problems about internal-only fix STORE and fix_store_state

Hi folks!
1. I’ve tried to use internal-only fix STOR****E to save the atom position, but I just get the original position. Is it possible to use this fix to get the atom position from the last timestep**?**
2. Can I get the atom inf from the fix_store_state.cpp using pointer like FixStoreState* fixstore?
for example,fix_addforce.cpp call fix_store_state.cpp.

Hi folks!
1. I’ve tried to use internal-only fix STOR****E to save the atom position, but I just get the original position. Is it possible to use this fix to get the atom position from the last timestep**?**

fix STORE provides the per-atom storage. it is up to you to copy data into it and update it as you need it. all that the fix does for you is to migrate the data along with atoms migrating between subdomains (and thus MPI ranks) and store/restore it into restart files.

2. Can I get the atom inf from the fix_store_state.cpp using pointer like FixStoreState* fixstore?
for example,fix_addforce.cpp call fix_store_state.cpp.

fix addforce is not a good example, since it only allows to access variables. better to look at some code that would access e.g. fix ave/atom
you would typically access the per-atom vector data from such a fix through looking up the (numerical) fix index through its fix_id (string) like this:
int ifix = modify->find_fix(fix_id);

and then you can get access to a vector of the per atom data through:
double *fix_vector = modify->fix[ifix]->vector_atom;

fix store/state will update the data for you, but you have to access each property (x, y, z) independently through separate argument indices.

axel.