[chimerax-users] view and the center of mass of the selection
Elaine Meng
meng at cgl.ucsf.edu
Wed Jan 19 12:32:01 PST 2022
Sorry no, you cannot use the centroid model name in the turn command.
However, you could make the centroid a named selection using the "name" command. That selector name should not have an underscore character, however. It could have a hyphen, as in this example:
name lig-com #1.1.3
turn y 30 center lig-com
color lig-com white
hide lig-com
If you use that approach, you would still have to put the model number one time in the script, but then all the other places can use the name of the named selection.
name command:
<https://rbvi.ucsf.edu/chimerax/docs/user/commands/name.html>
By the way, instead of making a centroid model, you could just use "ligand" or any other specification of multiple atoms as the center in the turn command. This was mentioned in the help links I sent you in the previous message below. However, the rotation will use the center of the bounding box of those atoms rather than the geometric centroid. If that is good enough, however, it could save you some steps.
I hope this helps,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
> On Jan 19, 2022, at 3:33 AM, Enrico Martinez <jmsstarlight at gmail.com> wrote:
>
> Thank you Elaine!
> I did it like this:
>
> # calculate com for the ligand
> define centroid ligand name lig_com
> # then view the new model of the centroid
> view #1.1.3 orient clip false; turn z 90; turn y 45; turn x -90; turn x 77
> wait
>
> one question: I have not found a way to use the "view" with the name
> of the model "lig_com", always operating with the model number
> (#1.1.3). May I use "lig_com" for the same operation?
> Cheers
> Enrico
>
> вт, 18 янв. 2022 г. в 19:45, Elaine Meng <meng at cgl.ucsf.edu>:
>>
>> Just look at the help for the "turn" command... it has a "center" option that lets you specify the center of rotation to use during the turn. The "center" can be given in several ways, including as x,y,z.
>>
>> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/turn.html>
>> <https://rbvi.ucsf.edu/chimerax/docs/user/commands/pointspec.html#point>
>>
>> Best,
>> Elaine
>> -----
>> Elaine C. Meng, Ph.D.
>> UCSF Chimera(X) team
>> Department of Pharmaceutical Chemistry
>> University of California, San Francisco
>>
>>
>>> On Jan 18, 2022, at 3:28 AM, Enrico Martinez via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>>>
>>> Dear ChimeraX users!
>>> I am using view command to center the camera on the ligand
>>> an then, to rotate th whole system to the desired position:
>>> view #1.1 & ligand orient clip false; turn z 90; turn y 45; turn x
>>> -90; turn x 77
>>> may I rather center the camera on the center of mass of the ligand
>>> calculated using
>>> measure center ligand
>>> If so, how may I combine the both commands together?
>>> Thank you in advance!
>>> Enrico
>>
>
More information about the ChimeraX-users
mailing list