Re: vmd-l: error using Namdenergy

From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Wed Jun 21 2006 - 17:17:17 CDT

Hi Chandra,
a couple things here... could you let us know what version of VMD you're
using, and on what platform?
Namdenergy uses NAMD itself for the actual energy calculations so it
seems very odd that changing the CRYST header causes a problem (indeed,
I have used it many times in cases where it hasn't caused a problem,
hence my confusion--in fact, it just worked ok for me now). Perhaps you
could send me one of the pdb/psf combos that fails?
Also, just for your information, if you run namdenergy on a loaded dcd
it will automatically loop over the trajectory; there's no need to run
each frame separately.
Peter

Chandra Ramananjara wrote:
> Hi all,
> I am observing a strange error in namdenergy. I am using the
> text-based version of namdenergy in VMD (in text mode) which can be
> called using the command 'package require namdenergy'.
> Here is the problem. I have a dcd file and I want to step through each
> frame and calculate energies for interactions between various atoms.
> So, for each frame of the dcd file, I select all the atoms and write
> them to a pdb file (called temp.pdb) and then load the pdb file (along
> with a general psf file) so I can run namdenergy on the atoms in that
> PDB file. So, for example, the script for looping through 1000 dcd
> frames is something like this:
>
> for { set i 0 } { $i < 1000 } { incr i 1 } {
>
> molinfo top set frame $i
> set all [atomselect top all]
> $all writepdb TEMP.pdb
> mol load psf base.psf pdb TEMP.pdb
> set group [atomselect top "name O"]
> namdenergy -nonb -sel $group -par param.inp
>
> }
>
> The problem I encounter is that the results I get from namdenergy are
> always 0 (obviously wrong).
> But when I open the TEMP.pdb file (generated in VMD using writepdb) I
> notice the first line in the PDB file is something like: "CRYST1 24 24
> 24 90.0 90.0 90.0". This line is the first line in every PDB file
> generated using VMD's writepdb command. It specifies the unit cell
> length and angles.
> I notice that if I delete this line, reload the PDB file into VMD and
> re-run namdenergy, I get the right answer for the energy. It seems the
> namdenergy program cannot recognize PDB files with the "CRYST1...."
> header.
> Unfortunately, all PDB files generated using the writepdb command in
> VMD have this header. As I mentioned, manually deleting this header
> allows namdenergy to recognize the PDB file and gives right answers.
> But since I want everything to be automated, programmatically (using
> Tcl file commands) deleting the header of every generated PDB file
> would use up valuable computational time. Is there any workaround ?
> And does anybody have any idea why namdenergy refuses to recognize PDB
> files with the "CRYST1...." header ?
>
> Thanks,
> Chandra
>
> ------------------------------------------------------------------------
> Do you Yahoo!?
> Get on board. You're invited
> <http://us.rd.yahoo.com/evt=40791/*http://advision.webevents.yahoo.com/handraisers>
> to try the new Yahoo! Mail Beta.

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