diff --git a/openfe/protocols/openmm_afe/equil_solvation_afe_method.py b/openfe/protocols/openmm_afe/equil_solvation_afe_method.py index 648e01c88..34e9416c9 100644 --- a/openfe/protocols/openmm_afe/equil_solvation_afe_method.py +++ b/openfe/protocols/openmm_afe/equil_solvation_afe_method.py @@ -34,8 +34,8 @@ import uuid import warnings from collections import defaultdict -from typing import Any, Optional, Union from collections.abc import Iterable +from typing import Any, Optional, Union import gufe import numpy as np diff --git a/openfe/protocols/openmm_md/plain_md_methods.py b/openfe/protocols/openmm_md/plain_md_methods.py index fb41541c0..0fab218c9 100644 --- a/openfe/protocols/openmm_md/plain_md_methods.py +++ b/openfe/protocols/openmm_md/plain_md_methods.py @@ -15,8 +15,8 @@ import time import uuid from collections import defaultdict -from typing import Any, Optional from collections.abc import Iterable +from typing import Any, Optional import gufe import mdtraj diff --git a/openfe/protocols/openmm_rfe/_rfe_utils/topologyhelpers.py b/openfe/protocols/openmm_rfe/_rfe_utils/topologyhelpers.py index 68dbdcf33..a33b85912 100644 --- a/openfe/protocols/openmm_rfe/_rfe_utils/topologyhelpers.py +++ b/openfe/protocols/openmm_rfe/_rfe_utils/topologyhelpers.py @@ -278,9 +278,9 @@ def get_alchemical_waters( )[0] solvent_indices = { - atom.residue.index - for atom in traj.topology.atoms - if (atom.index in water_atoms) and (atom.index not in excluded_waters) + atom.residue.index + for atom in traj.topology.atoms + if (atom.index in water_atoms) and (atom.index not in excluded_waters) } if len(solvent_indices) < 1: diff --git a/openfe/protocols/openmm_rfe/equil_rfe_methods.py b/openfe/protocols/openmm_rfe/equil_rfe_methods.py index 52d4fd168..6f5cf4a4f 100644 --- a/openfe/protocols/openmm_rfe/equil_rfe_methods.py +++ b/openfe/protocols/openmm_rfe/equil_rfe_methods.py @@ -29,9 +29,9 @@ import uuid import warnings from collections import defaultdict +from collections.abc import Iterable from itertools import chain from typing import Any, Optional, Union -from collections.abc import Iterable import gufe import matplotlib.pyplot as plt diff --git a/openfe/protocols/openmm_utils/charge_generation.py b/openfe/protocols/openmm_utils/charge_generation.py index f4ca2525e..b449a9e68 100644 --- a/openfe/protocols/openmm_utils/charge_generation.py +++ b/openfe/protocols/openmm_utils/charge_generation.py @@ -6,8 +6,8 @@ import copy import sys import warnings -from typing import Literal, Optional, Union from collections.abc import Callable +from typing import Literal, Optional, Union import numpy as np from openff.toolkit import Molecule as OFFMol diff --git a/openfe/protocols/openmm_utils/omm_settings.py b/openfe/protocols/openmm_utils/omm_settings.py index ae52c1c77..86ac2fa10 100644 --- a/openfe/protocols/openmm_utils/omm_settings.py +++ b/openfe/protocols/openmm_utils/omm_settings.py @@ -171,7 +171,7 @@ class Config: timestep: FloatQuantity[femtosecond] = 4 * unit.femtosecond """Size of the simulation timestep. Default 4 * unit.femtosecond.""" - langevin_collision_rate: FloatQuantity[1/picosecond] = 1.0 / unit.picosecond + langevin_collision_rate: FloatQuantity[1 / picosecond] = 1.0 / unit.picosecond """Collision frequency. Default 1.0 / unit.pisecond.""" reassign_velocities = False """ @@ -364,7 +364,7 @@ class Config: Default `250`. """ - early_termination_target_error: FloatQuantity[kcal/mol] | None = 0.0 * unit.kilocalorie_per_mole + early_termination_target_error: FloatQuantity[kcal / mol] | None = 0.0 * unit.kilocalorie_per_mole # todo: have default ``None`` or ``0.0 * unit.kilocalorie_per_mole`` # (later would give an example of unit). """ diff --git a/openfe/setup/alchemical_network_planner/relative_alchemical_network_planner.py b/openfe/setup/alchemical_network_planner/relative_alchemical_network_planner.py index 11f0a64ea..ad2a360ae 100644 --- a/openfe/setup/alchemical_network_planner/relative_alchemical_network_planner.py +++ b/openfe/setup/alchemical_network_planner/relative_alchemical_network_planner.py @@ -2,8 +2,8 @@ # For details, see https://github.com/OpenFreeEnergy/openfe import abc import copy -from typing import Optional, Type from collections.abc import Callable, Iterable +from typing import Optional, Type from gufe import ( AlchemicalNetwork, diff --git a/openfe/setup/chemicalsystem_generator/abstract_chemicalsystem_generator.py b/openfe/setup/chemicalsystem_generator/abstract_chemicalsystem_generator.py index b0cb67dba..cd96d0c23 100644 --- a/openfe/setup/chemicalsystem_generator/abstract_chemicalsystem_generator.py +++ b/openfe/setup/chemicalsystem_generator/abstract_chemicalsystem_generator.py @@ -1,8 +1,8 @@ # This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe import abc -from enum import Enum from collections.abc import Iterable +from enum import Enum from gufe import ChemicalSystem diff --git a/openfe/setup/chemicalsystem_generator/easy_chemicalsystem_generator.py b/openfe/setup/chemicalsystem_generator/easy_chemicalsystem_generator.py index 0b6d9714e..2394b2a68 100644 --- a/openfe/setup/chemicalsystem_generator/easy_chemicalsystem_generator.py +++ b/openfe/setup/chemicalsystem_generator/easy_chemicalsystem_generator.py @@ -1,8 +1,8 @@ # This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe -from typing import Optional from collections.abc import Iterable +from typing import Optional from gufe import ChemicalSystem, Component, ProteinComponent, SmallMoleculeComponent, SolventComponent diff --git a/openfe/setup/ligand_network_planning.py b/openfe/setup/ligand_network_planning.py index e2071734e..2c172520e 100644 --- a/openfe/setup/ligand_network_planning.py +++ b/openfe/setup/ligand_network_planning.py @@ -5,9 +5,9 @@ import math import warnings from collections import Counter +from collections.abc import Callable, Iterable from pathlib import Path from typing import Optional, Union -from collections.abc import Callable, Iterable import networkx as nx from gufe import AtomMapper, SmallMoleculeComponent diff --git a/openfe/tests/utils/conftest.py b/openfe/tests/utils/conftest.py index 35be29c79..90be909d3 100644 --- a/openfe/tests/utils/conftest.py +++ b/openfe/tests/utils/conftest.py @@ -1,8 +1,8 @@ # This code is part of OpenFE and is licensed under the MIT license. # For details, see https://github.com/OpenFreeEnergy/openfe +from collections.abc import Iterable from importlib import resources from typing import NamedTuple -from collections.abc import Iterable import pytest from rdkit import Chem diff --git a/openfe/utils/system_probe.py b/openfe/utils/system_probe.py index 4830de507..1bc9a97ff 100644 --- a/openfe/utils/system_probe.py +++ b/openfe/utils/system_probe.py @@ -4,8 +4,8 @@ import socket import subprocess import sys -from typing import Optional from collections.abc import Iterable +from typing import Optional import psutil from psutil._common import bytes2human diff --git a/openfe/utils/visualization_3D.py b/openfe/utils/visualization_3D.py index 292214342..5548f6f99 100644 --- a/openfe/utils/visualization_3D.py +++ b/openfe/utils/visualization_3D.py @@ -1,5 +1,5 @@ -from typing import Dict, Optional, Tuple, Union from collections.abc import Iterable +from typing import Dict, Optional, Tuple, Union import numpy as np from matplotlib import pyplot as plt diff --git a/openfecli/utils.py b/openfecli/utils.py index 61aeb58e3..9975aff89 100644 --- a/openfecli/utils.py +++ b/openfecli/utils.py @@ -4,9 +4,9 @@ import functools import importlib import logging +from collections.abc import Callable from datetime import datetime from typing import Optional -from collections.abc import Callable import click