Hi all,
I’ve used the add_terminal_residue_using_phi_psi function to make a little
shortcut to force Coot to add a terminal residue (code below), which I can then
refine into the density (sometimes Coot cannot find an acceptable position for
a terminal residue, when I can clearly see appropriate density).
It works fine, except that there seems to be a bug in
add_terminal_residue_using_phi_psi - it always adds the new residue at the end
of the chain, regardless of whether the N-term or C-term residue is clicked,
and it also adds after the TER flag if present. This means that I can’t use
this to add residues to the N-term, as Coot will not recognize that the
adjacent residues are linked if they are not adjacent in the file. Thoughts?
Oli.
#Force addition of residue - useful when
#Coot says "No acceptable position found"
# but density is clear.
def force_add_terminal_residue():
def force_addition(res1):
mol_id=res1[1]
ch_id=res1[2]
res_no=res1[3]
res_type="auto"
add_terminal_residue_using_phi_psi(mol_id,ch_id,res_no,
res_type,-64,-41)
user_defined_click(1,force_addition)
add_simple_coot_menu_menuitem(menu,
"Forced addition of terminal residue (click terminus)",
lambda func: force_add_terminal_residue())