Hello Everyone,
I am trying to use fix ave/time command to output some quantities to a file. But, I am getting the following error:
ERROR: Illegal fix ave/time command (src/fix_ave_time.cpp:1143)
Last command: fix 2 all ave/time 200 5 1000 v_sysdensity pe ke etotal file 1.5.energies.txt
The simulation is running when I remove this fix.
I am attaching my lammps input file here:
FINAL-TRIAL.in (2.2 KB)
Can anyone tell me as where I am going wrong?
Thank you,
Sanjeet
Can you run the following command without error?
fix 2 all ave/time 200 5 1000 v_sysdensity file 1.5.energies.txt
@sanjeets47 when reporting errors always report which LAMMPS version you are using.
A more recent LAMMPS version would show you the following, more specific error:
ERROR: Unknown fix ave/time keyword pe (src/fix_ave_time.cpp:1102)
So now you can study the fix ave/time documentation (the one for your version of LAMMPS, the online version always refers to the latest release of LAMMPS) whether a keyword “pe” exists or rather whether the fix accepts thermo keywords. You cannot just make keywords up and hope for the best.
Dear Axel,
Thank you for your reply.
I am using LAMMPS (23 Jun 2022) version.
Anyway, I got your point, and I am able to use the fix ave/time command correctly. And my simulations are running well.
Thank you very much,
Sanjeet
Yes, Now I can run the following command without error:
fix 2 all ave/time 200 5 1000 v_sysdensity v_pe v_ke v_etotal file 1.5.energies.txt
Thank you,
Sanjeet