Example Program: CANSMI
(in $DY_ROOT/contrib/src/c/smiles/)
What it does:
Generates unique SMILES. Takes SMILES strings on input, makes an object,
generates unique SMILES and prints them on output.
What it illustrates:
-
As the prototypical toolkit program, it shows the polymorphism at work.
-
dt_smilin()
returns either a reaction or molecule
object for the given SMILES string.
-
dt_cansmiles()
accepts either a reaction or molecule
object.
-
Don't assume object types. If absolutely necessary, check them, but
otherwise, think in terms of reactions and molecules being the same
object.
Other examples: rings, showparts, smarts_filter, hbonds, depict_usage_[1-6]