[chimerax-users] Model number of geometric objects(axes, planes)
Eric Pettersen
pett at cgl.ucsf.edu
Wed May 11 10:46:37 PDT 2022
Hi Shubham,
The define command returns the plane and axes models created, so you could use those to get the model specifier for the angle command. The "define plane" command always returns a single plane model, whereas the "define axis" command returns a list of axes models, which might contain only a single axis, depending on what arguments you gave to the "define axis" command.
So as an example, assuming you had some atoms selected, here's some code that creates an axis and a plane and measures the angle between them:
from chimerax.core.commands import run
p = run(session, "define plane sel")
axes = run(session, "define axis sel")
axis = axes[0]
angle = run(session, "angle " + p.atomspec + " " + axis.atomspec)
--Eric
> On May 11, 2022, at 4:33 AM, Shubham Devesh Ramgoolam via ChimeraX-users <chimerax-users at cgl.ucsf.edu> wrote:
>
> Hi,
> I hope you are doing well.
>
> I am writing a python script to do the following:
> Define planes and axes
> Measure the angle between specific planes and between specific plane and axis
>
> The issue I am facing is that I need the model number of these geometric objects when using the command angle. Is there a command that will give the model number of the geometric objects? (In chimera, I would assign a number to the geometric objects when defining them and I would refer to it in the command angle. In chimeraX, I could assign a name to the geometric object but the command angle accept only model number for axes and planes.)
>
> Regards,
> Shubham
>
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows
>
> _______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220511/eea456bb/attachment.html>
More information about the ChimeraX-users
mailing list