Skip to content

Commit

Permalink
Correct the formatting using black
Browse files Browse the repository at this point in the history
  • Loading branch information
MBartkowiakSTFC committed Jan 26, 2024
1 parent e05315e commit ef40e38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class MockTrajectoryInputData(InputFileData):
"""Imitates the HDFTrajectoryInputData,
but builds a MockTrajectory out of a JSON file instead.
"""

extension = "json"

def load(self):
Expand Down
21 changes: 10 additions & 11 deletions MDANSE/Src/MDANSE/MolecularDynamics/MockTrajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,12 @@

class MockTrajectory:
"""For testing purposes, MockTrajectory can replace a trajectory.
It acts as a trajectory of predefined composition and size,
while taking only a necessary minimum of resources.
The main goal is performance testing of different analysis types
without the need to run Molecular Dynamics simulations beforehand.
It acts as a trajectory of predefined composition and size,
while taking only a necessary minimum of resources.
The main goal is performance testing of different analysis types
without the need to run Molecular Dynamics simulations beforehand.
"""

def __init__(
self,
number_of_frames: int = 1000,
Expand Down Expand Up @@ -99,7 +100,7 @@ def set_coordinates(self, coords: np.ndarray):
-------
bool
False if the number of elements was wrong
"""
"""
if len(coords) != self._num_atoms_in_box:
return False
coords_nm = coords * measure(1.0, "ang").toval("nm")
Expand Down Expand Up @@ -206,7 +207,7 @@ def __getitem__(self, frame: int):
-------
dict
coordinates, time and unit cell at the specified frame
Raises
------
IndexError
Expand All @@ -223,13 +224,11 @@ def __getitem__(self, frame: int):
return configuration

def __getstate__(self):
"""Only added for compatibility with Trajectory
"""
"""Only added for compatibility with Trajectory"""
pass

def __setstate__(self, state):
"""Only added for compatibility with Trajectory
"""
"""Only added for compatibility with Trajectory"""
pass

def coordinates(self, frame: int) -> np.ndarray:
Expand Down Expand Up @@ -261,7 +260,7 @@ def coordinates(self, frame: int) -> np.ndarray:

return self._coordinates[scaled_index].astype(np.float64)

def configuration(self, frame: int) -> '_Configuration':
def configuration(self, frame: int) -> "_Configuration":
"""An MDANSE Configuration at the specified frame number.
Parameters
Expand Down

0 comments on commit ef40e38

Please sign in to comment.