Skip to content

Commit

Permalink
Typing.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtarzia committed Jan 18, 2025
1 parent 3cf4705 commit 44802a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/cgexplore/_internal/molecular/conformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
@dataclass(frozen=True, slots=True)
class Conformer:
molecule: stk.Molecule
energy_decomposition: dict
energy_decomposition: dict[str, tuple[float, str]]
conformer_id: int | None = None
source: str | None = None

Expand Down
14 changes: 7 additions & 7 deletions src/cgexplore/_internal/utilities/generation_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import logging
import pathlib
from collections.abc import Iterator
from collections import abc

import numpy as np
import stk
Expand Down Expand Up @@ -202,7 +202,7 @@ def run_soft_md_cycle( # noqa: PLR0913
friction: openmm.unit.Quantity,
reporting_freq: float,
traj_freq: float,
platform: str,
platform: str | None,
) -> OMMTrajectory | None:
"""Run MD exploration with soft potentials.
Expand Down Expand Up @@ -296,7 +296,7 @@ def run_constrained_optimisation( # noqa: PLR0913
bond_ff_scale: float,
angle_ff_scale: float,
max_iterations: int,
platform: str,
platform: str | None,
) -> stk.Molecule:
"""Run optimisation with constraints and softened potentials.
Expand Down Expand Up @@ -362,7 +362,7 @@ def run_optimisation( # noqa: PLR0913
name: str,
file_suffix: str,
output_dir: pathlib.Path,
platform: str,
platform: str | None,
max_iterations: int | None = None,
ensemble: Ensemble | None = None,
) -> Conformer:
Expand Down Expand Up @@ -423,7 +423,7 @@ def yield_near_models(
name: str,
output_dir: pathlib.Path | str,
neighbour_library: list,
) -> Iterator[stk.Molecule]:
) -> abc.Iterator[stk.Molecule]:
"""Yield structures of models with neighbouring force field parameters.
Keywords:
Expand Down Expand Up @@ -497,8 +497,8 @@ def shift_beads(
def yield_shifted_models(
molecule: stk.Molecule,
forcefield: ForceField,
kicks: tuple[int],
) -> Iterator[stk.Molecule]:
kicks: abc.Sequence[int],
) -> abc.Iterator[stk.Molecule]:
"""Yield conformers with atom positions of particular beads shifted.
Keywords:
Expand Down

0 comments on commit 44802a7

Please sign in to comment.