Skip to content

Commit 57250c4

Browse files
committed
add in averaging over the number_frames for each of the forces and torques matrices
1 parent aa42de4 commit 57250c4

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

CodeEntropy/entropy.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,22 @@ def execute(self):
197197
step,
198198
)
199199

200+
force_matrix_ua = {k: v / number_frames for k, v in force_matrix_ua.items()}
201+
torque_matrix_ua = {k: v / number_frames for k, v in torque_matrix_ua.items()}
202+
203+
force_matrix_res = [
204+
f / number_frames if f is not None else None for f in force_matrix_res
205+
]
206+
torque_matrix_res = [
207+
t / number_frames if t is not None else None for t in torque_matrix_res
208+
]
209+
force_matrix_poly = [
210+
f / number_frames if f is not None else None for f in force_matrix_poly
211+
]
212+
torque_matrix_poly = [
213+
t / number_frames if t is not None else None for t in torque_matrix_poly
214+
]
215+
200216
# Do the entropy calculations
201217
for molecule_id in range(number_molecules):
202218
mol_container = self._get_molecule_container(reduced_atom, molecule_id)

0 commit comments

Comments
 (0)