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(); }
55 : d_positions(numAtoms,
RDGeom::Point3D(0.0, 0.0, 0.0)) {}
65 d_positions(std::move(o.d_positions)) {}
70 RDProps::operator=(std::move(o));
74 d_positions = std::move(o.d_positions);
82 void resize(
unsigned int size) { d_positions.resize(size); }
85 void reserve(
unsigned int size) { d_positions.reserve(size); }
107 return getAtomPos(rdcast<unsigned int>(atomId));
115 return getAtomPos(rdcast<unsigned int>(atomId));
120 if (atomId == std::numeric_limits<unsigned int>::max()) {
123 if (atomId >= d_positions.size()) {
126 d_positions[atomId] = position;
131 return setAtomPos(rdcast<unsigned int>(atomId), position);
134 inline unsigned int getId()
const {
return d_id; }
137 inline void setId(
unsigned int id) { d_id = id; }
141 return rdcast<unsigned int>(d_positions.size());
143 inline bool is3D()
const {
return df_is3D; }
144 inline void set3D(
bool v) { df_is3D = v; }
155 unsigned int d_id{0};
156 ROMol *dp_mol{
nullptr};
167 constexpr double zeroTol = 1e-3;
169 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