# Check which are clustered
print cdp.clustering
# We now going to deselect spins, which are not clustered.
# We use the same file before, and then reverse the selection.
deselect.read('cluster_residues.txt', spin_id_col=1, change_all=True)
deselect.reverse()
# Check for Selected
from pipe_control.mol_res_spin import spin_loop
for spin, spin_id in spin_loop(return_id=True, skip_desel=False):
print spin_id, spin.select
</source>
# Before executing, it would be a good idea to save the state after clustering.