Comments (7)
Until I encountered my current somewhat odd research question where kinetics of such reactions became interesting to me, I was also neither aware of the possibility nor need for this. Oh I see, in the openSMILES definition the meaning of this seems to be arbitrary. RDKit implements it as enforced atom index.
Thanks for the reply and the pointers @t-young31! At the moment I am not quite familiar enough yet with the structure of autodE but I think I will be using it quite a lot and when I understood sufficiently how to implement this without breaking everything, I may try and give it a shot.
from autode.
Lovely! Just in time for the student starting in my lab who will work on the project. :D
from autode.
Hi @ffmulks – unfortunately, at the moment, there isn't a way to use those kind of SMILES strings to initialise molecules (I wasn't aware that it was possible!).
It would be great to have this functionality, but because no one is working on this project full time I'm not sure it'll be addressed until later on this year. Of course if you would like to implement it and submit a pull request that would be awesome! 😄
Some thoughts/questions if/when it's added:
- I assume it's §3.1.7 in the openSMILES specification?
- If it's just an arbitrary integer then does the atom ordering need to be regenerated?
- An
atom_class
would need to be added to aSMILESAtom
andAtom
, defaulting to zero - The nodes in the molecular graph would need to add an
atom_class
attribute - Isomorphisms would need to match also on
atom_class
from autode.
will try and get this into v1.2.3
from autode.
What version of RDKit are you using that applies the atom classes as indices? Mine (v. 2021.09.4) doesn't seem to do it:
>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles('C[Br:0]')
>>> print(Chem.MolToMolBlock(m))
RDKit 2D
2 1 0 0 0 0 0 0 0 0999 V2000
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.2990 0.7500 0.0000 Br 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0
M END
>>> m = Chem.MolFromSmiles('C[Br:1]')
>>> print(Chem.MolToMolBlock(m))
RDKit 2D
2 1 0 0 0 0 0 0 0 0999 V2000
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 0
1.2990 0.7500 0.0000 Br 0 0 0 0 0 0 0 0 0 1 0 0
1 2 1 0
M END
A version that doesn't reassign atom indices is implemented on atom_index_labeling which can be installed in a similar way to the naming fix branch by replacing fix_naming_clash -> atom_index_labeling. If you have time to test it out that would be awesome. Also, how important is it for atom indices to be reassigned?
Thanks!
from autode.
Just a little oversight, I think. It saves it. That is the 1 that you get in the post-coordinate bit (0 0 0 0 0 0 0 0 0 1 0 0). I run RDKit version 2022.03.2. Thanks a lot, will test ASAP!
Both of these work fine for testing:
from rdkit.Chem import rdChemReactions as Reactions
from rdkit.Chem import Draw
rxn = Reactions.ReactionFromSmarts('C[Cl:1].[Cl-:2]>>C[Cl:2].[Cl-:1]', useSmiles=True)
image = Draw.ReactionToImage(rxn)
image.save('rxn_image.png')
from rdkit import Chem
print(Chem.MolToMolBlock(Chem.MolFromSmiles('C[Cl:1]')))
Labelling starts at 1, so the 0 will not change the molblock but >0 does.
from autode.
Optimization went smoothly, great! Just a note for future optimization: it would save resources to not optimize identical reactants and products. This may be weird to pull off with differently indexed molecules, though. Not a problem for me anyways, this will mostly be used for small molecules.
from autode.
Related Issues (20)
- ImportError: cannot import name 'cached_property' from 'functools' HOT 2
- Temperature should be a value
- Better optimisers for NEB
- Performing NEB given exact atom-mapping HOT 5
- Diffrence in frequencies from ORCA and autode HOT 5
- Optimiser bugs
- Implement image-pair regeneration with DHS (-GS) and i-EIP
- Increase default SCF cycles in Q-Chem HOT 2
- SMILES input -> molecule bug HOT 3
- Turn of truncation of structure HOT 2
- DIC->Cart iterative back-transform did not converge HOT 6
- Failed to create a complete set of delocalised internal coordinates HOT 3
- ORCA error ? CouldNotGetProperty: Could not get energy HOT 2
- Codecov pytest runs are not using xTB on windows CI runs
- Debugging TS failures via file type generated
- Bump Python version in CI
- Problem with decarboxylation reactions HOT 4
- Solvent not being added with G09 for TS quick-reaction coordinate HOT 1
- Autode error "Could not get energy" for the XTB calculation HOT 2
- autode deals with free radicals? HOT 3
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 autode.