[lammps-users] copying instantaneous particle positions

Hi LAMMPS users,

The issue I have right now is the result of my poor knowledge of C++ programming. In altering some of the source code, I am trying to copy the positions of the particles in my system at a particular moment in time, t. Simply definining

**x = atom->x;

at time t, creates a pointer to the actual positions. Instead of having x fixed through all later times, it evolves with atom->x (after all, x is a pointer). Does anyone know how I could define a array that simply copies the elements of atom->x instead of point to them?

Thanks in advance,
Andy

You can certainly allocate your own array and copy
values from atom->x into it for local storage.

Steve