Giter VIP home page Giter VIP logo

Comments (8)

johnmay avatar johnmay commented on August 28, 2024 2

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.

johnmay avatar johnmay commented on August 28, 2024 1

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.

johnmay avatar johnmay commented on August 28, 2024 1

in short you would ideally need: wU: wD: etc in the CXSMILES layers, this doesn't currently work though.

from depict.

nbehrnd avatar nbehrnd commented on August 28, 2024 1

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):

testing

test_cxsmiles.ipynb.zip

from depict.

nbehrnd avatar nbehrnd commented on August 28, 2024

Suggestion: change the level of the second pull-down menu; instead No Annotation, use CIP Stereo Label. This annotates two centres as S configurated:

with_labels

(Because an export to .svg is one option, the string below the structure formula can be removed later.)

from depict.

Kohulan avatar Kohulan commented on August 28, 2024

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

from depict.

johnmay avatar johnmay commented on August 28, 2024

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.

Kohulan avatar Kohulan commented on August 28, 2024

@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

from depict.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.