Most structure generators regard chemical compounds as graphs, i.e. as a set of vertices (the atoms, depleted of hydrogens) connected by edges of different degree (the bonds). This is also the basic concept on which the generator MOLGEN works, which was used here. MOLGEN [19]-[24] provides the exhaustive and irredundant set of isomers that correspond to the given input data.
The first part of input has to be the empirical formula of the molecule: all atoms together with their multiplicity in the molecule and their valence (for common organic atoms like C, N and O the valence is pre-defined). If run with that information alone, MOLGEN will yield the complete set of isomers, which is often a huge amount of structures. For example, there exist 38,496,539 isomers to CHNO [20]. So it is highly recommended to apply further restrictions. The most important ones are substructures. In MOLGEN, there are three different types of substructures: macroatoms (must occur, but may not overlap one another), goodlist (must occur, may overlap) and badlist (mustn't occur). When investigating certain classes of substances, the main functional group can be prescribed as a macroatom. So the number of isomers is reduced drastically.
The actual generation is carried out by algorithms based on group actions and double coset theory; details can be found elsewhere [19,20,24,25].