VMD-L Mailing List
From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Tue Aug 29 2006 - 17:42:56 CDT
- Next message: Nitin Bhardwaj: "Re: Counting H-bonds from a dcd file"
- Previous message: Nitin Bhardwaj: "Counting H-bonds from a dcd file"
- In reply to: Nitin Bhardwaj: "Counting H-bonds from a dcd file"
- Next in thread: Nitin Bhardwaj: "Re: Counting H-bonds from a dcd file"
- Reply: Nitin Bhardwaj: "Re: Counting H-bonds from a dcd file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
On 8/29/06, Nitin Bhardwaj <nbhardwaj_at_gmail.com> wrote:
> Dear VMD users,
>
> I was wondering if there is a quick way to count the number of
> hydrogen bonds between a lipid molecule and a protein chain directly
> from the dcd file. I also want to use different paprameters for
> H-bonds (60 degrees as angle and 3.5 Ang as the distance cut-off).
you will need a .psf file or equivalent to be able to identify the atoms
via their names and thus locate the hydrogen bond donors and acceptors
and hydrogens. a dcd file does not contain that kind of information, only
coordinates (or velocities, or...).
once you have that figured out, you can use a code like the following:
set mol [molinfo top]
set lip [atomselect $mol "<add here selection text to identify the lipid>"]
set pep [atomselect $mol "<add here selection to identify the protein chain>"]
set nhb [llength [lindex [measure hbonds 3.6 60 $lip $pep] 0]]
puts "number of h-bonds: $nhb"
if you want this for the whole trajectory, you just add a loop
of the the frames to this:
set nf [molinfo $mol get numframes]
for {set i 0} {$i < $nf} {incr i} {
$lip frame $i
$pep frame $i
set nhb [llength [lindex [measure hbonds 3.6 60 $lip $pep] 0]]
puts "number of h-bonds in frame $i: $nhb"
}
similar stuff should be in the mailing list archives.
cheers,
axel.
>
> thanks a lot in advance.
> Rgds,
> Nitin
>
>
-- ======================================================================= 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.
- Next message: Nitin Bhardwaj: "Re: Counting H-bonds from a dcd file"
- Previous message: Nitin Bhardwaj: "Counting H-bonds from a dcd file"
- In reply to: Nitin Bhardwaj: "Counting H-bonds from a dcd file"
- Next in thread: Nitin Bhardwaj: "Re: Counting H-bonds from a dcd file"
- Reply: Nitin Bhardwaj: "Re: Counting H-bonds from a dcd file"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]