dt_Handle transform, container, molecule1, moleculeX;
dt_String asmi;
dt_Integer slen;
/* Read SMIRKS in. */
transform = dt_smirkin(25, "[O:1][H:2]>>[O-:1].[H+:2]");
/* Put molecules in the sequence. */
container = dt_alloc_seq();
molecule1 = dt_smilin(1, "O");
dt_append(container, molecule1);
moleculeX = dt_smilin(12, "Oc1ccc(O)cc1");
dt_append(container, moleculeX);
molecule1 = dt_next(container);
asmi = dt_arbsmiles(&alen, molecule1, 0);
printf("The molecule1 is %.*s.\n", alen, asmi);
moleculeX = dt_next(container);
asmi = dt_arbsmiles(&alen, moleculeX, 0);
printf("The moleculeX is %.*s.\n", alen, asmi);
moleculeX = dt_next(container);
if (NULL_OB == moleculeX)
printf("The NULL object is next.\n");
dt_reset(container);
moleculeX = dt_next(container);
if (moleculeX == molecule1)
printf("Reset is like rewind.\n");
The molecule1 is O.
The moleculeX is Oc1ccc(cc1)O.
The NULL object is next.
Reset is like rewind.
|