[chimerax-users] Model number of geometric objects(axes, planes)

Shubham Devesh Ramgoolam sdramgoolam at uwaterloo.ca
Wed May 11 20:23:54 PDT 2022


Thank you so much Eric. I appreciate it.

Shubham.

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows

From: Eric Pettersen<mailto:pett at cgl.ucsf.edu>
Sent: Wednesday, May 11, 2022 22:15
To: Shubham Devesh Ramgoolam<mailto:sdramgoolam at uwaterloo.ca>
Cc: chimerax-users at cgl.ucsf.edu<mailto:chimerax-users at cgl.ucsf.edu>
Subject: Re: [chimerax-users] Model number of geometric objects(axes, planes)

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<mailto:chimerax-users at cgl.ucsf.edu>> wrote:

Hi,
I hope you are doing well.

I am writing a python script to do the following:

  1.  Define planes and axes
  2.  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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220512/f6caabdc/attachment.html>


More information about the ChimeraX-users mailing list