On 30/12/13 17:42, Oliver Clarke wrote:
And here is a more compact/elegant version courtesy of Paul that accomplishes a similar function in half the code - morphing with a radius decreasing from 12 to 6 Å over an arbitrary number of cycles, using a map initially blurred with a B-factor of 100, decreasing incrementally to 0 (the original map) over the course of the procedure:
I did some experimenting and I have been won over to the idea of an initial RBR (into a blurred map), so adding that and fixing the typos, reso_morph becomes:
def reso_morph(imol, imol_map, n_rounds): turn_off_backup(imol) set_refinement_immediate_replacement(1) sharpen(imol_map, 150) for ch_id in chain_ids(imol): if is_polymer_chain(imol, ch_id): rigid_body_refine_by_atom_selection(imol, '//'+ch_id) accept_regularizement() for round in range(n_rounds): f = float(round)/float(n_rounds) for ch_id in chain_ids(imol): if is_polymer_chain(imol, ch_id): # play with these numbers radius = 8 * (2 - f) - 3 sf = 120 * (1 - f) sharpen(imol_map, sf) morph_fit_chain(imol, ch_id, radius)