add control over the coordinate precision to coordgen (#1847)

This commit is contained in:
Greg Landrum
2018-05-04 18:41:28 +02:00
committed by Brian Kelley
parent 0626136f66
commit 624698f282
2 changed files with 9 additions and 4 deletions

View File

@@ -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.

View File

@@ -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"