[chimerax-users] Align with specific atoms (but against all other molecules)
Elaine Meng
meng at cgl.ucsf.edu
Sun Nov 27 11:09:07 PST 2022
Hi Doo Nam,
As far as I know you will have to use the 99 commands. Even if you use the python method to call the commands, it will still be 99 commands. If you just meant that it is too hard to make the command script with 99 commands and you want to know the python to loop 99 times instead, somebody else will have to advise (I don't know python).
Or, if the main reason is display:
If you are trying to make a movie and show them all apart and then all together in a single command without showing them moving one by one, I recommend saving the view ("view name" etc.) before you match them, matching them (with 99 commands), saving another view in the matched position ("view name" again) and then saving a session. Then for your movie you can restore that session, which will contain the 2 views with the names you assigned them, and your movie script can use the "view" command to switch between these two positions.
saving and restoring views (positions)
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/view.html#name>
saving session
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/save.html#session>
I hope hope this helps,
Best,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Nov 26, 2022, at 1:49 PM, Kim, Doo Nam via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> Hi,
>
> I’ve used
>
> align #2/X:1 @CA,O,C,N to #1/X:1 @CA,O,C,N
> align #3/X:1 @CA,O,C,N to #1/X:1 @CA,O,C,N
> align #4/X:1 @CA,O,C,N to #1/X:1 @CA,O,C,N
> …
>
> to align
> #2 molecule against #1 molecule with backbone atoms
> #3 molecule against #1 molecule with backbone atoms
> #4 molecule against #1 molecule with backbone atoms
> etc…
>
>
> However, how can I align all rest molecules (e.g. #2~#100) against #1 molecule
> with backbone atoms at once in chimeraX?
>
>
> I’ve used
> align all toAtoms #1 matchAtomNames true
> align all toAtoms #1 matchNumbering true
>
> to align all molecules to #1 molecule at once.
> However, with this command, I cannot specify to use backbone atoms (e.g. CA,O,C,N) only when aligning.
>
>
> I think that there should a 1 line command that aligns all molecules with specific atoms only
> or there is chimeraX equivalent python script as
>
> from chimera import runCommand as rc # use 'rc' as shorthand for runCommand
> from chimera import replyobj # for emitting status messages
>
> Best,
> Doo Nam
More information about the ChimeraX-users
mailing list