Comments (4)
@ChayaSt - is "corner case 1" really a problem? I agree that the toolkits are inconsistent which is perhaps "annoying" but ... your SMILES string is, er, "nonsense", isn't it? Specifically c-1-c-c-c-c-c-1
is "a ring of aromatic carbons connected by single bonds", which doesn't sound very feasible. (Standard "I am not a chemist" disclaimer applies though.) My first impression would be that if you give toolkits something which doesn't make chemical sense, you might expect that they will deal with it in different ways.
I also feel that way about "corner case 2", but my "I am not a chemist" disclaimer applies even more strongly here. In this case it just comes from the fact that "I expect we will only see iodine acting like a 'normal halogen' and being a terminal atom which always has valence one and a single bond to any other atom." So... I'm not terribly concerned if iodine ends up with weird numbers of hydrogens when it occurs in crazy environments. (Is there some reason this is "less crazy" than I think?)
Thanks.
from cmiles.
@davidlmobley, I mostly agree with you that we can ignore these kinds of crazy corner cases, but it is annoying that different toolkits treat them differently.
The bigger concern is the first 2 issues, where protonation states of a molecule with geometry is not conserved and that a toolkit is internally inconsistent or toolkits are inconsistent with where it places H when it is ambiguous. That's why I'm proposing restricting input to explicit H SMILES (it doesn't fully solve the third issue but that is something we can have a note about in the documentation).
The problem is that while there is a way to check openeye molecules that the SMILES used to create the molecule has explicit hydrogen, I did not yet find an equivalent check for RDKit.
from cmiles.
I'd ask the RDKit issue tracker.
And I think any cases where a toolkit is internally inconsistent should also be raised as bugs/issues with either toolkit's support folks.
from cmiles.
@ChayaSt So, right now I don't check for explicit hydrogens, and in fact I rely on the AddExplicitHs
/AddHs
functions in OE and RDK. I think what we're learning here is that this could be a problem moving forward. I'm opening an issue in openforcefield to think about this in the context of that repo's use cases. There's a good chance I'll borrow your code if you find a way to check for all explicit H's in both OE and RDK (even if I end up letting OFF permit it, I'd want to raise a warning).
I agree that restricting to explicit H SMILES is a good idea here.
I think that the corner cases are good to document, and I agree with you and David that it probably isn't critical at this stage to expect proper behavior for these specific ones.
from cmiles.
Related Issues (20)
- Spurious missing stereo warnings
- Fix `has_stereo_defined` for rdkit HOT 1
- Detect overdefined stereo
- conda package HOT 1
- cmiles.utils.to_canonical_label failure HOT 2
- Could get_molecule_ids() support OEMol and RDMol input?
- Standardize molecule support through openforcefield.topology.Molecule?
- Generating a QCSchema JSON from an OEMol?
- WARNING: Proton(s) added/removed
- Generating CMILES ids for an OEMol?
- Hydrogens move and stereochemistry flip when reading qcschema molecule HOT 1
- Failing tests HOT 3
- Better parsing of molecule inputs
- Ideas for future refactor
- Discrepancies in re-generated reference data HOT 1
- How to update reference files for new versions of RDKit
- RDKit 2020.09.3 changes
- OpenEye toolkits 2020.2.0 changes
- Problem when loading TorsionDrive qcmol from QCA HOT 4
- Explicit valence issue with rdkit HOT 5
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 cmiles.