Comments (4)
You're right - the mapping is wrong in this specific case. The beauty of the approach is that it learned to map reactions without unsupervised (without having labelled examples). That said, it is not straightforward to improve and correct the model. Reporting wrongly mapped reactions like you just did is very helpful, as we will consider them for the next RXNMapper version.
Let me show explain to you what happens by looking at the attention weights on the RXNMapper Demo. If we look at the product atoms 1 and 2, and their attention weights towards the reactant atoms:
Attention of product atom 1.
We see that atom 2 has the stronger attention weight, and will be mapped first to the wrong reactant atom.
One reason for this attention pattern is how the SMILES are canonicalised for this specific case. If we look at the wrongly mapped part of the SMILES, we have the following ... C 1 = C ... >> C 1 = C ...
.
This is incorrectly mapped by RXNMapper to ... [C:1]1=[CH:2] ... >> [C:1]1=[CH:2] ...
. Due to the canonicalisation, in this case, the two carbon in the SMILES switched side around the 1 =
.
The correct mapping would be ... [C:2]1=[CH:1] ... >> [C:1]1=[CH:2] ...
.
Although your example is straightforward to map for a human, it is challenging for an AI model that sees the molecules only as SMILES strings.
from rxnmapper.
With the default parameters, RXNMapper will map all product atoms iteratively (as we assume that all atoms are present on the precursors side). The problem is that the last product oxygen atom to map overwrites another previously mapped oxygen atom, as you omitted H2O
in the reaction. If you add the H2O
, I guess it maps it correctly:
from rxnmapper.
Hi, I also want to report another case which is wrongly mapped.
rxn = L-glutamine <=> NH4(+) + L-glutamate
Smiles = NC(=O)CC[C@H]([NH3+])C(=O)[O-]>>[NH4+].[NH3+][C@@H](CCC(=O)[O-])C(=O)[O-]
mapped rxn = [NH3+:1][C@@H:2]([CH2:3][CH2:4][C:5](=[O:6])[NH2:11])[C:8](=[O:7])[O-:10]>>[NH3+:1][C@@H:2]([CH2:3][CH2:4][C:5](=[O:6])[O-:7])[C:8](=[O:9])[O-:10].[NH4+:11]
The change of O7
is not correct. The H2O
is omitted in the reaction.
from rxnmapper.
Closing due to inactivity.
from rxnmapper.
Related Issues (20)
- Error when installing from PIP HOT 5
- If a low confidence score means that the obtained mapped_rxn is invalid and can not use it? HOT 2
- AttributeError: 'SmilesTokenizer' object has no attribute 'max_l HOT 4
- Request: All source code to reproduce will be contained in this repository? HOT 1
- False atom mapping result. HOT 2
- Script to finetune model? HOT 1
- segmentation fault HOT 3
- ValueError when processing reaction smiles HOT 2
- Cannot run on M1 Mac
- Training dataset of rxnmapper? HOT 1
- rxn module not present in 0.2.0 release -- ModuleNotFoundError HOT 3
- Imbalanced Stoichiometry/ Missing Atom Mapping HOT 2
- Can not reproduce the result of Fig 4. HOT 2
- Can you share the code to reproduce the figure 4(A)? HOT 2
- pip error with python 3.11 HOT 13
- Error while generating Atom-atom mapping HOT 1
- Could you share the script to train the model? HOT 1
- if the atom mapping is invalid, should we remove this reaction when trainning model? HOT 2
- use get_attention_guided_atom_maps on generic compound HOT 1
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 rxnmapper.