Morph residues gui.py: Difference between revisions
Jump to navigation
Jump to search
Bernhardcl (talk | contribs) (Created page with "if (have_coot_python): if coot_python.main_menubar(): menu = coot_menubar_menu("Morph") add_simple_coot_menu_menuitem( menu, "Morp...") |
No edit summary |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
<pre> | |||
if (have_coot_python): | if (have_coot_python): | ||
if coot_python.main_menubar(): | if coot_python.main_menubar(): | ||
Line 27: | Line 28: | ||
central_residue, | central_residue, | ||
select_radius) | select_radius) | ||
morph_residues = [central_residue | morph_residues = [central_residue] + other_residues | ||
morph_fit_residues(aa_imol, morph_residues, morph_radius) | morph_fit_residues(aa_imol, morph_residues, morph_radius) | ||
Line 51: | Line 52: | ||
"aa_imol", 1000, 2) | "aa_imol", 1000, 2) | ||
) | ) | ||
</pre> | |||
Load with: | |||
Calculate->Run Script | |||
Or put the file in e.g. ''.coot-preferences'' directory to make it permanent. |
Latest revision as of 16:02, 23 June 2017
if (have_coot_python): if coot_python.main_menubar(): menu = coot_menubar_menu("Morph") add_simple_coot_menu_menuitem( menu, "Morph Fit This Molecule", lambda func: using_active_atom(morph_fit_all, "aa_imol", 10) ) add_simple_coot_menu_menuitem( menu, "Morph Fit This Chain", lambda func: using_active_atom(morph_fit_chain, "aa_imol", "aa_chain_id", 10) ) def morph_fit_region_func(select_radius, morph_radius): with UsingActiveAtom() as \ [aa_imol, aa_chain_id, aa_res_no, aa_ins_code, aa_atom_name, aa_alt_conf]: central_residue = [aa_chain_id, aa_res_no, aa_ins_code] other_residues = residues_near_residue(aa_imol, central_residue, select_radius) morph_residues = [central_residue] + other_residues morph_fit_residues(aa_imol, morph_residues, morph_radius) add_simple_coot_menu_menuitem( menu, "Morph Fit This Region 12 9", lambda func: morph_fit_region_func(12, 9) ) add_simple_coot_menu_menuitem( menu, "Morph Fit This Region 8 6", lambda func: morph_fit_region_func(8, 6) ) add_simple_coot_menu_menuitem( menu, "Jiggle-fit This Molecule", lambda func: using_active_atom(fit_molecule_to_map_by_random_jiggle, "aa_imol", 1000, 2) )
Load with:
Calculate->Run Script
Or put the file in e.g. .coot-preferences directory to make it permanent.