Skip to content

Commit

Permalink
Update helpers.py
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen authored Mar 21, 2024
1 parent e4cfa7e commit 4c29329
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions atomistics/calculators/lammps/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4c29329

Please sign in to comment.