SMILES¶
| Item | Value |
|---|---|
| Format ID | smi |
| Extensions | .smi, .txt |
| Read | Yes |
| Write | Yes |
| Registry role | Reader, file writer, frame writer |
| Data level | Coordinates on read; graph required on write |
SMILES record IO with graph-derived charge/multiplicity and canonical SMILES writing.
Python
from molop import AutoParser
frame = AutoParser("molecules.smi")[0][0]
print(frame.to_canonical_SMILES(), frame.coords.shape)
Output
For CCO ethanol, output is similar to CCO (3, 3).
The trailing name is outside the parsed contract and three-dimensional coordinates are not preserved.
| Feature | Support | Scope | Limits |
|---|---|---|---|
| Reading | Supported | Non-empty SMILES records; first whitespace token parsed; 2D coordinates, graph, formal charge/radical, charge, and multiplicity derived by RDKit. | Trailing record names or columns are not part of the advertised parsed-data contract; input 3D coordinates cannot be preserved. |
| Molecular graph and writing | Supported | Canonical graph-derived SMILES writer with strict graph semantics. | Coords-only rendering is not the default writer contract. |
| Format conversion | Supported | Gaussian output structures can be converted to SMILES through the registry. | Conversion depends on successful graph recovery or transformation. |
Property sources and reading conventions¶
The table maps file contents to MolOP data. See data containers and cross-QM semantics for shared units, indices and missing values.
References: RDKit file API.
| Property | File marker or data source | Reading or writing convention |
|---|---|---|
| Reading | First whitespace-delimited SMILES token; RDKit MolFromSmiles and Compute2DCoords |
Atoms/bonds/formal charges/radicals come from the decoded graph. Coordinates are generated 2D depiction, not input geometry. Trailing tokens are not preserved as molecular properties. |
| Molecular graph and writing | Canonical SMILES from the recovered RDKit/Open Babel graph |
Canonicalization is a backend algorithm, not preservation of input token order. Graph recovery and stereochemistry depend on the available molecule. |
| Format conversion | Graph-capable writer contract; source molecule |
Graph fields feed canonical SMILES output; QM energies, NMR, spectra and source coordinates are not encoded by this writer. |