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

Adjusts the protonation state of a molecule (atom formal charges and bonded hydrogen counts) according to one of several pre-defined objectives. More...

+ Inheritance diagram for CDPL.Chem.ProtonationStateStandardizer:

Classes

class  Flavor
 Selects the objective driving the protonation-state adjustment. More...
 

Public Member Functions

None __init__ ()
 Constructs the ProtonationStateStandardizer instance.
 
None __init__ (ProtonationStateStandardizer standardizer)
 Constructs a copy of the ProtonationStateStandardizer instance standardizer. More...
 
int getObjectID ()
 Returns the numeric identifier (ID) of the wrapped C++ class instance. More...
 
ProtonationStateStandardizer assign (ProtonationStateStandardizer standardizer)
 Replaces the state of this standardizer by a copy of the state of standardizer. More...
 
bool standardize (Molecule mol, Flavor flavor)
 Adjusts the protonation state of mol in place according to the selected flavor. More...
 
bool standardize (Molecule mol, Molecule std_mol, Flavor flavor)
 Writes a standardized copy of mol to std_mol without modifying mol. More...
 

Properties

 objectID = property(getObjectID)
 

Detailed Description

Adjusts the protonation state of a molecule (atom formal charges and bonded hydrogen counts) according to one of several pre-defined objectives.

Constructor & Destructor Documentation

◆ __init__()

None CDPL.Chem.ProtonationStateStandardizer.__init__ ( ProtonationStateStandardizer  standardizer)

Constructs a copy of the ProtonationStateStandardizer instance standardizer.

Parameters
standardizerThe ProtonationStateStandardizer to copy.

Member Function Documentation

◆ getObjectID()

int CDPL.Chem.ProtonationStateStandardizer.getObjectID ( )

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

Different Python ProtonationStateStandardizer 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 ProtonationStateStandardizer 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()

ProtonationStateStandardizer CDPL.Chem.ProtonationStateStandardizer.assign ( ProtonationStateStandardizer  standardizer)

Replaces the state of this standardizer by a copy of the state of standardizer.

Parameters
standardizerThe source ProtonationStateStandardizer.
Returns
self

◆ standardize() [1/2]

bool CDPL.Chem.ProtonationStateStandardizer.standardize ( Molecule  mol,
Flavor  flavor 
)

Adjusts the protonation state of mol in place according to the selected flavor.

Parameters
molThe molecule to standardize (modified in place).
flavorThe protonation-state objective.
Returns
True if the molecule was modified, and False otherwise.

◆ standardize() [2/2]

bool CDPL.Chem.ProtonationStateStandardizer.standardize ( Molecule  mol,
Molecule  std_mol,
Flavor  flavor 
)

Writes a standardized copy of mol to std_mol without modifying mol.

Parameters
molThe input molecule.
std_molThe output molecule receiving the standardized copy.
flavorThe protonation-state objective.
Returns
True if the output differs from the input, and False otherwise.