3DNA Forum

Welcome => Bug reports => Topic started by: rkpoppleton on June 12, 2025, 08:48:31 am

Netiquette · Download · News · Gallery · G-quadruplexes · DSSR-Jmol · DSSR-PyMOL · Video Overview · DSSR v2.5.4 (DSSR Manual) · Homepage

Title: When analyzing multiple frames with --nmr, DSSR gets slower with each frame
Post by: rkpoppleton on June 12, 2025, 08:48:31 am
When I analyze MD trajectories with the --nmr option, the runtime does not scale linearly with the number of frames as one might expect.  For the same structure here are some benchmarks:
n_framesruntime (hh:mm)
25001:00
50004:15
10000>15:00

This suggests to me that there is either some sort of memory leak or maybe the file writing is seeking to the end of the file at the end of each frame?

Here is my DSSR command:
Code: [Select]
~/software/x3dna-dssr -i=RNA_traj.pdb --nmr --json -o=dssr.json
DSSR version: 2.4.6-2024nov15
Title: Re: When analyzing multiple frames with --nmr, DSSR gets slower with each frame
Post by: xiangjun on June 12, 2025, 02:51:55 pm
Hi,

Thanks for using DSSR and for posting your question on the Forum. I am aware of the issue you are describing. The initial design of the --nmr option allows for flexibility of user-selected frames/models (e.g., --nmr=3+5+6:9 as described in the User Manual). For each frame/model, DSSR re-reads the input file from the beginning, which causes the slowdown as you observed. There is no memory leak, as you can verify with valgrind or similar tools.

DSSR Pro version allows for sequential processing of all the frames in a single pass, which leads to faster performance (scale linearly with the number of frames).

Best regards,

Xiang-Jun
Title: Re: When analyzing multiple frames with --nmr, DSSR gets slower with each frame
Post by: rkpoppleton on June 13, 2025, 09:58:08 am
I see.  That makes sense where the slowdown is coming from.  For what its worth, in tools I've worked on in the past, when we need to do random-access trajectory reading, we first read through the whole trajectory once and make an index of the byte offsets for the start of each frame.  That way you can jump to any arbitrary frame without having to search through the file each time.
Title: Re: When analyzing multiple frames with --nmr, DSSR gets slower with each frame
Post by: xiangjun on June 13, 2025, 10:36:42 am
It sounds like a good suggestion. I will think about it.

Funded by the NIH R24GM153869 grant on X3DNA-DSSR, an NIGMS National Resource for Structural Bioinformatics of Nucleic Acids

Created and maintained by Dr. Xiang-Jun Lu, Department of Biological Sciences, Columbia University