11 #ifndef _RD_CONFORMER_H
12 #define _RD_CONFORMER_H
16 #include <boost/smart_ptr.hpp>
32 const char *
what() const noexcept
override {
return _msg.c_str(); }
57 d_positions.resize(0);
71 void resize(
unsigned int size) { d_positions.resize(size); }
74 void reserve(
unsigned int size) { d_positions.reserve(size); }
96 return getAtomPos(rdcast<unsigned int>(atomId));
104 return getAtomPos(rdcast<unsigned int>(atomId));
109 if (atomId == std::numeric_limits<unsigned int>::max()) {
112 if (atomId >= d_positions.size()) {
115 d_positions[atomId] = position;
120 return setAtomPos(rdcast<unsigned int>(atomId), position);
123 inline unsigned int getId()
const {
return d_id; }
126 inline void setId(
unsigned int id) { d_id = id; }
130 return rdcast<unsigned int>(d_positions.size());
132 inline bool is3D()
const {
return df_is3D; }
133 inline void set3D(
bool v) { df_is3D = v; }
144 unsigned int d_id{0};
145 ROMol *dp_mol{
nullptr};
147 void initFromOther(
const Conformer &conf);
158 if (p.z != 0.0)
return true;
#define PRECONDITION(expr, mess)
Class to allow us to throw a ValueError from C++ and have it make it back to Python.
#define RDKIT_GRAPHMOL_EXPORT
std::vector< Point3D > POINT3D_VECT
bool hasNonZeroZCoords(const Conformer &conf)
Returns true if any of the z coords are non zero, false otherwise.
boost::shared_ptr< Conformer > CONFORMER_SPTR