Skip to content

Commit

Permalink
Only lint source code, run pre-commit run --all-files
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwthompson committed Feb 4, 2022
1 parent f30856a commit 0953684
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ repos:
rev: 22.1.0
hooks:
- id: black
files: ^physical_validation
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
files: ^physical_validation
- repo: https://github.com/PyCQA/flake8
rev: 4.0.1
hooks:
- id: flake8
files: ^physical_validation
2 changes: 1 addition & 1 deletion physical_validation/tests/test_data_lammps_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def test_read_lammps() -> None:
lammps_files = database.lammps_files(system_name)
parser = pv.data.LammpsParser()
ensemble = pv.data.EnsembleData(
ensemble="NVT", natoms=100 * 3, volume=20 ** 3, temperature=300
ensemble="NVT", natoms=100 * 3, volume=20**3, temperature=300
)
lammps_simulation_data = parser.get_simulation_data(
ensemble=ensemble,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"liquid": pv.data.EnsembleData(
ensemble="NVE",
natoms=1000,
volume=3.60140 ** 3,
volume=3.60140**3,
energy=1,
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# Hack ensemble to also distinguish trajectories
ensemble={
"NVT": pv.data.EnsembleData(
ensemble="NVT", natoms=100 * 3, volume=20 ** 3, temperature=300
ensemble="NVT", natoms=100 * 3, volume=20**3, temperature=300
),
},
description="100 water molecules, energy and trajectory data",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
# Hack ensemble to also distinguish trajectories
ensemble={
"NVT full trajectory": pv.data.EnsembleData(
ensemble="NVT", natoms=5 * 3, volume=1.86210 ** 3, temperature=300
ensemble="NVT", natoms=5 * 3, volume=1.86210**3, temperature=300
),
"NVT last frame only": pv.data.EnsembleData(
ensemble="NVT", natoms=5 * 3, volume=1.86210 ** 3, temperature=300
ensemble="NVT", natoms=5 * 3, volume=1.86210**3, temperature=300
),
"NPT full trajectory": pv.data.EnsembleData(
ensemble="NPT", natoms=5 * 3, pressure=1, temperature=300
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
"NVT-low": pv.data.EnsembleData(
ensemble="NVT",
natoms=900 * 3,
volume=3.01125 ** 3,
volume=3.01125**3,
temperature=298.15,
),
"NVT-high": pv.data.EnsembleData(
ensemble="NVT",
natoms=900 * 3,
volume=3.01125 ** 3,
volume=3.01125**3,
temperature=308.15,
),
"NPT-lowT-lowP": pv.data.EnsembleData(
Expand Down
2 changes: 1 addition & 1 deletion physical_validation/util/gromacs_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def _check_exe(self, quiet: bool = False, exe: Optional[str] = None) -> bool:
else:
raise e
# check that output is as expected
return bool(re.search(br":-\) GROMACS - gmx.* \(-:", exe_out))
return bool(re.search(rb":-\) GROMACS - gmx.* \(-:", exe_out))

def _run(
self,
Expand Down
2 changes: 1 addition & 1 deletion physical_validation/util/integrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def check_convergence(
results[dt][0],
results[dt][1],
results[dt][2],
prev[0] ** 2 / dt ** 2,
prev[0] ** 2 / dt**2,
prev[1] / results[dt][1],
)
)
Expand Down

0 comments on commit 0953684

Please sign in to comment.