I believe what you call res_type is rather actually term_type and this
function doesnt take "auto", only "N" and "C". So I am afraid you have
to specify yourself which end you want to add.
HTH,
B
On 28/04/2014 21:33, Oliver Clarke wrote:
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())
--
***************************************************
Dr. Bernhard Lohkamp
Associate Professor/Docent
Div. Molecular Structural Biology
Dept. of Medical Biochemistry and Biophysics (MBB)
Karolinska Institutet
S-17177 Stockholm
Sweden
phone: (+46) 08-52487651
fax: (+46) 08-327626
email: [email protected]