diff --git a/CodeEntropy/ConformationFunctions.py b/CodeEntropy/ConformationFunctions.py index 31a5b7a..7fe1efd 100644 --- a/CodeEntropy/ConformationFunctions.py +++ b/CodeEntropy/ConformationFunctions.py @@ -80,6 +80,3 @@ def assign_conformation( conformations[frame] = np.argmin(distances) return conformations - - -# END assign_conformation diff --git a/CodeEntropy/EntropyFunctions.py b/CodeEntropy/EntropyFunctions.py index a3e7c53..e4a6d71 100644 --- a/CodeEntropy/EntropyFunctions.py +++ b/CodeEntropy/EntropyFunctions.py @@ -53,9 +53,6 @@ def frequency_calculation(lambdas, temp): return frequencies -# END frequency_calculation - - def vibrational_entropy(matrix, matrix_type, temp, highest_level): """ Function to calculate the vibrational entropy for each level calculated from eq. (4) @@ -110,9 +107,6 @@ def vibrational_entropy(matrix, matrix_type, temp, highest_level): return S_vib_total -# END vibrational_entropy - - def conformational_entropy( data_container, dihedrals, bin_width, start, end, step, number_frames ): @@ -166,9 +160,6 @@ def conformational_entropy( return S_conf_total -# END conformational_entropy - - def orientational_entropy(neighbours_dict): """ Function to calculate orientational entropies from eq. (10) in J. Higham, S.-Y. @@ -211,6 +202,3 @@ def orientational_entropy(neighbours_dict): # implement a case for molecules with hydrogen bonds but to a lesser # extent than water return S_or_total - - -# END orientational_entropy diff --git a/CodeEntropy/GeometricFunctions.py b/CodeEntropy/GeometricFunctions.py index 67cc28a..eb598d6 100644 --- a/CodeEntropy/GeometricFunctions.py +++ b/CodeEntropy/GeometricFunctions.py @@ -43,9 +43,6 @@ def get_beads(data_container, level): return list_of_beads -# END - - def get_axes(data_container, level, index=0): """ Function to set the translational and rotational axes. @@ -126,9 +123,6 @@ def get_axes(data_container, level, index=0): return trans_axes, rot_axes -# END - - def get_avg_pos(atom_set, center): """ Function to get the average position of a set of atoms. @@ -168,9 +162,6 @@ def get_avg_pos(atom_set, center): return avg_position -# END - - def get_sphCoord_axes(arg_r): """ For a given vector in space, treat it is a radial vector rooted at 0,0,0 and @@ -243,9 +234,6 @@ def get_sphCoord_axes(arg_r): return spherical_basis -# END - - def get_weighted_forces( data_container, bead, trans_axes, highest_level, force_partitioning=0.5 ): @@ -291,9 +279,6 @@ def get_weighted_forces( return weighted_force -# END - - def get_weighted_torques(data_container, bead, rot_axes, force_partitioning=0.5): """ Function to calculate the moment of inertia weighted torques for a given bead. @@ -379,9 +364,6 @@ def get_weighted_torques(data_container, bead, rot_axes, force_partitioning=0.5) return weighted_torque -# END - - def create_submatrix(data_i, data_j, number_frames): """ Function for making covariance matrices. @@ -411,9 +393,6 @@ def create_submatrix(data_i, data_j, number_frames): return submatrix -# END - - def filter_zero_rows_columns(arg_matrix, verbose): """ function for removing rows and columns that contain only zeros from a matrix @@ -461,6 +440,3 @@ def filter_zero_rows_columns(arg_matrix, verbose): ) return arg_matrix - - -# END diff --git a/CodeEntropy/LevelFunctions.py b/CodeEntropy/LevelFunctions.py index beb26f8..624ab41 100644 --- a/CodeEntropy/LevelFunctions.py +++ b/CodeEntropy/LevelFunctions.py @@ -48,9 +48,6 @@ def select_levels(data_container, verbose): return number_molecules, levels -# END get_levels - - def get_matrices( data_container, level, verbose, start, end, step, number_frames, highest_level ): @@ -155,9 +152,6 @@ def get_matrices( return force_matrix, torque_matrix -# END get_matrices - - def get_dihedrals(data_container, level): """ Define the set of dihedrals for use in the conformational entropy function. @@ -233,6 +227,3 @@ def get_dihedrals(data_container, level): dihedrals.append(atom_group.dihedral) return dihedrals - - -# END get_dihedrals diff --git a/CodeEntropy/main_mcc.py b/CodeEntropy/main_mcc.py index 86a7f43..dc77864 100644 --- a/CodeEntropy/main_mcc.py +++ b/CodeEntropy/main_mcc.py @@ -46,7 +46,7 @@ "help": "Bin width in degrees for making the histogram", "default": 30, }, - "tempra": { + "temperature": { "type": float, "help": "Temperature for entropy calculation (K)", "default": 298.0, @@ -286,7 +286,7 @@ def main(): # Calculate the entropy from the diagonalisation of the matrices S_trans_residue = EF.vibrational_entropy( - force_matrix, "force", args.temp, highest_level + force_matrix, "force", args.temperature, highest_level ) S_trans += S_trans_residue print(f"S_trans_{level}_{residue} = {S_trans_residue}") @@ -312,7 +312,7 @@ def main(): ) S_rot_residue = EF.vibrational_entropy( - torque_matrix, "torque", args.temp, highest_level + torque_matrix, "torque", args.temperature, highest_level ) S_rot += S_rot_residue print(f"S_rot_{level}_{residue} = {S_rot_residue}") @@ -420,8 +420,6 @@ def main(): with open(args.outfile, "a") as out: print(molecule, "\t", level, "\tConformational\t", S_conf, file=out) - # End united atom vibrational and conformational calculations # - if level in ("polymer", "residue"): # Vibrational entropy at every level # Get the force and torque matrices for the beads at the relevant level @@ -438,7 +436,7 @@ def main(): # Calculate the entropy from the diagonalisation of the matrices S_trans = EF.vibrational_entropy( - force_matrix, "force", args.temp, highest_level + force_matrix, "force", args.temperature, highest_level ) print(f"S_trans_{level} = {S_trans}") new_row = pd.DataFrame( @@ -456,7 +454,7 @@ def main(): ) S_rot = EF.vibrational_entropy( - torque_matrix, "torque", args.temp, highest_level + torque_matrix, "torque", args.temperature, highest_level ) print(f"S_rot_{level} = {S_rot}") new_row = pd.DataFrame( @@ -540,8 +538,6 @@ def main(): print(molecule, "\t Molecule\tTotal Entropy\t", S_molecule, file=out) -# END main function - if __name__ == "__main__": main()