Viscosity calculation using green-kubo formulation

EC.in (3.8 KB)
This is my input file; I have been using to calculate the viscosity. I am getting same error for long time now. I think I am using all the syntax right but still don’t know why I am getting error like this. can anyone help me.
ERROR: Fix in variable not computed at compatible time (…/variable.cpp:4218)
Last command: run 1000000

The error message is pretty self explanatory. You are outputting some property computed from a fix in an equal style variable at a different frequency than what the fix uses. This often happens with thermo output or inputs for a time averaging fix.

Unfortunately, your input is an example of how an excessive use of variables can make an input near unreadable, so the exercise to find this discrepancy is left to you, I don’t have the patience to track all the values of all the many different variables manually.

1 Like

thank you for your reply

Have you resolved the error issue with the in file? We are also trying to calculate viscosity using the G-K formula, but the process of reading the molecular structure keeps reporting errors. We initially chose to modify the example of Ar given in LAMMPS for viscosity calculation, but the calculated results differed greatly from the experimental values. So I wanted to ask if there are any other materials available for reference. Thank you for your response.

1 Like

You may find it useful to read this paper on the effects of temperature control on the calculation of viscosity: https://pubs.acs.org/doi/10.1021/acs.jpcb.2c06035

1 Like

no i am still working on it

thank you for your help