Chemical Data Processing Library Python API - Version 1.1.1
Public Member Functions | Static Public Attributes | Properties | List of all members
CDPL.Chem.SymmetryClassCalculator Class Reference

SymmetryClassCalculator. More...

+ Inheritance diagram for CDPL.Chem.SymmetryClassCalculator:

Public Member Functions

None __init__ ()
 Constructs the SymmetryClassCalculator instance.
 
None __init__ (MolecularGraph molgraph, Util.STArray class_ids)
 Constructs the SymmetryClassCalculator instance and perceives the topological symmetry classes of the atoms in the molecular graph molgraph. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None setAtomPropertyFlags (int flags)
 Allows to specify the set of atomic properties that has to be considered in the perception of topological symmetry classes. More...
 
None setBondPropertyFlags (int flags)
 Allows to specify the set of bond properties that has to be considered in the perception of topological symmetry classes. More...
 
None includeImplicitHydrogens (bool include)
 Allows to specify whether implicit hydrogen atoms shall be ignored or treated in the same way as explicit ones. More...
 
int getAtomPropertyFlags ()
 Returns the set of atomic properties that gets considered in the perception of topological symmetry classes. More...
 
int getBondPropertyFlags ()
 Returns the set of bond properties that gets considered in the perception of topological symmetry classes. More...
 
bool implicitHydrogensIncluded ()
 Tells whether implicit hydrogen atoms are ignored or treated in the same way as explicit ones. More...
 
None calculate (MolecularGraph molgraph, Util.STArray class_ids)
 Perceives the topological symmetry classes of the atoms in the molecular graph molgraph. More...
 

Static Public Attributes

int DEF_ATOM_PROPERTY_FLAGS = 158
 Specifies the default set of atomic properties considered in the perception of topological symmetry classes.
 
int DEF_BOND_PROPERTY_FLAGS = 10
 Specifies the default set of bond properties considered in the perception of topological symmetry classes.
 

Properties

 objectID = property(getObjectID)
 
 atomPropertyFlags = property(getAtomPropertyFlags, setAtomPropertyFlags)
 
 bondPropertyFlags = property(getBondPropertyFlags, setBondPropertyFlags)
 
 hydrogenComplete = property(implicitHydrogensIncluded, includeImplicitHydrogens)
 

Detailed Description

SymmetryClassCalculator.

See also
[TOPSY]

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Chem.SymmetryClassCalculator.__init__ ( MolecularGraph  molgraph,
Util.STArray  class_ids 
)

Constructs the SymmetryClassCalculator instance and perceives the topological symmetry classes of the atoms in the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to perceive the symmetry classes.
class_idsAn array containing the perceived symmetry class IDs. The class IDs are stored in the same order as the atoms appear in the atom list of the molecular graph (i.e. the symmetry class of an atom is accessible via its index).

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.SymmetryClassCalculator.getObjectID ( )

Returns the numeric identifier (ID) of the wrapped C++ class instance.

Different Python SymmetryClassCalculator instances may reference the same underlying C++ class instance. The commonly used Python expression a is not b thus cannot tell reliably whether the two SymmetryClassCalculator instances a and b reference different C++ objects. The numeric identifier returned by this method allows to correctly implement such an identity test via the simple expression a.getObjectID() != b.getObjectID().

Returns
The numeric ID of the internally referenced C++ class instance.

◆ setAtomPropertyFlags()

None CDPL.Chem.SymmetryClassCalculator.setAtomPropertyFlags ( int  flags)

Allows to specify the set of atomic properties that has to be considered in the perception of topological symmetry classes.

The flags argument is an OR combination of the constants defined in namespace Chem.AtomPropertyFlag. Supported property flags are:

Parameters
flagsThe set of atomic properties to consider.
Note
The default set of atomic properties is specified by SymmetryClassCalculator.DEF_ATOM_PROPERTY_FLAGS.

◆ setBondPropertyFlags()

None CDPL.Chem.SymmetryClassCalculator.setBondPropertyFlags ( int  flags)

Allows to specify the set of bond properties that has to be considered in the perception of topological symmetry classes.

The flags argument is an OR combination of the constants defined in namespace Chem.BondPropertyFlag. Supported property flags are:

Parameters
flagsThe set of bond properties to consider.
Note
The default set of bond properties is specified by SymmetryClassCalculator.DEF_BOND_PROPERTY_FLAGS.

◆ includeImplicitHydrogens()

None CDPL.Chem.SymmetryClassCalculator.includeImplicitHydrogens ( bool  include)

Allows to specify whether implicit hydrogen atoms shall be ignored or treated in the same way as explicit ones.

Parameters
includeIf True, implicit hydrogen atoms are treated as if they were explicit and are ignored otherwise.
Note
By default, implicit hydrogen atoms are treated in the same way as explicit ones.

◆ getAtomPropertyFlags()

int CDPL.Chem.SymmetryClassCalculator.getAtomPropertyFlags ( )

Returns the set of atomic properties that gets considered in the perception of topological symmetry classes.

Returns
The set of considered atomic properties.
See also
setAtomPropertyFlags()

◆ getBondPropertyFlags()

int CDPL.Chem.SymmetryClassCalculator.getBondPropertyFlags ( )

Returns the set of bond properties that gets considered in the perception of topological symmetry classes.

Returns
The set of considered bond properties.
See also
setBondPropertyFlags()

◆ implicitHydrogensIncluded()

bool CDPL.Chem.SymmetryClassCalculator.implicitHydrogensIncluded ( )

Tells whether implicit hydrogen atoms are ignored or treated in the same way as explicit ones.

Returns
True if implicit hydrogen atoms are treated in the same way as explicit ones, and False if they are ignored.

◆ calculate()

None CDPL.Chem.SymmetryClassCalculator.calculate ( MolecularGraph  molgraph,
Util.STArray  class_ids 
)

Perceives the topological symmetry classes of the atoms in the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to perceive the symmetry classes.
class_idsAn array containing the perceived symmetry class IDs. The class IDs are stored in the same order as the atoms appear in the atom list of the molecular graph (i.e. the symmetry class of an atom is accessible via its index).