[AMBER] Questions about reading the right LJ_Acoef values in *.prmtop file

From: ChenXin via AMBER <amber.ambermd.org>
Date: Sat, 26 Nov 2022 15:04:15 +0800 (GMT+08:00)

Hello everyone,
 It says in the Appendix of Amber Reference Manual that "The index for two atoms i and j into the LENNARD JONES ACOEF and LENNARD JONES BCOEF arrays is calculated as index = NONBONDED PARM INDEX [NTYPES × (ATOM TYPE INDEX(i) − 1) + ATOM TYPE INDEX(j)]." I wonder that the range of index number for each section, which should affect the read values.
For example, we want to obtain the LJ_ACOEF value between the first atom and the 15th atom for the a.prmtop file with 4731 atoms and 14 atom types.

%FLAG ATOM_TYPE_INDEX
%FORMAT(10I8)
       1 2 2 2 3 4 3 5 5 3
       6 6 7 3 6 6 6 8 9 1
       2 3 6 3 5 3 5 5 5 3
.......


       1
%FLAG NONBONDED_PARM_INDEX
%FORMAT(10I8)
       1 2 4 7 11 16 22 29 37 46
       56 67 79 92 2 3 5 8 12 17
       23 30 38 47 57 68 80 93 4 5
       6 9 13 18 24 31 39 48 58 69
 
......

%FLAG LENNARD_JONES_ACOEF
%FORMAT(5E16.8)
  9.44293233E+05 2.12601181E+03 1.39982777E-01 9.95480466E+05 2.56678134E+03
  1.04308023E+06 2.01791425E+04 9.14716912E+00 2.27401052E+04 2.01823541E+02
  8.96776989E+04 1.07193646E+02 9.71708117E+04 1.41077189E+03 7.51607703E+03
  6.20665997E+04 5.94667300E+01 6.78771368E+04 8.79040886E+02 4.98586848E+03
  3.25969625E+03 2.01562190E+06 5.97860700E+03 2.09861767E+06 4.93469320E+04
  2.02461849E+05 1.42791446E+05 4.19430400E+06 8.82619071E+05 2.27577561E+03
  9.24822270E+05 2.01619733E+04 8.61541883E+04 6.01816484E+04 1.86068943E+06
  8.19971662E+05 6.06829342E+05 1.02595236E+03 6.47841731E+05 1.12780457E+04
......
If the index number for each section ranges from 1, we can know that the ATOM_TYPE_INDEX for the first atom (i=1) and the 15th atom (j=15) is 1 and 6, respectively.

Then according to the equation, the pointer for NONBONDED_PARM_INDEX is calculated as 14*(1-1)+6=6.According to the pointer, we can read the 6th number in NONBONDED_PARM_INDEX section, which is 16. And the corresponding LJ Acoef in the LENNARD_JONES_ACOEF should be the 16th number, 6.20665997E+04.

However, if the index number for each section ranges from 0, though the ATOM_TYPE_INDEX for the first atom (i=0) and the 15th atom (j=14) is still 1 and 6,and the pointer calculated for the NONBONDED_PARM_INDEX is still 6, the pointer for LENNARD_JONES_ACOEF section read from NONBONDED_PARM_INDEX section should be the 7th number, 22. And the corresponding LJ Acoef should be the 23th number, 5.97860700E+03.

The started number (0 and 1) can obviously affect the resulted pointer and subsequently affect the reading of LJ_Acoef.

I would wonder which is the correct way.

To make it clear, the a.prmtop with specific sections is provided as the attachment.

Looking forward to the replys and thanks a lot.


All the best,
Chanyan

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber

Received on Fri Nov 25 2022 - 23:30:02 PST
Custom Search