Hi there, I am using fix ave/correlate to calculate viscosity and the test need to run very long. I wonder whether there is a command similar to “restart” that can continue from the last time step of previous calculation.
I checked the doc and see fix ave/correlate/long, but it doesn’t give output so can’t extract values from this fix. Is it reasonable to use both ave/correlate (output values for calculation) and ave/correlate/long (to generate restart binary)?
Unless you are using the ave running option (and why would you for computing viscosity?), the output between the Nfreq steps of fix ave/correlate is independent from previous outputs. So, if you can arrange it, that your partial simulation has a number of steps that is a multiple of Nfreq, you can continue your analysis after a restart without losing any information.
Hi Alex, I actually am using the ave running as the green kubo method (8.3.7. Calculate viscosity — LAMMPS documentation). Since it will accumulate continuously when the fix is set, so not sure how correctly handle it with a restart.
Well, then I don’t know anything else that can be done on the LAMMPS side.
Thus you either have to find a more powerful/parallel computer to run you simulation faster or use one of the other available methods to determine viscosity.
The Green-Kubo autocorrelation integrand becomes zero for some long enough correlation time (otherwise your system would be infinitely viscous). Thus you should be able to run your simulation over shorter runs and average over the ensemble of trajectories to get a meaningful result.
Additionally, you can output the raw pressure values (3 numbers for the entire system per pressure-snapshot – so not a lot of data) and then calculate the autocorrelation integral in post-processing, as a purely numerical operation (for example in Python with a standalone NumPy script). This will allow you to combine as many restarts as you like into a single autocorrelation integral.