Details:
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
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.inThen run ltemplify to convert nanotube.data into a moltemplate file:
ltemplify.py -name Nanotube nanotube.in nanotube.data > nanotube.ltYou 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")
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.)