Re: [AMBER] Calculating forces

From: Click, Timothy Howard <tclick.alumni.ou.edu>
Date: Fri, 26 Feb 2021 15:27:20 +0000

Thanks for the reply. I removed the align command, and I still have the same forces in cpptraj as before. When I compare this with Python where I used the following definitions:

vdwf = (12 * A / np.power(distance, 13)) - (6 * B / np.power(distance, 7))
elecf = q1 * q2 / (EPS * np.square(distance))
totalf = (vdwf + elecf) * dx / distance # dx = x_Cl- - x_Na+

I get the following forces for the first frame:

array([[ 0.03740528 -0.08097233 -0.01522982],
          [-0.03740528 0.08097233 0.01522982]], dtype=float32)

In all three cases, it appears that my forces are close but rotated differently. I accept that my Python code may affect this, but I am still curious as to why cpptraj and sander (or pmemd) have this rotational difference.

Thanks again for the help.
——
Cordially,
柯明 Timothy H. Click, Ph.D.
College of Veterinary Medicine
107 Math Sciences
Oklahoma State University
Stillwater, OK 74078



From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Thursday, February 25, 2021 at 04:33
To: AMBER Mailing List <amber.ambermd.org>
Subject: Re: [AMBER] Calculating forces
Hi,

The 'align' command is rotating the coordinates, which affects how the
force vectors are pointing. I'm guessing if you take away the 'align'
command the forces will match.

-Dan

On Wed, Feb 24, 2021 at 7:10 PM Click, Timothy Howard
<tclick.alumni.ou.edu> wrote:
>
> Salutations. I am attempting to calculate the forces between two atoms (Na+ and Cl-) in vacuo, and when I ran sander on a production run, I output forces. I also opted to postprocess using cpptraj
>
> parm nacl.parm7
> trajin production.nc
> align mass first
> esander production out forces.csv saveforces igb 6
> trajout forces.trj mdfrc
>
> However, the values differ
>
> sander:
> array([[ 0.0828545 , -0.18094742, -0.03403379],
>        [-0.0828545 ,  0.18094742,  0.03403379]], dtype=float32)
>
> cpptraj:
> array([[-0.037,  0.081,  0.015],
>        [ 0.037, -0.081, -0.015]], dtype=float32)
>
> I am also attempting to calculate the values manually using Python. The energies are identical (sander output file == cpptraj == Python). In Python, I used the basic energy equation as noted in the seminal paper (Cornell, 1995). I have attempted to look in the code ($AMBERHOME/AmberTools/src/mdgx/NBOnlyLJ.c and ($AMBERHOME/AmberTools/src/mdgx/NBLoop.c), but I am still confused on the calculations.
>
> Thanks for your help.
> ——
> Cordially,
> 柯明 Timothy H. Click, Ph.D.
> College of Veterinary Medicine
> 107 Math Sciences
> Oklahoma State University
> Stillwater, OK 74078
>
>
> _______________________________________________
> 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
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Feb 26 2021 - 07:30:01 PST
Custom Search