11#ifndef _RD_CONFORMER_H
12#define _RD_CONFORMER_H
16#include <boost/smart_ptr.hpp>
33 const char *
what() const noexcept
override {
return _msg.c_str(); }
58 d_positions.resize(0);
68 df_is3D(std::move(o.df_is3D)),
69 d_id(std::move(o.d_id)),
70 dp_mol(std::move(o.dp_mol)),
71 d_positions(std::move(o.d_positions)){};
76 RDProps::operator=(std::move(o));
77 df_is3D = std::move(o.df_is3D);
78 d_id = std::move(o.d_id);
79 dp_mol = std::move(o.dp_mol);
80 d_positions = std::move(o.d_positions);
88 void resize(
unsigned int size) { d_positions.resize(size); }
91 void reserve(
unsigned int size) { d_positions.reserve(size); }
113 return getAtomPos(rdcast<unsigned int>(atomId));
121 return getAtomPos(rdcast<unsigned int>(atomId));
126 if (atomId == std::numeric_limits<unsigned int>::max()) {
129 if (atomId >= d_positions.size()) {
132 d_positions[atomId] = position;
137 return setAtomPos(rdcast<unsigned int>(atomId), position);
140 inline unsigned int getId()
const {
return d_id; }
143 inline void setId(
unsigned int id) { d_id = id; }
147 return rdcast<unsigned int>(d_positions.size());
149 inline bool is3D()
const {
return df_is3D; }
150 inline void set3D(
bool v) { df_is3D = v; }
161 unsigned int d_id{0};
162 ROMol *dp_mol{
nullptr};
164 void initFromOther(
const Conformer &conf);
174 constexpr double zeroTol = 1e-3;
176 if (std::abs(p.z) > zeroTol) {
#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