From 4106726483bdafc0ad3bf5dd4432b892a3e4573c Mon Sep 17 00:00:00 2001 From: Thomas Holder Date: Tue, 12 Dec 2023 20:39:59 +0100 Subject: [PATCH] Raise NotImplementedError from unused functions --- propka/atom.py | 3 +++ propka/bonds.py | 2 ++ propka/group.py | 2 ++ propka/ligand_pka_values.py | 2 ++ propka/output.py | 3 +++ 5 files changed, 12 insertions(+) diff --git a/propka/atom.py b/propka/atom.py index 5cb6a4e..fa80997 100644 --- a/propka/atom.py +++ b/propka/atom.py @@ -8,6 +8,7 @@ The :class:`Atom` class contains all atom information found in the PDB file. import string from typing import cast, List, NoReturn, Optional, TYPE_CHECKING +import warnings from propka.lib import make_tidy_atom_label from . import hybrid36 @@ -303,6 +304,7 @@ class Atom: Returns: String with PDB line. """ + warnings.warn("only used by unused function") if numb is None: numb = self.numb if name is None: @@ -349,5 +351,6 @@ class Atom: Args: residue: the parent residue """ + raise NotImplementedError("unused") if self.residue is None: self.residue = residue diff --git a/propka/bonds.py b/propka/bonds.py index 396ec86..9bc00c0 100644 --- a/propka/bonds.py +++ b/propka/bonds.py @@ -93,6 +93,7 @@ class BondMaker: Args: protein: the protein to search for bonds """ + raise NotImplementedError("unused") _LOGGER.info('++++ Side chains ++++') # side chains for chain in protein.chains: @@ -132,6 +133,7 @@ class BondMaker: cys1: one of the cysteines to check cys1: one of the cysteines to check """ + raise NotImplementedError("unused") for atom1 in cys1.atoms: if atom1.name == 'SG': for atom2 in cys2.atoms: diff --git a/propka/group.py b/propka/group.py index 65e09f4..70178cd 100644 --- a/propka/group.py +++ b/propka/group.py @@ -167,6 +167,7 @@ class Group: Args: others: list of other groups """ + raise NotImplementedError("unused") # for each determinant type for other in others: if other == self: @@ -1400,6 +1401,7 @@ def is_ligand_group_by_marvin_pkas(parameters, atom: Atom) -> Optional[Group]: if not o == atom][0] atom.marvin_pka = other_oxygen.marvin_pka return TitratableLigandGroup(atom) + raise NotImplementedError("hydrogen_bonds") if atom.element in parameters.hydrogen_bonds.elements: return NonTitratableLigandGroup(atom) return None diff --git a/propka/ligand_pka_values.py b/propka/ligand_pka_values.py index f161d88..5d9adfd 100644 --- a/propka/ligand_pka_values.py +++ b/propka/ligand_pka_values.py @@ -13,6 +13,7 @@ import logging import os import subprocess import sys +import warnings from propka.output import write_mol2_for_atoms from propka.lib import split_atoms_into_molecules @@ -69,6 +70,7 @@ class LigandPkaValues: min_ph: minimum pH value max_ph: maximum pH value """ + warnings.warn("unused and untested by propka") self.get_marvin_pkas_for_molecular_container( molecule, num_pkas=num_pkas, min_ph=min_ph, max_ph=max_ph) diff --git a/propka/output.py b/propka/output.py index db5c311..2f6830e 100644 --- a/propka/output.py +++ b/propka/output.py @@ -72,6 +72,7 @@ def write_pdb_for_protein( include_hydrogens: Boolean indicating whether to include hydrogens options: options object """ + raise NotImplementedError("unused") if pdbfile is None: # opening file if not given if filename is None: @@ -169,6 +170,7 @@ def print_tm_profile(protein, reference="neutral", window=[0., 14., 1.], _: Boolean for verbosity options: options object """ + raise NotImplementedError("unused") profile = protein.getTmProfile( reference=reference, grid=[0., 14., 0.1], tms=tms, ref=ref, options=options) @@ -358,6 +360,7 @@ def write_jackal_scap_file(mutation_data=None, filename="1xxx_scap.list", TODO - figure out what this is """ + raise NotImplementedError("unused") with open(filename, 'w') as file_: for chain_id, _, res_num, code2 in mutation_data: str_ = "{chain:s}, {num:d}, {code:s}\n".format(