rinikerlab / reeds

This pipeline is executing a RE-EDS run for relative free energy calculations. It can be used for example for calculation of hydration free energies or ligand binding free energies.
https://rinikerlab.github.io/reeds/
MIT License
30 stars 8 forks source link

state sampling thresholds in vacuum #38

Closed SalomeRonja closed 3 years ago

SalomeRonja commented 3 years ago

I just ran the single state optimization for one of my vacuum system, and I noticed that some of the physical sampling thresholds are nans. The function which determines the sampling thresholds gives a nice warning for this:

"A state potential threshold was NaN -> This hints on that you did not sample the state as a dominating one! Please check your simulatigons!"

In case of the vacuum simulations, even with biased energy offsets, I always get the same dominating states:

0
State e1 - Domination state sampling fraction  0.0
State e2 - Domination state sampling fraction  0.1715
State e3 - Domination state sampling fraction  0.8185
State e4 - Domination state sampling fraction  0.0
State e5 - Domination state sampling fraction  0.0
State e6 - Domination state sampling fraction  0.0
[nan, -124.07254812657001, -101.61868126581481, nan, nan, nan]
/cluster/work/igc/wsalome/code/reeds/reeds/function_libs/analysis/sampling.py:198: UserWarning: A state potential threshold was NaN -> This hints on that you did not sample the state as a dominating one! Please check your simulatigons!
  warnings.warn("A state potential threshold was NaN -> This hints on that you did not sample the state as a dominating one! Please check your simulatigons!")
1
State e1 - Domination state sampling fraction  0.0
State e2 - Domination state sampling fraction  0.1748
State e3 - Domination state sampling fraction  0.8152
State e4 - Domination state sampling fraction  0.0
State e5 - Domination state sampling fraction  0.0
State e6 - Domination state sampling fraction  0.0
[nan, -126.3725692960204, -100.62956354681052, nan, nan, nan]
2
State e1 - Domination state sampling fraction  0.0
State e2 - Domination state sampling fraction  0.0
State e3 - Domination state sampling fraction  0.99
State e4 - Domination state sampling fraction  0.0
State e5 - Domination state sampling fraction  0.0
State e6 - Domination state sampling fraction  0.0
[nan, nan, -180.5018617695226, nan, nan, nan]
3
State e1 - Domination state sampling fraction  0.0
State e2 - Domination state sampling fraction  0.1733
State e3 - Domination state sampling fraction  0.8167
State e4 - Domination state sampling fraction  0.0
State e5 - Domination state sampling fraction  0.0
State e6 - Domination state sampling fraction  0.0
[nan, -124.43284366532423, -100.37143183639859, nan, nan, nan]
/cluster/work/igc/wsalome/code/reeds/reeds/function_libs/analysis/sampling.py:198: UserWarning: A state potential threshold was NaN -> This hints on that you did not sample the state as a dominating one! Please check your simulatigons!
  warnings.warn("A state potential threshold was NaN -> This hints on that you did not sample the state as a dominating one! Please check your simulatigons!")
4
State e1 - Domination state sampling fraction  0.0
State e2 - Domination state sampling fraction  0.174
State e3 - Domination state sampling fraction  0.816
State e4 - Domination state sampling fraction  0.0
State e5 - Domination state sampling fraction  0.0
State e6 - Domination state sampling fraction  0.0
[nan, -124.66017732804731, -100.683085612474, nan, nan, nan]
/cluster/work/igc/wsalome/code/reeds/reeds/function_libs/analysis/sampling.py:198: UserWarning: A state potential threshold was NaN -> This hints on that you did not sample the state as a dominating one! Please check your simulatigons!
  warnings.warn("A state potential threshold was NaN -> This hints on that you did not sample the state as a dominating one! Please check your simulatigons!")
5
State e1 - Domination state sampling fraction  0.0
State e2 - Domination state sampling fraction  0.1738
State e3 - Domination state sampling fraction  0.8162
State e4 - Domination state sampling fraction  0.0
State e5 - Domination state sampling fraction  0.0
State e6 - Domination state sampling fraction  0.0
[nan, -124.65177166175785, -100.61310471674739, nan, nan, nan]

This is low priority, but something to keep in mind. I'll have to see what happens when I use a higher bias for the energy offsets, or handle the threshold detection differently in case of vacuum.

RiesBen commented 3 years ago

hm damn.... I just checked it out. I think it would make sense to add a global vacuum_simulation flag in the module _do_RE_EDSgenerateOptimizedStates, that triggers the useage of any potential energy instead of domination sampling in _physical_occurence_potential_threshold_distributionbased.

Module: link threshold function: link

RiesBen commented 3 years ago

@SalomeRonja hi, i started implementing this, maybe you could checkout this branch vacuum_state_optimization

SalomeRonja commented 3 years ago

Solved by benjamin in #39 - thanks a lot !