ovilab / atomify

Atomify - a realtime LAMMPS visualizer
GNU General Public License v3.0
151 stars 21 forks source link

Atomify freezes if atoms are lost #329

Closed andeplane closed 7 years ago

andeplane commented 7 years ago

The two attached files reproduces the problem. Atoms might have arbitrary large coordinates and since we use domain->remap to place atoms inside simulation box before rendering, it gets stuck in

if (xperiodic) {
    while (coord[0] < lo[0]) coord[0] += period[0];
    while (coord[0] >= hi[0]) coord[0] -= period[0];
    coord[0] = MAX(coord[0],lo[0]);
  }

Archive.zip

andeplane commented 7 years ago

One solution would be to detect this before remap is called and skip remap if we have problematic atoms.

andeplane commented 7 years ago

Fixed in bd42d6f908662aed79e4915aac313aa93b50cdac by adding regular LAMMPS lost_check routine in fix_atomify.

andeplane commented 7 years ago

Turns out it isn't always fixed. In this example, it hangs because x is equal to 1e22 for some atom. 06_22_sic_single_sheet.zip

Edit: this time it is because fix ehex does remap, so it is a LAMMPS issue, not Atomify.