Questions about match and view commands

Dear ChimeraX users! I am performing a visualization of the ensemble of conformers for the same protein defined in the chimerax as models #1 to #6. Here are some of my questions: 1 - I try to superimpose all structures to the first model using match #2-5 to #1 is it possible to use some regular expression instead of #2-5 to select all models from the second to the last e.g. to superimpose all structures to the first one in the script. 2 - I try to automatically orient the superimposed models along its principal axe in one command e.g. using view orient but it does not produce a proper orientation. What kind of trick could work for a nanobody object to orient it automatically e,g, along Z ? Many thanks in advance Enrico

Hello, (1) match #2-end to #1 This is a general capability for ordered ranges (not specifically for matchmaker command, but many commands that use atomspecs), to use the word "start" or "end" and is explained in the command-line specification page here: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html#lists> (2) I don't know what your nanobody object is. If it is a set of atoms (or fake atoms, i.e. markers): (a) you could use "view" with "zalign" option to align based on two of the atoms (b) if you need to use all the atoms (or >2) to define the axis, you could first use "define axis" to define an axis object from the set of atoms, and then specify the axis object with the "zalign" option mentioned above. See: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#initial> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/define.html#axis> If it's not a set of atoms, but you know x,y,z coordinates to define the axis, you could supply the coordinates to the "define axis" command instead of atoms, then proceed as in 2b above. 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 Feb 12, 2025, at 10:12 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear ChimeraX users!
I am performing a visualization of the ensemble of conformers for the same protein defined in the chimerax as models #1 to #6. Here are some of my questions:
1 - I try to superimpose all structures to the first model using match #2-5 to #1
is it possible to use some regular expression instead of #2-5 to select all models from the second to the last e.g. to superimpose all structures to the first one in the script.
2 - I try to automatically orient the superimposed models along its principal axe in one command e.g. using view orient but it does not produce a proper orientation. What kind of trick could work for a nanobody object to orient it automatically e,g, along Z ?
Many thanks in advance
Enrico

Thank you very much Elaine ! Here are just some things to refine ;-) (1) your command works very well ! I've tried to adapt it in reverse order to align all structures to the last one (using end keyword), which does not work: #match #1-5 to end (2) This is an immunoglobulin object (pdb id 1IGT) - i have tried to compute the centroid and use it with "view" but still could not orient it properly .. All the best Enrico Il giorno mer 12 feb 2025 alle ore 20:45 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
Hello, (1) match #2-end to #1
This is a general capability for ordered ranges (not specifically for matchmaker command, but many commands that use atomspecs), to use the word "start" or "end" and is explained in the command-line specification page here: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html#lists>
(2) I don't know what your nanobody object is.
If it is a set of atoms (or fake atoms, i.e. markers): (a) you could use "view" with "zalign" option to align based on two of the atoms (b) if you need to use all the atoms (or >2) to define the axis, you could first use "define axis" to define an axis object from the set of atoms, and then specify the axis object with the "zalign" option mentioned above. See: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#initial> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/define.html#axis>
If it's not a set of atoms, but you know x,y,z coordinates to define the axis, you could supply the coordinates to the "define axis" command instead of atoms, then proceed as in 2b above.
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 Feb 12, 2025, at 10:12 AM, Enrico Martinez via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Dear ChimeraX users!
I am performing a visualization of the ensemble of conformers for the same protein defined in the chimerax as models #1 to #6. Here are some of my questions:
1 - I try to superimpose all structures to the first model using match #2-5 to #1
is it possible to use some regular expression instead of #2-5 to select all models from the second to the last e.g. to superimpose all structures to the first one in the script.
2 - I try to automatically orient the superimposed models along its principal axe in one command e.g. using view orient but it does not produce a proper orientation. What kind of trick could work for a nanobody object to orient it automatically e,g, along Z ?
Many thanks in advance
Enrico

