MAB skipping function: still broken in v2022.6?

32 views
Skip to first unread message

Hayden Scheiber

unread,
Nov 14, 2023, 1:51:04 PM11/14/23
to westpa-users
Hello,

At the time of this posting, I am using the latest version of WESTPA, v2022.06. I am employing MAB bins in my WESTPA calculations. I was aware that prior to v2022.05, the skip function of the MAB scheme was broken, but apparently fixes were made in v2022.05 to alleviate this. However, I believe the MAB skip function is still not working as intended in version v2022.06.

I have run two nearly identical WESTPA calculations using 2D progress coordinates with and without the MAB skip function. I've pasted the binning scheme from my west.cfg file below. For context, this is a simulation of an antigen/antibody complex unbinding. The first pcoord is the total solvent accessible surface area (SASA) of the epitope + paratope regions, while the second pcoord is the protein-protein distance (i.e. the smallest distance between any two atoms of the two proteins).

Binning scheme:
    system_options:
      # Dimensionality of your progress coordinate
      pcoord_ndim: 2
      # Number of data points per iteration
      # Needs to be pcoord_len >= 2 (minimum of parent, last frame) to work with most analysis tools
      pcoord_len: 21
      # Data type for your progress coordinate
      pcoord_dtype: !!python/name:numpy.float32
      bins:
        type: RecursiveBinMapper
        base:
            type: RectilinearBinMapper
            boundaries:
                - [0, 15, inf] # Binding SASA (nm^2, typical values 5 - 20)
                - [0, 5, inf]  # Min P-P distance (Angstroms)
        mappers:
          - type: MABBinMapper # Prior to dissociation
            direction: [1, 0]
            skip: [0, 1] # Skip MAB binning along P-P distance direction
            nbins: [7, 1]
            at: [1.0, 1.0]
            mab_log: true
          - type: MABBinMapper # After dissociation
            direction: [0, 1]
            skip: [1, 0] # Skip MAB binning along SASA direction
            nbins: [1, 3]
            at: [20.0, 1.0]
            mab_log: true
      # Number walkers per bin
      bin_target_counts: 32

In my first set attempt, I used the above binning scheme with the skipping enabled as shown. As suggested by the comments, this was intended to skip MAB binning in the first MAB bin along the P-P distance coordinate, and then skip MAB binning along the SASA pcoord in the second MAB bin. In both cases, I initialize the system from 64 basis states with 8 segs-per-state. These bstates are all bound configurations, differing only slightly in configuration. 

With the above MAB scheme including MAB skipping:
1 target state(s) present
Calculating progress coordinate values for basis states.
64 basis state(s) present
Calculating progress coordinate values for start states.
0 start state(s) present
Preparing initial states
################ MAB stats ################
minima in each dimension:      [3.9172401, 1.5129446]
maxima in each dimension:      [6.704759, 2.070519]
direction in each dimension:   [1, 0]
skip in each dimension:        [0, 1]
###########################################

        Total bins:            19
        Initial replicas:      64 in 2 bins, total weight = 1
        Total target replicas: 608
       
1-prob: 0.0000e+00
Simulation prepared.
2 of 19 (10.526316%) active bins are populated
per-bin minimum non-zero probability:       0.015625
per-bin maximum probability:                0.984375
per-bin probability dynamic range (kT):     4.14313
per-segment minimum non-zero probability:   0.000488281
per-segment maximum non-zero probability:   0.0585938
per-segment probability dynamic range (kT): 4.78749
norm = 1, error in norm = 0 (0*epsilon)
Updating system with the options from the configuration file
The exact same calculation with both MAB bin skips turned off:
1 target state(s) present
Calculating progress coordinate values for basis states.
64 basis state(s) present
Calculating progress coordinate values for start states.
0 start state(s) present
Preparing initial states
################ MAB stats ################
minima in each dimension:      [3.9172401, 1.5129446]
maxima in each dimension:      [6.704759, 2.070519]
direction in each dimension:   [1, 0]
skip in each dimension:        [0, 0]
###########################################

        Total bins:            23
        Initial replicas:      256 in 8 bins, total weight = 1
        Total target replicas: 736
       
