Hello LAMMPS users:
My goal is to have pressure data for each timestep of my simulation. I can accomplish this by having the following in my input file:
compute stress all pressure thermo_temp
thermo_style custom step temp pe ke pxx pyy pzz
thermo 1
The problem with this solution is that it’s a lot of I/O, which slows down my simulation. Instead, I’d like to make a buffer that will store a certain number (say 1000) of pressures for each timestep for a 1000 timesteps, and when the buffer is full, write (or append) to the data file. This way, I reduce I/O.
Now, if instead of having:
thermo 1
I have:
thermo 10
yet I still want to compute the pressure at every given timestep, how should I go about accomplishing it? Once I know how to invoke the pressure computation at each timestep and understand how to return a pointer to its data structure, figuring out the buffer situation would be relatively straightforward, I think. I’ve been trying to use the extract_lammps_compute
library function, though I’ve had no luck with it, constantly obtaining segfaults. I’ve also tried to mess around with manually calling `compute_pressure’ and other similar compute/modify functions, though that was a no-go either, all returning segfaults.
I appreciate your help,
Amit