mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
add control over the coordinate precision to coordgen (#1847)
This commit is contained in:
committed by
Brian Kelley
parent
0626136f66
commit
624698f282
8
External/CoordGen/CoordGen.h
vendored
8
External/CoordGen/CoordGen.h
vendored
@@ -26,8 +26,10 @@ struct CoordGenParams {
|
||||
// returned coordinates with a single bond
|
||||
// length of 50.
|
||||
std::string templateFileDir = "";
|
||||
bool dbg_useConstrained = true; // debugging
|
||||
bool dbg_useFixed = false; // debugging
|
||||
float minimizerPrecision =
|
||||
SKETCHER_STANDARD_PRECISION; // controls sketch precision
|
||||
bool dbg_useConstrained = true; // debugging
|
||||
bool dbg_useFixed = false; // debugging
|
||||
};
|
||||
|
||||
static CoordGenParams defaultParams;
|
||||
@@ -53,7 +55,7 @@ unsigned int addCoords(T& mol, const CoordGenParams* params = nullptr) {
|
||||
}
|
||||
double scaleFactor = params->coordgenScaling;
|
||||
|
||||
sketcherMinimizer minimizer;
|
||||
sketcherMinimizer minimizer(params->minimizerPrecision);
|
||||
auto min_mol = new sketcherMinimizerMolecule();
|
||||
|
||||
// FIX: only do this check once.
|
||||
|
||||
5
External/CoordGen/Wrap/rdCoordGen.cpp
vendored
5
External/CoordGen/Wrap/rdCoordGen.cpp
vendored
@@ -68,7 +68,10 @@ struct coordgen_wrapper {
|
||||
"for debugging use")
|
||||
.def_readwrite("templateFileDir",
|
||||
&CoordGen::CoordGenParams::templateFileDir,
|
||||
"directory containing the templates.mae file");
|
||||
"directory containing the templates.mae file")
|
||||
.def_readwrite("minimizerPrecision",
|
||||
&CoordGen::CoordGenParams::minimizerPrecision,
|
||||
"controls sketcher precision");
|
||||
python::def("SetDefaultTemplateFileDir", SetDefaultTemplateFileDir);
|
||||
docString =
|
||||
"Add 2D coordinates.\n"
|
||||
|
||||
Reference in New Issue
Block a user