6
$\begingroup$

Is there a way to show the orientation axis in Pymol?

It's something like this in VMD. I much prefer Pymol rendering.

enter image description here

$\endgroup$

2 Answers 2

5
$\begingroup$

As far as I know, there is no built in way to display the coordinate vectors. Fortunately, on the PyMOLWiki I was able to find a page with a number of scripts you can use to do this.

$\endgroup$
3
  • 1
    $\begingroup$ Could you add one of the solutions that work? $\endgroup$
    – Camps
    Jun 24, 2022 at 11:27
  • $\begingroup$ Thanks for the feedback. I agree that adding it would improve my answer but I’m a little bit spooked by the licensing requirement $\endgroup$ Jun 25, 2022 at 8:45
  • $\begingroup$ At the end of that page is written: Content is available under GNU Free Documentation License 1.2 unless otherwise noted, so, I think that sharing here will be no problem. $\endgroup$
    – Camps
    Jun 27, 2022 at 20:35
2
$\begingroup$

The supplied answer is correct, but is script and I (a passerby, not OP or responder) wanted a copypaste in the GUI. To make the code okay for copy pasting (i.e. no multilines):

from pymol.cgo import CYLINDER, cyl_text
from pymol.vfont import plain

obj = [CYLINDER, 0., 0., 0., 10., 0., 0., 0.2, 1.0, 1.0, 1.0, 1.0, 0.0, 0., CYLINDER, 0., 0., 0., 0., 10., 0., 0.2, 1.0, 1.0, 1.0, 0., 1.0, 0.,CYLINDER, 0., 0., 0., 0., 0., 10., 0.2, 1.0, 1.0, 1.0, 0., 0.0, 1.0,]

cyl_text(obj,plain,[-5.,-5.,-1],'Origin',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])
cyl_text(obj,plain,[10.,0.,0.],'X',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])
cyl_text(obj,plain,[0.,10.,0.],'Y',0.20,axes=[[3,0,0],[0,3,0],[0,0,3]])

cmd.load_cgo(obj,'axes')

The change away from star import is because it is evil unless one knows what there is on the __all__ variable of that module. Nothing to do with PyMOL GUI faux-terminal.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .