Dear LAMMPS users,
I am attempting to input several dihedral coefficients for each dihedral using the CHARMM style. When inputting these dihedrals it appears to only want set of coefficients per dihedrals and when more are used it does not function. For example see below a sample in my data file where 3 dihedral coefficients are used for 1 dihedral as specified in a paper parameterizing a specific molecule. Just wondering how I would put in several sets of coefficients for 1 dihedral or alternatively combining several coefficients into 1 set.
1 -0.273959238 1 0 0 # C1-C1-O1-C2
1 0.15999404 3 0 0 # C1-C1-O1-C2
1 2.74994657 2 180 0 # C1-C1-O1-C2
Many thanks,
Luke Wylie
if you need to set multiple sets of coefficients for the same dihedral, please define it in the topology multiple times, each with a different dihedral type, then you can assign the multiple coefficients to the different types (one set per type) and have them applied to the same dihedral. please make sure you set the 1-4 pair interaction factor to 0 for the additional dihedral types, so you don’t add the 1-4 pair interactions multiple times.
axel.
if you need to set multiple sets of coefficients for the same dihedral, please define it in the topology multiple times, each with a different dihedral type, then you can assign the multiple coefficients to the different types (one set per type) and have them applied to the same dihedral.
please make sure you set the 1-4 pair interaction factor to 0 for the additional dihedral types, so you don’t add the 1-4 pair interactions multiple times.
good point. (forgot about that.)
axel.
As an alternative to dihedral_style charmm, also take a look at these other dihedral styles:
https://lammps.sandia.gov/doc/dihedral_fourier.html
https://lammps.sandia.gov/doc/dihedral_table.html
https://lammps.sandia.gov/doc/dihedral_spherical.html
This way, you do not need to define multiple dihedral interactions for the same set of 4 atoms.
These additional dihedral stypes are enabled if you compiled LAMMPS with the USER-MISC package enabled. (Compiled versions of LAMMPS downloaded for linux, windows, or mac from the LAMMPS web site should include the USER-MISC package by default. The conda and ubuntu-specific versions of compiled LAMMPS might not. Fortunately, in that case, LAMMPS is easy to compile.)
Unfortunately, one drawback with these dihedral styles is that they do not yet work with GPU acceleration (unlike dihedral_style charmm which works with KOKKOS).
Cheers
andrew
Dear Axel and Andrew,
I am currently trying to implement these changes as suggested by copying the topology and am attempting to copy the topology multiple times (please find the topology of the dihedrals before and after the changes below). But I am currently getting the same error where it only reads 7 dihedrals which is assuming 1 set of coefficients per dihedral. If there is something obvious I am getting wrong in copying the topology multiple times please let me know.
Before:
Dihedrals
1 2 3 1 2 5
2 2 3 1 2 6
3 3 3 1 2 7
4 2 4 1 2 5
5 2 4 1 2 6
6 3 4 1 2 7
7 3 8 1 2 5
8 3 8 1 2 6
9 5 8 1 2 7
10 1 2 1 8 9
11 4 3 1 8 9
12 4 4 1 8 9
13 1 1 2 7 9
14 4 5 2 7 9
15 4 6 2 7 9
16 6 2 7 9 8
17 7 2 7 9 10
18 6 1 8 9 7
19 7 1 8 9 10
After:
Dihedrals
1 4 3 1 2 5
2 5 3 1 2 5
3 6 3 1 2 5
4 4 3 1 2 6
5 5 3 1 2 6
6 6 3 1 2 6
7 7 3 1 2 7
8 8 3 1 2 7
9 9 3 1 2 7
10 4 4 1 2 5
11 5 4 1 2 5
12 6 4 1 2 5
13 4 4 1 2 6
14 5 4 1 2 6
15 6 4 1 2 6
16 7 4 1 2 7
17 8 4 1 2 7
18 9 4 1 2 7
19 7 8 1 2 5
20 8 8 1 2 5
21 9 8 1 2 5
22 7 8 1 2 6
23 8 8 1 2 6
24 9 8 1 2 6
25 12 8 1 2 7
26 13 8 1 2 7
27 14 8 1 2 7
28 1 2 1 8 9
29 2 2 1 8 9
30 3 2 1 8 9
31 10 3 1 8 9
32 11 3 1 8 9
33 10 4 1 8 9
34 11 4 1 8 9
35 1 1 2 7 9
36 2 1 2 7 9
37 3 1 2 7 9
38 10 5 2 7 9
39 11 5 2 7 9
40 10 6 2 7 9
41 11 6 2 7 9
42 15 2 7 9 8
43 16 2 7 9 10
44 17 2 7 9 10
45 18 2 7 9 10
46 15 1 8 9 7
47 16 1 8 9 10
48 17 1 8 9 10
49 18 1 8 9 10
Thanks,
Luke
Dear Axel and Andrew,
I am currently trying to implement these changes as suggested by copying the topology and am attempting to copy the topology multiple times (please find the topology of the dihedrals before and after the changes below). But I am currently getting the same error where it only reads 7 dihedrals which is assuming 1 set of coefficients per dihedral. If there is something obvious I am getting wrong in copying the topology multiple times please let me know.
if you change the number of entries in the Dihedrals section, you have to adjust the header of the data file accordingly.
axel.