Thus, in the on-the-fly clustering strategy, any newly sampled energy minimum is compared with all structures that have already been visited by any other BH trajectories, using similarity of X-ray diffraction patterns to identify identical structures. If a structure had already been sampled by another BH trial, the current BH trajectory is truncated. The trial is replaced by a BH run starting from the next unused quasi-random seed, to explore a new region in configurational space and maintain a constant number of active BH trajectories. In this way, the method aims to minimize overlap in sampling between BH runs.