De-lint calculations.py.
Changes were made to function names; impacted functions changed in other files. Google searches performed to look for impacts to other software.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -182,7 +182,7 @@ class Conformation_container:
|
||||
propka.determinants.setIonDeterminants(self, version)
|
||||
|
||||
# calculating the back-bone reorganization/desolvation term
|
||||
version.calculateBackBoneReorganization(self)
|
||||
version.calculatebackbone_reorganization(self)
|
||||
|
||||
# setting remaining non-iterative and iterative side-chain & Coulomb interaction determinants
|
||||
propka.determinants.setDeterminants(self.get_sidechain_groups(), version=version, options=options)
|
||||
|
||||
@@ -157,9 +157,9 @@ def setIonDeterminants(conformation_container, version):
|
||||
for ion_group in conformation_container.get_ions():
|
||||
squared_distance = propka.calculations.squared_distance(titratable_group, ion_group)
|
||||
if squared_distance < version.parameters.coulomb_cutoff2_squared:
|
||||
weight = version.calculatePairWeight(titratable_group.Nmass, ion_group.Nmass)
|
||||
weight = version.calculate_pair_weight(titratable_group.Nmass, ion_group.Nmass)
|
||||
# the pKa of both acids and bases are shifted up by negative ions (and vice versa)
|
||||
value = (-ion_group.charge) * version.calculateCoulombEnergy(math.sqrt(squared_distance), weight)
|
||||
value = (-ion_group.charge) * version.calculate_coulomb_energy(math.sqrt(squared_distance), weight)
|
||||
newDeterminant = Determinant(ion_group, value)
|
||||
titratable_group.determinants['coulomb'].append(newDeterminant)
|
||||
|
||||
@@ -206,7 +206,7 @@ def setBackBoneDeterminants(titratable_groups, backbone_groups, version):
|
||||
if titratable_atom.element == 'H':
|
||||
heavy_atom = titratable_atom.bonded_atoms[0]
|
||||
hydrogen_atom = titratable_atom
|
||||
[d1, f_angle, d2] = propka.calculations.AngleFactorX(atom1=heavy_atom,
|
||||
[d1, f_angle, d2] = propka.calculations.angle_distance_factors(atom1=heavy_atom,
|
||||
atom2=hydrogen_atom,
|
||||
atom3=backbone_atom)
|
||||
else:
|
||||
@@ -227,7 +227,7 @@ def setBackBoneDeterminants(titratable_groups, backbone_groups, version):
|
||||
if backbone_atom.element == 'H':
|
||||
backbone_N = backbone_atom.bonded_atoms[0]
|
||||
backbone_H = backbone_atom
|
||||
[d1, f_angle, d2] = propka.calculations.AngleFactorX(atom1=titratable_atom,
|
||||
[d1, f_angle, d2] = propka.calculations.angle_distance_factors(atom1=titratable_atom,
|
||||
atom2=backbone_H,
|
||||
atom3=backbone_N)
|
||||
else:
|
||||
@@ -238,7 +238,7 @@ def setBackBoneDeterminants(titratable_groups, backbone_groups, version):
|
||||
|
||||
|
||||
if f_angle > 0.001:
|
||||
value = titratable_group.charge * propka.calculations.HydrogenBondEnergy(distance, dpKa_max, [cutoff1,cutoff2], f_angle)
|
||||
value = titratable_group.charge * propka.calculations.hydrogen_bond_energy(distance, dpKa_max, [cutoff1,cutoff2], f_angle)
|
||||
|
||||
newDeterminant = Determinant(backbone_group, value)
|
||||
titratable_group.determinants['backbone'].append(newDeterminant)
|
||||
|
||||
@@ -18,7 +18,7 @@ class version:
|
||||
def calculate_desolvation(self, group):
|
||||
return self.desolvation_model(self.parameters, group)
|
||||
|
||||
def calculatePairWeight(self, Nmass1, Nmass2):
|
||||
def calculate_pair_weight(self, Nmass1, Nmass2):
|
||||
return self.weight_pair_method(self.parameters, Nmass1, Nmass2)
|
||||
|
||||
# side chains
|
||||
@@ -32,18 +32,18 @@ class version:
|
||||
def electrostatic_interaction(self, group1, group2, distance):
|
||||
return self.electrostatic_interaction_model(group1, group2, distance, self)
|
||||
|
||||
def calculateCoulombEnergy(self, distance, weight):
|
||||
def calculate_coulomb_energy(self, distance, weight):
|
||||
return self.coulomb_interaction_model(distance, weight, self.parameters)
|
||||
|
||||
def checkCoulombPair(self, group1, group2, distance):
|
||||
def check_coulomb_pair(self, group1, group2, distance):
|
||||
return self.check_coulomb_pair_method(self.parameters, group1, group2, distance)
|
||||
|
||||
# backbone re-organisation
|
||||
def calculateBackBoneReorganization(self, conformation):
|
||||
def calculatebackbone_reorganization(self, conformation):
|
||||
return self.backbone_reorganisation_method(self.parameters, conformation)
|
||||
|
||||
# exceptions
|
||||
def checkExceptions(self, group1, group2):
|
||||
def check_exceptions(self, group1, group2):
|
||||
return self.exception_check_method(self, group1, group2)
|
||||
|
||||
def setup_bonding_and_protonation(self, molecular_container):
|
||||
@@ -66,23 +66,23 @@ class version_A(version):
|
||||
|
||||
# desolvation related methods
|
||||
self.desolvation_model = calculations.radial_volume_desolvation
|
||||
self.weight_pair_method = calculations.calculatePairWeight
|
||||
self.weight_pair_method = calculations.calculate_pair_weight
|
||||
|
||||
# side chain methods
|
||||
self.sidechain_interaction_model = propka.calculations.HydrogenBondEnergy
|
||||
self.sidechain_interaction_model = propka.calculations.hydrogen_bond_energy
|
||||
self.hydrogen_bond_interaction_model = propka.calculations.hydrogen_bond_interaction
|
||||
|
||||
# colomb methods
|
||||
self.electrostatic_interaction_model = propka.calculations.electrostatic_interaction
|
||||
self.check_coulomb_pair_method = propka.calculations.checkCoulombPair
|
||||
self.coulomb_interaction_model = propka.calculations.CoulombEnergy
|
||||
self.check_coulomb_pair_method = propka.calculations.check_coulomb_pair
|
||||
self.coulomb_interaction_model = propka.calculations.coulomb_energy
|
||||
|
||||
#backbone
|
||||
self.backbone_interaction_model = propka.calculations.HydrogenBondEnergy
|
||||
self.backbone_reorganisation_method = propka.calculations.BackBoneReorganization
|
||||
self.backbone_interaction_model = propka.calculations.hydrogen_bond_energy
|
||||
self.backbone_reorganisation_method = propka.calculations.backbone_reorganization
|
||||
|
||||
# exception methods
|
||||
self.exception_check_method = propka.calculations.checkExceptions
|
||||
self.exception_check_method = propka.calculations.check_exceptions
|
||||
return
|
||||
|
||||
def get_hydrogen_bond_parameters(self, atom1, atom2):
|
||||
@@ -188,20 +188,20 @@ class propka30(version):
|
||||
|
||||
# desolvation related methods
|
||||
self.desolvation_model = calculations.radial_volume_desolvation
|
||||
self.weight_pair_method = calculations.calculatePairWeight
|
||||
self.weight_pair_method = calculations.calculate_pair_weight
|
||||
|
||||
# side chain methods
|
||||
self.sidechain_interaction_model = propka.calculations.HydrogenBondEnergy
|
||||
self.sidechain_interaction_model = propka.calculations.hydrogen_bond_energy
|
||||
|
||||
# colomb methods
|
||||
self.check_coulomb_pair_method = propka.calculations.checkCoulombPair
|
||||
self.coulomb_interaction_model = propka.calculations.CoulombEnergy
|
||||
self.check_coulomb_pair_method = propka.calculations.check_coulomb_pair
|
||||
self.coulomb_interaction_model = propka.calculations.coulomb_energy
|
||||
|
||||
#backbone
|
||||
self.backbone_reorganisation_method = propka.calculations.BackBoneReorganization
|
||||
self.backbone_reorganisation_method = propka.calculations.backbone_reorganization
|
||||
|
||||
# exception methods
|
||||
self.exception_check_method = propka.calculations.checkExceptions
|
||||
self.exception_check_method = propka.calculations.check_exceptions
|
||||
|
||||
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user