ADicksonLab / wepy

Weighted Ensemble simulation framework in Python
https://adicksonlab.github.io/wepy/index.html
MIT License
51 stars 20 forks source link

Incorrect output from parent_table_discontinuities function #74

Open kilince opened 1 year ago

kilince commented 1 year ago

The parent_table_discontinuities function should add -1 to the walker in a cycle if a warping event occurs for that specific walker. The current implementation returns -1 for all walkers in the cycle even if only one walker has warping event.

Here is an example: I get the warping record for my file: warping_record: [warping_Record(cycle_idx=419, walker_idx=32, target_idx=0, weight=8.720277913580345e-12)] Then use parent_table_discontinuities function to build a parent table: par_table_no_disc = parent_table_discontinuities(UnbindingBC, net_par_table, warping_record) When I check the cycle 419 in my parent table, this is the output: par_table_no_disc[419] = [-1, -1, -1,-1,-1,-1, -1,-1, -1,-1, -1,-1,-1, -1,-1,-1, -1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1, -1,-1, -1,-1,-1, -1,-1,-1,-1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,-1]

The output should be, par_table_no_disc[419] = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47]