Bernhards key bindings for coot.py: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 37: Line 37:
         fill_partial_residue(imol, chain_id, res_no, ins_code)
         fill_partial_residue(imol, chain_id, res_no, ins_code)
add_key_binding("Fill Partial", "k", lambda: key_binding_func_2())
add_key_binding("Fill Partial", "k", lambda: key_binding_func_2())
add_key_binding("Kill Sidechain", "K", lambda:
                using_active_atom(delete_residue_sidechain,
                                  "aa_imol", "aa_chain_id", "aa_res_no", "aa_ins_code", 0))
refine_residue_sphere_radius = 3.5  # Angstroms
add_key_binding("Refine residue in a sphere", "R",
                lambda: sphere_refine(refine_residue_sphere_radius))


def key_binding_func_3():
def key_binding_func_3():
Line 88: Line 96:


def key_binding_func_6():
def key_binding_func_6():
    from types import ListType
     active_atom = active_residue()
     active_atom = active_residue()
     if (not active_atom):
     if (not active_atom):
Line 99: Line 106:
         atom_name = active_atom[4]
         atom_name = active_atom[4]
         alt_conf  = active_atom[5]
         alt_conf  = active_atom[5]
         centred_residue = active_atom[1:4]
         regularize_zone(imol, chain_id,
        other_residues = residues_near_residue(imol, centred_residue, 3)
                        res_no - 1, res_no + 1,
        all_residues = [centred_residue]
                        alt_conf)
        if (type(other_residues) is ListType):
add_key_binding("Regularize Residues", "B", lambda: key_binding_func_6())
            all_residues += other_residues
        print "imol: %s residues: %s" %(imol, all_residues)
        refine_residues(imol, all_residues)
           
add_key_binding("Refine residues in a sphere", "R", lambda: key_binding_func_6())


def key_binding_func_7():
def key_binding_func_7():
28

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu