Tuesday, April 21, 2009
Single Wall Carbon Nanotubes in 4.0.3 GROMACS and Windows Vista Part 1
Okay, I am starting to get results that are at least approximating what I would expect, by that I mean stays together and jiggles around. I'll get down to brass tacks and lay out how I did it and then later on talk about why I went about it this way, lessons learned, what's next, all that.
1. I used the oplsaa force field for this. This force field is not included in older versions of gmx. It already contains carbon in the atom types, so we don't have to add that. However we do have to add some cnt parameters to a couple of files. These files are all located in gromacs/top. The first file to change is ffoplsaa.n2t . We need to add a couple of carbon atoms bonded to two and three other carbon atoms. Open up the file in a text editor and add them to the bottom:
C opls_240 0 12.011 3 C 0.142 C 0.142 C 0.142
C opls_239 0 12.011 2 C 0.142 C 0.142
You can probably guess what's going on here: atom type, charge, mass, # of bonds, what they're bonded to and bond length in nm.
Here is my copy of the file: ffoplsaa.n2t
2. Next we are going to add some bond parameters to ffoplsaabon.itp. I just dropped these in at the bottom of the file where I saw other people had made some prior modifications:
; Added by TEM for CNTs
[ bondtypes ]
C C 1 0.14210 478900
[ angletypes ]
C C C 1 120.000 397.480
[ dihedraltypes ]
C C 1 0.000 167.360 1
Note there is some weirdness happening on the one side of the above tube. I'm not quite sure the dihedraltypes are correct, may need to revise that. Again here is my file: ffoplsaabon.itp
Okay, those were the changes. If you had read my previous post, don't worry about messing with the .rtp file. That was a messy fix and not necessary.
Next fire up cygwin and cd your directory to where you have you cnt pdb file. If you want a copy of my nano-capsule, here it is: swnt_capped.pdb
in cygwin, type: editconf -f swnt_capped.pdb -o swnt_capped.gro -d 2.0
This will create your .gro file with a 2.0 nm box around the tube.
next type: x2top -f swnt_capped.gro -o swnt_capped.top
This will create the topology file. The documentation says you can use a pdb file as input however I never got it to work with anything but the .gro file.
Next you need a simulation parameter file, md.mdp. Here is the one I used to get you started:
Put this file in your directory with your pdb, .gro and .top files. If you copy the text into a text file and save it as a text file, it usually doesn't work; copy an actual .mdp file and change the contents. So far the only thing I feel comfortable messing around with in this file is the simulation length and time step, lot going on here.
Now type: grompp -f md.mdp -c swnt_capped.gro -p swnt_capped.top -maxwarn 3
The experienced user may be interested to know that I used to have to set the maximum number of warnings to 150 to get past this...
And now: mdrun -s topol.tpr
The sim takes a couple of minutes to run through. You can then load the .gro and . trr file into VMD to view the results, make movies, whatever.
There is still more to go, need to figure out what is causing that buckling, a very knowledgeable professor has told me the potentials look too soft, bunch of stuff. If you have something to add to this, let me know.
Special thanks to Brian and Damian for putting up with the play-by-play emails, hope I'm not on the spam list now guys.