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 "ltemplify.py" utility.

Details:

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 nanotube.data full

ltemplify.py

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

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

 echo "atom_style full" > nanotube.in
Then run ltemplify to convert nanotube.data into a moltemplate file:
 ltemplify.py -name Nanotube nanotube.in nanotube.data > nanotube.lt
You will need to edit the "nanotuble.lt" 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 "nanotube.lt" file (if it is present). Finally make sure the "system.lt" contains these lines:
 import "nanotube.lt"
 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 system.lt")

links

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

http://www.nanotube.msu.edu/tubeASP/

http://turin.nss.udel.edu/research/tubegenonline.html

http://www.ugr.es/~gmdm/java/contub/contub.html

(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.)