Comments (6)
Wow - nice catch. This causes tons of problems in the toolkit, actually. It's easy to find separate cases of the toolkit ignoring the isotopes and choking on them:
>>> [atom.mass.m for atom in Molecule.from_smiles("[2H]O[2H]").atoms]
[1.007947, 15.99943, 1.007947]
>>> Molecule.from_smiles("[13C]")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/mattthompson/mambaforge/envs/smirnoff-plugins-test/lib/python3.9/site-packages/openff/toolkit/topology/molecule.py", line 1807, in from_smiles
molecule = toolkit_registry.call(
File "/Users/mattthompson/mambaforge/envs/smirnoff-plugins-test/lib/python3.9/site-packages/openff/toolkit/utils/toolkit_registry.py", line 356, in call
raise e
File "/Users/mattthompson/mambaforge/envs/smirnoff-plugins-test/lib/python3.9/site-packages/openff/toolkit/utils/toolkit_registry.py", line 352, in call
return method(*args, **kwargs)
File "/Users/mattthompson/mambaforge/envs/smirnoff-plugins-test/lib/python3.9/site-packages/openff/toolkit/utils/rdkit_wrapper.py", line 1035, in from_smiles
molecule = self.from_rdkit(
File "/Users/mattthompson/mambaforge/envs/smirnoff-plugins-test/lib/python3.9/site-packages/openff/toolkit/utils/rdkit_wrapper.py", line 1756, in from_rdkit
raise RadicalsNotSupportedError(
openff.toolkit.utils.exceptions.RadicalsNotSupportedError: The OpenFF Toolkit does not currently support parsing molecules with S- and P-block radicals. Found 4 radical electrons on molecule [13C].
Prior to having thought about this much, I wonder if rolling a custom solution here would be easier than getting isotope support into the toolkit.
Erroring out if an isotope is passed through would be an improvement in the sense that unsupported behavior (even unintentionally unsupported) is handled more gracefully, but I figure that won't actually be an improvement in getting research done.
from openff-evaluator.
I wonder if rolling a custom solution here would be easier than getting isotope support into the toolkit.
I agree that a custom solution here might be easier, I wonder if all smirks matching might be better done using rdkit directly to save time as the current workflow as I understand it goes smiles -> parse with rdkit/openeye -> convert to off-Mol -> substructure search with rdkit/openeye. When filtering 70k records in thermoML this could save some time and give the correct behaviour.
from openff-evaluator.
Mostly resolved with #503 / release v0.4.3. There might be performance optimizations left on the table - didn't have the time to look deep enough into that.
from openff-evaluator.
openforcefield/openff-toolkit#974
from openff-evaluator.
I was also a bit worried that Evaluator didn't depend on RDKit but I checked and it's explicitly listed; I guess the -base
trick is just used to avoid AmberTools.
from openff-evaluator.
from openff-evaluator.
Related Issues (20)
- Solvation free energy calculations failing HOT 10
- Loosen MDTraj constraint HOT 3
- tutorial data and script are outdated HOT 1
- unit bug forcebalance 1.9.4 + evaluator 0.4.1 + toolkit 0.11.4 in tutorial04 HOT 5
- Virtual sites missing from gradient calculations HOT 8
- Remove modules depending on Yank
- OpenMM 8 causing test failures HOT 2
- Star imports misconfigured HOT 1
- Unit-related AttributeError on code which previously worked HOT 6
- Remove use of `pkg_resources`
- Pandas 2 breaks things HOT 3
- Tutorial01 HOT 5
- OE_LICENSE HOT 3
- unit HOT 16
- Pint removed upcast_types = [] from pint.compat HOT 3
- openff-evaluator conda installation problems HOT 3
- Update calls to Simulation.MinimizeEnergy to provide tolerance as force, not energy HOT 4
- tutorial04 - No module named 'forcebalance' HOT 1
- Identifiers not being parsed through evaluator HOT 2
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-evaluator.