Comments (4)
Turns out it also flips map indices with the newer solution in openforcefield/cmiles#15
Example:
Mapped SMILES generated with cmiles:
'[H:7][C:1]1([C:2]([C:4]([C:5]([C:3]1([H:11])[H:12])([H:15])[C:6]([H:16])([H:17])[H:18])([H:13])[H:14])([H:9])[H:10])[H:8]'
Generating molecule from mapped SMILES generates this mapping:
Generating molecule from canonical SMILES, then canonicalizing the order and adding map indices as +1 of atom index (the way cmiles generates the mapped SMILES) generates this mapping:
@j-wags, this means that the logic I implemented here openforcefield/cmiles#15 fails for this molecule because when the molecule's atom order generated from the mapped SMILES is canonicalized, the map indices are not +1 the atom indices.
For this case, doing a substructure search does find the right ordering for the first match. It might be best to use the substructure search and find the match that corresponds to the mapped SMILES.
from openff-fragmenter.
This problem is likely unavoidable, which is why for fragmenter pipelines we always want to generate the molecule with the ordering we want and continue to use that ordering/mapping throughout the remainder of the pipeline.
from openff-fragmenter.
The problem arises from the way fragmenter was designed.
Fragmenter generates a list of fragments with cmiles
IDs before the fragments have geometries as seen in this planning image:
The way to remedy this is to have cmiles
only generate a mapped SMILES if the input molecule also has geometry. This will create the following changes in fragmenter
and cmiles
:
- fragment JSON will not have mapped SMILES
cmiles
will allowOEMol
inputs (currently only isomeric explicit hydrogen SMILES or QCJSON are allowed)cmiles
will only generate mapped SMILES if the input molecule has a geometry. It will first check that the molecule with geometry is in canonical order, and if not reorder it. It can be a good idea to have astrict
flag here to allow mapped SMILES without geometries.
from openff-fragmenter.
This is not a concern because the since the atoms are symmetrical - it is the same molecule.
from openff-fragmenter.
Related Issues (20)
- Grow fragments when stereochemistry can not be fixed
- fragmented molecule atom mapping rearrangement HOT 3
- Fragmentation issue because of stereochem when the bond involves Sulfur HOT 3
- `find_rotatable_bonds` fails unless an atom map is present HOT 1
- Provide a way to map from `WBOFragmenter` input molecule to parent molecule HOT 1
- Use xtb for the WBO HOT 2
- Skip OpenEye functions if license not found, even if installed
- Support openforcefield.topology.Molecule? HOT 2
- Functional groups on rings do not come along with ring HOT 1
- Handle different charging failures appropriately
- Charging molecules while only returning the original coordinates returns a wonky molecule HOT 1
- Return parent fragment mapping HOT 2
- Ideas for future refactor HOT 1
- Fragmentation fails with new openeye toolkit. HOT 2
- Fragments have missing stereochemistry HOT 2
- Segmentation Fault HOT 5
- Wiberg Order Not Found HOT 2
- Omega returned error code 0 HOT 1
- Refactor into an OpenFF namespace
- Make fragmenters stateless
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openff-fragmenter.