ERROR: All dihedral coeffs are not set

Dear Sir or Madam,

Hope this email finds you safe and well in this challenging time.

I am using LAMMPS to perform simulations on Polydimethylsiloxane, where the class2 force field was used for all different interactions. In my script, bond_style, angle_style and dihedral_style were set as class2. For the dihedral_style and dihedral_coeff, my settings were as follows:

dihedral_style class2

dihedral_coeff 1 0.00 0.00 0.00 0.00 -0.01 0.00 #Si-O-Si-C

dihedral_coeff 2 -0.225 0.00 0.00 0.00 -0.01 0.00 #Si-O-Si-O

dihedral_coeff 3 0.00 0.00 0.00 0.00 -0.0657 0.00 #O-Si-C-H

dihedral_coeff 4 0.00 0.00 0.00 0.00 -0.0657 0.00 #C-Si-C-H

However, computer reports the following error:

ERROR: All dihedral coeffs are not set (…/dihedral.cpp:73)

To solve the problem I replaced the class2 with multi/harmonic for dihedral_style, and the dihedral_coeff was changed accordingly. The new settings for the dihedral_style and dihedral_coeff were shown below

dihedral_style multi/harmonic

dihedral_coeff 1 0.0 -0.194866 0.0336784 0.303366 0.0

dihedral_coeff 2 0.0 -0.194866 0.0336784 0.303366 0.0

dihedral_coeff 3 0.0 -0.194866 0.0336784 0.303366 0.0

dihedral_coeff 4 0.075082 -0.194866 0.0336784 0.303366 0.0

After this modification it worked with no error reported. But I do not understand why we had such a problem. Would it be possible you can help explain the reason behind it. Attached please also find the input script in any case it may help.

Many thanks for you possible help,

Guotong Wang

PhD from Jiangsu University

发送自 Windows 10 版邮件应用

in.pdmstest (4.01 KB)

Dear Sir or Madam,

Hope this email finds you safe and well in this challenging time.

[…]

After this modification it worked with no error reported. But I do not understand why we had such a problem. Would it be possible you can help explain the reason behind it. Attached please also find the input script in any case it may help.

the class2 dihedral style has 6 (SIX!) energy terms for each dihedral type and each of them requires a separate dihedral_coeff statement.
you only provided the ones for the regular dihedral term. you also need to set the middle-bond-torsion term, the end-bond-torsion term, the angle-torsion term, the angle-angle-torsion term, and the bond-bond-13 term.

since you didn’t LAMMPS will complain. for details, please see the class2 dihedral style documentation.

axel.