Comments (8)
Closing as won't fix, perhaps in future but not now. Please feel free to send patch, i've pointed to what needs to change. All the best.
from depict.
The issue is if you give it coordinates, it expects to have the non-planar bonds (up/down wedges) annotated as well. See here: https://docs.chemaxon.com/display/docs/chemaxon-extended-smiles-and-smarts-cxsmiles-and-cxsmarts.md#src-1806633-safe-id-q2hlbuf4b25fehrlbmrlzfnnsuxfu2fuzfnnqvjuuy1dwfnnsuxfu2fuzenyu01bulrtlvnpbmdszsjvcg9yrg93biiov2lnz2x5ksxvugfuzerpv05ib25kcw
from depict.
in short you would ideally need: wU: wD: etc in the CXSMILES layers, this doesn't currently work though.
from depict.
The wedges, ... I see. No problem resolution, but a couple of observations (Python 3.11.2, RDKit 202209.3-1 as provided by Debian 12/bookworm):
-
the example about ferrocene
c12c3c4c5c1[Fe]23451234c5c1c2c3c45 |C:4.5,0.6,1.7,2.8,3.9,7.12,6.10,9.16,10.18,8.14|
works, but the bridged cycles[H][C@]12CCCC@(CC(C)C1)C2(S)Cl |r,TLB:13:11:2.4.3:7.10.8,THB:12:11:2.4.3:7.10.8,9:8:11:2.4.3|
and[H][C@]12COCC@(CC@@HC1)[C@@]2(Cl)C1CCCC1 |r,TLB:15:14:2.4.3:7.13.8,THB:16:14:2.4.3:7.13.8,9:8:14:2.4.3|
by ChemAxxon do not pass. I assumed perhaps work to cover cxsmiles by cdk/depict is ongoing. -
Based on a blog post here I run a Jupyter notebook. With one of isomer of mandelic acid,
O=C(O)[C@H](O)c1ccccc1
all works well, the output by RDKit is accepted here. With copy-paste of the SMILES of your molecule of interest, it does not. -
Because SMILES can differ by program / algorithm engaged, I tested the canonical SMILES OpenBabel assigns to your structure (
S=C(N[C@H](C(=O)N[C@H](c1ccccc1)C)c1ccccc1)Nc1ccccc1
). Though the string passes the notebook, but the result doesn't work for cdk/depict either.
Below a screen photo about cdkdepict (ferrocene, one of ChemAxxon examples for bridged structures; mandelic acid, and with your structure expressed by OpenBabel's canonical SMILES -- the later two cxsmiles generated with the Jupyter notebook attached in the .zip):
from depict.
Suggestion: change the level of the second pull-down menu; instead No Annotation
, use CIP Stereo Label
. This annotates two centres as S configurated:
(Because an export to .svg is one option, the string below the structure formula can be removed later.)
from depict.
Thank you but there does not appear to be a problem with annotation, and CIP annotation does not seem to be relevant in this case. The CXSMILES depiction should get displayed like this:
![image](https://private-user-images.githubusercontent.com/30716951/241175131-3460556c-2a60-4a62-97c0-f4eb791af2c3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY3NzMsIm5iZiI6MTcyNDc3NjQ3MywicGF0aCI6Ii8zMDcxNjk1MS8yNDExNzUxMzEtMzQ2MDU1NmMtMmE2MC00YTYyLTk3YzAtZjRlYjc5MWFmMmMzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDE2MzQzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVkZjg1OTdlZmQwNzA5MDVhZWZlOWQxZDFlYTM1NmYwOGE5OWZjNjcyYTI5YjU3MjM0ZWMwMTNjNzQxZTRhYTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.94zlQzbqgX6oPYZ2o_mO-D7dGyhi_LMw7p_lxYjox-Y)
from depict.
I'm not sure if we currently pass/set them from the CXSMILES but it's certainly possible. The other option is we assign the up/down bonds if they are missing but I'm less keen on that.
from depict.
@johnmay Thanks a lot.
I'm not sure if we currently pass/set them from the CXSMILES but it's certainly possible.
This could be the best option I agree. Since we tend to use the CDK depiction quite a lot it would be great if we fix this internally.
@nbehrnd Thank you for the detailed information.
I was able to parse the SMILES string I provided with RDKIT without any issues, and the molecule is displayed in the exact coordinates provided.
![image](https://private-user-images.githubusercontent.com/30716951/241202908-65dc9edc-17a2-4642-9055-6cad9c38b21e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3NzY3NzMsIm5iZiI6MTcyNDc3NjQ3MywicGF0aCI6Ii8zMDcxNjk1MS8yNDEyMDI5MDgtNjVkYzllZGMtMTdhMi00NjQyLTkwNTUtNmNhZDljMzhiMjFlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI3VDE2MzQzM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThmNTlmMjY0MjFhNjIwZjdkZTI5MDJlM2IyODNhZjEwYjU5NTA0ODVlY2RjYmZjY2ZlZjZhOGZhYzE2MjliNWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.WAeaDsBpCZwTzAV_Wt1iyO5KeM4kg7pR4_Hsy99cSmk)
from depict.
Related Issues (20)
- 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
- www.simolecule.com does not work anymore HOT 2
- Flip should flip stereobond HOT 1
- feature request: generating multiple molecue structures within one image HOT 1
- Abbreviation of ketene
- fork me icon broken? HOT 1
- Aromatic display HOT 2
- CDK Depict website appears to be down HOT 5
- "White on clear" / "Neon on clear" options? HOT 2
- Feature request: MOL or single-molecule SDF as output? HOT 3
- Question: Query parameters for editor / starting page 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.