Opened 6 years ago

Closed 5 years ago

#3084 closed defect (can't reproduce)

Inserted fragments should update missing-structure pseudobonds

Reported by: Tristan Croll Owned by: Eric Pettersen
Priority: moderate Milestone:
Component: Structure Editing Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

summary pretty much covers it

Attachments (1)

merge.py (8.9 KB ) - added by Tristan Croll 5 years ago.
Added by email2trac

Download all attachments as: .zip

Change History (6)

comment:1 by Eric Pettersen, 6 years ago

Resolution: fixed
Status: assignedclosed

The insertion now automatically updates the missing-structure pseudobonds, at least as far as I can tell with my rinky-dink tests.

in reply to:  2 ; comment:2 by Tristan Croll, 5 years ago

I've been putting this to *extensive* use over the past few days 
(building a new crystallographic model essentially from scratch as part 
of a "bring your own challenging data" event organised by my lab). I 
can't put my finger on the cause, but *sometimes* when adding a new 
residue to the N-terminal side of a chain break (i.e. the side with the 
pendant C=O) the old pseudobond fails to delete (but the new one is 
correctly created). Doesn't *seem* to correlate to any particular 
residue type... but it does seem like "older" pseudobonds (or those 
created when the model was first loaded) are more likely to be left 
behind. Possible that they're duplicated, and only one is deleted? Just 
did a quick test: added a residue (old pseudobond remained, new one 
created). Added a second (first pseudobond still there, second one 
correctly deleted, new one added). Deleted both newly-added residues 
(new pseudobond deleted). Added another residue - *now* the original 
pseudobond is finally deleted.

On 2020-04-22 00:11, ChimeraX wrote:

comment:3 by Eric Pettersen, 5 years ago

Resolution: fixed
Status: closedreopened

in reply to:  4 ; comment:4 by Tristan Croll, 5 years ago

Just ran into a segmentation fault when inserting a fragment into the middle of a chain (including joining up the N- and C-terminal ends to the existing chain), after disabling all the pseudobond-updating portion of my own code:

{{{
Program received signal SIGSEGV, Segmentation fault.
__memmove_ssse3_back () at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1516
1516 movdqu 0x20(%rsi), %xmm2
Missing separate debuginfos, use: debuginfo-install ucsf-chimerax-1.1-1.el7.x86_64
(gdb) bt
#0  0x00007ffff75f9913 in __memmove_ssse3_back ()
    at ../sysdeps/x86_64/multiarch/memcpy-ssse3-back.S:1516
#1  0x00007fffb029c041 in std::vector<char, std::allocator<char> >::_M_fill_insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, std::allocator<char> > >, unsigned long, char const&) ()
    at /opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/atomic/lib/libatomstruct.so
#2  0x00007fffb02e1e8a in atomstruct::StructureSeq::insert(atomstruct::Residue*, atomstruct::Residue*) ()
    at /opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/atomic/lib/libatomstruct.so
#3  0x00007fffb026f464 in atomstruct::Structure::_form_chain_check(atomstruct::Atom*, atomstruct::Atom*, atomstruct::Bond*) ()
    at /opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/atomic/lib/libatomstruct.so
#4  0x00007fffb025d11b in atomstruct::StructurePBGroup::new_pseudobond(atomstruct::Atom*, atomstruct::Atom*) ()
    at /opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/atomic/lib/libatomstruct.so
#5  0x00007fffb02a1c2e in atomstruct::Residue::add_atom(atomstruct::Atom*) ()
    at /opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/atomic/lib/libatomstruct.so
#6  0x00007fffaffa40bb in __pyx_pw_8chimerax_6atomic_5cymol_9CyResidue_11add_ato--------------Type ---Type -------------------------------T-------------------------------Type <return> to continue, or q <return> to quit---
m(PyObject*, PyObject*) (__pyx_v_self=<optimized out>, __pyx_v_self=<optimized out>, __pyx_v_atom=<optimized out>) at cymol.cpp:25308
#7  0x00007fffaffa40bb in __pyx_pw_8chimerax_6atomic_5cymol_9CyResidue_11add_atom(PyObject*, PyObject*) (__pyx_v_self=<optimized out>, __pyx_v_atom=<optimized out>) at cymol.cpp:25264
#8  0x00007ffff79052a9 in _PyMethodDef_RawFastCallKeywords (method=0x7fffb01eb580 <__pyx_methods_8chimerax_6atomic_5cymol_CyResidue>, self=<optimized out>, args=0x1ea24610, nargs=1, kwnames=<optimized out>) at Objects/call.c:647
#9  0x00007ffff79052f5 in _PyCFunction_FastCallKeywords (func=0x7ffebb789280, args=<optimized out>, nargs=<optimized out>, kwnames=<optimized out>)
    at Objects/call.c:732
#10 0x00007ffff78de557 in _PyEval_EvalFrameDefault (kwnames=0x0, oparg=1, pp_stack=<synthetic pointer>) at Python/ceval.c:4568
#11 0x00007ffff78de557 in _PyEval_EvalFrameDefault (f=<optimized out>, throwflag=<optimized out>) at Python/ceval.c:3093
#12 0x00007ffff79f103e in _PyEval_EvalCodeWithName (_co=0x7ffebd40cf60, globals=<optimized out>, locals=locals@entry=0x0, args=<optimized out>, argcount=2, kwnames=0x7ffeb85de6a8, kwargs=0x1a6a1870, kwcount=3, kwstep=1, defs=0x7ffebe2328b8, defcount=6, kwdefs=0x0, closure=0x0, name=0x7ffefcf45e30, qualname=0x7ffefcf45e30) at Python/ceval.c:3930
}}}

Doing some basic probing: not related to the joining of the ends (still crashes if I leave that out). Not length related - still crashes if I limit it to the first two of 35 residues. Reinstating my own pseudobond updating code in Python gets it working again. Interestingly, it worked without crashing even though my implementation had some boneheaded bugs causing it to update the pseudobonds almost completely wrongly... possibly just the act of touching the pseudobond manager before the changes callback gets a look-in was causing something critical to update so your code could run correctly? Anyway, the attached code seems to work correctly (and is independent of the rest of ISOLDE/Clipper so should be portable)... if all the code that uses the pseudobond manager is commented out, it crashes.

If you need a test case, let me know (the model I hit this on is a huge ISOLDE session, won't run in the ChimeraX dev builds).



________________________________
From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Sent: 09 July 2020 01:44
Cc: pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>; Tristan Croll <tic20@cam.ac.uk>
Subject: Re: [ChimeraX] #3084: Inserted fragments should update missing-structure pseudobonds

#3084: Inserted fragments should update missing-structure pseudobonds
----------------------------------------+----------------------------
          Reporter:  Tristan Croll      |      Owner:  Eric Pettersen
              Type:  defect             |     Status:  reopened
          Priority:  moderate           |  Milestone:
         Component:  Structure Editing  |    Version:
        Resolution:                     |   Keywords:
        Blocked By:                     |   Blocking:
Notify when closed:                     |   Platform:  all
           Project:  ChimeraX           |
----------------------------------------+----------------------------
Changes (by Eric Pettersen):

 * status:  closed => reopened
 * resolution:  fixed =>


--
Ticket URL: <https://plato.cgl.ucsf.edu/trac/ChimeraX/ticket/3084#comment:3>
ChimeraX <http://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

merge.py

by Tristan Croll, 5 years ago

Attachment: merge.py added

Added by email2trac

comment:5 by Eric Pettersen, 5 years ago

Resolution: can't reproduce
Status: reopenedclosed

The example I used was inserting residues 61-66 of chain A of 2gbp into the missing structure gap between residues 60 and 67 in chain V of 1www. Both with and without the explicitly pseudobond manipulations of merge.py commented out, it worked.

Note: See TracTickets for help on using tickets.