Commit 23682b9a authored by atreyamaj's avatar atreyamaj
Browse files

Addressed review comments

parent dd2a379c
......@@ -70,8 +70,8 @@ class MATFeaturizer(MolecularFeaturizer):
try:
from rdkit.Chem import AllChem
from rdkit import Chem
except:
raise ModuleNotFoundError('This class requires RDKit to be installed.')
except ModuleNotFoundError:
pass
try:
mol = Chem.AddHs(mol)
AllChem.EmbedMolecule(mol, maxAttempts=5000)
......@@ -223,11 +223,7 @@ class MATFeaturizer(MolecularFeaturizer):
raise DeprecationWarning(
'Mol is being phased out as a parameter, please pass "datapoint" instead.'
)
try:
from rdkit import Chem
except:
raise ImportError("This class requires RDKit to be installed.")
from rdkit import Chem
datapoint = self.construct_mol(datapoint)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment