From: Chandra Ramananjara (mozart20d_at_yahoo.com)
Date: Wed Jun 21 2006 - 15:04:19 CDT

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 to try the new Yahoo! Mail Beta.