You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arguably trivial but it would be nice to handle the wrong input separately from checking that toolkit(s) are installed. Here I accidentally pass in an OpenFF Molecule and confused myself since I knew I had the toolkits installed
In [1]: importcmilesIn [2]: fromopenforcefield.topology.moleculeimportMoleculeWarning: Unabletoloadtoolkit'AmberTools'.
_ColormakerRegistry()
In [3]: cmiles.utils.mol_to_smiles(Molecule.from_smiles('C'))
---------------------------------------------------------------------------RuntimeErrorTraceback (mostrecentcalllast)
<ipython-input-3-f0a9fb86fb26>in<module>---->1cmiles.utils.mol_to_smiles(Molecule.from_smiles('C'))
~/software/cmiles/cmiles/utils.pyinmol_to_smiles(molecule, **kwargs)
165 """
166 molecule = copy.deepcopy(molecule)
--> 167 toolkit = _set_toolkit(molecule)
168 if has_atom_map(molecule):
169 remove_atom_map(molecule)
~/software/cmiles/cmiles/utils.py in _set_toolkit(molecule)
556 import cmiles._cmiles_rd as toolkit
557 else:
--> 558 raise RuntimeError("Must have openeye or rdkit installed")
559returntoolkit560RuntimeError: MusthaveopeneyeorrdkitinstalledIn [4]: cmiles.utils.mol_to_smiles(Molecule.from_smiles('C').to_openeye())
Out[4]: '[H:2][C:1]([H:3])([H:4])[H:5]'
The text was updated successfully, but these errors were encountered:
Arguably trivial but it would be nice to handle the wrong input separately from checking that toolkit(s) are installed. Here I accidentally pass in an OpenFF
Molecule
and confused myself since I knew I had the toolkits installedThe text was updated successfully, but these errors were encountered: