From: Diego Gomes (diego.enry_at_gmail.com)
Date: Sat Jun 22 2024 - 09:57:34 CDT

Hi Jacob, I can confirm it is misbehaving with the frame numbers.
Thank you for reporting, I've added it to our issue tracker on gitlab.
(I can fix it on July 1st.)

Friendly,
Diego.

On Tue, Jun 18, 2024 at 4:02 PM Jacob Graham <
jacobgraham2025_at_u.northwestern.edu> wrote:

> I think there is a bug when using the -skip parameter of namdenergy from
> the command line.
>
> I am using VMD for LINUXAMD64, version 1.9.3 (November 30, 2016) and the
> NAMD Energy Plugin, Version 1.4 to calculate energies between 2 molecules
> throughout a .dcd format trajectory. Instead of calculating the energy for
> every frame in my trajectory, I am trying to calculate it for every 10th
> frame. In order to do this, I am passing '-skip 9' to the namdenergy
> command. However, in the output file I noticed that the frame number and
> time reported in the first two columns were going higher than the number of
> frames and time in the trajectory. When I reran the energy calculations
> passing '-skip 0' to the namdenergy command, this problem went away. When
> comparing the two output files, I noticed that values reported as frame 10,
> while using -skip 9 corresponded to the same values reported as frame 9
> while using -skip 0. Values reported as frame 20 while using -skip 9
> corresponded to the same values reported as frame 18 while using -skip 0.
>
> By my understanding, -skip n should skip n frames and calculate energy for
> every (n+1)th frame as it is explained in the documentation (
> https://www.ks.uiuc.edu/Research/vmd/plugins/namdenergy/). It appears to
> instead be calculating energy every (n+1)th frame, but reporting that those
> values are for the nth frame when using -skip.
>
> Here is an example of the output from namdenergy while passing -skip 9:
>
> Frame Time Elec VdW Nonbond
> Total
> 0 0 -21.9162 -0.9314 -22.8476
> -22.8476
> 10 250000 -29.1755 -12.2471 -41.4226
> -41.4226
> 20 500000 -45.4165 -17.1429 -62.5594
> -62.5594
> 30 750000 -46.1839 -17.1731 -63.357
> -63.357
>
> Here is an example of the output from namdenergy while passing -skip 0:
>
> Frame Time Elec VdW Nonbond
> Total
> 0 0 -21.9162 -0.9314 -22.8476
> -22.8476
> 1 25000 -25.1932 -3.7803 -28.9735
> -28.9735
> 2 50000 -24.2 -2.3902 -26.5902
> -26.5902
> 3 75000 -16.2648 -6.8729 -23.1377
> -23.1377
> 4 100000 -76.8927 -10.6238 -87.5165
> -87.5165
> 5 125000 -40.3515 -9.2048 -49.5563
> -49.5563
> 6 150000 -57.7284 -10.5919 -68.3203
> -68.3203
> 7 175000 -85.7217 -9.7696 -95.4913
> -95.4913
> 8 200000 -31.3831 -11.8777 -43.2608
> -43.2608
> 9 225000 -29.1755 -12.2471 -41.4226
> -41.4226
> 10 250000 -15.114 -12.7385 -27.8525
> -27.8525
> 11 275000 -78.0499 -16.191 -94.2409
> -94.2409
> 12 300000 -55.0642 -16.8925 -71.9567
> -71.9567
> 13 325000 -61.9645 -13.9181 -75.8826
> -75.8826
> 14 350000 -36.7297 -22.0884 -58.8181
> -58.8181
> 15 375000 -54.2946 -10.5093 -64.8039
> -64.8039
> 16 400000 -51.3829 -14.1861 -65.569
> -65.569
> 17 425000 -19.3285 -19.999 -39.3275
> -39.3275
> 18 450000 -45.4165 -17.1429 -62.5594
> -62.5594
> 19 475000 -39.6884 -18.2573 -57.9457
> -57.9457
> 20 500000 -27.6637 -23.3253 -50.989
> -50.989
> 21 525000 -39.3987 -23.0473 -62.446
> -62.446
> 22 550000 -32.7096 -20.5993 -53.3089
> -53.3089
> 23 575000 -51.2034 -19.2007 -70.4041
> -70.4041
> 24 600000 -46.6593 -20.738 -67.3973
> -67.3973
> 25 625000 -38.3873 -15.928 -54.3153
> -54.3153
> 26 650000 -33.5287 -16.0382 -49.5669
> -49.5669
> 27 675000 -46.1839 -17.1731 -63.357
> -63.357
>
> I confirmed that this means -skip 0 and -skip 1 will both calculate
> energies at each frame, but -skip 1 will double each Frame number and Time.
>
> Here is an example of the output from namdenergy while passing -skip 1:
>
> Frame Time Elec VdW Nonbond
> Total
> 0 0 -21.9162 -0.9314 -22.8476
> -22.8476
> 2 50000 -25.1932 -3.7803 -28.9735
> -28.9735
> 4 100000 -24.2 -2.3902 -26.5902
> -26.5902
> 6 150000 -16.2648 -6.8729 -23.1377
> -23.1377
> 8 200000 -76.8927 -10.6238 -87.5165
> -87.5165
> 10 250000 -40.3515 -9.2048 -49.5563
> -49.5563
> 12 300000 -57.7284 -10.5919 -68.3203
> -68.3203
> 14 350000 -85.7217 -9.7696 -95.4913
> -95.4913
> 16 400000 -31.3831 -11.8777 -43.2608
> -43.2608
> 18 450000 -29.1755 -12.2471 -41.4226
> -41.4226
> 20 500000 -15.114 -12.7385 -27.8525
> -27.8525
> 22 550000 -78.0499 -16.191 -94.2409
> -94.2409
> 24 600000 -55.0642 -16.8925 -71.9567
> -71.9567
> 26 650000 -61.9645 -13.9181 -75.8826
> -75.8826
> 28 700000 -36.7297 -22.0884 -58.8181
> -58.8181
> 30 750000 -54.2946 -10.5093 -64.8039
> -64.8039
> 32 800000 -51.3829 -14.1861 -65.569
> -65.569
> 34 850000 -19.3285 -19.999 -39.3275
> -39.3275
> 36 900000 -45.4165 -17.1429 -62.5594
> -62.5594
> 38 950000 -39.6884 -18.2573 -57.9457
> -57.9457
> 40 1000000 -27.6637 -23.3253 -50.989
> -50.989
> 42 1050000 -39.3987 -23.0473 -62.446
> -62.446
> 44 1100000 -32.7096 -20.5993 -53.3089
> -53.3089
> 46 1150000 -51.2034 -19.2007 -70.4041
> -70.4041
> 48 1200000 -46.6593 -20.738 -67.3973
> -67.3973
> 50 1250000 -38.3873 -15.928 -54.3153
> -54.3153
> 52 1300000 -33.5287 -16.0382 -49.5669
> -49.5669
> 54 1350000 -46.1839 -17.1731 -63.357
> -63.357
>
> Please confirm if you think my logic is sound.
>
> Best,
>
> Jacob
>

-- 
Diego Enry B. Gomes, PhD
Department of Physics at Auburn University &
NIH Center for Macromolecular Modeling and Visualization
Leach Science Center - Ste. 3182 - Auburn, AL
dgomes_at_auburn.edu