Re: Atom distance & ptraj

From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Thu Jan 05 2006 - 13:59:48 CST

Hi Bo,
you might want to refer to the thread at
http://www.ks.uiuc.edu/Research/namd/mailing_list/namd-l/2849.html about
using ptraj with namd.

As far as Pijush's suggestion goes, the index is simply a plain text
file with the atom index of each of the atoms you want to include,
numbered starting at 0. You can get this in vmd, for exmaple, with the
commands
set sel [atomselect top "selection of your choice"]
set ofile [open indices.dat w]
puts $ofile [$sel get index]
close $ofile
$sel delete

You had said earlier that you were having trouble getting the distances
using VMD. Once you know how, though, this is probably the easiest way
to do things. If you load your trajectory/trajectories into vmd, select
the distance of interest (by pressing '2' and then clicking on the 2
atoms), you can then go to Graphics > Labels, select bonds, and then
either graph (if you have xmgrace) or save the distances throughout the
trajectory in the graph menu. Saving them to a dat file will allow you
to subsequently view them in excel or other software of your choice.

Best, Peter

bo baker wrote:

>Hi,
>
>I try to use 'ptraj' to extract the distance information. There is one
>prolem here. How NAMD mask the atoms in the files of .psf and .dcd? I
>tried the way as in Amber, but didn't work. Here is how I did:
>
>ptraj N62-2wation.psf < n62namd-dist1.in
>
>test1:
>----
>trajin N62-2equil1.dcd.gz
>distance a1 out N62-2eq1a.dist time 0.02 :169_at_OE1 :188_at_NH1
>strip :WAT
>go
>----
>The error message:
>
>Mask [:169_at_OE1] represents 0 atoms !!!NO ATOMS DETECTED!!!
>Mask [:188_at_NH1] represents 0 atoms !!!NO ATOMS DETECTED!!!
>
>Test2:
>----
>trajin N62-2equil1.dcd.gz
>distance a1 out N62-2eq1a.dist time 0.02 :1661 :1931
>strip :WAT
>go
>-----
>The error message:
>
>Mask [:1661] represents 0 atoms !!!NO ATOMS DETECTED!!!
>Mask [:1931] represents 0 atoms !!!NO ATOMS DETECTED!!!
>
>
>Thanks for any advices.
>
>Bo
>
>

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:43:13 CST