Gromacs

Carbon Nanotube

    Robert Johnson's Tips

    Taken from Robert Johnson's posts on the gmx-users mailing list.

    • Be absolutely sure that the "terminal" carbon atoms are sharing a bond in the topology file.
    • For GROMACS version 3.3.x, use pbc = full in your .mdp file (use periodic_molecules = yes in GROMACS version 4.0)
    • Even if the topology is correct, crumpling may occur if you place the nanotube in a box of wrong dimension, so use VMD to visualize the nanotube and its periodic images and make sure that the space between images is correct. If the spacing is too small or too big, there will be a large amount of stress induced in the tube which will lead to crumpling or stretching.
    • Don't apply pressure coupling along the axis of the nanotube. In fact, for debugging purposes, it might be better to turn off pressure coupling altogether until you figure out if anything is going wrong, and if so, what.
    • When using x2top with a specific force field, things are assumed about the connectivity of the molecule. The terminal carbon atoms of your nanotube will only be bonded to, at most, 2 other carbons, if periodic, or one if non-periodic and capped with hydrogens.
    • You can generate an "infinite" nanotube with the -pbc option to x2top. Here, x2top will recognize that the terminal C atoms actually share a chemical bond. Thus, when you use grompp you won't get an error about a single bonded C.

     

    Christopher Stiles's Advice

     

    New GROMACS Users

    First if you are new to GROMACS step on before you even install the program is to read the GROMACS Manual! It is not that long and it will keep you from making your self look stupid by asking questions that are very clearly covered in it.

    Second run the tutorials and make sure that your installation is functioning properly.

    Third make sure that all your files are UNIX formatted while this can cause major problems otherwise.

    Fourth become familiar with the formatting of a .pdb File and what exactly a residue is!

     

    New to Simulations Containing CNT’s

    Now once you have done all of this you are ready to start learning how to use GROMACS for your CNT simulations.

    First I would start with using my site (broken link and not archived anywhere— 2012-04-13) to get a general idea of what a basic run through for a CNT simulation entails Please note that this has not been updated for changes in the most current version.

    For .pdb files you might want to use an application called Nanotube Modeler.

    It allows for larger nanotubes then the method I have on the site and even offers the ability to use capped tubes. I have worked with the developer to make it so that the output .pdb files have correct bond records although note that some modification must be made to the files (commenting out the first I believe 2 lines or so, and naming your residues properly. This can be looked up easily and you should know how since you know what a residue is by now and where they are in your .pdb files). The application does cost money but the time you save not hand coding is invaluable.

     

    When You Start Having Problems

    Search the mailing list to see if your problem has already been solved - more then likely it has! This is how I figured out most of my problems and the ones I asked are also documented, try searching things like ‘cnt’ and ‘swcnt’ or even looking for threads involving me (Christopher Stiles) they would have been from the summer months of 2007 mainly.

    When all else fails ask your question clearly on the mailing list. Please make sure you are very clear - it will save you and the people nice enough to respond lots of time! So what I mean by being clear is include any errors you are having as they appeared when you get them. Also include all step you have made previously including the commands you used and how you modified any files. Also, follow the advice here on getting help.

    Also VERY IMPORTANT, pose your questions on the mailing list and not personally to individuals' e-mail addresses. This way when this person is nice enough to take time out of their day to answer your question, others may benefit from the question and answer.

     

    Analyzing Your Data

    Since you have read the manual you know there are lots of great tools built in! So use them! Although I did run into some problems getting them to do exactly what I wanted to do so I utilized another application. For my analysis of my data I use an application called VMD.

    With this application I use Tcl/Tk scripts to analyze at the data. This application is very useful in producing nice images for presentations as well!

     

    Andrea Minoia's tutorial

    Modeling Carbon Nanotubes with GROMACS (also archived as http://www.webcitation.org/66u2xJJ3O) contains everything to set up simple simulations of a CNT using OPLS-AA parameters. Structures of simple CNTs can be easily generated e.g. by buildCstruct (Python script that also adds terminal hydrogens, WebCite archive of BuildCstruct v1.1) or TubeGen Online (just copy and paste the PDB output into a file and name it cnt.pdb).

    To make it work with modern Gromacs 4.5.3+ you'll probably want to do the following:

    1. make a directory cnt_oplsaa.ff
    2. In this directory, create the following files, using the data from the tutorial page:
      • forcefield.itp from the file in section .itp
      • atomnames2types.n2t from the file in section .n2t
      • aminoacids.rtp from the file in section .rtp
    3. generate a topology

    g_x2top -f cnt.gro -o cnt.top -ff cnt_oplsaa -name CNT -noparam

    • select the custom forcefield (the cnt_oplsaa.ff directory must be in the same directory as where the g_x2top command is run or it must be found on the GMXLIB path)
    • -noparam instructs g_x2top to not use bond/angle/dihedral force constants from the command line (-kb, -ka, -kd) but rely on the force fiel files; however, this necessitates the next step (fixing the dihedral functions)

    The function type for the dihedrals is set to '1' by g_x2top but the force field file specifies type '3'. Therefore, replace func type  '1' with '3' in the [ dihedrals ] section of the topology file. A quick way is to use sed (but you might have to adapt this to your operating system; also manually look at the top file and check that you only changed the dihedral func types):

    sed -i~ '/\[ dihedrals \]/,/\[ system \]/s/1 *$/3/' cnt.top

    Once you have the topology you can set up your system. For instance, a simple in-vacuo simulation (using your favourite parameters in em.mdp and md.mdp):

    Put into a slightly bigger box:
    editconf -f cnt.gro -o boxed.gro -bt dodecahedron -d 1

    Energy minimise in vacuuo:
    grompp -f em.mdp -c boxed.gro -p cnt.top -o em.tpr
    mdrun -v -deffnm em


    MD in vacuuo:
    grompp -f md.mdp -c em.gro -p cnt.top -o md.tpr
    mdrun -v -deffnm md


    Look at trajectory:
    trjconv -f md.xtc -s md.tpr -o md_centered.xtc -pbc mol -center
    trjconv -s md.tpr -f md_centered.xtc -o md_fit.xtc -fit rot+trans
    vmd em.gro md_fit.xtc

     

    External Material

    • TubeGen Online - web-accessible nanotube structure generator.
    • NanoEngineer-1 - a nano engineering CAD software that allows easy construction of nanotubes and graphene sheets (and comes bundled with Gromacs 3.3.3 for energy minimisation and MD, see NanoEngineer-1 gromacs, hence one can use NE1 to build topologies...)

    Tom Moore's Machine Phase Posts

    Guide to setting up GROMACS 4.0 to use with carbon nanotubes:Part 1

    Page last modified 22:37, 13 Apr 2012 by orbeckst