Weighing factors in dihedral terms for cyclic sytems using dihedral_style charmm

Dear all,
I have been reading some conversations related to problems of double counting of 1-2, 1-3 or 1-4 interactions in cyclic systems (4-,5-,6-membered). So, one way is providing a weighing factor if one is using dihedral_style “charmm”. But other dihedral styles do not have this liberty. So, how this thing is taken care of?
In one of the conversation I read @akohlmey mentioning
“”"
LAMMPS is different from other codes in that the 1-4 terms
are applied in the dihedral calculation and not during the
nonbonded calculation. you still provide the parameters
with the non-bonded atom types, though.
“”"
What I have understood from here is it that because in 1-4 terms non-bonded interactions do not contribute, so the problem of double counting does not arise. Have I understood it correctly, or I am missing something?

Thanks,
Megha

Using the special_bonds command — LAMMPS documentation

Not quite. When doing the 1-4 pairs as part of the non-bonded computation (i.e. pair style), then each pair of atoms is listed only once, so no double counting is possible. When computing the non-bonded contributions to 1-4 pairs with the dihedrals, you can have multiple dihedrals covering the same 1-4 pair. E.g. in a benzene ring, you can have a C1-C2-C3-C4 dihedral and a C1-C6-C5-C4 dihedral which both have the C1-C4 1-4 non-bonded pair, so you have to scale this pair with a factor of 0.5.
The scaling for the non-bonded interactions as such is taken from the pair style parameters (which have regular parameters and parameters for 1-4 pairs, which may be the same as the regular parameters or different).

Thanks for your reply!
But I am a little confused. When a list of 1-4 pairs has been generated as part of the non-bonded computation (which I don’t know how is generated) and each pair is only listed once then what do you mean by “computing the non-bonded contributions to 1-4 pairs with the dihedrals” The 1-4 pairs has been generated and now using special_bonds the non-bonded interactions for them would be scaled by 0.5 for lj and 0.833 for coulomb (at least in amber ff).

I have one more doubt, while counting or looking for 1-4 pairs, is any comparison done to check whether that pair is also present in 1-2 or 1-3 interactions?

I am referring to the special case of the CHARMM force field. There the 1-4 scaling factors (for coulomb and LJ) are set to 0.0 and then the non-bonded calculation done in the dihedral style instead of the pair style. This requires using dihedral style charmm and a lj/charmm pair style variant.

For amber you would be using pair style lj/cut/coul/long and special_bonds amber which does the 1-4 interactions during the pair style and not during the dihedral style and thus the scaling factor for the dihedral style should be 0.0 for all cases so that the LJ parts are not computed. This is all mentioned in detail in the documentation for dihedral style charmm.

The “lower” designation has precedence. If a pair of atoms is part of an 1-3 pair (i.e. an angle interaction) and an 1-4 pair (i.e. a dihedral interaction), the 1-3 scaling factor from special_bonds is applied.

Thank you very much for the clarification!

Best regards,
Megha