De-lint determinant.py.
This commit is contained in:
@@ -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:
|
class Determinant:
|
||||||
"""
|
"""Determinant class.
|
||||||
Determinant class - set up for later structurization
|
|
||||||
|
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):
|
def __init__(self, group, value):
|
||||||
"""
|
"""Initialize the object.
|
||||||
Contructer of determinant object - simple, but helps in creating structure!
|
|
||||||
|
Args:
|
||||||
|
group: group associated with Determinant object
|
||||||
|
value: value to assign to group
|
||||||
"""
|
"""
|
||||||
self.group = group
|
self.group = group
|
||||||
self.label = group.label
|
self.label = group.label
|
||||||
self.value = value
|
self.value = value
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
def add(self, value):
|
def add(self, value):
|
||||||
"""
|
"""Increment determinant value.
|
||||||
adding a value to determinant
|
|
||||||
|
Args:
|
||||||
|
value: value to add to determinant
|
||||||
"""
|
"""
|
||||||
self.value += value
|
self.value += value
|
||||||
|
|
||||||
return
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return '%s: %8.2f' % (self.label, self.value)
|
return '%s: %8.2f' % (self.label, self.value)
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import propka.calculations
|
|||||||
from propka.determinant import Determinant
|
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):
|
def setDeterminants(propka_groups, version=None, options=None):
|
||||||
"""
|
"""
|
||||||
adding side-chain and coulomb determinants/perturbations to all residues - note, backbone determinants are set separately
|
adding side-chain and coulomb determinants/perturbations to all residues - note, backbone determinants are set separately
|
||||||
|
|||||||
Reference in New Issue
Block a user