11#ifndef RD_ALIGNMOLECULES_H
12#define RD_ALIGNMOLECULES_H
32 const char *
what() const noexcept
override {
return _msg.c_str(); }
50 std::vector<MatchVectType>
map;
88 int prbCid = -1,
int refCid = -1,
const MatchVectType *atomMap =
nullptr,
90 unsigned int maxIters = 50);
118 ROMol &prbMol,
const ROMol &refMol,
int prbCid = -1,
int refCid = -1,
121 unsigned int maxIters = 50);
150 int prbCid = -1,
int refCid = -1,
bool reflect =
false,
151 unsigned int maxIters = 50);
190 const std::vector<MatchVectType> &map = std::vector<MatchVectType>(),
191 int maxMatches = 1e6,
bool symmetrizeConjugatedTerminalGroups =
true,
193 unsigned int maxIters = 50,
int numThreads = 1) {
194 bool ignoreHs =
false;
196 prbMol, refMol, bestTrans, bestMatch,
198 ignoreHs, numThreads, map, weights},
199 prbCid, refCid,
reflect, maxIters);
223 int prbCid = -1,
int refCid = -1);
255 ROMol &prbMol,
const ROMol &refMol,
int prbCid = -1,
int refCid = -1,
256 const std::vector<MatchVectType> &map = std::vector<MatchVectType>(),
257 int maxMatches = 1e6,
bool symmetrizeConjugatedTerminalGroups =
true,
259 bool ignoreHs =
false;
263 ignoreHs, numThreads, map, weights},
312 const ROMol &mol,
int numThreads = 1,
313 const std::vector<MatchVectType> &map = std::vector<MatchVectType>(),
314 int maxMatches = 1e6,
bool symmetrizeConjugatedTerminalGroups =
true,
316 bool ignoreHs =
false;
319 ignoreHs, numThreads, map, weights});
351 ROMol &prbMol,
const ROMol &refMol,
int prbCid = -1,
int refCid = -1,
352 const std::vector<MatchVectType> &map = std::vector<MatchVectType>(),
353 int maxMatches = 1e6,
bool symmetrizeConjugatedTerminalGroups =
true,
382 int prbCid,
int refCid,
383 const std::vector<MatchVectType> &map,
402 ROMol &mol,
const std::vector<unsigned int> *atomIds =
nullptr,
403 const std::vector<unsigned int> *confIds =
nullptr,
405 unsigned int maxIters = 50, std::vector<double> *RMSlist =
nullptr);
~MolAlignException() noexcept override=default
MolAlignException(const char *msg)
construct with an error message
MolAlignException(const std::string msg)
construct with an error message
const char * what() const noexcept override
get the error message
RWMol is a molecule class that is intended to be edited.
#define RDKIT_MOLALIGN_EXPORT
RDKIT_MOLALIGN_EXPORT void symmetrizeTerminalAtoms(RWMol &mol)
RDKIT_MOLALIGN_EXPORT double getAlignmentTransform(const ROMol &prbMol, const ROMol &refMol, RDGeom::Transform3D &trans, int prbCid=-1, int refCid=-1, const MatchVectType *atomMap=nullptr, const RDNumeric::DoubleVector *weights=nullptr, bool reflect=false, unsigned int maxIters=50)
Alignment functions.
RDKIT_MOLALIGN_EXPORT std::vector< double > getAllConformerBestRMS(const ROMol &mol, const BestAlignmentParams ¶ms)
RDKIT_MOLALIGN_EXPORT double alignMol(ROMol &prbMol, const ROMol &refMol, int prbCid=-1, int refCid=-1, const MatchVectType *atomMap=nullptr, const RDNumeric::DoubleVector *weights=nullptr, bool reflect=false, unsigned int maxIters=50)
Optimally (minimum RMSD) align a molecule to another molecule.
RDKIT_MOLALIGN_EXPORT double getBestRMS(ROMol &prbMol, const ROMol &refMol, const BestAlignmentParams ¶ms, int prbCid=-1, int refCid=-1)
RDKIT_MOLALIGN_EXPORT double CalcRMS(ROMol &prbMol, const ROMol &refMol, int prbCid=-1, int refCid=-1, const std::vector< MatchVectType > &map=std::vector< MatchVectType >(), int maxMatches=1e6, bool symmetrizeConjugatedTerminalGroups=true, const RDNumeric::DoubleVector *weights=nullptr)
RDKIT_MOLALIGN_EXPORT double getBestAlignmentTransform(const ROMol &prbMol, const ROMol &refMol, RDGeom::Transform3D &bestTrans, MatchVectType &bestMatch, const BestAlignmentParams ¶ms, int prbCid=-1, int refCid=-1, bool reflect=false, unsigned int maxIters=50)
RDKIT_MOLALIGN_EXPORT void alignMolConformers(ROMol &mol, const std::vector< unsigned int > *atomIds=nullptr, const std::vector< unsigned int > *confIds=nullptr, const RDNumeric::DoubleVector *weights=nullptr, bool reflect=false, unsigned int maxIters=50, std::vector< double > *RMSlist=nullptr)
RDKIT_MOLALIGN_EXPORT const RDGeom::POINT3D_VECT * reflect(const Conformer &conf)
std::vector< std::pair< int, int > > MatchVectType
used to return matches from substructure searching, The format is (queryAtomIdx, molAtomIdx)
Vector< double > DoubleVector
const RDNumeric::DoubleVector * weights
std::vector< MatchVectType > map
int numThreads
will always be used
bool symmetrizeConjugatedTerminalGroups
matches found in a SubstructMatch().