Skip to content

Commit

Permalink
Merge pull request #1132 from pyiron/lammps_drop_2016
Browse files Browse the repository at this point in the history
Lammps drop 2016
  • Loading branch information
jan-janssen committed Aug 21, 2023
2 parents fe337c4 + a729356 commit b0c4456
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 56 deletions.
32 changes: 0 additions & 32 deletions pyiron_atomistics/lammps/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,20 +386,7 @@ def write_input(self):
structure=self.structure, cutoff_radius=self.cutoff_radius
)
lmp_structure.write_file(file_name="structure.inp", cwd=self.working_directory)
version_int_lst = self._get_executable_version_number()
update_input_hdf5 = False
if (
version_int_lst is not None
and "dump_modify" in self.input.control._dataset["Parameter"]
and (
version_int_lst[0] < 2016
or (version_int_lst[0] == 2016 and version_int_lst[1] < 11)
)
):
self.input.control["dump_modify"] = self.input.control[
"dump_modify"
].replace(" line ", " ")
update_input_hdf5 = True
if not all(self.structure.pbc):
self.input.control["boundary"] = " ".join(
["p" if coord else "f" for coord in self.structure.pbc]
Expand All @@ -416,25 +403,6 @@ def write_input(self):
)
self.input.potential.copy_pot_files(self.working_directory)

def _get_executable_version_number(self):
"""
Get the version of the executable
Returns:
list: List of integers defining the version number
"""
if self.executable.version:
return [
l
for l in [
[int(i) for i in sv.split(".") if i.isdigit()]
for sv in self.executable.version.split("/")[-1].split("_")
]
if len(l) > 0
][0]
else:
return None

@property
def publication(self):
return {
Expand Down
24 changes: 0 additions & 24 deletions tests/lammps/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,30 +133,6 @@ def test_structure_charge(self):
],
)

def test_avilable_versions(self):
self.job.executable = os.path.abspath(
os.path.join(
self.execution_path,
"..",
"static",
"lammps",
"bin",
"run_lammps_2018.03.16.sh",
)
)
self.assertTrue([2018, 3, 16] == self.job._get_executable_version_number())
self.job.executable = os.path.abspath(
os.path.join(
self.execution_path,
"..",
"static",
"lammps",
"bin",
"run_lammps_2018.03.16_mpi.sh",
)
)
self.assertTrue([2018, 3, 16] == self.job._get_executable_version_number())

def _build_water(self, y0_shift=0.0):
density = 1.0e-24 # g/A^3
n_mols = 27
Expand Down

0 comments on commit b0c4456

Please sign in to comment.