I am implementing some code for autocorrelation compute in LAMMPS but i found some C++ dificulties I would like to ask. The question is I need to save the initial velocities of atoms to begin the autocorrelation compute but I find it dificult because all objects defined in LAMMPS are pointers to objects, I suposse, and provide access to the direcction nor the value ( for instance atom->v ) so i dont find the way to save initial data (in fact every step are actualiced so my autorrelation is ever 1 !!). I am a little bit ‘self-taught’ guy in C++ so advanced topics in some way are still dificult for me (Class inside class, pointers to class … etc).
Any help is welcome!!! thanks!!