dt_Handle molecule, atom;
dt_Integer acount, bcount, ccount;
molecule = dt_alloc_mol();
dt_mod_on(molecule);
atom = dt_addatom(molecule, 8, 2);
dt_mod_off(molecule);
acount = dt_count(molecule, TYP_ATOM);
bcount = dt_count(molecule, TYP_BOND);
ccount = dt_count(molecule, TYP_CYCLE);
printf("There is %d atom, %d bonds, and %d cycles.\n",
acount, bcount, ccount);
There is 1 atom, 0 bonds, and 0 cycles.
|