Add safeSetattr to more params / options objects (#8842)

* add safeSetattr to varios params objects

* added safeSetattr to further params / options
This commit is contained in:
Niels Maeder
2025-10-08 16:15:20 +02:00
committed by GitHub
parent b2fe43a9ad
commit db93262a3e
15 changed files with 49 additions and 22 deletions

View File

@@ -16,6 +16,7 @@
#include <RDGeneral/Exceptions.h>
#include <GraphMol/RDKitBase.h>
#include <CoordGen/CoordGen.h>
#include <RDBoost/Wrap.h>
namespace python = boost::python;
@@ -90,7 +91,9 @@ struct coordgen_wrapper {
"controls sketcher precision")
.def_readwrite(
"treatNonterminalBondsToMetalAsZOBs",
&CoordGen::CoordGenParams::treatNonterminalBondsToMetalAsZeroOrder);
&CoordGen::CoordGenParams::treatNonterminalBondsToMetalAsZeroOrder)
.def("__setattr__", &safeSetattr);
python::def("SetDefaultTemplateFileDir", SetDefaultTemplateFileDir,
python::args("dir"));
docString =

View File

@@ -111,7 +111,8 @@ struct freesasa_wrapper {
python::args("self", "alg", "cls", "pr")))
.def_readwrite("algorithm", &FreeSASA::SASAOpts::algorithm)
.def_readwrite("classifier", &FreeSASA::SASAOpts::classifier)
.def_readwrite("probeRadius", &FreeSASA::SASAOpts::probeRadius);
.def_readwrite("probeRadius", &FreeSASA::SASAOpts::probeRadius)
.def("__setattr__", &safeSetattr);
docString =
"Classify the atoms in the molecule returning their radii if "