From: Nicholas Musolino (musolino_at_mit.edu)
Date: Thu Aug 05 2010 - 10:17:23 CDT

Dear Regina,

I recently ran into this problem, and was able to solve this after working out how NAMDenergy obtains its energy evaluations. Behind the scenes, it basically creates an NAMD configuration file, then runs NAMD for a single energy evaluation.

Take a look at the NAMD configuration file (should be named something like (jobname)-temp.namd), and see if you notice any differences between the NAMD energy-evaluation options there, and in your original simulation.

In my case, the PME settings were different. What I did when I wanted to use "special" (i.e. my own) NAMD settings to match my previous NAMD simulation was this:
(1) Make a copy of .../vmd-1.8.7/plugins/noarch/tcl/namdenergy1.2/namdenergy.tcl, adapting the path to your install location.
(2) Try to understand how this TCL file works. Basically, it processes arguments, and then has a lot of "puts" commands to write lines to an NAMD configuration file.
(3) Try to modify this to process additional arguments as needed, and write additional/different lines to the NAMD file as needed.

In my case, I changed the "-pme" option in the TCL file to accept arguments like "-pmeX <Nx> -pmeY <Ny> -pmeZ <Nz>", and then write corresponding lines to the NAMD configuration file.

Within VMD, you'll have to run the command
        source modified_namdenergy.tcl
to load the namdenergy proc, and then try running your redefined namdenergy proc with your arguments. If the energies match, you're done! Otherwise, check out the -temp.namd file for differences, and keep editing the .tcl file as needed.

It took me a few iterations to get everything working, but I'm no expert.

If any of the NamdEnergy experts (authors?) would like to charm in, they might provide a simpler answer. Like modifying the .namd file by hand if you're doing this once.

Good luck and best regards,
Nicholas

---------------------------------------------------------------------------
Nicholas Musolino
Ph.D. candidate, Molecular Engineering Laboratory
Department of Chemical Engineering, MIT
musolino_at_mit.edu | 617-253-6675 | Room E19-528

On Aug 5, 2010, at 8:41 AM, politr_at_huji.ac.il wrote:

> Dear VMD users,
> I'm using NAMD energy plugin to calculate energy between peptide and water. In order to test the work of the plugin I started from putting "all" under selection and I loaded XSC file, parameter file and choose PME (like in simulation) . The problem is that the energies I'm getting are slightly different from the energies in the log file from the simulation itself. Does anyone have any idea what is the reason for the discrepancy?
> Regina
>