Changes in fix_gcmc.cpp from 2015/05/18


Aidan did some modifications by changing "domain->inside()"-checks
to "domain->inside_nonperiodic()"-checks in:

but did keep "domain->inside()" check in:

Why was this distinction made?

Furthermore: there seems to be some serious problem
with mapping/remapping in the rotation procedure of
molecules (in full_energy-mode), e.g.:

an atom of a spc water residing in some box at at:
orig[]= 26.4995,0.620019,11.1815, gets unmapped to
xtmp[]=-0.208751,-55.2257,-0.098093, but uses an
com[] = 26.7083,55.8458,11.2796 (from "group->xcm()"),
resulting in botched coordinates after rotation:

This happens in attempt_molecule_rotation_full(), after
this event, the next call to "energy_full()" will fail
with whatever error message is near (missing bonded
atom etc.)

I circumvented this for now by setting a flag in
attempt_molecule_rotation_full() after detection of a
domain->inside()-problem, printing some debug info
(as above) and letting the move simply fail (and avoiding

This is what I found out so far,



The change was necessary because the non-full versions do not call
remap() after the MC move is applied, so atoms may legitimately lie
outside the cell in periodic directions.

The problem you cite is hard to explain. I looked at the relevant
block of code and did not see anything amiss. I suspect the
imageflags got messed up in a previous MC move. Can you send a small