Toolkit Tutorial: Programming


  dt_Handle molecule ;
 
dt_String csmi , asmi ;
 
dt_Integer clen , alen ;

 
/* Read SMILES in. */
 
molecule = dt_smilin ( 10 , "[OH-].[H+]" );

 
/* Write canonical form. */
 
csmi = dt_cansmiles ( & clen , molecule , 0 );
 
/* Write abitrary form. */
 
asmi = dt_arbsmiles ( & alen , molecule , 0 );

 
printf ( "Canonical form is %.*s and arbitrary form is %.*s.\n" ,
     
clen , csmi , alen , asmi );