Skip to content

Commit 85af3cc

Browse files
committed
make QM molecule partial sanitized with RDKit
This aligns the RDKit conversion process. A relaxed sanitization process is required to avoid kekulization/sanitization/valence issues which would prevent a molecule from being created. Especially relevant in the context of `draw`, which has an RDKit backend that calls this function. We don't want it to fail drawing simple because it doesn't follow the sanitization rules.
1 parent f668f08 commit 85af3cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rmgpy/qm/molecule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def rd_build(self):
147147
"""
148148
Import rmg molecule and create rdkit molecule with the same atom labeling.
149149
"""
150-
return self.molecule.to_rdkit_mol(remove_h=False, return_mapping=True)
150+
return self.molecule.to_rdkit_mol(remove_h=False, return_mapping=True, sanitize="partial")
151151

152152
def rd_embed(self, rdmol, num_conf_attempts):
153153
"""

0 commit comments

Comments
 (0)