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
3 changes: 2 additions & 1 deletion CodeEntropy/calculations/ConformationFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ def assign_conformation(
# get the values of the angle for the dihedral
# dihedral angle values have a range from -180 to 180
for timestep in data_container.trajectory[start:end:step]:
timestep_index = timestep.frame - start
value = dihedral.value()
# we want postive values in range 0 to 360 to make the peak assignment work
# using the fact that dihedrals have circular symetry
# (i.e. -15 degrees = +345 degrees)
if value < 0:
value += 360
phi[timestep.frame] = value
phi[timestep_index] = value

# create a histogram using numpy
number_bins = int(360 / bin_width)
Expand Down
5 changes: 3 additions & 2 deletions CodeEntropy/calculations/LevelFunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ def get_matrices(
trans_axes, rot_axes = GF.get_axes(data_container, level, bead_index)

# Sort out coordinates, forces, and torques for each atom in the bead
weighted_forces[bead_index][timestep.frame] = GF.get_weighted_forces(
timestep_index = timestep.frame - start
weighted_forces[bead_index][timestep_index] = GF.get_weighted_forces(
data_container, list_of_beads[bead_index], trans_axes, highest_level
)
weighted_torques[bead_index][timestep.frame] = GF.get_weighted_torques(
weighted_torques[bead_index][timestep_index] = GF.get_weighted_torques(
data_container, list_of_beads[bead_index], rot_axes
)

Expand Down