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....



FragmentCode


Unit:SDL_cstruct
Class:TCTab
Declaration:function FragmentCode (AtIx: integer; var NOuterBonds: integer): longint;

The method FragmentCode calculates a fragment code representing augmented atoms, which are equivalent to 1-sphere HOSE codes. The parameter AtIx specifies the index of the atom for which the fragment code is to be calculated. The function returns the fragment code as its value and the number of bonds which go out of the first sphere in the variable parameter NOuterBonds.

The returned fragment code is a 32-bit integer value, which is positive, if the code is valid. The resulting code is unique and reversible. A negative value indicates one of the following errors:

-1 invalid atom in structure
-2 too many neighboring atoms (more than 4)

Note that this fragment code can only be applied to structural fragments which do not contain atoms other then the following:

H, B, C, N, O, F, Si, P, S, Cl, As, Br, Sn, I

The code developed by FragmentCode can be transferred into an easy-to-interpret string by using the function FragmentStr.

Hint: Do not mix up FragmentCode with FragmentCount !


Last Update: 2012-Oct-20