pair_coeff and g_ewald Help

Hello I’m a college student who is working on a special project for a class with lammps and my script is not working for some reason. What I have is:

variable gamma equal 0.1 # eta ~ 0.3 mPa s, timestep = 2 fs

units real
boundary p p p
comm_modify vel yes

atom_style full
bond_style harmonic
angle_style harmonic
pair_style hybrid/overlay lj/cut/coul/long 14.0 10.0 dpd/tstat 300.0 300.0 10.0 38262

kspace_style pppm 1.0e-4

read_data data.unt

pair_coeff * * lj/cut/coul/long 0.086 3.4
pair_coeff 1 2 lj/cut/coul/long 1.10 98.6
pair_coeff 1 1 lj/cut/coul/long 1.54 83.1
pair_coeff 1 6 lj/cut/coul/long 1.43 85.5
pair_coeff 1 5 lj/cut/coul/long 1.43 70.0
pair_coeff 6 6 lj/cut/coul/long 1.21 118.2

pair_coeff 5 2 lj/cut/coul/long 1.04 92.7 #
pair_coeff 8 6 lj/cut/coul/long 0.295 0.530 #

#These 2 lines when commented out I get an error saying that it could not compute g_ewald but the initial error goes away

pair_coeff 3 4 dpd/tstat {gamma} pair_coeff 3 7 dpd/tstat {gamma}
pair_coeff 4 7 dpd/tstat {gamma} pair_coeff 7 7 dpd/tstat {gamma}

bond_coeff 1 0.0 0.9572
angle_coeff 1 0.0 104.5

group water type 3 4 7
group tube type 1 2 5 6 8

neighbor 2.0 bin
neigh_modify delay 5

compute Tliq water temp

compute Tpar water temp/partial 1 1 0

fix shakeh2o water shake 1.0e-4 200 0 b 1 a 1
fix constnve water nve

dump dumpwall tube xyz 10000000 dump.tube.xyz
dump_modify dumpwall flush yes
dump dumpwater water xyz 1000 dump.water.xyz
dump_modify dumpwater flush yes

thermo_style custom step cpu c_Tliq c_Tpar etotal
thermo 2
thermo_modify flush yes

timestep 2.0
velocity water create 300.0 34239
run 60000
write_restart restart.eq

run 240000

If I don’t comment those lines out I get and error:

ERROR: Incorrect args for pair coefficients (…/pair_lj_cut_coul_long.cpp:647)

If someone could help or at least give me a direction I would greatly appreciate it.

​that is because they don't follow the syntax requirements for the atom
types​, the left atom type of a pair has to be the lower number. the
following lines should work and do the same thing:



pair_coeff 2 5 lj/cut/coul/long 1.04 92.7 #
pair_coeff
​6​

​8​
lj/cut/coul/long 0.295 0.530 #

​axel.​

Thank you so much it fixed the first problem but I still get the:
ERROR: Could not compute g_ewald (…/pppm.cpp:1277)

Is there any way to address this?

Thank you so much it fixed the first problem but I still get the:
ERROR: Could not compute g_ewald (../pppm.cpp:1277)

Is there any way to address this?

​this is not so straightforward to debug. this error message would happen,
if you have "tricky" system or a bad input., e.g. bad box dimensions.

as a first step, you can just use the kspace_modify gewald command to
explicitly set it to an arbitrary but reasonably number,
e.g. 0.2 or 0.1

that should get you past the error message, and then you need to see, if
you have very large or invalid energies and/or forces.

if it is only a "tricky" system, you probably can run for a little bit, and
then write out a new data file and start over with automatic settings.
if you have a "bad" system, you need to remove the problematic parts or
adjust the parameters giving the problem. it is probably best at this
point, to find somebody with a little bit of experience to look over your
shoulder. it is very difficult to sort out such kind of problems from
remote.

axel.