From: Jérôme Hénin (jhenin_at_ifr88.cnrs-mrs.fr)
Date: Fri May 11 2012 - 04:32:39 CDT

Hi everyone,

When measure cluster is used with fitrmsd as a distance function, and
any single alignment fails (that happens often when looking at folding
of small peptides), then my impression is that the whole clustering
aborts. It would be pretty useful to make the behavior a little more
fault-tolerant, e.g. a logical thing to do is, if the alignment fails,
to decide that the distance is infinite for all practical purposes.

It could look roughly like this:
(MeasureCluster.C:370)

static float cluster_get_rmsd(const float *Frame1Pos, const float *Frame2Pos,
                               AtomSel *sel, float *weights) {
    float distance = 0.0f;
    if (measure_rmsd(sel, sel, sel->num_atoms, Frame1Pos, Frame2Pos,
weights, &distance) == MEASURE_NOERR) {
        return distance;
    } else {
        return 1e20; // effectively infinite distance, could be any
VERY_LARGE_FLOAT
    }
}

Note: I haven't tested this, as I don't have an up-to-date build
environment these days, and no time to get it running right now. This
is why I am making this a mere suggestion and not a patch.

Cheers,
Jerome