The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Class: TCTab
Declaration: function SearchSubStruc (CTabSmall: TCTab; var MatchedAtoms: AtFlagType; CompareBonds: boolean): boolean;

The method SearchSubStruc searches the structure CTabSmall in the current structure and returns TRUE if the structure CTabSmall has been recognized as a partial structure. If the parameter CompareBonds is TRUE the type of the bonds are also considered during the comparison of the structures. The variable array parameter MatchedAtoms contains a non-zero value for each atom which matches the structure CTabSmall.

The search algorithm first evaluates the molecular formulas. If the molecular formula of the structure CTabSmall is contained the number of rings in both structures are checked. If the number of rings in CTabSmall is less or equal to current structure an atom-by-atom search is started using a graph tree representation of the structures (see figure below) and the atomic attributes calculated by CalcAttributes.


Please note that a substructure search may require considerable time if the two structures are large, have many rings and do not contain any hetero atoms.

Last Update: 2012-Okt-20