Hello,
I have tried to manipulate the dihedral potential named “multi/harmonic” to permit 6 coefficients instead of 5, because I want to add an additional cosine term to this potential. However, I continue to get the error “Incorrect args for dihedral coefficients”. In the function DihedralMultiHarmonic::coeff, I have changed the line
if (narg != 6) error->all(“Incorrect args for dihedral coefficients”);
to
if (narg != 7) error->all(“Incorrect args for dihedral coefficients”);
but this does not solve the problem. Is there some where else in LAMMPS that checks for the correct number of arguments on the line that contains “dihedral_coeff” in the LAMMPS input script? I used grep to search for where this error statement occurs in all the files, but this has not given me any clues. (Just to note, I have added an extra variable “a6” into “.h” and “.cpp” files of dihedral_multi_harmonic, and have added lines to the code wherever I see a1-a5 being manipulated.)
Thanks in advance,
Landry