Re: [AMBER] Different number of processes give different nonbonded energy in sander trajectory analysis

From: Daniel Roe via AMBER <amber.ambermd.org>
Date: Thu, 20 Mar 2025 09:17:10 -0400

Hi,

Other opinions may vary, but I think that the energy differences you get
from post-processing like this should be negligible compared to other
differences. Depending on your application I don't think it should affect
your results too much - over multiple frames it should probably average
out. Can you expand upon what you're using the post-processing for?

-Dan

On Thu, Mar 20, 2025 at 9:01 AM Yunhao Mei <meiyh.stu.pku.edu.cn> wrote:

> Hi Daniel,
>
> Thank you very much for your reply. I have tested the behavior on an NVT
> trajectory, and this time, all energy terms are identical. Since NPT
> simulations are commonly used in research, it would be greatly beneficial
> if you or other developers could further investigate this issue. In the
> meantime, I will switch my production run to NVT to avoid potential
> PME-related issues.
>
> Best regards,
> Yunhao Mei
>
>
>
> Original:
> From:Daniel Roe <daniel.r.roe.gmail.com>
> Date:2025-03-20 20:36:11(GMT+08:00)
> To:Yunhao Mei <meiyh.stu.pku.edu.cn> , AMBER Mailing List <
> amber.ambermd.org>
> Cc:
> Subject:Re: [AMBER] Different number of processes give different nonbonded
> energy in sander trajectory analysis
>
> Hi,
>
> Is this from a trajectory generated in the NPT ensemble (i.e. the box
> size changes)? If so, that could be the source of the discrepancy; I'm
> not certain but I think that the imin=5 code will adjust PME
> parameters based on box sizes for each input frame where the box size
> changes. That would fit with only the nonbonded terms changing. If I
> get a free moment I'll try to look into this further.
>
> If you have an NVT trajectory you could try that and see if you still
> see the same differences.
>
> -Dan
>
> On Thu, Mar 20, 2025 at 7:43 AM Yunhao Mei via AMBER <amber.ambermd.org> wrote:
> >
> > Dear AMBER developers and users,
> >
> >
> >
> > I recently encountered an issue when using sander with imin=5 to extract energy from a trajectory. Specifically, I observed that sander.MPI produced different nonbonded energy values when different numbers of processes were used. For example:
> >
> >
> >
> > With mpirun -np 4:
> >
> >
> > NSTEP ENERGY RMS GMAX NAME NUMBER
> > 1 -1.3656E+05 1.6835E+01 1.3896E+02 O 34549
> > BOND = 684.2128 ANGLE = 1452.6058 DIHED = 1207.5225
> > VDWAALS = 20144.5207 EEL = -172841.5000 HBOND = 0.0000
> > 1-4 VDW = 1038.9863 1-4 EEL = 11518.6327 RESTRAINT = 0.0000
> > CMAP = 239.2315
> > minimization completed, ENE= -.13655579E+06 RMS= 0.168353E+02
> > |Largest sphere to fit in unit cell has radius = 31.533
> >
> >
> >
> > With mpirun -np 8:
> >
> >
> > NSTEP ENERGY RMS GMAX NAME NUMBER
> > 1 -1.3653E+05 1.6819E+01 1.1655E+02 CG 3132
> > BOND = 684.2128 ANGLE = 1452.6058 DIHED = 1207.5225
> > VDWAALS = 20145.8189 EEL = -172818.4430 HBOND = 0.0000
> > 1-4 VDW = 1038.9863 1-4 EEL = 11518.6327 RESTRAINT = 0.0000
> > CMAP = 239.2315
> > minimization completed, ENE= -.13653143E+06 RMS= 0.168189E+02
> > |Largest sphere to fit in unit cell has radius = 31.533
> >
> >
> >
> > However, when I set imin=1 for structure optimization, the results from np=4 and np=8 showed only minor energy differences, with each term varying by no more than 0.001, while GMAX remained identical. This suggests that the issue is specific to trajectory analysis. Given that the differences in energy and gradients are not negligible, I suspect that there might be an issue in the trajectory analysis implementation of sander.MPI.
> >
> >
> > I would appreciate any insights or suggestions regarding this behavior. Thank you for your time and help.
> >
> >
> > Best regards,
> >
> >
> > Yunhao Mei
> > College of Chemistry and Chemical Engineering
> > Peking University
> >
> >
> >
> >
> >
> > _______________________________________________
> > AMBER mailing list
> > AMBER.ambermd.org
> > http://lists.ambermd.org/mailman/listinfo/amber
>
>
>
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Mar 20 2025 - 06:30:03 PDT
Custom Search