Skip to content

Commit 74dc405

Browse files
committed
expose rdkit options for conformer generation
1 parent af73d1a commit 74dc405

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

moleculekit/smallmol/smallmol.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,13 @@ def getCenter(self):
662662
return coords.mean(axis=0).astype(np.float32)
663663

664664
def generateConformers(
665-
self, num_confs=400, optimizemode="mmff", align=True, append=True
665+
self,
666+
num_confs=400,
667+
optimizemode="mmff",
668+
align=True,
669+
append=True,
670+
pruneRmsThresh=1.0,
671+
maxAttempts=10000,
666672
):
667673
"""
668674
Generates ligand conformers
@@ -673,14 +679,14 @@ def generateConformers(
673679
Number of conformers to generate.
674680
optimizemode: str
675681
The optimizemode to use. Can be 'uff', 'mmff'
676-
Default: 'mmff'
677682
align: bool
678683
If True, the conformer are aligned to the first one
679-
Default: True
680684
append: bool
681685
If False, the current conformers are deleted
682-
Default: True
683-
686+
pruneRmsThresh: float
687+
The RMSD threshold for pruning conformers
688+
maxAttempts: int
689+
The maximum number of attempts to generate conformers
684690
"""
685691
from rdkit.Chem.AllChem import (
686692
UFFOptimizeMolecule,
@@ -702,8 +708,8 @@ def generateConformers(
702708
mol,
703709
clearConfs=False,
704710
numConfs=num_confs,
705-
pruneRmsThresh=1.0,
706-
maxAttempts=10000,
711+
pruneRmsThresh=pruneRmsThresh,
712+
maxAttempts=maxAttempts,
707713
)
708714
if optimizemode not in ["uff", "mmff"]:
709715
raise ValueError('Unknown optimizemode. Should be "uff", "mmff"')

0 commit comments

Comments
 (0)