Skip to content

Commit 672b973

Browse files
committed
Fix failure to parse large molecules
Increased maxMatches in rdkit GetSubstructMatches to allow for larger molecules (maxMatches increased from 1000 to 10000.)
1 parent d1d2270 commit 672b973

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

pgradd/RDkitWrapper/MolQuery.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,14 @@ def GetQueryMatches(self, mol, debug=0):
612612
except Exception:
613613
return tuple()
614614
# Match mol substructure matches
615-
rdkit_matches = mol.GetSubstructMatches(self.mol, uniquify=False)
615+
maxMatches = 10000
616+
rdkit_matches = mol.GetSubstructMatches(self.mol, uniquify=False,
617+
maxMatches=maxMatches)
618+
lenMatches = len(rdkit_matches)
619+
if lenMatches == maxMatches:
620+
print('\nMax RDKit substructure matches exceeded. All groups in',
621+
'molecule may not have been determined.')
622+
print(Chem.MolToSmiles(Chem.RemoveHs(mol)))
616623
if debug:
617624
print('structure matches:' + str(rdkit_matches))
618625
# if no rdkit match

pgradd/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
# present, too:
99
#
1010
name = 'pgradd'
11-
__version__ = '1.0.0'
11+
__version__ = '2.9'
1212
#
1313
####

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
setuptools_info = {
1818
'name': 'pgradd',
19-
'version': '2.8',
19+
'version': '2.9',
2020
'author': 'Vlachos Research Group',
2121
'author_email': '[email protected]',
2222
'description': 'Python package implements the Group Additivity (GA) method for estimating thermodynamic properties',

0 commit comments

Comments
 (0)