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

XLogPCalculator. More...

+ Inheritance diagram for CDPL.MolProp.XLogPCalculator:

Public Member Functions

None __init__ ()
 Constructs the XLogPCalculator instance.
 
None __init__ (XLogPCalculator calc)
 Initializes a copy of the XLogPCalculator instance calc. More...
 
None __init__ (Chem.MolecularGraph molgraph)
 Constructs the LogSCalculator instance and calculates the \( \log P \) of the molecular graph molgraph. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
XLogPCalculator assign (XLogPCalculator calc)
 Replaces the current state of self with a copy of the state of the XLogPCalculator instance calc. More...
 
float calculate (Chem.MolecularGraph molgraph)
 Calculates the \( \log P \) of the molecular graph molgraph. More...
 
float getResult ()
 Returns the result of the last \( \log P \) calculation. More...
 
Math.DVector getFeatureVector ()
 Returns the feature count vector of the last \( \log P \) calculation. More...
 
Math.DVector getAtomContributions ()
 Returns the contribution of each atom the total obtained by the last \( \log P \) calculation. More...
 

Static Public Attributes

int FEATURE_VECTOR_SIZE = 101
 Specifies the number of different structural features used by the \( \log P \) model.
 

Properties

 objectID = property(getObjectID)
 
 result = property(getResult)
 

Detailed Description

XLogPCalculator.

See also
[XLOGP]

Constructor & Destructor Documentation

◆ __init__() [1/2]

None CDPL.MolProp.XLogPCalculator.__init__ ( XLogPCalculator  calc)

Initializes a copy of the XLogPCalculator instance calc.

Parameters
calcThe XLogPCalculator instance to copy.

◆ __init__() [2/2]

None CDPL.MolProp.XLogPCalculator.__init__ ( Chem.MolecularGraph  molgraph)

Constructs the LogSCalculator instance and calculates the \( \log P \) of the molecular graph molgraph.

The calculated \( \log P \) can be retrieved by a call to getResult().

Parameters
molgraphThe molecular graph for which to calculate the \( \log P \).

Member Function Documentation

◆ getObjectID()

int CDPL.MolProp.XLogPCalculator.getObjectID ( )

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

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

◆ assign()

XLogPCalculator CDPL.MolProp.XLogPCalculator.assign ( XLogPCalculator  calc)

Replaces the current state of self with a copy of the state of the XLogPCalculator instance calc.

Parameters
calcThe XLogPCalculator instance to copy.
Returns
self

◆ calculate()

float CDPL.MolProp.XLogPCalculator.calculate ( Chem.MolecularGraph  molgraph)

Calculates the \( \log P \) of the molecular graph molgraph.

Parameters
molgraphThe molecular graph for which to calculate the \( \log P \).
Returns
The calculated \( \log P \) of the molecular graph molgraph.

◆ getResult()

float CDPL.MolProp.XLogPCalculator.getResult ( )

Returns the result of the last \( \log P \) calculation.

Returns
The result of the last \( \log P \) calculation, or zero if a calculation has not yet been performed.

◆ getFeatureVector()

Math.DVector CDPL.MolProp.XLogPCalculator.getFeatureVector ( )

Returns the feature count vector of the last \( \log P \) calculation.

The occurrence count of a particular structural feature (atom type or correction factor feature) can be retrieved from the returned vector via its feature index. For atom type related features, the feature index correspond to the numerical identifier of the atom type in the original publication [XLOGP] minus 1. The feature indices of the various correction factors start at index 90 and are ordered according to their definition in the paper.

Returns
The feature count vector of the last \( \log P \) calculation.
Note
The returned feature vector is of size XLogPCalculator.FEATURE_VECTOR_SIZE.

◆ getAtomContributions()

Math.DVector CDPL.MolProp.XLogPCalculator.getAtomContributions ( )

Returns the contribution of each atom the total obtained by the last \( \log P \) calculation.

Returns
The contribution of each atom the total \( \log P \).
Note
The sum of the atom contributions does not necessarily equal the calculated molecule \( \log P \) and might be lower!
See also
XLogPCalculator.calculate()