Algorithmic steps of the SWINGER algorithm. The snapshots represent
the state of the system before and after each stage of the algorithm.
Before the algorithm is applied the region C contains
water molecules (blue) and water clusters (red). After the first stage
(I) of the algorithm the clusters are disassembled, and primary (blue)
and buffer (gray) lists are constructed. In the second stage (II),
initial grouping is performed, where all molecules in the primary
list are assigned to a given cluster. In the third stage (III), the
clustering is optimized with simulated annealing MC. In the last stage
(IV), only the clusters in region C are preserved,
whereas other clusters are rejected.