VMD and NAMD are two closely linked molecular dynamics tools from the UIUC Computational Biophysics Group. As you can probably guess from the ‘Biophysics’ header, the emphasis for this suite is on large-scale macromolecular clusters such as proteins or even lipid bilayers, meaning CHARMM and force field models are the order of the day.
Despite the emphasis on biochemistry, there is an interesting tutorial on simulating water permeation through carbon nanotubes. When I stumbled across that tutorial on the same day I saw a post about desalinization using carbon nanotubes, I thought ‘kismet!’.
The tutorial is really quite good, and I encourage you to follow it, but there are a few steps to get you started.
- To download the software from UIUC, you’ll need to go to:
http://www.ks.uiuc.edu/Development/Download/download.cgi?PackageName=NAMD
which will prompt you to create a new user account. - Once that rigmarole is out of the way, you’ll need to actually download NAMD, the actual molecular dynamics simulator. If you’re running this on a Windows PC ( I’m assuming you are, otherwise you should know enough about what you’re doing to not need me! ) you’ll need to download the NAMD_2.6 Win32 version, instead of whatever is the latest version. Apparently Windows users don’t need up to date molecular modeling, or so I’m told. If this post if more than 6 mo old, you might try the newest version instead of 2.6, YMMV.
- Next download VMD, the MD visualizer component. For the windows users, there is an auto installer. It will drop the VMD link into a ‘Programs’->’University of Illinois’ folder in your start menu.
- Finally you’ll need to download the nanotube tutorial files, as mentioned in the tutorial file itself.
- Put all those files into one directory, unzip the zip files, and run the VMD installer if you chose that route.
You should now be set up for following the water permeation tutorial.
Note that when it says ‘run source xxx.tcl’, what it really means is: navigate to the directory where you unzipped the nanotube_tutorial files first using something like:
cd c:/Users/verpa/Desktop/chemistry/nanotube_tutorial
( note the commands are DOS but using unix style ‘/’ instead of DOS ‘\’ separators )
then run:
source xxx.tcl
Do the tutorial. Note in the AutoIMD section, you can grab molecules while the sim is running and fling them willy-nilly. It’s quite fun and possibly even useful.
…
Well, that was fun, yes? Now let’s sexy it up a bit by adding two ions, good old Na+ and Cl-. The basic premise of the article, was that carbon nanotubes will magically stop ions from flowing through the tube for a lot of different hand waving reasons. Personally, I don’t buy it … sure the ions won’t get through the tube, that’s just a VdW argument ( at least on the cation side ). To me, the bigger issue to me is tube blockage. My naive assumption would be that these ions ( and their loosely bound primary solvation sphere ) will hit the tube aperture and block other water molecules from getting through.
Enough talk, tell me how to test it!
- We need to add our Na and Cl atoms to the PDB file you ran sims on in the tutorial. Make a copy of cnt.pdb called cnt_mod.pdb. Edit the new file, by placing the following lines:
ATOM 1321 SOD SOD I 1 8.010 6.395 -9.214 0.00 0.00 ION NA ATOM 1322 CLA CLA I 2 -2.251 4.666 -9.206 0.00 0.00 ION CL
the logic should be pretty clear, but to break it down:
(1321) atom number, (SOD) atom label, (SOD I) aminoacid name,
(1) aa chain-id, (8,6,-9) x,y,z atom coordinates, (0) occupancy
(0) not sure, (ION NA) residue name
Note that NAMD uses the occupancy value to tell which atoms to process (0) and which to leave fixed (1).
- Next, copy of the cnt.psf file to cnt_mod.psf. Add this starting on line 1328:
1321 ION 1 SOD SOD SOD 1.000000 22.9898 0 1322 ION 2 CLA CLA CLA -1.000000 35.4500 0
(1321) atom number, (ION) residue, (1) residue subgroup,
(SOD) aa code, (SOD) aa subgroup code, (SOD) atom-type label,
(1) partial charge, (23) atom mass, (0) dunno.Unfortunately, since we’ve changed the atom count, we need to change the atom count on line 8. Increase it by 2 to 1322.
- Finally, let’s tell our NAMD conf file what to do. Copy sim_short.conf to sim_mod.conf and edit:
structure cnt_mod.psf coordinates cnt_mod.pdb set temperature 300 set outputname sim_mod temperature 300.00K # Needed since we don't have # precomputed coor and vel files
and
minimize 500; # We've changed the atom positions and are not providing # and are not providing an optimized starting position # a few minimize cycles will find us good starting points # and avoid the ' atoms moving too fast ' error run 40000 ;# 40ps
- Run that in the same way as with the tutorial sim_short.conf. If you’re running a multicore processor, you might want to add the multiprocessor option, +pN, where N is number of processors:
namd2.exe +p2 nano_tutorial/sim_mod.conf - Get some tea. When you come back, load the files cnt_mod.psf and sim_mod.dcd and enjoy.
If, like me, you ran sim_mod and sim_short for 150000 ticks, you’d find that ( using flow.tcl ):
sim_short ( no ions ): 56 water molecules (+z)
sim_mod ( one pair of NaCl ions over separate nanotubes ): 42 water molecules (+z)
An examination of the video of the salty water simulation shows that while the sodium ion with its solvation shell is able to plug up one nanotube a little, the chloride ion tends to slip out, allowing free passage to the water.
Basically, I have to eat my words … on balance, water molecules continue to flow ( if a bit slower ) even when the sodium ion and its bulky coordination sphere are jammed into the nanotube’s narrow pipe … that’s what she said!
Yup, this whole entry was build up for that one joke. That’s what I call commitment to a bit.
A couple things…
1) I don’t follow your reasoning for “Personally, I don’t buy it … sure the ions won’t get through the tube, that’s just a VdW argument ( at least on the cation side ).”. For atomic species such as the ones you’re studying I expect fluxional but persistent first solvation shells, thus if anything I would expect you to say “at least on the anion side” since it is the larger core. Am I missing something obvious?
2) I like your interpretation of the molecules acting like a flapper on a toilet, but I am not surprised to see that its not tightly bound to the end. I expect there to be few intermolecular forces holding it in place so is must be some kind of osmotic vacuum that causes the ions to gravitate to the channels?
3) Do you actually see slower velocities for the Na channel vs. Cl? I understand different fluxes (molecules / time) but I don’t really understand how an ion at the entrance would perturb the dielectric inside the tube enough to generate significantly different diffusion rates.
Fair points:
1) No, you’re right. I wasn’t thinking through the argument completely in my head. Both ions’ solvation shells would block them from fitting.
2) Yup. I was a bit weirded out by the argument from one of the article that inspired this: “And if that wasn’t good enough, the team found that the nanotube filters are very good at removing ions from water as it passes through. Bakajin thinks that the broken bonds at either end of the tubes attract the ions.” http://physicsworld.com/blog/2009/03/nanotubes_and_desalination.html
Though they’re probably talking about something a bit more sexy than our generic nanotubes here.
3) Nope, this was me being sloppy with my terminology. The sodium blocked tube had a lower flux, not speed.
Per a request to see this same simulation run using a proton in place of the sodium ion, see here:
http://www.screencast.com/t/NTc2OTkxNmM
Same conditions with a pressure of 1000+ atms being being applied to the top layer of water molecules ( per the tutorial ).
Note again that the proton doesn’t seem to be able to slip through from its solvation sphere.
Hi,
I’m having some trouble running the water permeation tutorial. Whenever I try to run one of the tcl scripts, I get syntax errors:
Kevins-MacBook-Pro:nanotubes-files Kevin$ source make_arm.tcl
-bash: proc: command not found
-bash: make_arm.tcl: line 12: syntax error near unexpected token `(‘
-bash: make_arm.tcl: line 12: ` set tt [expr 2*$PI/(3*$m)]’
Kevins-MacBook-Pro:nanotubes-files Kevin$ source flow.tcl
-bash: proc: command not found
-bash: global: command not found
-bash: foreach: command not found
-bash: flow.tcl: line 22: syntax error near unexpected token `}’
-bash: flow.tcl: line 22: ` } elseif {$z > $upperEnd} {‘
Kevins-MacBook-Pro:nanotubes-files Kevin$ source permeation.tcl
-bash: puts: command not found
-bash: foreach: command not found
-bash: lappend: command not found
-bash: permeation.tcl: line 23: syntax error near unexpected token `}’
-bash: permeation.tcl: line 23: `}’
Kevins-MacBook-Pro:nanotubes-files Kevin$
Hello,
It’s been a while since I worked with this, but as I recall there was, at the time, a fair bit of problems with depending on what version of the application you’re using and what OS type.
Since I don’t have a macbook, I probably can’t help too much, but give a post onto the list here:
http://www.ks.uiuc.edu/Research/namd/mailing_list/
according to the guidelines here: http://www.catb.org/~esr/faqs/smart-questions.html ( include OS and build of your NAMD version )
If you’re still running into trouble, let me know the info as well and I’ll see if I can’t get it running on my linux box this weekend.
Have fun!
Verpa