Question: What Are The Best Solutions For 2D Generation Of Small Molecules ?
6
gravatar for Qud
7.2 years ago by
Qud60
Qud60 wrote:

I'm searching for a solution to automatically generate 2D molecule representation from different sources (SDF for example).

No graphical interface, library would be a plus.

chemoinformatics library • 4.0k views
ADD COMMENTlink modified 4.5 years ago by Abdul Rafay Khan940 • written 7.2 years ago by Qud60
2

2D coordinate generation or depiction or both?

ADD REPLYlink written 7.2 years ago by Noel O'Boyle40
1

Yeah, I originally assumed generation of 2D coordinates was meant, but lost confidence in that... clarification most welcome.

ADD REPLYlink written 7.2 years ago by Egon Willighagen5.2k
2
gravatar for Wolf Ihlenfeldt
7.2 years ago by
Wolf Ihlenfeldt150 wrote:

Arguably the best depiction software available is the 2D layouter integrated in the Cactvs toolkit (see www.xemistry.com/academic for free academic/educational versions). It is used for example in PubChem and by various 3rd-party software vendors (IDBS, Optibrium, etc.).

It provides both coordinate generation and depiction (via multiple renderers, including pixel images [GIF,PNG,bitmaps], SVG, WMF, EMF, PICT, EPS, PDF, MIF, SWF). Full stereochemistry support, including stereo-centers with free electrons, odd and even allenes, square planar stereochemistry - and proper trans double bonds in macrocycles - as far as I know, it is the only layouter which can do that. It knows about standard ring system orientations - so a steroid will always have its well-known appearance, regardless of the order of the input atoms, and pyridine etc. come out with the hetero atom at the bottom, not somewhere random, etc.. Aligned layout on a common substructure fragment is supported, and DNA/RNA/Peptide polymers are automatically recognized and laid out in a proper chain sequence. There is also a basic reaction layouter.

The toolkit has an easily programmed script interpreter, so setting up a batch script with custom parameters is simple. Over 50 structure file formats are automatically recognized and supported, including SDF.

All major platforms (Windows, OSX, Linux, Solaris, FreeBSD) are supported. We sell turnkey solutions for these problems, too, but these are limited to commercial customers. Link libraries for integration into custom software may be licensed.

Neutral comparisons:

http://baoilleach.webfactional.com/site_media/blog_b/sdg.html

http://ctr.wikia.com/wiki/Depict_a_compound_as_an_image

http://ctr.wikia.com/wiki/Align_the_depiction_using_a_fixed_substructure

ADD COMMENTlink written 7.2 years ago by Wolf Ihlenfeldt150
1
gravatar for Egon Willighagen
7.2 years ago by
Maastricht
Egon Willighagen5.2k wrote:

The Chemistry Development Kit can do this with the StructureDiagramGenerator. A full code example can be found in this blog post. The basic use looks like:

StructureDiagramGenerator sdg = new StructureDiagramGenerator();
sdg.setMolecule(someMolecule);
sdg.generateCoordinates();
Molecule layedOutMol = sdg.getMolecule();

If your input already has 2D coordinates, then the problem is much simpler, and you only need depiction. Then, you can use the rendering functionality from the CDK. Several tutorial posts can be found as links in this README. This will graphics like:

alt text

ADD COMMENTlink modified 7.2 years ago • written 7.2 years ago by Egon Willighagen5.2k
1

Except, of course that Molecule has been removed from recent versions? :)

ADD REPLYlink written 7.2 years ago by Gilleain30

Not in the stable release, only in the development release...

ADD REPLYlink written 7.2 years ago by Egon Willighagen5.2k
1
gravatar for Pierre Lindenbaum
7.2 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum119k wrote:

I wrote a XSLT stylesheet to transform PC-Compound/XML to SVG. See my blog at http://plindenbaum.blogspot.com/2009/06/fun-with-svg-ncbipubchemxslt-svg.html

xsltproc --stringparam scale 30 --stringparam xradius 2 \
         --stringparam show-bounds false \
         src/xsl/pubchem2svg.xsl \
         CID_16204538.xml > file.svg

alt text

ADD COMMENTlink written 7.2 years ago by Pierre Lindenbaum119k
1
gravatar for Michael Kuhn
7.2 years ago by
Michael Kuhn5.0k
EMBL Heidelberg
Michael Kuhn5.0k wrote:

There's a simple tool called mol2ps / mol2png which you can call from the command line.

ADD COMMENTlink written 7.2 years ago by Michael Kuhn5.0k
1
gravatar for Fredrik
7.2 years ago by
Fredrik30
Sweden
Fredrik30 wrote:

You can also use OpenBabel, either through the command line command obabel or through the API, in c++ or any of the script bindings (e.g. pybel for Python, easiest accessed through Cinfony)

ADD COMMENTlink written 7.2 years ago by Fredrik30
1
gravatar for Joe Corkery
7.2 years ago by
Joe Corkery10
Cambridge, MA
Joe Corkery10 wrote:

OpenEye's OEDepict library would be a perfect solution for this problem. OEDepict offers rapid 2D coordinate generation and artful rendering of chemical structures. 2D coordinates can be generated from SMILES or from 3D structures. Multiple image file formats are supported including but not limited to: PNG, SVG, PS, EPS, and PDF.

In addition to handling molecule 2D coordinate generation and depiction routines, OEDepict provides a powerful engine that supports:

  • basic shape drawing
  • multiple molecular display options
  • a variety of highlighting styles
  • customizable layout options (including grids and multi-page formatting)
  • depictions aligned by MCS or substructure
  • MDL query and MDL reaction depictions.

The library is written in C++ but has bindings for Python, Java, and .NET. Most standard platforms are supported including Microsoft Windows, Mac OS X, and a wide variety of Linux flavors.

OEDepict is free for non-commercial use and is used widely throughout the pharmaceutical industry and embedded in many third-party applications.

OEDepict also has a companion library, Grapheme TK that provides additional mechanisms to enhance standard 2D depictions based on 3D properties. I've included a few example images below.

alt text

alt text

ADD COMMENTlink written 7.2 years ago by Joe Corkery10
1
gravatar for Abdul Rafay Khan
4.5 years ago by
Karachi, PK
Abdul Rafay Khan940 wrote:

http://cdk.sourceforge.net/

ADD COMMENTlink written 4.5 years ago by Abdul Rafay Khan940
0
gravatar for Abdul Rafay Khan
4.5 years ago by
Karachi, PK
Abdul Rafay Khan940 wrote:

http://cdk.sourceforge.net/

ADD COMMENTlink written 4.5 years ago by Abdul Rafay Khan940
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1060 users visited in the last hour