Skip to content

Commit c5afaa9

Browse files
committed
Merge pull request #231 from rwest/oldrdkit
Get it to work (mostly) with older versions of rdkit
2 parents 1400e67 + 2571933 commit c5afaa9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

rmgpy/molecule/element.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,12 @@ def __init__(self, number, symbol, name, mass):
7878
self.symbol = intern(symbol)
7979
self.name = name
8080
self.mass = mass
81-
self.covRadius = _rdkit_periodic_table.GetRcovalent(symbol)
81+
try:
82+
self.covRadius = _rdkit_periodic_table.GetRcovalent(symbol)
83+
except RuntimeError:
84+
import logging
85+
logging.error("RDkit doesn't know element {0} so covalent radius unknown".format(symbol))
86+
self.covRadius = 0
8287

8388
def __str__(self):
8489
"""

0 commit comments

Comments
 (0)