Skip to content

Commit d3f43d2

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent dac2094 commit d3f43d2

File tree

126 files changed

+482
-15
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+482
-15
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ happen.
2121

2222
**Desktop (please complete the following information):**
2323

24-
- OS: \[e.g. iOS\]
25-
- Browser \[e.g. chrome, safari\]
26-
- Version \[e.g. 22\]
24+
- OS: [e.g. iOS]
25+
- Browser [e.g. chrome, safari]
26+
- Version [e.g. 22]
2727

2828
**System parameters** Please run the following in your python kernel and copy
2929
the output below.

CI/functional_tests/test_molten_salts.py

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
-------
2626
Perform a functional test on two molten salts.
2727
"""
28+
2829
from typing import Tuple
2930

3031
import pytest
@@ -73,6 +74,7 @@ def mdsuite_project(traj_files, tmp_path) -> mds.Project:
7374
-------
7475
project: mdsuite.Project
7576
An MDSuite project to be tested.
77+
7678
"""
7779
project = mds.Project(storage_path=tmp_path.as_posix())
7880

@@ -114,6 +116,7 @@ def test_analysis(mdsuite_project):
114116
-----
115117
See the link below for similar data for CNs for molten salts.
116118
https://link.springer.com/article/10.1007/s10800-018-1197-z
119+
117120
"""
118121
NaCl_experiment = mdsuite_project.experiments.NaCl
119122
KCl_experiment = mdsuite_project.experiments.KCl

CI/functional_tests/test_water_study.py

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
-------
2626
Functional test for the analysis of a GROMACS water simulation.
2727
"""
28+
2829
from typing import List
2930

3031
import pytest
@@ -65,6 +66,7 @@ def mdsuite_project(traj_files, tmp_path) -> mdsuite.Project:
6566
-------
6667
project: mdsuite.Project
6768
An MDSuite project to be tested.
69+
6870
"""
6971
gmx_units = Units(
7072
time=1e-12,
@@ -102,6 +104,7 @@ def test_water_analysis(mdsuite_project):
102104
-----
103105
The diffusion, angle, and eventually coordination data tested here are comparable
104106
with values taken from experiment and published studies.
107+
105108
"""
106109
water = mdsuite_project.experiments["water_sim"]
107110

CI/integration_tests/calculators/__test_structure_factor.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import json
2829
import os
2930
from pathlib import Path

CI/integration_tests/calculators/_test_green_kubo_thermal_conductivity.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import json
2829
import os
2930
from pathlib import Path

CI/integration_tests/calculators/_test_green_kubo_viscosity.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import json
2829
import os
2930
from pathlib import Path

CI/integration_tests/calculators/_test_nernst_einstein_ionic_conductivity.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import json
2829
import os
2930
from pathlib import Path

CI/integration_tests/calculators/test_angular_distribution_function.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import os
2829

2930
import pytest

CI/integration_tests/calculators/test_coordination_numbers.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import os
2829

2930
import pytest

CI/integration_tests/calculators/test_einstein_diffusion_coefficients.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import dataclasses
2829
import os
2930

CI/integration_tests/calculators/test_einstein_distinct_diffusion_coefficients.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
values.
3232
3333
"""
34+
3435
import os
3536

3637
import pytest

CI/integration_tests/calculators/test_einstein_helfand_ionic_conductivity.py

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import os
2829

2930
import pytest
@@ -61,6 +62,7 @@ def test_project(traj_file, true_values, tmp_path, desired_memory):
6162
Notes
6263
-----
6364
Test uncertainty is very high!
65+
6466
"""
6567
with mds.utils.helpers.change_memory_fraction(desired_memory=desired_memory):
6668
os.chdir(tmp_path)

CI/integration_tests/calculators/test_green_kubo_distinct_diffusion_coefficients.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import os
2829

2930
import pytest

CI/integration_tests/calculators/test_green_kubo_ionic_conductivity.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import os
2829

2930
import numpy as np

CI/integration_tests/calculators/test_green_kubo_self_diffusion_coefficients.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import dataclasses
2829
import os
2930

@@ -103,9 +104,7 @@ def test_calculator(tmp_path, desired_memory):
103104
time_should_be = time_step * np.arange(0, vacf_range) * units.time
104105
thermal_vel_SI = np.sqrt(3 * kT / mass) * units.length / units.time
105106
relaxation_time_SI = relaxation_time * units.time
106-
vacf_should_be = thermal_vel_SI**2 * np.exp(
107-
-time_should_be / relaxation_time_SI
108-
)
107+
vacf_should_be = thermal_vel_SI**2 * np.exp(-time_should_be / relaxation_time_SI)
109108
diff_coeff_should_be = diff_coeff * units.length**2 / units.time
110109

111110
np.testing.assert_allclose(res["time"], time_should_be, atol=1e-6)

CI/integration_tests/calculators/test_kirkwood_buff_integrals.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import os
2829

2930
import pytest

CI/integration_tests/calculators/test_potential_of_mean_force.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import os
2829

2930
import pytest

CI/integration_tests/calculators/test_radial_distribution_function.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import os
2829

2930
import pytest

