Chemical Data Processing Library Python API - Version 1.0.0
Public Member Functions | Properties | List of all members
CDPL.Chem.BondDirectionCalculator Class Reference

BondDirectionCalculator. More...

+ Inheritance diagram for CDPL.Chem.BondDirectionCalculator:

Public Member Functions

None __init__ ()
 Construcst the BondDirectionCalculator instance.
 
None __init__ (MolecularGraph molgraph, Util.UIArray dirs)
 Constructs the BondDirectionCalculator instance and calculates direction flags for a minimum set of directional bonds that unambiguously define the configuration of double bonds in the molecular graph molgraph. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
None includeRingBonds (bool include)
 Allows to specify whether or not the configuration of ring double bonds shall also be regarded in the performed bond direction calculations. More...
 
bool ringBondsIncluded ()
 Tells whether the configuration of ring double bonds is also regarded in the performed bond direction calculations. More...
 
None setRingSizeLimit (int min_size)
 Sets the minimum ring size that is required for ring double bonds to be considered in the performed bond direction calculations. More...
 
int getRingSizeLimit ()
 Returns the minimum ring size that is required for ring double bonds to be considered in the performed bond direction calculations. More...
 
None calculate (MolecularGraph molgraph, Util.UIArray dirs)
 Calculates direction flags for a minimum set of directional bonds that unambiguously define the configuration of double bonds in the molecular graph molgraph. More...
 

Properties

 objectID = property(getObjectID)
 
 ringSizeLimit = property(getRingSizeLimit, setRingSizeLimit)
 
 incRingBonds = property(ringBondsIncluded, includeRingBonds)
 

Detailed Description

BondDirectionCalculator.

See also
[SMILES]

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Chem.BondDirectionCalculator.__init__ ( MolecularGraph  molgraph,
Util.UIArray  dirs 
)

Constructs the BondDirectionCalculator instance and calculates direction flags for a minimum set of directional bonds that unambiguously define the configuration of double bonds in the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to calculate the bond direction flags.
dirsAn array containing the calculated bond direction flags (possible values are defined as constants in namespace Chem.BondDirection). The directions are stored in the same order as the bonds appear in the bond list of the molecular graph (i.e. the direction flag of a bond is accessible via its index).

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.BondDirectionCalculator.getObjectID ( )

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

Different Python BondDirectionCalculator 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 BondDirectionCalculator 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.

◆ includeRingBonds()

None CDPL.Chem.BondDirectionCalculator.includeRingBonds ( bool  include)

Allows to specify whether or not the configuration of ring double bonds shall also be regarded in the performed bond direction calculations.

Parameters
includeIf True, ring double bond geometries will be taken into consideration and get ignored otherwise.
Note
By default, the configuration of ring double bonds is taken into consideration.
See also
setRingSizeLimit()

◆ ringBondsIncluded()

bool CDPL.Chem.BondDirectionCalculator.ringBondsIncluded ( )

Tells whether the configuration of ring double bonds is also regarded in the performed bond direction calculations.

Returns
True if ring double bond geometries are taken into consideration, and False otherwise.
See also
setRingSizeLimit()

◆ setRingSizeLimit()

None CDPL.Chem.BondDirectionCalculator.setRingSizeLimit ( int  min_size)

Sets the minimum ring size that is required for ring double bonds to be considered in the performed bond direction calculations.

Parameters
min_sizeThe minimum required ring size.
Note
The default minimum ring size is set to 8. This settings is only effective when the general inclusion of ring double bonds is not disabled (see includeRingBonds()).

◆ getRingSizeLimit()

int CDPL.Chem.BondDirectionCalculator.getRingSizeLimit ( )

Returns the minimum ring size that is required for ring double bonds to be considered in the performed bond direction calculations.

Returns
The minimum required ring size.

◆ calculate()

None CDPL.Chem.BondDirectionCalculator.calculate ( MolecularGraph  molgraph,
Util.UIArray  dirs 
)

Calculates direction flags for a minimum set of directional bonds that unambiguously define the configuration of double bonds in the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to calculate the bond direction flags.
dirsAn array containing the calculated bond direction flags (possible values are defined as constants in namespace Chem.BondDirection). The directions are stored in the same order as the bonds appear in the bond list of the molecular graph (i.e. the direction flag of a bond is accessible via its index).