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

Assigns Cahn-Ingold-Prelog (CIP) configuration labels to stereogenic atoms and bonds of a molecular graph. More...

#include <CIPConfigurationLabeler.hpp>

Public Types

typedef std::shared_ptr< CIPConfigurationLabelerSharedPointer
 A reference-counted smart pointer [SHPTR] for dynamically allocated CIPConfigurationLabeler instances. More...
 

Public Member Functions

 CIPConfigurationLabeler ()
 Constructs the CIPConfigurationLabeler instance without an associated molecular graph. More...
 
 CIPConfigurationLabeler (const MolecularGraph &molgraph)
 Constructs the CIPConfigurationLabeler instance and prepares it for molgraph. More...
 
 CIPConfigurationLabeler (const CIPConfigurationLabeler &labeler)
 Constructs a copy of the CIPConfigurationLabeler instance labeler. More...
 
 ~CIPConfigurationLabeler ()
 Destructor. More...
 
void setup (const MolecularGraph &molgraph)
 Prepares the labeler to assign CIP descriptors for the molecular graph molgraph. More...
 
unsigned int getLabel (const Atom &atom)
 Returns the CIP descriptor of the stereogenic atom atom. More...
 
unsigned int getLabel (const Bond &bond)
 Returns the CIP descriptor of the stereogenic bond bond. More...
 
CIPConfigurationLabeleroperator= (const CIPConfigurationLabeler &labeler)
 Replaces the state of this labeler by a copy of the state of labeler. More...
 

Detailed Description

Assigns Cahn-Ingold-Prelog (CIP) configuration labels to stereogenic atoms and bonds of a molecular graph.

After calling setup() for a molecular graph the per-atom or per-bond CIP descriptor can be queried via the getLabel() overloads. The implementation is largely based on John Mayfield's Java implementation of the CIP sequence rules [CIPJM].

See also
Chem::CIPDescriptor
Since
1.1

Member Typedef Documentation

◆ SharedPointer

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

Constructor & Destructor Documentation

◆ CIPConfigurationLabeler() [1/3]

CDPL::Chem::CIPConfigurationLabeler::CIPConfigurationLabeler ( )

Constructs the CIPConfigurationLabeler instance without an associated molecular graph.

◆ CIPConfigurationLabeler() [2/3]

CDPL::Chem::CIPConfigurationLabeler::CIPConfigurationLabeler ( const MolecularGraph molgraph)

Constructs the CIPConfigurationLabeler instance and prepares it for molgraph.

Parameters
molgraphThe molecular graph to label.

◆ CIPConfigurationLabeler() [3/3]

CDPL::Chem::CIPConfigurationLabeler::CIPConfigurationLabeler ( const CIPConfigurationLabeler labeler)

Constructs a copy of the CIPConfigurationLabeler instance labeler.

Parameters
labelerThe CIPConfigurationLabeler to copy.

◆ ~CIPConfigurationLabeler()

CDPL::Chem::CIPConfigurationLabeler::~CIPConfigurationLabeler ( )

Destructor.

Member Function Documentation

◆ setup()

void CDPL::Chem::CIPConfigurationLabeler::setup ( const MolecularGraph molgraph)

Prepares the labeler to assign CIP descriptors for the molecular graph molgraph.

Parameters
molgraphThe molecular graph to label.

◆ getLabel() [1/2]

unsigned int CDPL::Chem::CIPConfigurationLabeler::getLabel ( const Atom atom)

Returns the CIP descriptor of the stereogenic atom atom.

Parameters
atomThe atom whose CIP descriptor is queried.
Returns
One of the Chem::CIPDescriptor values.

◆ getLabel() [2/2]

unsigned int CDPL::Chem::CIPConfigurationLabeler::getLabel ( const Bond bond)

Returns the CIP descriptor of the stereogenic bond bond.

Parameters
bondThe bond whose CIP descriptor is queried.
Returns
One of the Chem::CIPDescriptor values.

◆ operator=()

CIPConfigurationLabeler& CDPL::Chem::CIPConfigurationLabeler::operator= ( const CIPConfigurationLabeler labeler)

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

Parameters
labelerThe source CIPConfigurationLabeler.
Returns
A reference to itself.

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