RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::CIPLabeler Namespace Reference

Classes

class  MaxIterationsExceeded
class  CIPMolSpan
class  CIPMol
class  AtropisomerBond
class  Configuration
class  Sp2Bond
class  Tetrahedral
class  Digraph
class  Edge
class  FractionalAtomicNum
class  Node
class  Priority
class  PairList
class  Rule1a
class  Rule1b
class  Rule2
class  Rule3
class  Rule4a
class  Rule4b
class  Rule4c
class  Rule5
class  Rule5New
class  Rule6
class  Rules
class  SequenceRule
class  Sort
class  TooManyNodesException

Functions

RDKIT_CIPLABELER_EXPORT void assignCIPLabels (ROMol &mol, unsigned int maxRecursiveIterations=0)
RDKIT_CIPLABELER_EXPORT void assignCIPLabels (ROMol &mol, const boost::dynamic_bitset<> &atoms, const boost::dynamic_bitset<> &bonds, unsigned int maxRecursiveIterations=0)
std::vector< FractionalAtomicNum > calcFracAtomNums (const CIPMol &mol)

Variables

constexpr unsigned int IMPLICITH
enum class  Descriptor : uint8_t {
  NONE , UNKNOWN , ns , R ,
  S , r , s , seqTrans ,
  seqCis , E , Z , M ,
  P , m , p , SP_4 ,
  TBPY_5 , OC_6
}
static std::string to_string (const Descriptor &desc)

Enumeration Type Documentation

◆ Descriptor

enum class RDKit::CIPLabeler::Descriptor : uint8_t
strong

Defines a descriptor which can be assigned to an atom to indicate the type of chirality (if there is any). Each descriptor defines its generallink Type} which can be useful when comparing centres of different geometry.

Enumerator
NONE 
UNKNOWN 
ns 
R 

Tetrahedral

S 
r 
s 
seqTrans 

Cis/Trans

seqCis 
E 
Z 
M 
P 
m 
p 
SP_4 
TBPY_5 
OC_6 

Definition at line 26 of file Descriptor.h.

Function Documentation

◆ assignCIPLabels() [1/2]

RDKIT_CIPLABELER_EXPORT void RDKit::CIPLabeler::assignCIPLabels ( ROMol & mol,
const boost::dynamic_bitset<> & atoms,
const boost::dynamic_bitset<> & bonds,
unsigned int maxRecursiveIterations = 0 )

Overload that allows selecting which atoms and/or bonds will be labeled.

Parameters
mol- the molecule to be labelled.
atoms- bitset with the atom indexes to be labeled. The bitset must have mol.getNumAtoms() bits. Unselected atom configurations may still be used as auxiliary stereochemical dependencies, but their primary labels are not written.
bonds- bitset with the bond indexes to be labeled. The bitset must have mol.getNumBonds() bits. Unselected bond configurations may still be used as auxiliary stereochemical dependencies, but their primary labels are not written.
maxRecursiveIterations- maximum total number of recursive comparisons across the preliminary and full labeling passes. A value of zero means no caller-specified limit. A value of 1,250,000 takes about 1 second. Most structures require fewer than 10,000 comparisons. A peptide with MW~3000 took about 100 comparisons, and a 20,000 MW protein took about 600 comparisons.
Note
Partial labeling does not set common_properties::_CIPComputed, which denotes a complete molecule-wide calculation.

References RDKIT_CIPLABELER_EXPORT.

◆ assignCIPLabels() [2/2]

RDKIT_CIPLABELER_EXPORT void RDKit::CIPLabeler::assignCIPLabels ( ROMol & mol,
unsigned int maxRecursiveIterations = 0 )

Calculate Stereochemical labels based on an accurate implementation of the CIP rules.

This is a C++ port of https://github.com/SiMolecule/centres, which was originally written by John Mayfield in Java. The original algorithm was described in:

Hanson, R. M., Musacchio, S., Mayfield, J. W., Vainio, M. J., Yerin, A., Redkin, D. Algorithmic Analysis of Cahn–Ingold–Prelog Rules of Stereochemistry: Proposals for Revised Rules and a Guide for Machine Implementation. J. Chem. Inf. Model. 2018, 58, 1755-1765.

Parameters
mol- the molecule to be labelled.
Note
only atoms with chiral tags and double bonds with proper bond directions will be labelled.
Labels will be stored under the common_properties::_CIPCode property of the relevant atoms/bonds.
Parameters
maxRecursiveIterations- maximum total number of recursive comparisons across all labeling passes; zero means no caller-specified limit.

References RDKIT_CIPLABELER_EXPORT.

◆ calcFracAtomNums()

std::vector< FractionalAtomicNum > RDKit::CIPLabeler::calcFracAtomNums ( const CIPMol & mol)

Calculate fractional atomic numbers for all atoms in the mol. Using fractional atomic numbers makes sure that atoms in rings that have resonant structures are always considered with the same priority.

◆ to_string()

std::string RDKit::CIPLabeler::to_string ( const Descriptor & desc)
static

Definition at line 55 of file Descriptor.h.

References E, M, m, NONE, ns, OC_6, P, p, R, r, S, s, seqCis, seqTrans, SP_4, TBPY_5, UNKNOWN, and Z.

Referenced by RDKit::CIPLabeler::PairList::toString().

Variable Documentation

◆ IMPLICITH

unsigned int RDKit::CIPLabeler::IMPLICITH
inlineconstexpr
Initial value:
=
std::numeric_limits<unsigned int>::max()

Definition at line 28 of file Configuration.h.