From: Christopher Stiles (CS145331_at_albany.edu)
Date: Tue Aug 07 2007 - 10:12:13 CDT

Ha ha very good, he is the one that has gotten me this far but that was on
the GROMACS mailing list so I thought I should pose my VMD questions on this
one...but thank you and just to let you know he has already been a huge help
with my simulation. I am a summer intern at the College of Nanoscale Science
and Engineering (CNSE) State University of New York, and well basically it
has been my job to come up with the whole simulation without any prior
experience in the field, so basically I have never used any of these
programs and he has been a great help with helping me work out the bugs in
GROMACS and he has given me this last e-mail:
####################################
The best and easiest way to do this would be to write a script within VMD.
You can define an atom selection something like:
set wat_inside [atomselect $mol_id "same residue as water and (z > $NT_beg
and z < $NT_end and sqrt((x-$x_NT)*(x-$x_NT) +
(y-$y_NT)*(y-$y_NT)) < $NT_radius)]

Here $mol_id is the molecule id of your system (probably 0), $NT_beg and
$NT_end are the beginning and ending coordinates (in the
z-direction) of your nanotube, $x_NT and $y_NT are the x and y coordinates
of the nanotube center, and $NT_radius is the nanotube radius.

Then you can loop over the frames in your trajectory and update that atom
selection with the commands:
$wat_inside frame $n
$wat_insde update

Then you can figure out how many water molecules are within your nanotube by
$wat_inside num

Bob
###################################

So u can see how I tried to use it from my other e-mail at the bottom... but
I believe I may have screwed something up...

Thank you for your help as always,

~Christopher Stiles
College of Nanoscale Science and Engineering (CNSE)
State University of New York, Albany, New York 12203, USA

>-----Original Message-----
>From: Axel Kohlmeyer [mailto:akohlmey_at_cmm.chem.upenn.edu]
>Sent: Tuesday, August 07, 2007 9:54 AM
>To: Christopher Stiles
>Cc: VMD Mailing List; Bob Johnson
>Subject: Re: vmd-l: CNT Analysis
>
>
>On Tue, 7 Aug 2007, Christopher Stiles wrote:
>
>hi christopher!
>
>CS> Just off the bat I am very new to VMD and have went through some of the
>CS> tutorials and read the manual to the extent that it deals with
>Analysis.
>
>very commendable.
>
>CS> I have used Gromacs to simulate a Carbon Nanotube (CNT) in water for a
>CS> length of time. I am trying to use VMD to look at the tube and count
>the
>CS> number of water molecules in the tube with respect to time. I have the
>CS> following code but I am not sure that I am writing it correct or even
>going
>CS> about it correctly, so any advice would be greatly appreciated!
>
>i suggest you contact bob johnson (in cc), a graduate student in
>our group here in philly and our local expert in using VMD for
>analysis and visualization of data from simulations of carbon
>nanotubes and anything that you would want to put next to them.
>over the last couple of years he has done some truely amazing
>stuff with VMD for his project.
>
>cheers,
> axel.
>
>CS>
>CS>
>CS>
>CS> Here is the code that I try and put into the "Tk console":
>CS>
>CS> set NT_beg 1.0
>CS>
>CS> set NT_end 2.231
>CS>
>CS> set x_NT 1.6125
>CS>
>CS> set y_NT 1.6125
>CS>
>CS> set NT_radius 0.409
>CS>
>CS> set wat_inside [atomselect 0 "water" and (z > $NT_beg and z < $NT_end
>and
>CS> sqrt((x-$x_NT)*(x-$x_NT) + (y-$y_NT)*(y-$y_NT)) < $NT_radius)]
>CS>
>CS>
>CS>
>CS> Thank you,
>CS>
>CS>
>CS>
>CS> ~Christopher Stiles
>CS>
>CS> College of Nanoscale Science and Engineering (CNSE)
>CS>
>CS> State University of New York, Albany, New York 12203, USA
>CS>
>CS>
>CS>
>CS>
>
>--
>=======================================================================
>Axel Kohlmeyer akohlmey_at_cmm.chem.upenn.edu http://www.cmm.upenn.edu
> Center for Molecular Modeling -- University of Pennsylvania
>Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
>tel: 1-215-898-1582, fax: 1-215-573-6233, office-tel: 1-215-898-5425
>=======================================================================
>If you make something idiot-proof, the universe creates a better idiot.