Comments (9)
Possible in code but via the web-service at the moment. I can make the annotate parameter take a list e.g. annotate=colmap,atommap etc. Things get crowded very quickly though.
What's the use-case?
from depict.
I bet it will get crowded, we'd like to us this to simplify metabolic reactions where we have atom maps, by reducing the chains and other "substructures" down to R groups - we can display e.g. numbered Rs in the CDK but not e.g. in ChemAxon, where they become *s. We're playing around with the possibilities of how we can index parts of "uncertain structures" that aren't reacting, the colour helps visually track what is going where in the reaction but we need the atom maps too - hence the combination would be cool. It's early days, we're playing around with how we could implement this in code and the ability to edit the SMILES live in the web interface and see what happens is incredibly useful .. pre-coding once we have the concept sorted... because I don't actually have the SMILES, I'm making them "live" and we're trying to figure out what will work so we can create them systematically ... if you see what I mean ...
I have a couple of examples but the URLs are going crazy with copy paste and I can't rescue the SMILES out of them (I have the originals on a different device ... can send if needed) ... here's at least one of the pictures...
from depict.
we can display e.g. numbered Rs in the CDK but not e.g. in ChemAxon, where they become *s
Erm.. that doesn't sound right? How are you putting the R groups in...
c1ccccc1* |$;;;;;;R1$|
Is how it should be done the same in both ChemAxon and CDK (they did it first). I do have a debug function that dumps unrecognized text from bracket atoms in to pseudo-atoms but this is non-standard and should not be used e.g. c1ccccc1[R1] BAD
.
Also you can put the substituents in there... I don't support this fully mainly because CDK likes to have separate objects (e.g. there is an RGroupQuery instance) whereas I would just represent everything in a single mol type.
c1ccccc1 |$R1;;;;;;$,RG:_R1={CC |$;;_AP1$|},{CCC* |$;;;_AP1$|}|
Have some prototype code to display that
from depict.
from depict.
Yes you can use it in reactions too. It's CXSMILES export option from ChemAxon.
from depict.
I don't have ChemAxon so can't try the export directly and I also have a lot of structures from literature that I'm trying to represent correctly where I don't necessarily even have mol files to start as, in the end, I need the SMILES that works properly for the CDK, not a mol. I tried a few CxSMILES that display well individually and couldn't get any of them to work with a reaction.
If I start with one of your examples:
CCO.[CH3:1]C:2[OH:4]>[H+]>CC[O:4]C:2[CH3:1].O Ethyl esterification [1.7.3]
Then I modify the CCO and reactant to contain an R group:
*CO |$R1;;$| test
*C[O:4]C:2[CH3:1] |$R1;;;;;$| test2
These display fine by themselves
but the reaction doesn't - everything after the first reactant ends up in the title (or nothing displays) no matter what combination of spacing I try. What am I missing?
*CO |$R1;;$|.[CH3:1]C:2[OH:4]>[H+]>*C[O:4]C:2[CH3:1] |$R1;;;;;$|.O Ethyl esterification with R group
from depict.
No you put it all in the title, this ensure backwards compatability:
OC[*].[CH3:1][C:2]([OH:4])=[O:3]>[H+]>[CH3:1][C:2](=[O:3])[O:4]C[*].O |$;;_R1;;;;;;;;;;;_R1;$| Ethyl esterification [1.7.3]
https://www.chemaxon.com/marvin-archive/latest/help/formats/cxsmiles-doc.html
from depict.
ahha, without _ it looks better ... so you have to count atoms over the whole reaction ... I see ...
OC[*].[CH3:1][C:2]([OH:4])=[O:3]>[H+]>[CH3:1][C:2](=[O:3])[O:4]C[*].O |$;;R1;;;;;;;;;;;R1;$| Ethyl esterification [1.7.3]
or even
OC*.[CH3:1][C:2]([OH:4])=[O:3]>[H+]>[CH3:1][C:2](=[O:3])[O:4]C*.O |$;;R1;;;;;;;;;;;R1;$| Ethyl esterification [1.7.3]
(because the original SMILES don't have the * in square brackets?)
from depict.
But to return to the original issue ... if I want to combine atom mapping AND colour mapping in R:
m2 <- parse.smiles("[CH3:1]C:2[OH:4]")[[1]]
dep2 <- get.depictor(annotate="mapidx")
img <- view.image.2d(m2,dep2)
plot(1:10, 1:10, pch=19)
rasterImage(img, 2,2,8,10)
But I can't get the colmap - presumably because I need the reaction (a single SMILES also doesn't display colmap in depict):
dep3 <- get.depictor(annotate="colmap")
img <- view.image.2d(m2,dep3)
plot(1:10, 1:10, pch=19)
rasterImage(img, 2,2,8,10)
But if I try to parse reaction SMILES that display in Depict I get null ... what option am I missing here?
@rajarshi ?
m3 <- parse.smiles("CCO.[CH3:1]C:2[OH:4]>[H+]>CC[O:4]C:2[CH3:1].O Ethyl esterification [1.7.3]")[[1]]
m3
NULL
Without title the same:
m3 <- parse.smiles("CCO.[CH3:1]C:2[OH:4]>[H+]>CC[O:4]C:2[CH3:1].O")[[1]]
m3
NULL
Would adjusting "annotate" to take a list be the right way, or rather a new option that just combines colmap and mapidx? I guess a list would let users pick and choose...
from depict.
Related Issues (20)
- Batch download as PNG and standardizing the image size? HOT 2
- Multi-step reaction SMILES? HOT 9
- Option to depict Molfile-provided coordinates HOT 4
- Feature request: alignment via SMARTS HOT 2
- Fix variable attach in brackets (CXSMILES_ HOT 1
- vulnerability in trivy scan HOT 2
- How to disable the Thiele ring? HOT 7
- latest Docker fails with exception HOT 3
- CDK Depict website down? HOT 2
- missing stereo in CXSMILES depiction HOT 7
- relabelling of atoms is possible? HOT 4
- What are the query params? HOT 2
- Missing charges HOT 1
- atom numbering based on the InChI HOT 16
- thoughts about input of .sdf (version 3000) / extended stereochemistry HOT 2
- mark missing stereo HOT 3
- depict 1H-imidazole HOT 3
- bug in atom placement on for image render - specific smiles HOT 1
- Bug in depicting CXSMILES with Stereochemistry HOT 8
- www.simolecule.com does not work anymore 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 depict.