https://github.com/openforcefield/cmiles
Generate canonical molecule identifiers for quantum chemistry database
https://github.com/openforcefield/cmiles
cheminformatics database forcefield forcefield-parameterization quantum-chemistry
Last synced: 3 months ago
JSON representation
Generate canonical molecule identifiers for quantum chemistry database
- Host: GitHub
- URL: https://github.com/openforcefield/cmiles
- Owner: openforcefield
- License: mit
- Created: 2018-07-27T19:37:26.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-05-17T14:52:01.000Z (about 5 years ago)
- Last Synced: 2025-10-21T20:47:57.774Z (7 months ago)
- Topics: cheminformatics, database, forcefield, forcefield-parameterization, quantum-chemistry
- Language: Jupyter Notebook
- Homepage: https://cmiles.readthedocs.io
- Size: 15.1 MB
- Stars: 23
- Watchers: 5
- Forks: 7
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## CMILES is no longer actively maintained
As of May 2021, CMILES is no longer being actively maintained. Most of its essential functionality
has been migrated to the [Open Force Field Toolkit](https://github.com/openforcefield/openff-toolkit/)
and [QCSubmit](https://github.com/openforcefield/openff-qcsubmit/) packages.
API points that handle former CMILES functions in these packages include:
* [openff.toolkit.toplogy.Molecule.to_smiles](https://open-forcefield-toolkit.readthedocs.io/en/latest/api/generated/openff.toolkit.topology.Molecule.html#openff.toolkit.topology.Molecule.to_smiles) with the `mapped=True` keyword argument
* [openff.toolkit.topology.Molecule.from_mapped_smiles](https://open-forcefield-toolkit.readthedocs.io/en/latest/api/generated/openff.toolkit.topology.Molecule.html#openff.toolkit.topology.Molecule.from_mapped_smiles)
* [openff.toolkit.topology.Molecule.from_qcschema](https://open-forcefield-toolkit.readthedocs.io/en/latest/api/generated/openff.toolkit.topology.Molecule.html#openff.toolkit.topology.Molecule.from_qcschema)
* And the [openff-qcsubmit dataset class](https://openforcefield.github.io/openff-qcsubmit/datasets/)
cmiles
==============================
[//]: # (Badges)
[](https://github.com/openforcefield/cmiles/actions?query=branch%3Amaster+workflow%3ACI)
[](https://codecov.io/gh/openforcefield/cmiles/branch/master)
[](https://cmiles.readthedocs.io/en/latest/?badge=latest)
Generate canonical identifiers for chemical databases, specifically quantum
chemical data.
cmiles seeks to address several issues:
1. *Link the QC molecule to its cheminformatics molecular graph to make QC data
useful to the force field and machine learning communities.*
A QC molecule is identified by its elements and geometry. Each conformer
is considered a separate molecule. However, from a cheminformatics perspective,
the connectivity graph is the identity of the molecule.
2. *Canonical identifiers.*
When indexing a chemical database, it is crucial that the identifier
is canonical to reduce redundancy and search failures.
**Problem**:
Each toolkit has its own canonicalization algorithm. This algorithm may
change in different versions of the toolkit.
**Solution**:
Distribute cmiles as a Docker image with pinned dependencies.
3. *Canonical order of QC geometry.*
Since QC molecules are identified by their elements and geometry, canonical
atomic order can reduce redundancy.
**Problem**:
In cheminformatics toolkits, the order of atoms in a molecular graph are arbitrary.
Therefore, every time you generate a new molecular graph, the order of the atoms can change.
**Solution**:
Use the toolkits canonical atomic ranking to generate a SMILES string that has
explicit hydrogens and map indices that correspond to the canonical atomic ranking.
Then, this mapped SMILES can be used as a SMARTS pattern to find the mapping of
a molecular graph's these map indices to atomic indices. This map is then used
to generate canonical order for the xyz coordinates and symbols in the QC molecule.
`cmiles.utils` provides functions that will do this.
In addition, the mapped SMILES ensure that all molecular graphs generated can be mapped
to QC geometries if those geometries are in the order of the map.
4. *Standardize compounds*
Provide an index to find all protomers of a molecule.
**Problem**:
Different protomeric states are different QC molecules. However, sometimes all
protomers and / tautomers of a molecule are needed. SMILES strings are different
for each protomer. While InChI standardizes molecular charge states, it only
standardize the tautomers it recognizes and not others. Some tautomers
it does not capture are keto-enol and enamine-imine.
`cmiles` does not yet offer a full solution. Currently it provides the InChI, the
[unique protomer from openeye](https://docs.eyesopen.com/toolkits/python/quacpactk/OEProtonFunctions/OEGetUniqueProtomer.html)
and `MolStandardize` from rdkit. rdkit's solution only addresses tautomers of the
same charge states and openeye's solution does not capture indoles, isoindoles and
some mesomers. However, the union of these identifiers captures more than each individual solution.
#### How to use cmiles
`cmiles` has one main function, `to_molecule_id(molecule)` This
function returns a dictionary with 10 identifiers generated with either OpenEye
or RDKit.
1. Canonical SMILES
2. Canonical, isomeric SMILES
3. Canonical, isomeric, explicit hydrogen SMILES
4. Canonical, explicit hydrogen SMILES
5. Canonical, isomeric, explicit hydrogen, mapped SMILES.
6. Molecular formula in Hill notation
7. InChI
8. InChIKey
9. unique protomer SMILES
10. Standardized tautomer SMILES
`cmiles.utils` provides functions to generate atom maps and map ordered geometries.
### Dependencies
One of the following cheminformatics toolkits:
* openeye
* rdkit
### Copyright
Copyright (c) 2018, Chaya D. Stern
#### Acknowledgements
Project based on the
[Computational Chemistry Python Cookiecutter](https://github.com/choderalab/cookiecutter-python-comp-chem)