Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions src/atomistics/calculators/lammps/libcalculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,15 @@ def calc_molecular_dynamics_npt_with_lammpslib(
seed: int = 4928459,
dist: str = "gaussian",
disable_initial_velocity: bool = False,
couple_xyz: bool = False,
lmp=None,
output_keys=OutputMolecularDynamics.keys(),
**kwargs,
) -> dict:
if couple_xyz:
LAMMPS_ENSEMBLE_NPT_XYZ = LAMMPS_ENSEMBLE_NPT + " couple xyz"
else:
LAMMPS_ENSEMBLE_NPT_XYZ = LAMMPS_ENSEMBLE_NPT
if not disable_initial_velocity:
init_str = (
LAMMPS_THERMO_STYLE
Expand All @@ -247,7 +252,7 @@ def calc_molecular_dynamics_npt_with_lammpslib(
+ "\n"
+ LAMMPS_VELOCITY
+ "\n"
+ LAMMPS_ENSEMBLE_NPT
+ LAMMPS_ENSEMBLE_NPT_XYZ
)
input_template = Template(init_str).render(
thermo=thermo,
Expand All @@ -270,7 +275,7 @@ def calc_molecular_dynamics_npt_with_lammpslib(
+ "\n"
+ LAMMPS_THERMO
+ "\n"
+ LAMMPS_ENSEMBLE_NPT
+ LAMMPS_ENSEMBLE_NPT_XYZ
)
input_template = Template(init_str).render(
thermo=thermo,
Expand Down Expand Up @@ -473,6 +478,7 @@ def calc_molecular_dynamics_thermal_expansion_with_lammpslib(
Pdamp: float = 1.0,
seed: int = 4928459,
dist: str = "gaussian",
couple_xyz: bool = False,
lmp=None,
output_keys=OutputThermalExpansion.keys(),
**kwargs,
Expand All @@ -487,7 +493,11 @@ def calc_molecular_dynamics_thermal_expansion_with_lammpslib(
+ LAMMPS_VELOCITY
+ "\n"
)
run_str = LAMMPS_ENSEMBLE_NPT + "\n" + LAMMPS_RUN
if couple_xyz:
LAMMPS_ENSEMBLE_NPT_XYZ = LAMMPS_ENSEMBLE_NPT + " couple xyz"
else:
LAMMPS_ENSEMBLE_NPT_XYZ = LAMMPS_ENSEMBLE_NPT
run_str = LAMMPS_ENSEMBLE_NPT_XYZ + "\n" + LAMMPS_RUN
temperature_lst = np.arange(Tstart, Tstop + Tstep, Tstep).tolist()
return lammps_thermal_expansion_loop(
structure=structure,
Expand Down
Loading