Hey all,
I am trying to simulate a system in which I want to use a hybrid of stillinged weber potential with three body on and off. I am using LAMMPS (2 Aug 2023 - Update 2). I have three atom types. I set up the non-bonded interactions in the following way:
# set non bonded interactions
pair_style hybrid sw threebody on sw threebody off
# three body interactions (OH-OH-OH,mW-mW-mW)
pair_coeff * * sw 1 params.sw NULL OH NULL
pair_coeff * * sw 1 params.sw NULL NULL MW
# two body interations (CH3-CH3,CH3-OH,CH3-mW)
pair_coeff 1 1 sw 2 params.sw CH3 CH3 CH3
pair_coeff 1 2 sw 2 params.sw CH3 OH OH
pair_coeff 1 3 sw 2 params.sw CH3 MW MW
The aim here should be clear from the comments. The params.sw
file that I use is also included here:
# Three body set
OH OH OH 6.189 2.3925 1.8 23.15 1.20 -0.333333 7.049556277 0.6022245584 4.0 0.0 0.0
MW MW MW 6.189 2.3925 1.8 23.15 1.20 -0.333333 7.049556277 0.6022245584 4.0 0.0 0.0
# Only Two body
CH3 CH3 CH3 2.601770907 3.668729141 1.8 0.000 0.00 0.000000 7.049556277 0.6022245584 4.0 0.0 0.0
CH3 OH OH 1.367038049 5.36308005 1.8 0.000 0.00 0.000000 7.049556277 0.6022245584 4.0 0.0 0.0
CH3 MW MW 1.367038049 5.36308005 1.8 0.000 0.00 0.000000 7.049556277 0.6022245584 4.0 0.0 0.0
OH CH3 CH3 1.367038049 5.36308005 1.8 0.000 0.00 0.000000 7.049556277 0.6022245584 4.0 0.0 0.0
MW CH3 CH3 1.367038049 5.36308005 1.8 0.000 0.00 0.000000 7.049556277 0.6022245584 4.0 0.0 0.0
# Irrelevant (ignored by LAMMPS)
CH3 CH3 OH 1.367038049 5.36308005 1.8 0.000 1.20 -0.333333 7.049556277 0.6022245584 4.0 0.0 0.0
CH3 CH3 MW 1.367038049 5.36308005 1.8 0.000 1.20 -0.333333 7.049556277 0.6022245584 4.0 0.0 0.0
CH3 OH CH3 2.601770907 3.668729141 1.8 0.000 0.00 0.000000 0.000000000 0.0000000000 4.0 0.0 0.0
CH3 MW CH3 2.601770907 3.668729141 1.8 0.000 0.00 0.000000 0.000000000 0.0000000000 4.0 0.0 0.0
OH OH CH3 1.367038049 5.36308005 1.8 0.000 1.20 -0.333333 7.049556277 0.6022245584 4.0 0.0 0.0
MW MW CH3 1.367038049 5.36308005 1.8 0.000 1.20 -0.333333 7.049556277 0.6022245584 4.0 0.0 0.0
OH CH3 OH 6.189 2.3925 1.8 23.15 1.20 -0.333333 7.049556277 0.6022245584 4.0 0.0 0.0
MW CH3 MW 6.189 2.3925 1.8 23.15 1.20 -0.333333 7.049556277 0.6022245584 4.0 0.0 0.0
I am getting the error:
ERROR: Must use consistent type to element mappings with threebody off (src/src/MANYBODY/pair_sw.cpp:301)
Last command: pair_coeff 1 2 sw 2 params.sw CH3 OH OH
From what I read from the documentation and the example file in GH, the two body terms are in the line ikk
. However, it is not clear to me how exactly should the element-to-type and type-to-element information should be used in the pair_coeff
command.
Why does this line work: pair_coeff 1 1 sw 2 params.sw CH3 CH3 CH3
but the next one does not work.
PS: Edit was to add more information.