problem with pair/hybrid and respa inner/middle/outer

Dear all,

I think there is a bug when using pair/hybrid together with
the run style respa and the inner/middle/outer keywords.

The code crashes during the setup when the attached input and
restart file are run. The problem vanishes if either the pair style
is changed to a non-hybrid style, the respa is switched off, or
the inner and outer keyword are not used with the respa.

The code crashes when neighbor->build() is called in Respa::setup().
I am using the LAMMPS-14May13 version.



lammps.equib.script (852 Bytes) (1.86 MB)

I think the 5Jun patch fixes this - please try it out …



I just tried it and it works well. Thanks for the patch.




sorry that I have to take back my statement from earlier that day:

There still seems to be a problem with the code. It does not crash
any more, however, computed quantities seem to be incorrect:

I have run three test cases that are attached:
case a): hybrid pair style + respa (lammps.hybrid_list.script + hybrid.log)
case b): hybrid pair style without respa (lammps.nonrespa_list.script + nonrespa.log)
case c): not hybrid pair style + respa (lammps.nonhybrid_list.script + nonhybrid.log)

My understanding is that each of the three test cases should provide the identical
thermodynamic output in the first step. case b) and case c) provide the correct output,
case a) provides a different output, though.



P.S.: The problem with the error in the energies can be resolved by replacing pair_hybrid.cpp
with the attached file.

pair_hybrid.cpp (26 KB)

hybrid.log (1.9 KB) (2.41 MB)

lammps.hybrid_list.script (522 Bytes)

lammps.nonhybrid_list.script (478 Bytes)

lammps.nonrespa_list.script (454 Bytes)

nonhybrid.log (1.86 KB)

nonrespa.log (1.73 KB)

I dropped in your altered pair hybrid (in a different way,
you should check that it does what you expect).

I assume you are saying there is still an issue with (a)
different than (b,c).

Two ideas:

a) if you are using 2 sub-styles there are 2 cases,
(1) they both have outer/inner methods defined,
or (2) only one does (the case where neither does
should throw an error) - it doesn’t look like pair hybrid
has logic for case (2), since it needs to call
the compute() method of one of the sub-styles

b) can you create and debug a simple test file
with a few atoms run for 0 steps - then if you
put print statements in the pair styles you
should be able to see if all the interactions
are being called/computed

We should take these details off-line until
we have a fix - it’s probably not interesting to the