epam / Indigo

Universal cheminformatics toolkit, utilities and database search tools
http://lifescience.opensource.epam.com
Apache License 2.0
312 stars 105 forks source link

Molecule rendering overlaps #758

Open kvarchenko opened 2 years ago

kvarchenko commented 2 years ago

Steps to Reproduce While rendering SMILES from list attached overlapped substructures and wrong turns appear. For example: c1ccccc1Oc1ccccc1F(C1C=CC=C2C=CC=CC=12)N(C1C=CC=C2C=CC=CC=12)Oc1ccccc1Br(C1C=CC=C2C=CC=CC=12)P[C-]BC1CCCC1Cl(C1C=CC=C2C=CC=CC=12)O

NC1CCCCC1[SiH2]C1CCCCC1PC1CCCC1CBrBrC1CCCCC1BNC1CCCCC1F[Br+]C1CCCC1

For Indigo Service:

curl -X POST "http://localhost:8002/v2/indigo/render" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"output_format\": \"image/png\", \"struct\": \"c1ccccc1Oc1ccccc1F(C1C=CC=C2C=CC=CC=12)N(C1C=CC=C2C=CC=CC=12)Oc1ccccc1Br(C1C=CC=C2C=CC=CC=12)P[C-]BC1CCCC1Cl(C1C=CC=C2C=CC=CC=12)O\"}"
curl -X POST "http://localhost:8002/v2/indigo/render" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"output_format\": \"image/png\", \"struct\": \"NC1CCCCC1[SiH2]C1CCCCC1PC1CCCC1CBrBrC1CCCCC1BNC1CCCCC1F[Br+]C1CCCC1\"}"

Expected behavior Rendered images without overlapping structures.

Actual behavior cfa7370e-4e22-4d7e-8bed-d2f3dfce798b ba0acf38-5224-44ba-b791-729824c223b8

Attachments rendering_problem_smiles.txt

Indigo/Bingo version

indigo_version: 1.7.0.44-gd16d27b64-x86_64-linux-gnu-11.2.1

AlexanderSavelyev commented 2 years ago

@kvarchenko please provide your code to reproduce

kvarchenko commented 2 years ago

For Indigo Service:

curl -X POST "http://localhost:8002/v2/indigo/render" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"output_format\": \"image/png\", \"struct\": \"c1ccccc1Oc1ccccc1F(C1C=CC=C2C=CC=CC=12)N(C1C=CC=C2C=CC=CC=12)Oc1ccccc1Br(C1C=CC=C2C=CC=CC=12)P[C-]BC1CCCC1Cl(C1C=CC=C2C=CC=CC=12)O\"}"
curl -X POST "http://localhost:8002/v2/indigo/render" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"output_format\": \"image/png\", \"struct\": \"NC1CCCCC1[SiH2]C1CCCCC1PC1CCCC1CBrBrC1CCCCC1BNC1CCCCC1F[Br+]C1CCCC1\"}"