 |
RDKit
Open-source cheminformatics and machine learning.
|
Go to the documentation of this file.
11 #ifndef _RD_CONFORMER_H
12 #define _RD_CONFORMER_H
16 #include <boost/smart_ptr.hpp>
30 const char *
message()
const {
return _msg.c_str(); };
48 Conformer() : df_is3D(true), d_id(0), dp_mol(NULL) { d_positions.clear(); };
51 Conformer(
unsigned int numAtoms) : df_is3D(true), d_id(0), dp_mol(NULL) {
55 d_positions.resize(0);
69 void resize(
unsigned int size) { d_positions.resize(size); }
72 void reserve(
unsigned int size) { d_positions.reserve(size); }
94 return getAtomPos(rdcast<unsigned int>(atomId));
102 return getAtomPos(rdcast<unsigned int>(atomId));
108 if (atomId >= d_positions.size()) {
111 d_positions[atomId] = position;
116 return setAtomPos(rdcast<unsigned int>(atomId), position);
119 inline unsigned int getId()
const {
return d_id; }
122 inline void setId(
unsigned int id) { d_id = id; }
126 return rdcast<unsigned int>(d_positions.size());
128 inline bool is3D()
const {
return df_is3D; }
129 inline void set3D(
bool v) { df_is3D = v; }
133 void setOwningMol(
ROMol *mol);
136 void setOwningMol(
ROMol &mol);
143 void initFromOther(
const Conformer &conf);
154 if (p.z != 0.0)
return true;
bool hasNonZeroZCoords(const Conformer &conf)
Returns true if any of the z coords are non zero, false otherwise.
std::vector< Point3D > POINT3D_VECT
#define RDKIT_GRAPHMOL_EXPORT
#define PRECONDITION(expr, mess)
boost::shared_ptr< Conformer > CONFORMER_SPTR