Skip to content

Commit 4368199

Browse files
committed
a heavy atoms universe is created for each residue and called by the get_dihedrals and conformational_entropy functions so that MDAnalysis gives dihedrals only containing heavy atoms. Values obtained for aliphatic residue match the old code now. Some further investigation for aromatic residues is still required to confirm results obtained using this implementation.
1 parent 478280f commit 4368199

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

CodeEntropy/main_mcc.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ def main():
308308
S_trans = 0
309309
S_rot = 0
310310
S_conf = 0
311+
311312
for residue in range(num_residues):
312313
# molecule data container of MDAnalysis Universe type for internal
313314
# degrees of freedom getting indices of first and last atoms in the
@@ -319,10 +320,14 @@ def main():
319320
residue_container = MDAHelper.new_U_select_atom(
320321
molecule_container, selection_string
321322
)
323+
residue_heavy_atoms_container = MDAHelper.new_U_select_atom(
324+
residue_container, "not name H*"
325+
) # only heavy atom dihedrals are relevant
322326

323327
# Vibrational entropy at every level
324328
# Get the force and torque matrices for the beads at the relevant
325329
# level
330+
326331
force_matrix, torque_matrix = LF.get_matrices(
327332
residue_container,
328333
level,
@@ -392,11 +397,11 @@ def main():
392397
# Gives entropy of conformations within each residue
393398

394399
# Get dihedral angle distribution
395-
dihedrals = LF.get_dihedrals(residue_container, level)
400+
dihedrals = LF.get_dihedrals(residue_heavy_atoms_container, level)
396401

397402
# Calculate conformational entropy
398403
S_conf_residue = EF.conformational_entropy(
399-
residue_container,
404+
residue_heavy_atoms_container,
400405
dihedrals,
401406
bin_width,
402407
start,

0 commit comments

Comments
 (0)