Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions CodeEntropy/LevelFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,7 @@ def get_dihedrals(data_container, level):

# if united atom level, read dihedrals from MDAnalysis universe
if level == "united_atom":
# only use dihedrals made of heavy atoms
heavy_atom_group = data_container.select_atoms("not name H*")
dihedrals = heavy_atom_group.dihedrals
dihedrals = data_container.dihedrals

# if residue level, looking for dihedrals involving residues
if level == "residue":
Expand Down
9 changes: 7 additions & 2 deletions CodeEntropy/main_mcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ def main():
S_trans = 0
S_rot = 0
S_conf = 0

for residue in range(num_residues):
# molecule data container of MDAnalysis Universe type for internal
# degrees of freedom getting indices of first and last atoms in the
Expand All @@ -319,10 +320,14 @@ def main():
residue_container = MDAHelper.new_U_select_atom(
molecule_container, selection_string
)
residue_heavy_atoms_container = MDAHelper.new_U_select_atom(
residue_container, "not name H*"
) # only heavy atom dihedrals are relevant

# Vibrational entropy at every level
# Get the force and torque matrices for the beads at the relevant
# level

force_matrix, torque_matrix = LF.get_matrices(
residue_container,
level,
Expand Down Expand Up @@ -392,11 +397,11 @@ def main():
# Gives entropy of conformations within each residue

# Get dihedral angle distribution
dihedrals = LF.get_dihedrals(residue_container, level)
dihedrals = LF.get_dihedrals(residue_heavy_atoms_container, level)

# Calculate conformational entropy
S_conf_residue = EF.conformational_entropy(
residue_container,
residue_heavy_atoms_container,
dihedrals,
bin_width,
start,
Expand Down