Skip to content

Commit f99a856

Browse files
author
Oliver Scott
committed
Fix deprecation of GenerateMolHashString, hash is for now 'MolNode-{SMILES}'.
1 parent 1d07c7a commit f99a856

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scaffoldgraph/core/graph.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ def init_molecule_name(mol):
3838
----------
3939
mol : rdkit.Chem.rdchem.Mol
4040
41+
Notes
42+
-----
43+
Since rdkit 2020.09.01 the GetMolHashString has been
44+
deprecated. If using an rdkit version >= 2020.09.01
45+
the function sets the name to 'MolNode-' plus the
46+
canonical smiles. This prevents collisions with
47+
scaffolds which are hashed using their canonical smiles.
48+
4149
"""
4250
if not mol.HasProp('_Name') or mol.GetProp('_Name') == '':
4351
if rdversion < '2020.09.01':

0 commit comments

Comments
 (0)