Skip to content

Commit

Permalink
Minor tweaks for run_EEXE.py
Browse files Browse the repository at this point in the history
  • Loading branch information
wehs7661 committed Aug 26, 2023
1 parent 403f5fc commit 95e6335
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 3 additions & 1 deletion ensemble_md/cli/run_EEXE.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@ def main():
print('\nNote: No weight combination will be performed.')
weights = EEXE.histogram_correction(weights_avg, counts)
else:
w_for_printing = EEXE.combine_weights(weights_avg)[1]
print('\nNote: No histogram correction will be performed.')
print('Note: No weight combination will be performed.')
print(f'The alchemical weights of all states: \n {list(np.round(w_for_printing, decimals=3))}')

# 3-5. Modify the MDP files and swap out the GRO files (if needed)
# Here we keep the lambda range set in mdp the same across different iterations in the same folder but swap out the gro file # noqa: E501
Expand Down Expand Up @@ -276,4 +278,4 @@ def main():

print(f'\nTime elapsed: {utils.format_time(time.time() - t1)}')

sys.exit()
MPI.COMM_WORLD.Abort(0)
11 changes: 8 additions & 3 deletions ensemble_md/utils/gmx_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,15 +393,20 @@ def compare_MDPs(mdp_list, print_diff=False):
workflow adopted in :code:`run_EEXE.py` but it might be useful in some places,
so we decided to keep it.)
Parameters
----------
mdp_list : list
A list of MDP files.
print_diff : bool
If :code:`True`, print to screen the parameters that are different among the MDP files
and the values of the parameters in the MDP files in a more readable format.
Returns
-------
diff_params : dict
A dictionary of parameters that are different among the MDP files.
The keys are the parameter names and the values is a list of values of the
parameters in the MDP files.
print_diff : bool
If :code:`True`, print to screen the parameters that are different among the MDP files
and the values of the parameters in the MDP files in a more readable format.
"""
diff_params = {}
for i in range(len(mdp_list)):
Expand Down

0 comments on commit 95e6335

Please sign in to comment.