Opened 2 years ago

Closed 2 years ago

#9791 closed defect (duplicate)

cartoon style unnecessarily computes ribbon(?)

Reported by: kristen.browne@… Owned by: Eric Pettersen
Priority: moderate Milestone:
Component: Structure Analysis Version:
Keywords: Cc: Tom Goddard
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

With the biological assembly of 1m4x (open pdbe_bio:1m4x maxa 1; 1.6 million atoms), "cartoon style sides 16" causes the memory usage (which was already 20+ GB) to shoot through the roof, despite the fact that no cartoon is being displayed.

Change History (2)

comment:1 by Tom Goddard, 2 years ago

Cc: Tom Goddard added; Eric Pettersen removed
Component: DepictionStructure Analysis
Owner: changed from Tom Goddard to Eric Pettersen

I also see the memory explode to over 120 Gbytes in about 20 seconds after the cartoon style sides 16 command

open pdbe_bio:1m4x maxa 1
cartoon style sides 16

Force quitting ChimeraX while this is happening shows it is computing secondary structure using ksdssp in C++.

11  residue_is_helix + 112 (molc.cpp:2855,5 in libmolc.dylib + 53156) [0x11eea8fa4] 1-11
11  void error_wrap_array_get<atomstruct::Residue, bool, unsigned char>(atomstruct::Residue**, unsigned long, bool (atomstruct::Residue::*)() const, unsigned char*) + 96 (molc.cpp:203,23 in libmolc.dylib + 53156) [0x11eea8fa4] 1-11
11  atomstruct::Residue::is_helix() const + 44 (Residue.h:102,37 in libmolc.dylib + 53156) [0x11eea8fa4] 1-11
11  atomstruct::Residue::ss_type() const + 44 (Residue.h:400,22 in libmolc.dylib + 53156) [0x11eea8fa4] 1-11
11  atomstruct::AtomicStructure::compute_secondary_structure(float, int, int, bool, atomstruct::CompSSInfo*) + 1492 (CompSS.cpp:923,9 in libatomstruct.dylib + 216916) [0x12fbb4f54] 1-11
11  atomstruct::compute_chain(atomstruct::KsdsspParams&) + 160 (CompSS.cpp:809,16 in libatomstruct.dylib + 217700) [0x12fbb5264] 1-11
11  __bzero + 64 (libsystem_platform.dylib + 13136) [0x186a1e350] 1-11

The cartoon style code is poorly written and is calling residues.is_helix even though it obviously doesn't need to do that because none of the options given to the command need it. The cartoon style code should probably be rewritten to not do the needless calculations. But anything that tries to use the secondary structure on this 1.6 million atoms is going to kill ChimeraX, so that excessive memory use should be fixed.

Reassigning to Eric since he is in charge of secondary structure computation.

comment:2 by Eric Pettersen, 2 years ago

Resolution: duplicate
Status: assignedclosed

The basic problem is that secondary-structure calculation is very inefficient for large structures (ticket #8446), and the bioassembly file lacks secondary structure information, so ChimeraX tries to calculate it when is_helix is called (unnecessarily) from "cartoon style sides 16".

Ticket #8446 will take some effort to fix (since finding sheets from component ladders is not a local search), so instead I have modified the NIH3D script to prevent the secondary-structure calculation from happening (with "structure.ss_assigned = True") for structures where ribbon presets will not be used. You may have to poke Michal to get the pull request merged into the master branch.

Note: See TracTickets for help on using tickets.