change default precision for coordgen (#3452)

* change default precision for coordgen
also makes preset precision settings accessible

* additional caveat in release notes
This commit is contained in:
Greg Landrum
2020-10-02 05:24:29 +02:00
committed by GitHub
parent bc4d547847
commit 895437f7c9
3 changed files with 29 additions and 5 deletions

View File

@@ -22,6 +22,10 @@ namespace RDKit {
namespace CoordGen {
struct CoordGenParams {
const float sketcherCoarsePrecision = 0.01;
const float sketcherStandardPrecision = SKETCHER_STANDARD_PRECISION;
const float sketcherBestPrecision = SKETCHER_BEST_PRECISION;
const float sketcherQuickPrecision = SKETCHER_QUICK_PRECISION;
RDGeom::INT_POINT2D_MAP
coordMap; // coordinates for fixing particular atoms of a template
const ROMol* templateMol = nullptr; // a molecule to use as a template
@@ -30,7 +34,7 @@ struct CoordGenParams {
// length of 50.
std::string templateFileDir = "";
float minimizerPrecision =
SKETCHER_STANDARD_PRECISION; // controls sketch precision
sketcherCoarsePrecision; // controls sketch precision
bool dbg_useConstrained = true; // debugging
bool dbg_useFixed = false; // debugging
bool minimizeOnly = false; // don't actually generate full coords

View File

@@ -69,12 +69,25 @@ struct coordgen_wrapper {
.def_readwrite("templateFileDir",
&CoordGen::CoordGenParams::templateFileDir,
"directory containing the templates.mae file")
.def_readwrite("minimizerPrecision",
&CoordGen::CoordGenParams::minimizerPrecision,
"controls sketcher precision")
.def_readwrite("minimizeOnly", &CoordGen::CoordGenParams::minimizeOnly,
"uses coordgen's force field to cleanup the 2D "
"coordinates of the active conformation");
"coordinates of the active conformation")
.def_readonly("sketcherBestPrecision",
&CoordGen::CoordGenParams::sketcherBestPrecision,
"highest quality (and slowest) precision setting")
.def_readonly("sketcherStandardPrecision",
&CoordGen::CoordGenParams::sketcherStandardPrecision,
"standard quality precision setting, the default for the coordgen project")
.def_readonly("sketcherQuickPrecision",
&CoordGen::CoordGenParams::sketcherQuickPrecision,
"faster precision setting")
.def_readonly("sketcherCoarsePrecision",
&CoordGen::CoordGenParams::sketcherCoarsePrecision,
"\"coarse\" (fastest) precision setting, produces good-quality coordinates"
" most of the time, this is the default setting for the RDKit")
.def_readwrite("minimizerPrecision",
&CoordGen::CoordGenParams::minimizerPrecision,
"controls sketcher precision");
python::def("SetDefaultTemplateFileDir", SetDefaultTemplateFileDir);
docString =
"Add 2D coordinates.\n"