MAB bin boundaries (WESTPA 2.0)

59 views
Skip to first unread message

Jonathan Borowsky

unread,
Sep 27, 2023, 2:50:30 PM9/27/23
to westpa-users
Hello,

Where can I find the coordinates of the MAB-generated bin boundaries at each WESTPA round? I can't figure out how to extract this information from the bin_topologies group in the west.h5 file.

Best,
Jonathan

Jeremy Leung

unread,
Sep 27, 2023, 4:33:33 PM9/27/23
to westpa-users
Hi Jonathan,

Unfortunately it's impossible as the bin_topologies group object only pickles the function itself but not the input. Depending on whether you set ``mab_log: True`` in west.cfg during your simulation, you can either estimate or calculate the exact values.

If ``mab_log: True``, you can use the min/max values to calculate the exact bin bounds since bin spacing is even.
```
import numpy
min_val = 1 # Min Value from mab_log
max_val = 5 # Max Value from mab_log
nbins = 4 # number of bins fed to MAB in west.cfg

bin_bounds = numpy.linspace(min_val, max_val, nbins +1)
```

If ``mab_log: False`` (False is default), then you can potentially find the min/max values from the last pcoord values of all segments, but that might be slightly off from what's being used due to recycling and such.

We plan to add in the option to output those values into a text file but that process involves adding more print/pstatus statements here .

Best,

Jeremy L.

Jonathan Borowsky

unread,
Sep 27, 2023, 5:01:17 PM9/27/23
to westpa-users
Hi Jeremy,

Thank you for letting me know. That option would be useful if/when it's added.

Best,
Jonathan

Jeremy Leung

unread,
Oct 20, 2023, 2:44:37 PM10/20/23
to westpa-users
Hi Jonathan,

The option to output bin boundaries (bin_log) has been added to WESTPA v2022.06. It's now published on github and pypi and will be on conda-forge shortly.


Best,

Jeremy L.

Jonathan Borowsky

unread,
Oct 23, 2023, 8:38:08 PM10/23/23
to westpa-users
Hi Jeremy,

Thank you for adding the feature and for letting me know!

Best,
Jonathan
Reply all
Reply to author
Forward
0 new messages