Re: [AMBER] How are the A and B coefficients for LJ parameters determined?

From: Markowska <amber.ambermd.org>
Date: Thu, 17 Jul 2025 14:42:04 +0200

Dear Solen,

yes, you're right! I tried the parameters you pointed out and it gave me
the exact values as in the tutorial. Thank you!

However, I'm still getting that error from parmed.
I used the same input file as in the tutorial, so now I will just paste it
here:

parmed.in:
parm 1D23_solv.prmtop
reference 1D23_solv.inpcrd

setOverwrite True #Set overwrite output file
change AMBER_ATOM_TYPE :A*,DA*.N7 NAMG #Change atom type of Adenine N7 atom
to NAMG
change AMBER_ATOM_TYPE :G*,DG*.N7 NGMG #Change atom type of Adenine N7 atom
to NGMG
change AMBER_ATOM_TYPE :*.OP* OPMG #Change atom type of backbone phosphate
oxygen to OPMG
addLJType .%NAMG #Add a new LJ type for Adenine N7 atom
addLJType .%NGMG #Add a new LJ type for Guanine N7 atom
addLJType .%OPMG #Add a new LJ type for backbone phosphate oxygen
add12_6_4 :MG watermodel TIP4PEW #Add C4 terms
printLJMatrix :MG #Print out the LJ matrix to check whether the adding C4
terms are right
outparm 1D23_1264_na_tip4pew.prmtop 1D23_1264_na_tip4pew.inpcrd #Output new
prmtop and inpcrd files

and I'm running it by typing
parmed -i parmed.in

However, it may be possible that there is something wrong with the input
structure that I missed during the preparation step.

Best regards,
Karolina

czw., 17 lip 2025 o 14:26 Solen Ekesan <solen.ekesan.rutgers.edu>
napisał(a):

