Chemical Data Processing Library C++ API - Version 1.4.0
Public Types | Public Member Functions | Static Public Attributes | List of all members
CDPL::Chem::DefaultMultiConfMoleculeInputProcessor Class Reference

Default Chem::MultiConfMoleculeInputProcessor implementation that detects multi-conformer input by comparing atom and bond properties (and optionally molecule names) between successive input molecules. More...

#include <DefaultMultiConfMoleculeInputProcessor.hpp>

+ Inheritance diagram for CDPL::Chem::DefaultMultiConfMoleculeInputProcessor:

Public Types

typedef std::shared_ptr< DefaultMultiConfMoleculeInputProcessorSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated DefaultMultiConfMoleculeInputProcessor instances. More...
 
- Public Types inherited from CDPL::Chem::MultiConfMoleculeInputProcessor
typedef std::shared_ptr< MultiConfMoleculeInputProcessorSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated MultiConfMoleculeInputProcessor implementations. More...
 

Public Member Functions

 DefaultMultiConfMoleculeInputProcessor (bool comp_names=true, unsigned int atom_flags=DEF_ATOM_PROPERTY_FLAGS, unsigned int bond_flags=DEF_BOND_PROPERTY_FLAGS)
 Constructs the processor with the given property-comparison configuration. More...
 
bool init (MolecularGraph &tgt_molgraph) const
 Initializes the processor state for tgt_molgraph as the new conformer-collection target. More...
 
bool isConformation (MolecularGraph &tgt_molgraph, MolecularGraph &conf_molgraph) const
 Tells whether conf_molgraph is a conformer of the already-accumulated tgt_molgraph. More...
 
bool addConformation (MolecularGraph &tgt_molgraph, MolecularGraph &conf_molgraph) const
 Adds the atom-coordinate set of conf_molgraph as a new conformer to tgt_molgraph. More...
 
- Public Member Functions inherited from CDPL::Chem::MultiConfMoleculeInputProcessor
virtual ~MultiConfMoleculeInputProcessor ()
 Virtual destructor. More...
 

Static Public Attributes

static constexpr unsigned int DEF_ATOM_PROPERTY_FLAGS
 Specifies the default set of atom properties considered when checking conformer compatibility. More...
 
static constexpr unsigned int DEF_BOND_PROPERTY_FLAGS
 Specifies the default set of bond properties considered when checking conformer compatibility. More...
 

Detailed Description

Default Chem::MultiConfMoleculeInputProcessor implementation that detects multi-conformer input by comparing atom and bond properties (and optionally molecule names) between successive input molecules.

Member Typedef Documentation

◆ SharedPointer

A reference-counted smart pointer [SHPTR] for dynamically allocated DefaultMultiConfMoleculeInputProcessor instances.

Constructor & Destructor Documentation

◆ DefaultMultiConfMoleculeInputProcessor()

CDPL::Chem::DefaultMultiConfMoleculeInputProcessor::DefaultMultiConfMoleculeInputProcessor ( bool  comp_names = true,
unsigned int  atom_flags = DEF_ATOM_PROPERTY_FLAGS,
unsigned int  bond_flags = DEF_BOND_PROPERTY_FLAGS 
)

Constructs the processor with the given property-comparison configuration.

Parameters
comp_namesIf true, the molecule name property must agree between successive conformers.
atom_flagsThe bitwise-OR combination of Chem::AtomPropertyFlag values that must agree atom-wise.
bond_flagsThe bitwise-OR combination of Chem::BondPropertyFlag values that must agree bond-wise.

Member Function Documentation

◆ init()

bool CDPL::Chem::DefaultMultiConfMoleculeInputProcessor::init ( MolecularGraph tgt_molgraph) const
virtual

Initializes the processor state for tgt_molgraph as the new conformer-collection target.

Parameters
tgt_molgraphThe molecular graph that will accumulate conformers.
Returns
true if the target was successfully initialized, and false otherwise.

Implements CDPL::Chem::MultiConfMoleculeInputProcessor.

◆ isConformation()

bool CDPL::Chem::DefaultMultiConfMoleculeInputProcessor::isConformation ( MolecularGraph tgt_molgraph,
MolecularGraph conf_molgraph 
) const
virtual

Tells whether conf_molgraph is a conformer of the already-accumulated tgt_molgraph.

Parameters
tgt_molgraphThe current conformer-collection target.
conf_molgraphThe candidate conformer molecular graph.
Returns
true if conf_molgraph matches tgt_molgraph under the configured comparison flags, and false otherwise.

Implements CDPL::Chem::MultiConfMoleculeInputProcessor.

◆ addConformation()

bool CDPL::Chem::DefaultMultiConfMoleculeInputProcessor::addConformation ( MolecularGraph tgt_molgraph,
MolecularGraph conf_molgraph 
) const
virtual

Adds the atom-coordinate set of conf_molgraph as a new conformer to tgt_molgraph.

Parameters
tgt_molgraphThe conformer-collection target.
conf_molgraphThe conformer to add.
Returns
true if the conformer was added, and false if the addition failed (e.g. coordinate mismatch).

Implements CDPL::Chem::MultiConfMoleculeInputProcessor.

Member Data Documentation

◆ DEF_ATOM_PROPERTY_FLAGS

constexpr unsigned int CDPL::Chem::DefaultMultiConfMoleculeInputProcessor::DEF_ATOM_PROPERTY_FLAGS
staticconstexpr
Initial value:
=
constexpr unsigned int FORMAL_CHARGE
Specifies the formal charge of an atom.
Definition: Chem/AtomPropertyFlag.hpp:73
constexpr unsigned int ISOTOPE
Specifies the isotopic mass of an atom.
Definition: Chem/AtomPropertyFlag.hpp:68
constexpr unsigned int TYPE
Specifies the generic type or element of an atom.
Definition: Chem/AtomPropertyFlag.hpp:63

Specifies the default set of atom properties considered when checking conformer compatibility.

◆ DEF_BOND_PROPERTY_FLAGS

constexpr unsigned int CDPL::Chem::DefaultMultiConfMoleculeInputProcessor::DEF_BOND_PROPERTY_FLAGS
staticconstexpr
Initial value:
=
constexpr unsigned int ORDER
Specifies the order of a bond.
Definition: BondPropertyFlag.hpp:63

Specifies the default set of bond properties considered when checking conformer compatibility.


The documentation for this class was generated from the following file: