Building chiral nanotubes using external software

The approach shown here works well for "zig-zag" nanotubes. Nanotubes with other chiralities are more difficult to make this way (because the tube axis is no longer perpendicular to graphene basis vectors). For those nanotubes, I recommend using an external program to generate a LAMMPS data file for the nanotube. If you want to combine the tube with other molecules created by moltemplate, you can then import it into moltemplate as a molecule object using the "" utility.


VMD plugins (by Axel Kohlmeyer and Robert R. Johnson)

The nanotube-builder for VMD can generate nanotubes (with smooth tips) for any chirality. These tubes also have explicit bonds between carbons:

The resulting nanotube can be converted to a data file using topotools. To do that, select the "Extensions"->"Tk Console" menu and enter

 topo writelammpsdata full

That data file can be converted to moltemplate format (an .LT file) using the "" utility.

The first step is to create a short input script containing the atom_style command ( will read this script. Presumably atom_style is "full").

 echo "atom_style full" >
Then run ltemplify to convert into a moltemplate file: -name Nanotube >
You will need to edit the "" file to replace all of the "@atom:type1" atoms types file to match the carbon atom types in the other lt files (ie "@atom:../C"). If you don't plan on defining bonded interactions between carbon atoms, then be sure to remove the write("Data Bonds") section of the "" file (if it is present). Finally make sure the "" contains these lines:
 import ""
 nanotube = new Nanotube.move(?,?,?)
(Replace ?,?,? with the location where you want the nanotube to go. You can also rotate it using .rot(angle,axisx,axisy,axiz).)

... and then run moltemplate the normal way ("moltemplate -atom_style full")


Note: there are numerous programs for specifying the coordinates of the atoms in a nanotube, some of which are below.

(You can load coordinates into moltemplate using the "-xyz" or "-pdb" arguments. However currently (2013-12-01), the file must contain coordinates for all of the atoms in your sytem, not just the nanotube.)