Can α-carbon trace and bond be adjust for PBC?

Hi, I want to use ChimeraX to visualize the protein slab simulation in the condensed phase as the link below. Unlike typical protein simulations, simulations of the condensed phase slab often need to keep the atoms inside the box for more accurate visualization. This means that particles between proteins may be jumping, leading to unreasonable lines appearing in the visualization. I have not found a way to adjust this in ChimeraX. https://www.biorxiv.org/content/10.1101/2020.08.05.237008v1.full Is there a way to limit the maximum distance between carbon and bond among particles? Thanks!

Hi, So, as I understand it you are saying that molecules are being split across the periodic boundary and ChimeraX is drawing the bonds that cross the boundary all the way through the box and you would like to suppress that. There is no builtin way to do that, but it is a very simple piece of Python code, namely: too_long = 10.0 from chimerax.atomic import all_atomic_structures for s in all_atomic_structures(session): bonds = s.bonds bonds.displays = bonds.lengths < too_long The above code would hide bonds longer than 10 angstroms. It you put that code in a file (say, hide_long.py in your home folder), then you could run it every frame with the perframe <https://www.cgl.ucsf.edu/chimerax/docs/user/commands/perframe.html> command, e.g. “perframe “open ~/hide_long..py”. I have attached a file containing the above code for convenience. --Eric Eric Pettersen UCSF Computer Graphics Lab 
On Mar 24, 2024, at 12:52 PM, qz.chen--- via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi,
I want to use ChimeraX to visualize the protein slab simulation in the condensed phase as the link below. Unlike typical protein simulations, simulations of the condensed phase slab often need to keep the atoms inside the box for more accurate visualization. This means that particles between proteins may be jumping, leading to unreasonable lines appearing in the visualization. I have not found a way to adjust this in ChimeraX.
https://www.biorxiv.org/content/10.1101/2020.08.05.237008v1.full
Is there a way to limit the maximum distance between carbon and bond among particles?
Thanks! _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Thank you, this is very helpful. I've been trying to adjust the settings for the cartoon display on my own, but I've found that the cartoon display is an attribute of residues and does not have a 'length' attribute. Is there a simple method for this, or does it require computing the distances through code?

The situation for cartoon display is more complicated and there may not be a good solution. The cartoon path is computed as a spline along the backbone atoms, and may look very bad if there is a huge discontinuity in the backbone atom positions. The typical solution in this case is to reimage the simulation to keep bonded entities together as they cross the periodic boundary, which I understand is something you don’t want to do. So here is some code to suppress the cross-box parts of a cartoon, though I have no idea if the result will look okay or not. too_long = 10.0 from chimerax.atomic import all_atomic_structures, concatenate for s in all_atomic_structures(session): bonds = s.bonds long_bonds = bonds.filter(bonds.lengths > too_long) atoms1, atoms2 = long_bonds.atoms atoms = atoms1.merge(atoms2) long_residues = atoms.unique_residues s.residues.ribbon_displays = True long_residues.ribbon_displays = False Hope this helps. —Eric
On Mar 25, 2024, at 5:26 PM, qz.chen--- via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Thank you, this is very helpful. I've been trying to adjust the settings for the cartoon display on my own, but I've found that the cartoon display is an attribute of residues and does not have a 'length' attribute. Is there a simple method for this, or does it require computing the distances through code? _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/

Yes, this can only affect part of the ribbon. Even the affected ribbon is only partially hidden. Anyway, thank you very much!

Eric's fix hides the bonds that stretch across your simulation periodic box and the ribbon for one residue on each side of the jump. That won't completely fix the ribbons which use a spline guided by the ribbon C-alpha positions because the smooth spline distorts the ribbon for several several residues near the jump. If you hide the ribbon for just one residue on each side of the jump there will still be some rather distorted ribbon ends, but if you hide two residues on each side of the jump it mostly looks ok. Here are images hiding no ribbon residues, hiding 1 ribbon residue, and hiding 2 ribbon residues. Eric's Python script would need some more fancy code to hide two residues on each side of the jump. Tom Example of distorted ribbon where protein jumps from one side of periodic box to the other. Top shows full ribbon, middle shows ribbon hidden for one residue on each side of jump, bottom shows ribbon hidden for two residues on each sideof jump.
On Mar 25, 2024, at 6:19 PM, qz.chen--- via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Yes, this can only affect part of the ribbon. Even the affected ribbon is only partially hidden. Anyway, thank you very much! _______________________________________________ ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu Archives: https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
participants (3)
-
Eric Pettersen
-
qz.chen@tamu.edu
-
Tom Goddard