RDKit
Open-source cheminformatics and machine learning.
RDKit::Conformer Class Reference

The class for representing 2D or 3D conformation of a molecule. More...

#include <Conformer.h>

Inheritance diagram for RDKit::Conformer:
RDKit::RDProps

Public Member Functions

 Conformer ()
 Constructor. More...
 
 Conformer (unsigned int numAtoms)
 Constructor with number of atoms specified ID specification. More...
 
 Conformer (const Conformer &other)
 Copy Constructor: initialize from a second conformation. More...
 
Conformeroperator= (const Conformer &other)
 
 ~Conformer ()
 Destructor. More...
 
void resize (unsigned int size)
 
void reserve (unsigned int size)
 Reserve more space for atom position. More...
 
bool hasOwningMol () const
 returns whether or not this instance belongs to a molecule More...
 
ROMolgetOwningMol () const
 Get the molecule that owns this instance. More...
 
const RDGeom::POINT3D_VECTgetPositions () const
 Get a const reference to the vector of atom positions. More...
 
RDGeom::POINT3D_VECTgetPositions ()
 Get a reference to the atom positions. More...
 
const RDGeom::Point3DgetAtomPos (unsigned int atomId) const
 Get the position of the specified atom. More...
 
template<class U >
const RDGeom::Point3DgetAtomPos (U atomId) const
 overload More...
 
RDGeom::Point3DgetAtomPos (unsigned int atomId)
 Get the position of the specified atom. More...
 
template<class U >
RDGeom::Point3DgetAtomPos (U atomId)
 overload More...
 
void setAtomPos (unsigned int atomId, const RDGeom::Point3D &position)
 Set the position of the specified atom. More...
 
template<class U >
void setAtomPos (U atomId, const RDGeom::Point3D &position)
 overload More...
 
unsigned int getId () const
 get the ID of this conformer More...
 
void setId (unsigned int id)
 set the ID of this conformer More...
 
unsigned int getNumAtoms () const
 Get the number of atoms. More...
 
bool is3D () const
 
void set3D (bool v)
 
- Public Member Functions inherited from RDKit::RDProps
 RDProps ()
 
 RDProps (const RDProps &rhs)
 
RDPropsoperator= (const RDProps &rhs)
 
void clear ()
 
const DictgetDict () const
 gets the underlying Dictionary More...
 
DictgetDict ()
 
STR_VECT getPropList (bool includePrivate=true, bool includeComputed=true) const
 returns a list with the names of our properties More...
 
template<typename T >
void setProp (const std::string &key, T val, bool computed=false) const
 sets a property value More...
 
template<typename T >
void getProp (const std::string &key, T &res) const
 allows retrieval of a particular property value More...
 
template<typename T >
getProp (const std::string &key) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
template<typename T >
bool getPropIfPresent (const std::string &key, T &res) const
 
bool hasProp (const std::string &key) const
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
void clearProp (const std::string &key) const
 clears the value of a property More...
 
void clearComputedProps () const
 clears all of our computed properties More...
 
void updateProps (const RDProps &source, bool preserveExisting=false)
 update the properties from another More...
 

Protected Member Functions

void setOwningMol (ROMol *mol)
 Set owning moelcule. More...
 
void setOwningMol (ROMol &mol)
 Set owning moelcule. More...
 

Friends

class ROMol
 

Additional Inherited Members

- Protected Attributes inherited from RDKit::RDProps
Dict d_props
 

Detailed Description

The class for representing 2D or 3D conformation of a molecule.

This class contains

  • a pointer to the owing molecule
  • a vector of 3D points (positions of atoms)

Definition at line 43 of file Conformer.h.

Constructor & Destructor Documentation

◆ Conformer() [1/3]

RDKit::Conformer::Conformer ( )
inline

Constructor.

Definition at line 48 of file Conformer.h.

◆ Conformer() [2/3]

RDKit::Conformer::Conformer ( unsigned int  numAtoms)
inline

Constructor with number of atoms specified ID specification.