Hi Enrico, For the first point, you can use this command mm ~#1 to #1. For the second point, if you know which atoms you want to align along z, you can use view zalign atom-spec-1 atom-spec-2 Best, Matthias From: Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> Date: Wednesday, February 12, 2025 at 19:15 To: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu> Subject: [chimerax-users] Questions about match and view commands Dear ChimeraX users! I am performing a visualization of the ensemble of conformers for the same protein defined in the chimerax as models #1 to #6. Here are some of my questions: 1 - I try to superimpose all structures to the first model using match #2-5 to #1 is it possible to use some regular expression instead of #2-5 to select all models from the second to the last e.g. to superimpose all structures to the first one in the script. 2 - I try to automatically orient the superimposed models along its principal axe in one command e.g. using view orient but it does not produce a proper orientation. What kind of trick could work for a nanobody object to orient it automatically e,g, along Z ? Many thanks in advance Enrico

As explained in the help link I sent before, you cannot use "end" by itself, it is for use in ranges. Also as mentioned previously, you would need "define axis" not "define centroid" Elaine
On Feb 13, 2025, at 3:46 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
Thank you very much Elaine !
Here are just some things to refine ;-)
(1) your command works very well ! I've tried to adapt it in reverse order to align all structures to the last one (using end keyword), which does not work: #match #1-5 to end
(2) This is an immunoglobulin object (pdb id 1IGT) - i have tried to compute the centroid and use it with "view" but still could not orient it properly ..
All the best
Enrico
Il giorno mer 12 feb 2025 alle ore 20:45 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: Hello, (1) match #2-end to #1
This is a general capability for ordered ranges (not specifically for matchmaker command, but many commands that use atomspecs), to use the word "start" or "end" and is explained in the command-line specification page here: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html#lists>
(2) I don't know what your nanobody object is.
If it is a set of atoms (or fake atoms, i.e. markers): (a) you could use "view" with "zalign" option to align based on two of the atoms (b) if you need to use all the atoms (or >2) to define the axis, you could first use "define axis" to define an axis object from the set of atoms, and then specify the axis object with the "zalign" option mentioned above. See: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#initial> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/define.html#axis>
If it's not a set of atoms, but you know x,y,z coordinates to define the axis, you could supply the coordinates to the "define axis" command instead of atoms, then proceed as in 2b above.
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 Feb 12, 2025, at 10:12 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear ChimeraX users!
I am performing a visualization of the ensemble of conformers for the same protein defined in the chimerax as models #1 to #6. Here are some of my questions:
1 - I try to superimpose all structures to the first model using match #2-5 to #1
is it possible to use some regular expression instead of #2-5 to select all models from the second to the last e.g. to superimpose all structures to the first one in the script.
2 - I try to automatically orient the superimposed models along its principal axe in one command e.g. using view orient but it does not produce a proper orientation. What kind of trick could work for a nanobody object to orient it automatically e,g, along Z ?
Many thanks in advance
Enrico

Okay, thank you very much ! So presently, there is no keyword which would automatically select the last model, isn't it ? Enrico Il giorno gio 13 feb 2025 alle ore 17:28 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
As explained in the help link I sent before, you cannot use "end" by itself, it is for use in ranges.
Also as mentioned previously, you would need "define axis" not "define centroid"
Elaine
On Feb 13, 2025, at 3:46 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
Thank you very much Elaine !
Here are just some things to refine ;-)
(1) your command works very well ! I've tried to adapt it in reverse order to align all structures to the last one (using end keyword), which does not work: #match #1-5 to end
(2) This is an immunoglobulin object (pdb id 1IGT) - i have tried to compute the centroid and use it with "view" but still could not orient it properly ..
All the best
Enrico
Il giorno mer 12 feb 2025 alle ore 20:45 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: Hello, (1) match #2-end to #1
This is a general capability for ordered ranges (not specifically for matchmaker command, but many commands that use atomspecs), to use the word "start" or "end" and is explained in the command-line specification page here: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html#lists>
(2) I don't know what your nanobody object is.
If it is a set of atoms (or fake atoms, i.e. markers): (a) you could use "view" with "zalign" option to align based on two of the atoms (b) if you need to use all the atoms (or >2) to define the axis, you could first use "define axis" to define an axis object from the set of atoms, and then specify the axis object with the "zalign" option mentioned above. See: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#initial> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/define.html#axis>
If it's not a set of atoms, but you know x,y,z coordinates to define the axis, you could supply the coordinates to the "define axis" command instead of atoms, then proceed as in 2b above.
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 Feb 12, 2025, at 10:12 AM, Enrico Martinez via ChimeraX-users < chimerax-users@cgl.ucsf.edu> wrote:
Dear ChimeraX users!
I am performing a visualization of the ensemble of conformers for the same protein defined in the chimerax as models #1 to #6. Here are some of my questions:
1 - I try to superimpose all structures to the first model using match #2-5 to #1
is it possible to use some regular expression instead of #2-5 to select all models from the second to the last e.g. to superimpose all structures to the first one in the script.
2 - I try to automatically orient the superimposed models along its principal axe in one command e.g. using view orient but it does not produce a proper orientation. What kind of trick could work for a nanobody object to orient it automatically e,g, along Z ?
Many thanks in advance
Enrico

