Opened 7 years ago

Last modified 3 years ago

#1242 accepted enhancement

Straight helix tubes

Reported by: Elaine Meng Owned by: pett
Priority: moderate Milestone:
Component: Depiction Version:
Keywords: Cc: Tom Goddard
Blocked By: Blocking:
Notify when closed: Platform: all
Project: ChimeraX

Description

Want to show straight helix tubes in cartoon display style.

Change History (7)

comment:1 by Elaine Meng, 5 years ago

Owner: changed from Conrad Huang to Tom Goddard

comment:2 by pett, 5 years ago

Reporter: changed from eustermann@… to Elaine Meng

Reporter email address no longer valid

comment:3 by Elaine Meng, 3 years ago

Has been requested a few times, such as today:

From: 王超(Chao Wang) via ChimeraX-users <chimerax-users@…>
Subject: [chimerax-users] Can I change the curved cylinder into a straight one?
Date: August 26, 2022 at 7:47:06 PM PDT
To: "chimerax-users" <chimerax-users@…>
Reply-To: 王超(Chao Wang) <wangc@…>

Dear All,
After displaying helix in cylinder mode, I found that it is curved by default. I would like to ask whether it can be changed to a straight shape with two ends as fulcrums or other straight way?
Thanks,
Chao.

see also ticket #2489 control helix curvature

comment:4 by Tom Goddard, 3 years ago

Cc: Tom Goddard added
Owner: changed from Tom Goddard to pett

The ribbon code can easily show helices as straight cylinders. It may not produce the best cylinder end points resulting in somewhat weird appearance where the coil at the end of the cylinder joins on the side of the cylinder instead of the end cap. That doesn't seem to happen too often.

The main work to allow straight helix cylinders is that the C++ Structure class needs to support that mode. There would need to be a new ribbon style, Structure.ribbon_mode_style = RIBBON_MODE_CYLINDER, saved in sessions, and the cartoon style command would need to accept that for the modeHelix option. Then a few lines changed in the ribbon calculation code could use it.

I'll reassign to Eric to add this to the C++ Structure code and session saving if he thinks it is worth doing. If it is done, reassign to me and I can fix the cartoon command and make the calculation produce the straight cylinders.

Last edited 3 years ago by Tom Goddard (previous) (diff)

comment:5 by pett, 3 years ago

Status: assignedaccepted

comment:6 by Elaine Meng, 3 years ago

As a temporary workaround (until we have the better solution in the cartoon command) you could try "define axis" with "perHelix true" and some padding value to show straight cylinders for helices, and then hide the ribbon. The main problem with this workaround is that the other parts of the ribbon do not connect well to the straight cylinders in some places.

Example:
open 2gbp
hide atoms
define axis perhelix true padding 2.0
hide helix ribbon

Also if you only care about one specific helix, you can hide all of the other straight cylinders and only hide the ribbon for the specific residues in that helix.

comment:7 by Tom Goddard, 3 years ago

If you want to modify the Python code in your ChimeraX distribution you can change one line and it will always produce straight helix tubes. The line is 154 in file

ChimeraX.app/Contents/lib/python3.9/site-packages/chimerax/atomic/sse.py

on Mac (different location on Windows and Linux, ask if you can't find it) change

MIN_CURVE_LENGTH = 13

to

MIN_CURVE_LENGTH = 1300

This parameter controls the minimum length of a tube helix in residues that will be fit to a curve.

Note: See TracTickets for help on using tickets.