Open j-wags opened 5 years ago
Do we still want this? It is not the current behavior, i.e. if i try to sneak in an obviously-garbage SMILES string in a .smi
file it just skips over it and proceeds:
In [1]: from openff.toolkit.utils.rdkit_wrapper import RDKitToolkitWrapper
In [2]: from openff.toolkit import Molecule
In [3]: wrapper = RDKitToolkitWrapper()
In [4]: !cat smiles.smi
CC
CCO
C#C#C#C#C
In [5]: Molecule.from_file("smiles.smi", toolkit_registry=wrapper)
[11:28:02] WARNING: no name column found on line 0
[11:28:02] WARNING: no name column found on line 1
[11:28:02] Explicit valence for atom # 1 C, 6, is greater than permitted
[11:28:02] ERROR: Could not sanitize molecule on line 2
[11:28:02] ERROR: Explicit valence for atom # 1 C, 6, is greater than permitted
Out[5]:
[Molecule with name '' and SMILES '[H]C([H])([H])C([H])([H])[H]',
Molecule with name '' and SMILES '[H]C([H])([H])C([H])([H])O[H]']
https://github.com/openforcefield/openforcefield/blob/topology/openforcefield/utils/toolkits.py#L1500