There is "last-opened" as explained in the help <https://rbi.ucsf.edu/chimerax/docs/user/commands/atomspec.html#builtin> For example: select last-opened That isn't necessarily the same as the highest model number but maybe it will work for your situation. Elaine
On Feb 15, 2025, at 3:11 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Okay, thank you very much !
So presently, there is no keyword which would automatically select the last model, isn't it ?
Enrico
Il giorno gio 13 feb 2025 alle ore 17:28 Elaine Meng <meng@cgl.ucsf.edu> ha scritto:
As explained in the help link I sent before, you cannot use "end" by itself, it is for use in ranges.
Also as mentioned previously, you would need "define axis" not "define centroid"
Elaine
On Feb 13, 2025, at 3:46 AM, Enrico Martinez <jmsstarlight@gmail.com> wrote:
Thank you very much Elaine !
Here are just some things to refine ;-)
(1) your command works very well ! I've tried to adapt it in reverse order to align all structures to the last one (using end keyword), which does not work: #match #1-5 to end
(2) This is an immunoglobulin object (pdb id 1IGT) - i have tried to compute the centroid and use it with "view" but still could not orient it properly ..
All the best
Enrico
Il giorno mer 12 feb 2025 alle ore 20:45 Elaine Meng <meng@cgl.ucsf.edu> ha scritto: Hello, (1) match #2-end to #1
This is a general capability for ordered ranges (not specifically for matchmaker command, but many commands that use atomspecs), to use the word "start" or "end" and is explained in the command-line specification page here: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/atomspec.html#lists>
(2) I don't know what your nanobody object is.
If it is a set of atoms (or fake atoms, i.e. markers): (a) you could use "view" with "zalign" option to align based on two of the atoms (b) if you need to use all the atoms (or >2) to define the axis, you could first use "define axis" to define an axis object from the set of atoms, and then specify the axis object with the "zalign" option mentioned above. See: <https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#initial> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/define.html#axis>
If it's not a set of atoms, but you know x,y,z coordinates to define the axis, you could supply the coordinates to the "define axis" command instead of atoms, then proceed as in 2b above.
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 Feb 12, 2025, at 10:12 AM, Enrico Martinez via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:
Dear ChimeraX users!
I am performing a visualization of the ensemble of conformers for the same protein defined in the chimerax as models #1 to #6. Here are some of my questions:
1 - I try to superimpose all structures to the first model using match #2-5 to #1
is it possible to use some regular expression instead of #2-5 to select all models from the second to the last e.g. to superimpose all structures to the first one in the script.
2 - I try to automatically orient the superimposed models along its principal axe in one command e.g. using view orient but it does not produce a proper orientation. What kind of trick could work for a nanobody object to orient it automatically e,g, along Z ?
Many thanks in advance
Enrico
_______________________________________________ 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)
-
Elaine Meng
-
Enrico Martinez
-
Vorländer,Matthias Kopano