 |
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 *
what() const noexcept
override {
return _msg.c_str(); };
31 const char *
message() const noexcept {
return what(); };
49 Conformer() : df_is3D(true), d_id(0), dp_mol(NULL) { d_positions.clear(); };
52 Conformer(
unsigned int numAtoms) : df_is3D(true), d_id(0), dp_mol(NULL) {
56 d_positions.resize(0);
70 void resize(
unsigned int size) { d_positions.resize(size); }
73 void reserve(
unsigned int size) { d_positions.reserve(size); }
95 return getAtomPos(rdcast<unsigned int>(atomId));
103 return getAtomPos(rdcast<unsigned int>(atomId));
109 if (atomId >= d_positions.size()) {
112 d_positions[atomId] = position;
117 return setAtomPos(rdcast<unsigned int>(atomId), position);
120 inline unsigned int getId()
const {
return d_id; }
123 inline void setId(
unsigned int id) { d_id = id; }
127 return rdcast<unsigned int>(d_positions.size());
129 inline bool is3D()
const {
return df_is3D; }
130 inline void set3D(
bool v) { df_is3D = v; }
144 void initFromOther(
const Conformer &conf);
155 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