Hi Nusrat, One further idea is that if your structures are always symmetric around a long axis, you could use the “define axis” command to create an object representing that axis, and use the object to orient your structure and to rotate around. For instance, with the session you provided the following commands would define the axis, orient the structure so the axis is vertical, and rotate around the axis: define axis #1 view #1.1 zalign #1.1 turn x -90 center #1.1 view roll #1.1 You can hide the axis object with “hide #1.1”. --Eric Eric Pettersen UCSF Computer Graphics Lab
On Apr 11, 2026, at 6:56 AM, Nusrat Tazkia via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Hi Elaine,
Thank you for your detailed responses! I'll try them out!
Thank you,
Nusrat Tazkia
________________________________________ From: Elaine Meng <meng@cgl.ucsf.edu> Sent: Friday, April 10, 2026 10:13 PM To: Nusrat Tazkia <ntazk024@uottawa.ca> Cc: chimerax-users <chimerax-users@cgl.ucsf.edu> Subject: Re: [chimerax-users] Help with command-line orientation of structure in ChimeraX
Attention : courriel externe | external email
Oooh, one more idea that might actually get you to a commands-only approach with less tedium is to use the command "view" with the "zalign" option. For example, if you know two atoms you want to define the vertical axis of your standard position, you could specify them in "view" with the "zalign" option (which aligns the two atoms front to back) followed by a 90-degree "turn". You may also want to use "view" to center the viewport on specific atoms, in addition to orientation with its "zalign" option.
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#initial> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/turn.html>
Elaine
On Apr 10, 2026, at 6:22 PM, Elaine Meng <meng@cgl.ucsf.edu> wrote:
Dear Nusrat, These are common yet tricky issues when dealing with a series of related structures. I don't have simple answers because the problems are actually somewhat complex, but here is how I've dealt with them in my own projects:
(1) trying to get the "same" position of multiple related structures. The only way I know of is to match them to a reference structure which can then be hidden. You would manually get the reference structure into the position that you want, and then save a session. Then starting with this saved session with this reference structure, for each other structure, open that structure, match to existing reference structure, hide reference structure (if not already hidden). Or if you know the complete set of similar structures, another possibility would be to have all of them at the same time in the same session, matched to the same reference, and for each image of one structure, just hide all the other structures (e.g. Shown checkboxes in Models panel).
Using only commands and not a saved session is generally rather difficult. You would have to use an iterative process of opening a structure and entering a bunch of rotate (turn) and translate (move) commands until you get it into the position that you want, and saving these commands as you go, and that is quite tedious and time-consuming. Even after that, the set of saved commands may be useless for a different structure unless its coordinates start out already matched to the first structure.
(2) the rotation you expect. These structures are not spheres so the automatically computed rotation center may not be where you would want it to be. If you can figure out the center you want, you can specify it (e.g. a specific atom in the structure) in the turn command. Another issue is that the default view is perspective, so if the structure center is not the view center, the result of rotation can seem "off" somehow. You could try turning off perspective (command: camera ortho) and see if that helps. I'm not sure why you say there is a tilt, it may be that when you start the rotation, the tilt is front/back and you can't see it until 90 degrees later. You can show the Side View and maybe that will help you get the initial orientation to be truly upright.
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Resource for Biocomputing, Visualization, and Informatics Department of Pharmaceutical Chemistry University of California, San Francisco
On Apr 10, 2026, at 5:50 PM, Nusrat Tazkia via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear ChimeraX Support Team,
I hope you are doing well.
I am currently working with spike protein structures in ChimeraX and would like to orient them in a consistent and reproducible way using command-line instructions. Specifically, I am trying to “straighten” the structure so that the receptor-binding domain (RBD) is oriented upwards, without relying on manual mouse adjustments.
The RBD in my structure corresponds to residues 319–541 (chains A, B and C).
I have been using commands such as 'measure inertia', 'view', and 'turn', but I am having difficulty determining the exact sequence needed to achieve a clean and consistent orientation.
I have attached a .cxs session file showing my current structure and preferred manual orientation. I actually have many similar .cxs files, so I am looking for a command-line approach that will reliably produce the same orientation across all of them.
Additionally, when I use 'movie encode' to generate a rotation, I notice that the structure slightly tilts to the left or right during rotation. I would like the structure to remain perfectly straight and spin cleanly along a single axis (ideally the y-axis), without any unintended tilt.
Would it be possible for you to suggest the appropriate commands (or workflow) to reproduce this view consistently and achieve a stable, axis-aligned rotation?
Thank you very much for your time and support.
Kind regards,
Nusrat Tazkia<mut_70_model.cxs>_______________________________________________ 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/
_______________________________________________ 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/