1-prob: 0.0000e+00
Simulation prepared.
8 of 23 (34.782609%) active bins are populated
per-bin minimum non-zero probability:       0.015625
per-bin maximum probability:                0.328125
per-bin probability dynamic range (kT):     3.04452
per-segment minimum non-zero probability:   0.000488281
per-segment maximum non-zero probability:   0.0195312
per-segment probability dynamic range (kT): 3.68888
norm = 1, error in norm = 0 (0*epsilon)
Updating system with the options from the configuration file
Why are so few bins filled when the skipping function is enabled? I would have expected 7 bins filled to begin with, spanning the first outer bin. Even after 50 WE iterations, once trajectories have diffused into both MAB bins, only 4 out of 19 bins are occupied!

Iteration 50 (50 requested)
Beginning iteration 50
128 segments remain in iteration 50 (128 total)
4 of 19 (21.052632%) active bins are populated
per-bin minimum non-zero probability:       2.595e-46
per-bin maximum probability:                1
per-bin probability dynamic range (kT):     104.965
per-segment minimum non-zero probability:   8.10937e-48
per-segment maximum non-zero probability:   0.0576782
per-segment probability dynamic range (kT): 105.578
norm = 1, error in norm = 0 (0*epsilon)
MAB binning in use
Bottleneck bin occupancy may not be accurately reported
Waiting for segments to complete...
################ MAB stats ################
minima in each dimension:      [3.9939365, 1.5525619]
maxima in each dimension:      [14.99696, 2.5262394]
direction in each dimension:   [1, 0]
skip in each dimension:        [0, 1]
###########################################
################ MAB stats ################
minima in each dimension:      [15.044079, 1.7822143]
maxima in each dimension:      [17.444405, 2.75611]
direction in each dimension:   [0, 1]
skip in each dimension:        [1, 0]
###########################################
Iteration completed successfully
Iteration wallclock: 0:11:53.871709, cputime: 12:09:49.575783
On the other hand, with the MAB skipping disabled, only 23 iterations later I find 19 of 23 bins filled:
Iteration 23 (50 requested)
Beginning iteration 23
608 segments remain in iteration 23 (608 total)
19 of 23 (82.608696%) active bins are populated
per-bin minimum non-zero probability:       2.81192e-23
per-bin maximum probability:                0.480124
per-bin probability dynamic range (kT):     51.1919
per-segment minimum non-zero probability:   8.78725e-25
per-segment maximum non-zero probability:   0.0265375
per-segment probability dynamic range (kT): 51.7621
norm = 1, error in norm = 0 (0*epsilon)
MAB binning in use
Bottleneck bin occupancy may not be accurately reported
Waiting for segments to complete...
################ MAB stats ################
minima in each dimension:      [4.177698, 1.5353204]
maxima in each dimension:      [14.98888, 2.5825822]
direction in each dimension:   [1, 0]
skip in each dimension:        [0, 0]
###########################################
################ MAB stats ################
minima in each dimension:      [15.004696, 1.6985209]
maxima in each dimension:      [19.229214, 3.457224]
direction in each dimension:   [0, 1]
skip in each dimension:        [0, 0]
###########################################
Iteration completed successfully

Have I made a mistake somewhere, or is it that the MAB skipping code is not functioning as intended?

Cheers,
Hayden

Anthony Bogetti

unread,
Nov 15, 2023, 11:08:40 AM11/15/23
to westpa-users
Hello Hayden,

A while back we found a bug in the MAB skip code for binning schemes with >1 dimensions and thought we have fixed it. It appears (based on your thorough post and some other internal tests) that this bug has not actually been fixed. We will coordinate to try and have this part of the code fixed in a timely manner so that it generates the results you are expecting.

Best,
Anthony

Hayden Scheiber

unread,
Nov 15, 2023, 1:32:51 PM11/15/23
to westpa-users
Hi Anthony,

Glad to hear you are working on resolving this bug. 
It's not a major problem for my simulations as I can just disable MAB skipping, but definitely worth fixing as it can help improve efficiency when employing high dimensional pcoords!

Best,
Hayden

Reply all
Reply to author
Forward
0 new messages