I’ve been quite confused to use CHARMM FF in lammps since I’m new to lammps and used GROMACS previously. I checked the Cgenff parameter files provided by MacKerell’s lab. The nonbonded interactions give
“cutnb 14.0 ctofnb 12.0 ctonnb 10.0 eps 1.0 e14fac 1.0 wmin 1.5”
which i believe it means there is no scaling for 1-4 interaction. But lammps command “special_bonds charmm” scales 1-4 interactions to 0. I also checked “lj/charmm/coul/long” and “dihedral charmmfsw”, which seem to suggest that with the combination of these two the 1-4 interactions are calculated with specified lj14 parameters instead of periodic dihedral styles.
However, based on CGENFF server-generated GROMACS parameters and the CHARMM literature I read, I feel the CHARMM includes both 1-4 lj interactions and dihedral potentials. And in charmm literature, they said if non-specified lj14 parameters are included, the original lj parameters should be used.
Overall, I’m quite confused about how to apply CHARMM force field correctly to lammps. I’m hoping someone can offer some useful clarifications! Thank you for you help!
What you see is due to a limitation of LAMMPS that existed when the CHARMM pair styles were originally implemented but does not exist anymore. However nobody had been willing to undertake the significant effort to reimplement the CHARMM pair and dihedral styles now.
The main problem is that way back, it was not possible to detect at runtime within a pair style whether a pair in the neighbor list was a 1-4 pair and thus the LJ parameters should be switched or not. Instead the pair is removed from the neighbor list entirely (thanks to the special_bonds command).
The computation of the non-bonded interactions of the 1-4 pair is then performed during the computation of the dihedral interactions. This has some complications and thus the charmm dihedrals have a “scale factor” coefficient:
if there are multiple periodicities, the same dihedral is defined twice with different types representing the different parameters (there is now a special dihedral style for that, but that also is much newer than the CHARMM support in LAMMPS). There only the first has to have a scale factor or 1.0 and all others 0.0
if you have a 6 membered ring you have a dihedral where you go from atom 1 to 4 clockwise and one where you go counterclockwise, these two have to scaled with a factor 0.5
if you have a 5 membered ring you must use a scale factor of 0.0 since the the 1 to 4 atoms are on a dihedral in one direction, but on an angle in the other and the 1-3 exclusion takes precedence over the 1-4 exclusion.
Usually you don’t enter those directly, but rather setup your system with either CHARMM or psfgen from NAMD/VMD and then you can use either charmm-gui.org website or the charmml2lammps.pl tool bundled with LAMMPS to convert the CHARMM topology, geometry and parameters into a LAMMPS data file.
Thank you for your quick and helpful responses. It clarifies most of the confusion and I will try out the FF converters. But there still remains a few questions that I hope you or someone else can help me:
The charmm dihedral style will calculate 1-4 interactions based on provided lj parameters. So if no special lj14 parameters are specified, does lammps just use the original lj parameters?
Does this dihedral style calculate 1-4 interactions with the scaled or non-scaled lj interations plus the periodic dihedral potential or totally ignore the periodic potential?
It computes the dihedral potential and the non-bonded potential for the 1-4 pair of atoms. The latter part requires the scale factor to handle any cases of double counting.