Open m-bone opened 1 year ago
@hmacdope @richardjgowers can you have a look at this issue with the augment functionality?
Can do.
Sorry for the delay @m-bone can you clarify what you mean by original unit cell, vs the white cell?
No problem, the original unit cell is the one with blue boundaries and contains the larger atoms. The white cell is the larger surrounding area with the white containing the ghost atoms represented with the smaller white balls.
Expected behavior
Augment_coordinates should create ghost atoms within a specified cutoff from atoms existing within a universe. Used to mimic the effects of periodic boundaries when doing other calculations like counting neighbours.
Actual behavior
The majority of ghost atoms get added at the expected positions . However, a small selection of ghost atoms get placed within the system with the wrong Z coordinates, always far more negative than expected. For example, if the box is 5 Ang high then these atoms get placed with Z coordinates of -4, instead of 6. This can be seen in the attached files and the image below for methane, where two of the methane molecules are placed wrong. Using Ovito to overlay the LAMMPS data with the augmented coordinates in the xyz file shows the issue clearly.
The smaller atoms are the ghosts. The atoms in the lower part of the image should be at the top so that they've close enough to interact with any other atoms that might be in the original unit cell (in blue).
Code to reproduce the behavior
This Python code will recreate the ghost atoms xyz file and leave it in the specified directory.
Current version of MDAnalysis
Tested on MDA version 2.5.0 with Python 3.10.4 on Windows 10. Same issue seen on Ubuntu 20.04
Test Files (LAMMPS and current ghost atom xyz data) methane.zip