Question about modification of segmental repulsive potential pair_style srp

Dear Everyone,

I am trying to modify the soft segmental repulsive potential from a simple expression to a complex LJ expression. I modified all the corresponding expressions of energy and force in the pair_srp.cpp file. When I compiled and run it, it was terminated with the error: Illegal fix_modify command.

In modify.cpp, narg<2 leads to the error. However, when I checked the fix_srp.cpp file, it didn’t find fix_srp links to the modify_fix function. I am just wondering is there any possible reason can that lead to such error?

Kind regards,

Mingchao

pair_srp.cpp (22.3 KB)

Dear Everyone,

I am trying to modify the soft segmental repulsive potential from a simple
expression to a complex LJ expression. I modified all the corresponding

please note that this code is currently being refactored to address
some restarting and general implementation issues.

expressions of energy and force in the pair_srp.cpp file. When I compiled

BTW: that code is going to run needlessly slow due to the redundant
use of the pow() function.

and run it, it was terminated with the error: Illegal fix_modify command.

In modify.cpp, narg<2 leads to the error. However, when I checked the
fix_srp.cpp file, it didn't find fix_srp links to the modify_fix function. I

of course not. that wouldn't work. pair srp communicates changes and
setting to fix srp via the fix->modify_params() API.

am just wondering is there any possible reason can that lead to such error?

how about some incorrect fix_modify command elsewhere that has nothing
to do with SRP.

axel.

Dear Alex,

I didn’t use any fix_modify command in my input file. I used thermo_modify and dump_modify, is that possible these command lead to the error?

Kind regards,

MC

Dear Alex,

I didn't use any fix_modify command in my input file. I used thermo_modify
and dump_modify, is that possible these command lead to the error?

no. it is trivial to find out which command is causing the problem, as
it is the last command shown on the screen with -echo screen before
LAMMPS abends.

axel.

I have checked it with echo command, and fix_nvt command led to the error. Here is the content of my input file:

units real
dimension 3
boundary p p p

echo screen

atom_style angle

read_data test.data

bond_style harmonic
bond_coeff * 200.0 100.0

angle_style harmonic
angle_coeff * 4500.0 180.0

pair_style hybrid lj/cut 100.0 srp 100.0 1 min exclude yes
pair_coeff 1 1 lj/cut 108.0000 22.630000
pair_coeff 1 2 none
pair_coeff 2 2 srp 108.000 22.630 100.0

special_bonds lj 0.0 0.0 0.0
replicate 333 10 1
neighbor 2.0 bin
neigh_modify delay 20 every 20 check yes

variable t equal 2000

I have checked it with echo command, and fix_nvt command led to the error.

well, then you know what you have to debug.

axel.