CI/integration_tests/transformations/test_molecular_mapping_results.py

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
-------
2626
Test the outcome of molecular mapping.
2727
"""
28+
2829
from typing import List, Tuple
2930

3031
import pytest
@@ -73,6 +74,7 @@ def mdsuite_project(traj_files, tmp_path) -> mdsuite.Project:
7374
-------
7475
project: mdsuite.Project
7576
An MDSuite project to be tested.
77+
7678
"""
7779
water_files = traj_files[0]
7880
bmim_file = traj_files[1]
@@ -138,6 +140,7 @@ def test_water_molecule_smiles(self, mdsuite_project):
138140
-------
139141
Tests that the molecule groups detected are done so correctly and that the
140142
constructed trajectory is also correct.
143+
141144
"""
142145
reference_molecules = {
143146
"water": MoleculeInfo(
@@ -187,6 +190,7 @@ def test_water_molecule_reference_dict(self, mdsuite_project):
187190
-------
188191
Tests that the molecule groups detected are done so correctly and that the
189192
constructed trajectory is also correct.
193+
190194
"""
191195
mdsuite_project.experiments["ligand_water"].species["OW"].mass = [15.999]
192196
mdsuite_project.experiments["ligand_water"].species["HW1"].mass = [1.00784]

CI/integration_tests/transformations/test_transformation_run_options.py

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_from_project(mdsuite_project):
4545
Notes
4646
-----
4747
Does not check actual values just runs the transformation.
48+
4849
"""
4950
mdsuite_project.run.CoordinateUnwrapper()
5051

@@ -57,6 +58,7 @@ def test_from_project_twice(mdsuite_project):
5758
Notes
5859
-----
5960
Does not check actual values just runs the transformation.
61+
6062
"""
6163
mdsuite_project.run.CoordinateUnwrapper()
6264
mdsuite_project.run.CoordinateUnwrapper()
@@ -69,6 +71,7 @@ def test_from_experiment(mdsuite_project):
6971
Notes
7072
-----
7173
Does not check actual values just runs the transformation.
74+
7275
"""
7376
mdsuite_project.experiments.NaCl.run.CoordinateUnwrapper()
7477

@@ -81,6 +84,7 @@ def test_from_experiment_twice(mdsuite_project):
8184
Notes
8285
-----
8386
Does not check actual values just runs the transformation.
87+
8488
"""
8589
mdsuite_project.experiments.NaCl.run.CoordinateUnwrapper()
8690
mdsuite_project.experiments.NaCl.run.CoordinateUnwrapper()

CI/integration_tests/visualizer/znvis_visualizer.py

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
-------
2626
Test that the visualizer runs.
2727
"""
28+
2829
import os
2930
import tempfile
3031
import time
@@ -54,6 +55,7 @@ def test_run(self):
5455
test isn't prematurely closed and passes when it should have failed. For now
5556
120 seconds is more than enough time for this test but we can think of some
5657
improvements later.
58+
5759
"""
5860
process = MDSuiteProcess(target=self._run_app)
5961
process.start()

CI/unit_tests/database/test_experiment_database.py

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
Summary
2525
-------
2626
"""
27+
2728
import dataclasses
2829
import os
2930

CI/unit_tests/database/test_file_read.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Test MDSuite file reading."""
2+
23
import numpy as np
34

45
import mdsuite

CI/unit_tests/database/test_simulation_database.py

+6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
-------
2424
Test for module for the simulation database.
2525
"""
26+
2627
import os
2728
import tempfile
2829
import unittest
@@ -43,6 +44,7 @@ def test_build_path_input(self):
4344
Returns
4445
-------
4546
Asserts that the correct path is generated for a given input.
47+
4648
"""
4749
temp_dir = tempfile.TemporaryDirectory()
4850
os.chdir(temp_dir.name)
@@ -70,6 +72,7 @@ def test_add_dataset(self):
7072
Returns
7173
-------
7274
Assert that a dataset of the correct size is built.
75+
7376
"""
7477
temp_dir = tempfile.TemporaryDirectory()
7578
os.chdir(temp_dir.name)
@@ -93,6 +96,7 @@ def test_resize_array(self):
9396
Returns
9497
-------
9598
Resizes a built dataset and checks that the size is now correct.
99+
96100
"""
97101
temp_dir = tempfile.TemporaryDirectory()
98102
os.chdir(temp_dir.name)
@@ -118,6 +122,7 @@ def test_database_exists(self):
118122
Returns
119123
-------
120124
Checks for a False and then True result.
125+
121126
"""
122127
temp_dir = tempfile.TemporaryDirectory()
123128
os.chdir(temp_dir.name)
@@ -135,6 +140,7 @@ def test_check_existence(self):
135140
Returns
136141
-------
137142
Checks for a True and False result.
143+
138144
"""
139145
temp_dir = tempfile.TemporaryDirectory()
140146
os.chdir(temp_dir.name)

CI/unit_tests/experiment/test_Experiment.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Test MDSuite Experiment class."""
2+
23
import pytest
34

45
from mdsuite.experiment.experiment import Experiment

CI/unit_tests/experiment/test_run_computation.py

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
1010
Description:
1111
"""
12+
1213
from unittest.mock import Mock
1314

1415
from mdsuite.experiment.run import RunComputation

CI/unit_tests/graph_modules/test_molecular_graph.py

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
-------
2626
Module to test the molecular graph module.
2727
"""
28+
2829
from dataclasses import dataclass
2930
from pathlib import Path
3031

@@ -54,6 +55,7 @@ class SmilesTestData:
5455
species : dict
5556
A dictionary of species information for the test stating how many of each
5657
particle species is in the group e.g. {'C': 6, 'H': 14}
58+
5759
"""
5860

5961
name: str
@@ -78,6 +80,7 @@ def test_apply_system_cutoff(self):
7880
Returns
7981
-------
8082
Checks whether or not the cutoff has been enforced.
83+
8184
"""
8285
zeros = np.array([0, 0, 0, 0, 0])
8386
cutoff_data = [
@@ -123,6 +126,7 @@ def test_build_smiles_graph(self):
123126
-------
124127
This test checks that the SMILES graphs built by the module return the correct
125128
molecule information for several scenarios.
129+
126130
"""
127131
emim = SmilesTestData(
128132
name="emim",

0 commit comments

Comments
 (0)