Multiple 2D drawings from 3D-zmatrix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple 2D drawings from 3D-zmatrix

John McKelvey
Hello..

I have about 50 MOPAC Z-matrix files for which I need 2d
representations for publication.  I would like to have only the heavy
atoms rendered + any H's attached to hetero atoms.  As the structures
are dyes it would also be very helpful if resonance-structure/kekule
configuration be included as well as an index number for each
structure.

I have used O-B only for file format conversions.

Any suggestions most appreciated..

John

--
John McKelvey
10819 Middleford Pl
Ft Wayne, IN 46818
260-489-2160
[hidden email]

------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
Reply | Threaded
Open this post in threaded view
|

Re: Multiple 2D drawings from 3D-zmatrix

Geoffrey Hutchison
> I have about 50 MOPAC Z-matrix files for which I need 2d
> representations for publication.

Here's one easy way -- without needing to install anything else. I'm assuming you can use a Linux box with bash, or something similar. I use "curl" but "wget" can also work here with slightly different command-line options.

for x in *.out; do
  echo $x;
  inchi=`babel $x -oinchi 2>/dev/null | awk '{print $1;}'`
  curl -s -o ${x%%.out}.png "http://cactus.nci.nih.gov/chemical/structure/${inchi}/image?format=png"
done

Basically, you use OB to convert to an InChI and pass it through the NIH chemical resolver. There are a number of format options you can specify with the end of the URL:

http://cactus.nci.nih.gov/blog/?p=136

You mentioned wanting to add some text, so you might look at the header/footer options in that blog post. Noel mentioned a few Python modules -- this basically does the same thing.

Hope that helps,
-Geoff
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
OpenBabel-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss