Opened 5 months ago

Closed 4 months ago

#17824 closed defect (fixed)

Swapna and other operations slow

Reported by: matthias.vorlaender@… Owned by: pett
Priority: moderate Milestone:
Component: Performance Version:
Keywords: Cc:
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Dear ChimeraX team,

I have noticed that on some structure I am working with, the swapna command is extremely slow, making it almost unusable for structure manipulation. For a single nucleotide substitution, ChimeraX froze for >5 minutes before finishing the operation (that particular structure had ~300 000 atoms). When I however first delete all proteins from the structure, the operation is very fast. What is the rate limiting step in the swapna command? Does it invoke renumbering of all atoms in the PDB file? Without having quantified it, I experienced similar behavior for the build replace command. Would be fantastic if there would be a way to speed this up to increase its usability!

Change History (4)

comment:1 by pett, 5 months ago

For my reference:

Using 4v5x, which has roughly half a million atoms, swapping residue /BW:31 took less than a second the first time, but subsequent swaps took a little less than 18 seconds apiece. Not nearly the 5 minutes you are experiencing, but still quite a bit slower than I would expect. I will open a ticket in our bug-tracking database for this, with you on the recipient list.
"build replace" does a lot more work than swapna, so I can imagine it being somewhat slow, but again not 5-minutes slow. I'll look into that once I resolve the swapna situation.

comment:2 by matthias.vorlaender@…, 5 months ago

Hi Eric,

Thanks a lot! If it helps I can provide the PDB I was working on. Building an experimental structure involves a lot of stitching together of parts from different experimental or alphafold structures, which can lead to slightly messy files (for example, some residues that are more C-terminal may appear in the PDB text file before residues that are more N-terminal as a consequence of the ChimeraX “combine” command). I am not sure if that influences the swapna performance in any way. If helpful, please treat the file as confidential information since it is ongoing unpublished work.

Best wishes,
Matthias

From: ChimeraX <ChimeraX-bugs-admin@cgl.ucsf.edu>
Date: Wednesday, May 28, 2025 at 03:08
To: pett@cgl.ucsf.edu <pett@cgl.ucsf.edu>, Vorländer,Matthias Kopano <matthias.vorlaender@imp.ac.at>
Subject: Re: [ChimeraX] #17824: Swapna and other operations slow
#17824: Swapna and other operations slow
--------------------------------------------+----------------------
          Reporter:  matthias.vorlaender@…  |      Owner:  pett
              Type:  defect                 |     Status:  assigned
          Priority:  moderate               |  Milestone:
         Component:  Performance            |    Version:
        Resolution:                         |   Keywords:
        Blocked By:                         |   Blocking:
Notify when closed:                         |   Platform:  all
           Project:  ChimeraX               |
--------------------------------------------+----------------------
Comment (by pett):

 For my reference:

         Using 4v5x, which has roughly half a million atoms, swapping
 residue /BW:31 took less than a second the first time, but subsequent
 swaps took a little less than 18 seconds apiece.  Not nearly the 5 minutes
 you are experiencing, but still quite a bit slower than I would expect.  I
 will open a ticket in our bug-tracking database for this, with you on the
 recipient list.
         "build replace" does a lot more work than swapna, so I can imagine
 it being somewhat slow, but again not 5-minutes slow.  I'll look into that
 once I resolve the swapna situation.
--
Ticket URL: <https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/17824#comment:1>
ChimeraX <https://www.rbvi.ucsf.edu/chimerax/>
ChimeraX Issue Tracker

comment:3 by pett, 5 months ago

Thanks! It'll probably be several days before I can get to this, but I will keep your offer in mind.

--Eric

comment:4 by pett, 4 months ago

Resolution: fixed
Status: assignedclosed

The code that updated the chain sequence to reflect the new residue type was slow -- calling into the C++ layer to fetch the list of residues once per character in the sequence. Fix only in daily builds (starting tomorrow).

Fix: https://github.com/RBVI/ChimeraX/commit/b7588bc81c69b3975c8a009fac71aee8ffe1de39

Note: See TracTickets for help on using tickets.