Applied black formatter

This commit is contained in:
Sebastian Kloth 2023-12-05 16:44:26 +01:00
parent a7da9d7ec8
commit 9b45a1a7bd
5 changed files with 28 additions and 25 deletions

View File

@ -114,6 +114,7 @@ def calc_gr(
as large as possible, depending on the available memory. as large as possible, depending on the available memory.
returnx (opt.): If True the x ordinate of the histogram is returned. returnx (opt.): If True the x ordinate of the histogram is returned.
""" """
def gr_frame( def gr_frame(
atoms_a: CoordinateFrame, atoms_a: CoordinateFrame,
atoms_b: CoordinateFrame, atoms_b: CoordinateFrame,
@ -434,6 +435,7 @@ def hbonds(
else: else:
return pairs[is_bond] return pairs[is_bond]
def calc_cluster_sizes(frame, r_max=0.35): def calc_cluster_sizes(frame, r_max=0.35):
frame_PBC, indices_PBC = pbc_points( frame_PBC, indices_PBC = pbc_points(
frame, frame.box, thickness=r_max + 0.1, index=True frame, frame.box, thickness=r_max + 0.1, index=True

View File

@ -6,6 +6,7 @@ from typing import Iterable
import pandas as pd import pandas as pd
from tables import NoSuchNodeError from tables import NoSuchNodeError
@dataclass(kw_only=True) @dataclass(kw_only=True)
class MDSystem(abc.ABC): class MDSystem(abc.ABC):
load_only_results: bool = False load_only_results: bool = False

View File

@ -89,7 +89,7 @@ def filon_fourier_transformation(
else: else:
raise NotImplementedError( raise NotImplementedError(
'Invalid approximation method {}. Possible values are "linear", "stencil" ' 'Invalid approximation method {}. Possible values are "linear", "stencil" '
'or a list of values.' "or a list of values."
) )
time = time.reshape(-1, 1) time = time.reshape(-1, 1)
@ -498,5 +498,5 @@ def timing(function):
time_needed = end_time - start_time time_needed = end_time - start_time
print(f"Finished in {int(time_needed // 60)} min " f"{int(time_needed % 60)} s") print(f"Finished in {int(time_needed // 60)} min " f"{int(time_needed % 60)} s")
return result return result
return wrap
return wrap