diff --git a/atomistics/calculators/lammps/helpers.py b/atomistics/calculators/lammps/helpers.py index 78ce6129..3806807b 100644 --- a/atomistics/calculators/lammps/helpers.py +++ b/atomistics/calculators/lammps/helpers.py @@ -131,10 +131,13 @@ def lammps_thermal_expansion_loop( Pstop=Pstop, Pdamp=Pdamp, ) + volume_lst, temperature_lst = [], [] for l in run_str_rendered.split("\n"): lmp_instance.interactive_lib_command(l) - volume_md_lst.append(lmp_instance.interactive_volume_getter()) - temperature_md_lst.append(lmp_instance.interactive_temperatures_getter()) + volume_lst.append(lmp_instance.interactive_volume_getter()) + temperature_lst.append(lmp_instance.interactive_temperatures_getter()) + volume_md_lst.append(np.mean(volume_lst)) + temperature_md_lst.append(np.mean(temperature_lst)) lammps_shutdown(lmp_instance=lmp_instance, close_instance=lmp is None) return get_thermal_expansion_output( temperatures_lst=temperature_md_lst,