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);
67 df_is3D(std::move(o.df_is3D)),
68 d_id(std::move(o.d_id)),
69 dp_mol(std::move(o.dp_mol)),
70 d_positions(std::move(o.d_positions)){};
76 df_is3D = std::move(o.df_is3D);
77 d_id = std::move(o.d_id);
78 dp_mol = std::move(o.dp_mol);
79 d_positions = std::move(o.d_positions);
87 void resize(
unsigned int size) { d_positions.resize(size); }
90 void reserve(
unsigned int size) { d_positions.reserve(size); }
112 return getAtomPos(rdcast<unsigned int>(atomId));
120 return getAtomPos(rdcast<unsigned int>(atomId));
125 if (atomId == std::numeric_limits<unsigned int>::max()) {
128 if (atomId >= d_positions.size()) {
131 d_positions[atomId] = position;
136 return setAtomPos(rdcast<unsigned int>(atomId), position);
139 inline unsigned int getId()
const {
return d_id; }
142 inline void setId(
unsigned int id) { d_id = id; }
146 return rdcast<unsigned int>(d_positions.size());
148 inline bool is3D()
const {
return df_is3D; }
149 inline void set3D(
bool v) { df_is3D = v; }
160 unsigned int d_id{0};
161 ROMol *dp_mol{
nullptr};
163 void initFromOther(
const Conformer &conf);
#define PRECONDITION(expr, mess)
RDProps & operator=(const RDProps &rhs)
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