Hi Alexander,
On 03/29/2013 04:33 PM, Alexander Scouras wrote:
While scripting up a keybinding to toggle fixed atoms (via
mark_atom_as_fixed()), I discovered that closest_atom (and also active_residue)
does not actually return the closest atom for an amino acid, but actually the
CA. This seems to be semi-hard coded in the definition in
molecule-class-info.cc. That function actually takes a bool ca_check_flag
parameter, but the python and scheme wrappers just set the flag to True.
// Now, does this at belong to a residue that has a CA? If
// it does, reset at_best to be the CA of the residue, but
// keep dist_best as it was, of course.
Was this a "recent" change?
Quite recent. That is, recently I noticed this oversight (that one might
actually want the closest atom, and not the CA of the residue) - and put
in infrastructure so that closest_atom() returned the CA instead if
requested. However, as you note this didn't yet make it to the
user-level - I was not sufficiently brave/foolhardy :-/.
I used to have a keybinding for deleting individual atoms, and would use it
for deleting amide hydrogens while adding alternate conformations. (Necessary
because of how phenix.refine handles alt-confs). I'm using the fink
installation on OS X, and recently updated it for the first time in possibly
months. Version 0.7.1-pre Revision 4549.
Is there another way to do this, or some work around? I suppose I could call
residue_info and compare all the atom coordinates to rotation_centre().
Yes, sorry - that is the best work-around (that I can think of).
I think in future closest_atom() should do the expected thing (which is,
return the closest displayed atom) and I will rename the current
function to closest_atom_preferring_CA() (or some such). Something for 0.8.
Regards,
Paul.