Here’s a focused version of what I posted earlier. I have a hexagonal boron nitride (hBN) monolayer under CHARMM and I need to override the defaults for all 1-4 interactions, which includes the fudge factor and the LJ parameters. I have a local topology created by x2top (very functional for 2D crystals) and in that file so far I did the following: replaced all function types (third column) under [ pairs ] from 1 to 2. In addition, I replaced ‘gen-pairs’ to ‘no’ in the forcefield defaults. Finally, I added the following under [ pairtypes ] in ffnonbonded.itp according to my likely incorrect understanding of table 5.14 in the 2020 manual:
The directive you want to use is [pairs_nb], not [pairtypes]. Also take care to note what is stated in the manual about using such interactions and the need for special exclusions:
Note that one should add exclusions for all atom pairs listed in [ pairs_nb ], otherwise such pairs will also end up in the normal neighbor lists.
Hey Justin! Does this mean that I have to replace the entire [ pairs ] section for that “molecule” with [ exclusions ]? Because that entire list of pairs I have consists only of what I will have in [ pairs_nb ]… Also, is the ‘gen-pairs’ set to ‘no’ correct in this case? Thanks a whole bunch!
I am seriously confused by this. Sticking a [pairs_nb] section into ffnonbonded in the form of a “template” (by that i mean the list of three pairs shown above) results in “invalid order” from grompp. Does this need a full (per-pair) list for all atoms in the local itp specific to the molecule, or is it supposed to be part of ffnonbonded? I just can’t find a working example of how this needs to be implemented. :(
The [pairs_nb] belongs within the corresponding [moleculetype] definition. The “normal” pair interactions have to be excluded in [exclusions] so [pairs_nb] take effect. At least that’s what I gather from a quick look at the code.
OK, so some scripting will be needed there. I still don’t get it though. I need to specify the fudge factor and it is not part of [pairs_nb] according to table 14 of the 2024 online manual (sorry, this forum is stopping me from posting the link).
[pairs] type 2, however, is. Why not just edit my existing [pairs] section to be type 2 with the parameters set explicitly, all as part of [moleculetype]??
Maybe Berk could clarify this, because I think it was mentioned somewhere that he is the one who introduced pairs_nb and the manual sounds like it is in a bit of a conflict with what Justin is suggesting…
Ah, many thanks! That’s what I thought and this is what my postdoc and I did earlier today. It seems to work exactly as expected without adding any [exclusions]… Do we need those for a “molecule” that essentially stays in place nearly unchanged throughout the simulation?
I never thought I did. It’s just that given the discussion above I got quite confused, because originally I wanted to do more or less what you just described – except I thought those type 2 pairs could be added as pairtypes directly into ffnonbonded. I think the case is more or less closed, thank you very much. ;)