shirtsgroup/cg_openmm

Remove extra loop in calculating average energies.

mrshirts opened this issue · 0 comments

In parameters_free_energy.py, we have the loop:

 for i in range(len(full_T_list)):
 U_n = unsampled_state_energies[i,:]
      # compute expectations of being in conformational state n                                                             
      # Store results in a dictionary                                                                                       
      results[str(i)] = mbarT.computeMultipleExpectations(
      bool_i,U_n,compute_covariance=True)

With a properly set U_n, then we shouldn't have to do computeMultipleExpectations multiple times, but just once.

But if it's not affecting the speed, it probably doesn't need to be changed for now.