> Hi Karolina,
>
> In order to better understand the source of error you are getting with
> parmed, we need to see your parmed input file/commands.
> If you were manually entering commands, please also include how you first
> call parmed as well.
>
> Regarding the A B coefficients, in your leap commands, you are loading
> frcmod.ions234lm_126_tip4pew instead of frcmod.ions234lm_1264_tip4pew.
> A B coefficients are parameter set specific. 12-6-4 set has different
> values than the 12-6 set. The Panteva corrections only adjust the C term
> for the 12-6-4.
> If you want to read more about it, check out:
> https://pubs.acs.org/doi/full/10.1021/acs.jpcb.5b10423
>
> Best,
> Solen
>
> Solen Ekesan,
> Asst. Research Prof.
> Rutgers University
>
>
>
> ------------------------------
> *From:* Karolina Mitusińska (Markowska) via AMBER <amber.ambermd.org>
> *Sent:* Thursday, July 17, 2025 6:22 AM
> *To:* AMBER Mailing List <amber.ambermd.org>
> *Subject:* [AMBER] How are the A and B coefficients for LJ parameters
> determined?
>
> Dear Amber experts,
>
> I wanted to use Panteva parameters for my simulations, so I followed this
> tutorial:
> https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fambermd.org%2Ftutorials%2Fadvanced%2Ftutorial20%2F12_6_4.php&data=05%7C02%7Cse310%40connect.rutgers.edu%7C103fe4d20d71431a7cf308ddc51bf3ae%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C638883446043488150%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=gyIZvZJOwagqylt70%2BPtm%2BDa4JZhTG0y3adKwZUG6hI%3D&reserved=0
> <https://ambermd.org/tutorials/advanced/tutorial20/12_6_4.php>
> However, with the tleap_1264_tip4pew.in
> <
> https://nam02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fambermd.org%2Ftutorials%2Fadvanced%2Ftutorial20%2Ffiles%2F1264%2Ftleap_1264_tip4pew.in&data=05%7C02%7Cse310%40connect.rutgers.edu%7C103fe4d20d71431a7cf308ddc51bf3ae%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C638883446043508293%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=z44K6xTlONXhwWcJP%2Frpljee%2B3hUmMeOOXtYPDjcfB8%3D&reserved=0
> <https://ambermd.org/tutorials/advanced/tutorial20/files/1264/tleap_1264_tip4pew.in>
> >
> file being unavailable, I'm not sure if I follow correctly.
> Below is my version of how the file should look like:
>
> source leaprc.DNA.OL15
> source leaprc.water.tip4pew
> loadamberparams frcmod.ions234lm_126_tip4pew
> mol = loadpdb 1D23_clean.pdb
> solvatebox mol TIP4PEWBOX 10.0
> loadamberparams frcmod.tip4pew
> addions mol MG 0
> check mol
> savepdb mol 1D23_solv.pdb
> saveamberparm mol 1D23_solv.prmtop 1D23_solv.inpcrd
> quit
>
> tLeaP does not report any errors (just some warnings about water atoms
> being close to each other). Then I use parmed according to the tutorial,
> and I got the following error after the last command, so when trying to
> save the modified prmtop and incprd files:
>
> Traceback (most recent call last):
> File "/u/k/kmitusin/miniconda3/envs/AmberTools23/bin/parmed", line 11, in
> <module>
> sys.exit(clapp())
> ^^^^^^^
> File
>
> "/u/k/kmitusin/miniconda3/envs/AmberTools23/lib/python3.12/site-packages/parmed/scripts.py",
> line 142, in clapp
> parmed_commands.cmdloop()
> File "/u/k/kmitusin/miniconda3/envs/AmberTools23/lib/python3.12/cmd.py",
> line 138, in cmdloop
> stop = self.onecmd(line)
> ^^^^^^^^^^^^^^^^^
> File "/u/k/kmitusin/miniconda3/envs/AmberTools23/lib/python3.12/cmd.py",
> line 217, in onecmd
> return func(arg)
> ^^^^^^^^^
> File "<string>", line 1, in <lambda>
> File
>
> "/u/k/kmitusin/miniconda3/envs/AmberTools23/lib/python3.12/site-packages/parmed/tools/parmed_cmd.py",
> line 158, in _normaldo
> action.execute()
> File
>
> "/u/k/kmitusin/miniconda3/envs/AmberTools23/lib/python3.12/site-packages/parmed/tools/actions.py",
> line 274, in execute
> self.parm.save(self.rst_name, format=self.rst7_format,
> overwrite=Action.overwrite)
> File
>
> "/u/k/kmitusin/miniconda3/envs/AmberTools23/lib/python3.12/site-packages/parmed/structure.py",
> line 1578, in save
> rst7.write(fname, netcdf=(format == 'NCRST'))
> File
>
> "/u/k/kmitusin/miniconda3/envs/AmberTools23/lib/python3.12/site-packages/parmed/amber/_amberparm.py",
> line 2360, in write
> f.coordinates = self.coordinates
> ^^^^^^^^^^^^^
> File
>
> "/u/k/kmitusin/miniconda3/envs/AmberTools23/lib/python3.12/site-packages/parmed/amber/asciicrd.py",
> line 322, in coordinates
> raise ValueError(f'Got {len(stuff)} coordinates for {self.natom}
> atoms')
> ValueError: Got 1 coordinates for 15885 atoms
>
> As you can see I'm using Amber22 AmberTools23, conda version.
>
> So my first question is: why do I obtain this error? Is there something
> wrong with how I prepare the prmtop and inpcrd files?
> The second question is regarding the A and B coefficients: as the values
> I'm getting are almost a half of the value shown in the tutorial. How are
> they determined? And of course - why are mine different?
> For example:
> mine:
> Atom Type 1 Atom Type 2 A coefficient B coefficient C
> coefficient R i,j Eps i,j
> Mg2+ [16] NAMG [19] 42306.775035 82.288023
> 238.750000 3.177000 0.040013
> Mg2+ [16] NGMG [20] 42306.775035 82.288023
> 240.625000 3.177000 0.040013
> Mg2+ [16] OPMG [21] 25012.281982 66.703853
> 21.250000 3.014200 0.044472
> tutorial:
> Mg2+ [16] NAMG [19] 88850.011883 148.040958
> 238.750000 3.177000 0.040013
> Mg2+ [16] NGMG [20] 88850.011883 148.040958
> 240.625000 3.177000 0.040013
> Mg2+ [16] OPMG [21] 53402.610012 120.997661
> 21.250000 3.014200 0.044472
>
> Thank you for your help.
> Best regards,
> Karolina Mitusińska
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
>
> https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Flists.ambermd.org%2Fmailman%2Flistinfo%2Famber&data=05%7C02%7Cse310%40connect.rutgers.edu%7C103fe4d20d71431a7cf308ddc51bf3ae%7Cb92d2b234d35447093ff69aca6632ffe%7C1%7C0%7C638883446043522052%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=r4%2FxmahRYg6S5x5PmVTH2SoPxZ%2BeCby0RBhDght%2BiC4%3D&reserved=0
> <http://lists.ambermd.org/mailman/listinfo/amber>
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Thu Jul 17 2025 - 06:00:04 PDT
Custom Search