From 25648327cecdd3536f8c246aabf02c89ee118504 Mon Sep 17 00:00:00 2001 From: Nathan Baker Date: Sun, 24 May 2020 08:19:32 -0700 Subject: [PATCH] De-lint determinant.py. --- propka/determinant.py | 34 +++++++++++++++++++++------------- propka/determinants.py | 4 ++++ 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/propka/determinant.py b/propka/determinant.py index 5085ca1..2b29d08 100644 --- a/propka/determinant.py +++ b/propka/determinant.py @@ -1,29 +1,37 @@ +"""Holds the Determinant class + +TODO - it is confusing to have both `determinant.py` and `determinants.py`. +Should these be merged? +""" -from __future__ import division -from __future__ import print_function class Determinant: - """ - Determinant class - set up for later structurization + """Determinant class. + + Appears to be a container for storing information and values about + groups that interact to influence titration states. + + TODO - figure out what this class does. """ def __init__(self, group, value): - """ - Contructer of determinant object - simple, but helps in creating structure! + """Initialize the object. + + Args: + group: group associated with Determinant object + value: value to assign to group """ self.group = group self.label = group.label self.value = value - return - def add(self, value): - """ - adding a value to determinant + """Increment determinant value. + + Args: + value: value to add to determinant """ self.value += value - return - def __str__(self): - return '%s: %8.2f'%(self.label,self.value) + return '%s: %8.2f' % (self.label, self.value) diff --git a/propka/determinants.py b/propka/determinants.py index 658905a..52da557 100644 --- a/propka/determinants.py +++ b/propka/determinants.py @@ -9,6 +9,10 @@ import propka.calculations from propka.determinant import Determinant +# TODO - it is confusing to have both `determinant.py` and `determinants.py`. +# Should these be merged? + + def setDeterminants(propka_groups, version=None, options=None): """ adding side-chain and coulomb determinants/perturbations to all residues - note, backbone determinants are set separately