VMD-L Mailing List
From: Jérôme Hénin (jhenin_at_ifr88.cnrs-mrs.fr)
Date: Fri May 11 2012 - 04:32:39 CDT
- Next message: Mark Cunningham: "RE: Fwd: VMD Stereo does not work Quadbufferd"
- Previous message: Jérôme Hénin: "Re: Suggestion for measure cluster"
- Next in thread: Jérôme Hénin: "Re: Suggestion for measure cluster"
- Reply: Jérôme Hénin: "Re: Suggestion for measure cluster"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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
- Next message: Mark Cunningham: "RE: Fwd: VMD Stereo does not work Quadbufferd"
- Previous message: Jérôme Hénin: "Re: Suggestion for measure cluster"
- Next in thread: Jérôme Hénin: "Re: Suggestion for measure cluster"
- Reply: Jérôme Hénin: "Re: Suggestion for measure cluster"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]