Hi Steve
Problems with "read_restart" and hybrid pair_styles have occasionally
popped up over the last year. For reference, in April 2012, I posted
a bug report regarding a different problem with "read_restart" and
Axel posted a fix.
http://lammps.sandia.gov/threads/msg27987.html
(In that case, I think LAMMPS was crashing, not printing an error message.)
I am assuming his patch entered the code, because since then, the
problem went away (I think). However a perhaps different problem with
"read_restart" resurfaced again in December.
--- the current issue ---
I've attached two variants of the same test system (8 water molecules).
In the "working" version, I use
pair_style lj/charmm/coul/long 9.0 10.0 10.0
pair_coeff 1 1 0.1553 3.166
pair_coeff 2 2 0.0 2.058
In the "not_working" version I use a hybrid pair_style:
pair_style hybrid lj/charmm/coul/long 9.0 10.0 10.0
pair_coeff 1 1 lj/charmm/coul/long 0.1553 3.166
pair_coeff 2 2 lj/charmm/coul/long 0.0 2.058
To demonstrate the problem, cd to the "not_working" example, and run
lammps on "run.in.min" and "run.in.npt" in that order. (The
"run.in.npt" invokes read_restart on a restart file created during the
previous run.) When I do this, I get:
ERROR: KSpace style is incompatible with Pair style (kspace.cpp:147)
I tested this problem today with the 2013Jan11 version of LAMMPS.
(This has been a problem for moltemplate users in the past.
http://sourceforge.net/mailarchive/message.php?msg_id=30238375)
Sorry, I know it's never fun to get these kinds of posts.
Thanks for checking this out
--- details why I use hybrid styles ---
--- (not important. feel free to skip) ---
Why am I using "pair_style hybrid" with only one sub-style in the
"not_working" example?
In most moltemplate examples, I use hybrid pair_styles (and
angle_styles, etc) even if I don't need to. The goal is to define
molecules which are modular and can be imported into other users
simulations: If I post a molecule using a hybrid pair_style, then
later it makes it easier later for other users to import my molecule
and combine it with their own molecules which may use a different
pair_style. They can override the "pair_style" command in their own
files to include whatever extra sub-styles they need. But the
decision to use a hybrid or not-hybrid pair_style in the original
molecule has to be made at the beginning, because it effects the
syntax of all the "pair_coeff" commands which come later. Currently,
moltemplate is too dumb to change the syntax of the pair_coeff
commands to combine molecules defined with hybrid and non-hybrid
pair_styles.
working.tar.gz (1.14 KB)
not_working.tar.gz (1.19 KB)