Skip to content

Commit

Permalink
Rename box_file to data_file
Browse files Browse the repository at this point in the history
  • Loading branch information
stefsmeets committed Jun 5, 2024
1 parent c26d605 commit 28aecdd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/gemdat/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def from_lammps(
cls,
*,
coords_file: Path | str,
box_file: Path | str,
data_file: Path | str,
temperature: float,
time_step: float,
coords_format: str = 'xyz',
Expand All @@ -268,8 +268,8 @@ def from_lammps(
----------
coords_file : ...
LAMMPS coords file with trajectory data
box_file : ...
LAMMPS data format, contains the lattice
data_file : ...
LAMMPS data file with the lattice
temperature : float
Temperature of simulation in K
time_step : float
Expand All @@ -293,12 +293,12 @@ def from_lammps(
from pymatgen.io.lammps.data import LammpsData

coords_file = str(coords_file)
box_file = str(box_file)
data_file = str(data_file)

if not cache:
kwargs = {
'coords_file': coords_file,
'box_file': box_file,
'data_file': data_file,
'temperature': temperature,
'time_step': time_step,
}
Expand All @@ -316,7 +316,7 @@ def from_lammps(
if not constant_lattice:
raise NotImplementedError('Lammps reader does not support NPT simulations')

lammps_data = LammpsData.from_file(filename=box_file, atom_style=atom_style)
lammps_data = LammpsData.from_file(filename=data_file, atom_style=atom_style)
lattice = lammps_data.structure.lattice

utraj = Universe(coords_file, format=coords_format)
Expand Down
2 changes: 1 addition & 1 deletion tests/trajectory_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_from_lammps():

traj = Trajectory.from_lammps(
coords_file=data_dir / 'lammps_coords.xyz',
box_file=data_dir / 'lammps_data.txt',
data_file=data_dir / 'lammps_data.txt',
temperature=700,
time_step=2,
)
Expand Down

0 comments on commit 28aecdd

Please sign in to comment.