Input: Ensemble of walkers, REVO parameters |
Output: Ensemble of resampled walkers |
Dist_Matrix = AlltoAll_Dist(walkers); |
Vold, = CalcVariation(weights, Dist_Matrix); |
while
TRUE
do
|
c = Select the walker with highest Vi where > pmin; |
m1 = Select the walker with lowest Vi where < pmax; |
m2 = Select the walker that is closest to m1 where |
+ < pmax and dm2,m1 < dmerge_distance
|
if
c, m1 and m2 are defined
then
|
/*Changes the conformation and weight of walkers*/ |
Do cloning; |
Do merging; |
Vnew, = CalcVariation(weights, Dist_Matrix); |
if
Vnew > Vold
then
|
Vold = Vnew; |
else |
Undo cloning and merging step; |
break; |
else |
break; |
end |