Skip to content

Commit 93da3f2

Browse files
partial revert of 93056ff and further changes to make both lammps and post-processing to work
1 parent 2f48e01 commit 93da3f2

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

test_driver/helper_functions.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ def run_lammps(modelname: str, temperature_K: float, pressure_bar: float, timest
7676
pdamp = timestep_ps * 1000.0
7777
tdamp = timestep_ps * 100.0
7878

79-
log_filename = os.path.join(output_dir, "lammps.log")
80-
restart_filename = os.path.join(output_dir, "final_configuration.restart")
81-
melted_crystal_filename = os.path.join(output_dir, "melted_crystal.dump")
82-
average_position_filename = os.path.join(output_dir, "average_position.dump")
83-
average_cell_filename = os.path.join(output_dir, "average_cell.dump")
79+
log_filename = "lammps.log"
80+
restart_filename = "final_configuration.restart"
81+
melted_crystal_filename = "melted_crystal.dump"
82+
average_position_filename = "average_position.dump"
83+
average_cell_filename = "average_cell.dump"
8484
variables = {
8585
"modelname": modelname,
8686
"temperature": temperature_K,
@@ -92,22 +92,22 @@ def run_lammps(modelname: str, temperature_K: float, pressure_bar: float, timest
9292
"thermo_sampling_period": thermo_sampling_period,
9393
"species": " ".join(species),
9494
"zero_temperature_crystal_filename": os.path.join(output_dir, "zero_temperature_crystal.lmp"),
95-
"average_position_filename": f"{average_position_filename}.*",
96-
"average_cell_filename": average_cell_filename,
97-
"write_restart_filename": restart_filename,
95+
"average_position_filename": f"{os.path.join(output_dir, average_position_filename)}.*",
96+
"average_cell_filename": os.path.join(output_dir, average_cell_filename),
97+
"write_restart_filename": os.path.join(output_dir, restart_filename),
9898
"trajectory_filename": os.path.join(output_dir, "trajectory.lammpstrj"),
9999
"msd_trajectory_filename": os.path.join(output_dir, "msd_trajectory.lammpstrj"),
100100
"msd_threshold": msd_threshold_angstrom_squared_per_sampling_timesteps,
101101
"msd_timesteps": number_msd_timesteps,
102102
"rlc_run_length": rlc_run_length,
103103
"rlc_n_every": rlc_n_every,
104-
"melted_crystal_output": melted_crystal_filename
104+
"melted_crystal_output": os.path.join(output_dir, melted_crystal_filename)
105105
}
106106

107107
command = (
108108
f"{lammps_command} "
109109
+ " ".join(f"-var {key} '{item}'" for key, item in variables.items())
110-
+ f" -log {log_filename}"
110+
+ f" -log {os.path.join(output_dir, log_filename)}"
111111
+ f" -in {os.path.join(output_dir, 'npt.lammps')}")
112112

113113
patched_env = os.environ.copy()

0 commit comments

Comments
 (0)