diff --git a/naglmbis/_version.py b/naglmbis/_version.py index 952f41d..e6b0818 100644 --- a/naglmbis/_version.py +++ b/naglmbis/_version.py @@ -11,12 +11,12 @@ """Git implementation of _version.py.""" import errno +import functools import os import re import subprocess import sys from typing import Any, Callable, Dict, List, Optional, Tuple -import functools def get_keywords() -> Dict[str, str]: diff --git a/naglmbis/features/__init__.py b/naglmbis/features/__init__.py index b4de53b..c317c07 100644 --- a/naglmbis/features/__init__.py +++ b/naglmbis/features/__init__.py @@ -1,15 +1,15 @@ from naglmbis.features.atom import ( - HydrogenAtoms, + AtomicMass, + AtomicPolarisability, AtomInRingOfSize, - LipinskiDonor, + ExplicitValence, + Hybridization, + HydrogenAtoms, LipinskiAcceptor, + LipinskiDonor, PaulingElectronegativity, SandersonElectronegativity, - VDWRadius, - AtomicPolarisability, - Hybridization, - TotalValence, - ExplicitValence, - AtomicMass, TotalDegree, + TotalValence, + VDWRadius, ) diff --git a/naglmbis/features/atom.py b/naglmbis/features/atom.py index 38f9b3c..001540d 100644 --- a/naglmbis/features/atom.py +++ b/naglmbis/features/atom.py @@ -1,11 +1,10 @@ -from typing import Optional, Literal +from typing import Literal, Optional import torch from nagl.features import AtomFeature, one_hot_encode, register_atom_feature from openff.toolkit.topology import Molecule - +from pydantic import Extra, Field, dataclasses from rdkit import Chem -from pydantic import Field, dataclasses, Extra @dataclasses.dataclass(config={"extra": Extra.forbid}) diff --git a/naglmbis/models/__init__.py b/naglmbis/models/__init__.py index 2357b93..c504bf7 100644 --- a/naglmbis/models/__init__.py +++ b/naglmbis/models/__init__.py @@ -1,2 +1,2 @@ from naglmbis.models.base_model import MBISGraphModel -from naglmbis.models.models import load_charge_model, CHARGE_MODELS +from naglmbis.models.models import CHARGE_MODELS, load_charge_model diff --git a/naglmbis/models/base_model.py b/naglmbis/models/base_model.py index cab4bf0..49b3af7 100644 --- a/naglmbis/models/base_model.py +++ b/naglmbis/models/base_model.py @@ -4,8 +4,8 @@ from typing import Dict, List, Literal, Optional import torch -from nagl.training import DGLMoleculeLightningModel from nagl.molecules import DGLMolecule +from nagl.training import DGLMoleculeLightningModel from rdkit import Chem diff --git a/naglmbis/models/models.py b/naglmbis/models/models.py index 6b25ea6..e7b9c60 100644 --- a/naglmbis/models/models.py +++ b/naglmbis/models/models.py @@ -1,10 +1,10 @@ +import pathlib from typing import Literal -from naglmbis.models.base_model import MBISGraphModel -from naglmbis.utils import get_model_weights -import pathlib import torch +from naglmbis.models.base_model import MBISGraphModel +from naglmbis.utils import get_model_weights charge_weights = { "nagl-v1-mbis": {"checkpoint_path": "nagl-v1-mbis.ckpt"}, diff --git a/naglmbis/plugins/bccs.py b/naglmbis/plugins/bccs.py index 4bdaa79..fd401b7 100644 --- a/naglmbis/plugins/bccs.py +++ b/naglmbis/plugins/bccs.py @@ -1,6 +1,6 @@ # a file to track bcc models -from typing_extensions import Literal from openff.toolkit.typing.engines.smirnoff import ForceField +from typing_extensions import Literal # Model fit with nagl-v1 charges and nagl-v1 volumes with no polar h Rfree # list of smirks and charge corrections diff --git a/naglmbis/plugins/plugins.py b/naglmbis/plugins/plugins.py index fec8110..42dac1b 100644 --- a/naglmbis/plugins/plugins.py +++ b/naglmbis/plugins/plugins.py @@ -9,13 +9,13 @@ _allow_only, _NonbondedHandler, ) +from openmm import unit from qubekit.charges import MBISCharges from qubekit.molecules import Ligand from naglmbis.models import load_charge_model, load_volume_model +from naglmbis.plugins.bccs import bcc_force_fields, load_bcc_model from naglmbis.plugins.trained_models import trained_models -from naglmbis.plugins.bccs import load_bcc_model, bcc_force_fields -from openmm import unit class NAGLMBISHandler(_NonbondedHandler):