To begin with, you need to install the package Asymptote (http://asymptote.sourceforge.net/) , which is ' a powerful descriptive vector graphics language for technical drawing, inspired by METAPOST but with an improved C++-like syntax'.
The usage of NeatMol is supersimple. Firstly, prepare a file containing the Cartesian coordinates of your moelcule to be drawn, as exemplified in the following (the file is named, e.g. 'caffeine.cc1'):
24
C 0.842332 -0.365487 0.000000
C -0.284102 -1.196124 0.000000
N 2.029482 -1.104226 0.000000
N 0.077474 -2.535732 0.000000
N -1.647265 -0.617795 0.000000
C 1.453196 -2.367891 0.000000
C 0.637313 1.173511 0.000000
C -1.781269 0.768892 0.000000
N -0.677144 1.630636 0.000000
O 1.610675 1.934969 0.000000
O -2.920289 1.251006 0.000000
C -0.920246 3.109450 0.000000
C -2.862394 -1.482450 0.000000
C 3.455216 -0.681109 0.000000
H 2.087815 -3.245191 0.000000
H -1.498925 3.422212 -0.889789
H -1.498925 3.422212 0.889789
H 0.007191 3.714850 0.000000
H -3.490307 -1.288894 -0.890776
H -3.490307 -1.288894 0.890776
H -2.628953 -2.563865 0.000000
H 4.136021 -1.552908 0.000000
H 3.681706 -0.068585 0.893160
H 3.681706 -0.068585 -0.893160
Note: The first line indicates the total number of atoms, followed by lines indicating element symbols and Cartesian coordinates (in units of Angstrom).
Then, create a file called e.g. 'caffeine.asy' and put in the following commands:
import neatmol; size(10cm,0); Molecule mol = readMol("caffeine.cc1"); drawMol(mol);
After running the file 'caffeine.asy' with Asymptote, you will have a vector graphics looking like this:
To show bond distances, follow this example:
import neatmol; size(10cm,0); Molecule mol = readMol("caffeine.cc1"); drawMol(mol, defaultcrosspoint, 0); drawBondLength(mol, new pair []{(-1,-1)}, fontsize(12pt), NoFill);[/b]
Generated graphics:
You can also make 3D style for atoms:
import neatmol; size(10cm,0); Molecule mol = readMol("caffeine.cc1"); setMoldenStyle(); drawMol(mol); drawCharge("$2+$", fontsize(18pt));
Generated graphics:
Classic style is my favorite:
import neatmol; size(10cm,0); Molecule mol = readMol("caffeine.cc1"); setMoldenStyle(); drawMol(mol, defaultcrosspoint, 0); drawNumberSymbol(mol, fontsize(12pt));
Generated graphics:
Sketch style is the simplest yet informative:
import neatmol; size(10cm,0); Molecule mol = readMol("caffeine.cc1"); drawMol(mol, false);
Generated graphics: