dt_Handle transform, container, molecule1, moleculeX;
  dt_String asmi;
  dt_Integer alen;

  /* 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);

  /* The next item gives the first molecule. */
  molecule1 = dt_next(container);
  asmi = dt_arbsmiles(&alen, molecule1, 0);
    printf("The molecule1 is %.*s.\n", alen, asmi);

  /* The next item gives the second molecule */
  moleculeX = dt_next(container);
  asmi = dt_arbsmiles(&alen, moleculeX, 0);
    printf("The moleculeX is %.*s.\n", alen, asmi);

  /* The next item is the NULL object. */
  moleculeX = dt_next(container);
  if (NULL_OB == moleculeX)
    printf("The NULL object is next.\n");

  /* A reset and next operation gives the first molecule again. */
  dt_reset(container);
  moleculeX = dt_next(container);
  if (moleculeX == molecule1)
    printf("Reset is like rewind.\n");
  /* The water ionization transform and a sequence containing
    water and hydroquinone molecules are transformed into
    ionized water and ionized hydroquinone reactions
    ("[OH-:1].[H+:2]" and "[O-:1]c1ccc(cc1)O.[H+:2]").  The
    atoms involved in the transformation are "mapped" by number. */

 
{
   
dt_Handle container2, container3, container4, reaction, atom;
   
dt_Integer tmap;
   
int i, j, k;

   
container2 = dt_transform(transform, container, DX_FORWARD, 0);
   
i=0;
   
while (NULL_OB != (reaction = dt_next(container2))) {
     
i++;
     
asmi = dt_arbsmiles(&alen, reaction, 0);
     
printf("Transformation reaction %d is %.*s.\n", i, alen, asmi);
     
asmi = dt_arbsmiles(&alen, reaction, 1);
     
printf("Transformation mappings %d is %.*s.\n", i, alen, asmi);
     
j=0;
     
container3 = dt_stream(reaction, TYP_MOLECULE);
     
while (NULL_OB != (moleculeX = dt_next(container3))) {
     
j++;
     
k=0;
     
container4 = dt_stream(moleculeX, TYP_ATOM);
     
while (NULL_OB != (atom = dt_next(container4))) {
       
k++;
       
asmi = dt_symbol(&alen, atom);
       
tmap = dt_integer(atom, 4, "tmap");
       
if (0 < tmap)
         
printf("Molecule %d atom %.*s%d is map class number %d.\n",
            
j, alen, asmi, k, tmap);
     
}
     
}
   
}
 
}

The molecule1 is O.
The moleculeX is Oc1ccc(cc1)O.
The NULL object is next.
Reset is like rewind.
Transformation reaction 1 is O.Oc1ccc(cc1)O>>[OH-].[H+].Oc1ccc(cc1)O.
Transformation mappings 1 is [OH:1][H:10].[OH:2][c:3]1[cH:9][cH:8][c:6]([cH:5][cH:4]1)[OH:7]>>[OH-:1].[OH:2][c:3]1[cH:9][cH:8][c:6]([cH:5][cH:4]1)[OH:7].[H+:10].
Molecule 1 atom O1 is map class number 1.
Molecule 1 atom H10 is map class number 2.
Molecule 2 atom O1 is map class number 1.
Molecule 2 atom H10 is map class number 2.
Transformation reaction 2 is O.Oc1ccc(cc1)O>>[OH-].[H+].Oc1ccc(cc1)O.
Transformation mappings 2 is [OH:1][H:10].[OH:2][c:3]1[cH:9][cH:8][c:6]([cH:5][cH:4]1)[OH:7]>>[OH-:1].[OH:2][c:3]1[cH:9][cH:8][c:6]([cH:5][cH:4]1)[OH:7].[H+:10].
Molecule 1 atom O1 is map class number 1.
Molecule 1 atom H10 is map class number 2.
Molecule 2 atom O1 is map class number 1.
Molecule 2 atom H10 is map class number 2.
Transformation reaction 3 is Oc1ccc(cc1)O.O>>[O-]c1ccc(cc1)O.[H+].O.
Transformation mappings 3 is [OH2:1].[O:2]([H:10])[c:3]1[cH:9][cH:8][c:6]([cH:5][cH:4]1)[OH:7]>>[OH2:1].[O-:2][c:3]1[cH:9][cH:8][c:6]([cH:5][cH:4]1)[OH:7].[H+:10].
Molecule 1 atom O2 is map class number 1.
Molecule 1 atom H10 is map class number 2.
Molecule 2 atom O2 is map class number 1.
Molecule 2 atom H10 is map class number 2.
Transformation reaction 4 is Oc1ccc(O)cc1.O>>[O-]c1ccc(O)cc1.[H+].O.
Transformation mappings 4 is [OH2:1].[OH:2][c:3]1[cH:9][cH:8][c:6]([cH:5][cH:4]1)[O:7][H:10]>>[OH2:1].[OH:2][c:3]1[cH:9][cH:8][c:6]([cH:5][cH:4]1)[O-:7].[H+:10].
Molecule 1 atom O7 is map class number 1.
Molecule 1 atom H10 is map class number 2.
Molecule 2 atom O7 is map class number 1.
Molecule 2 atom H10 is map class number 2.