Definition at line 51 of file Conformer.h.

◆ Conformer() [3/3]

RDKit::Conformer::Conformer ( const Conformer other)

Copy Constructor: initialize from a second conformation.

◆ ~Conformer()

RDKit::Conformer::~Conformer ( )
inline

Destructor.

Definition at line 65 of file Conformer.h.

Member Function Documentation

◆ getAtomPos() [1/4]

template<class U >
RDGeom::Point3D& RDKit::Conformer::getAtomPos ( atomId)
inline

overload

Definition at line 101 of file Conformer.h.

◆ getAtomPos() [2/4]

template<class U >
const RDGeom::Point3D& RDKit::Conformer::getAtomPos ( atomId) const
inline

overload

Definition at line 93 of file Conformer.h.

◆ getAtomPos() [3/4]

RDGeom::Point3D& RDKit::Conformer::getAtomPos ( unsigned int  atomId)

Get the position of the specified atom.

◆ getAtomPos() [4/4]

const RDGeom::Point3D& RDKit::Conformer::getAtomPos ( unsigned int  atomId) const

Get the position of the specified atom.

◆ getId()

unsigned int RDKit::Conformer::getId ( ) const
inline

get the ID of this conformer

Definition at line 119 of file Conformer.h.

◆ getNumAtoms()

unsigned int RDKit::Conformer::getNumAtoms ( ) const
inline

Get the number of atoms.

Definition at line 125 of file Conformer.h.

◆ getOwningMol()

ROMol& RDKit::Conformer::getOwningMol ( ) const
inline

Get the molecule that owns this instance.

Definition at line 78 of file Conformer.h.

References PRECONDITION.

◆ getPositions() [1/2]

RDGeom::POINT3D_VECT& RDKit::Conformer::getPositions ( )

Get a reference to the atom positions.

◆ getPositions() [2/2]

const RDGeom::POINT3D_VECT& RDKit::Conformer::getPositions ( ) const

Get a const reference to the vector of atom positions.

Referenced by RDKit::hasNonZeroZCoords().

◆ hasOwningMol()

bool RDKit::Conformer::hasOwningMol ( ) const
inline

returns whether or not this instance belongs to a molecule

Definition at line 75 of file Conformer.h.

◆ is3D()

bool RDKit::Conformer::is3D ( ) const
inline

Definition at line 128 of file Conformer.h.

◆ operator=()

Conformer& RDKit::Conformer::operator= ( const Conformer other)

◆ reserve()

void RDKit::Conformer::reserve ( unsigned int  size)
inline

Reserve more space for atom position.

Definition at line 72 of file Conformer.h.

◆ resize()

void RDKit::Conformer::resize ( unsigned int  size)
inline

Resize the conformer so that more atoms location can be added. Useful, for e.g., when adding hydrogens

Definition at line 69 of file Conformer.h.

◆ set3D()

void RDKit::Conformer::set3D ( bool  v)
inline

Definition at line 129 of file Conformer.h.

◆ setAtomPos() [1/2]

template<class U >
void RDKit::Conformer::setAtomPos ( atomId,
const RDGeom::Point3D position 
)
inline

overload

Definition at line 115 of file Conformer.h.

◆ setAtomPos() [2/2]

void RDKit::Conformer::setAtomPos ( unsigned int  atomId,
const RDGeom::Point3D position 
)
inline

Set the position of the specified atom.

Definition at line 106 of file Conformer.h.

◆ setId()

void RDKit::Conformer::setId ( unsigned int  id)
inline

set the ID of this conformer

Definition at line 122 of file Conformer.h.

◆ setOwningMol() [1/2]

void RDKit::Conformer::setOwningMol ( ROMol mol)
protected

Set owning moelcule.

◆ setOwningMol() [2/2]

void RDKit::Conformer::setOwningMol ( ROMol mol)
protected

Set owning moelcule.

Friends And Related Function Documentation

◆ ROMol

friend class ROMol
friend

Definition at line 45 of file Conformer.h.


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