Hello Tsjerk,
I can use the function and commands. print clipped(clipsed) - but not
print clipped(3lzt) - shows the indices of the atoms between the
clipping planes
Tsjerk Wassenaar wrote:
Hi Johannes,
Coincidentally, I found myself in need of the same functionality the
other day. I came
Hi Johannes,
I can use the function and commands. print clipped(clipsed) - but not
print clipped(3lzt) - shows the indices of the atoms between the clipping
planes
print clipped(3lzt) should print the indices of atoms that are
clipped off by the clipping planes. That works for me, but in
Hi Johannes,
Coincidentally, I found myself in need of the same functionality the
other day. I came up with this:
from pymol import cmd
def clipped_by(at,v):
x,y,z = at.coord
nz = v[2]*(x-v[12])+v[5]*(y-v[13])+v[8]*(z-v[14])-v[11]
return nz v[15] and nz v[16]
def
Hi Johannes,
My guess is that you missed that get_view[0:8] is a _column-major_
rotation matrix. Transpose it before using it.
I decided to take a look at this problem for preparation of better
clipping planes in PyMOL. I got it to work in PyMOL using Python,
after much fussing about.
Here's
Jason Vertrees wrote:
Having said this, you can however, can get the clipping information
from PyMOL and write scripts against that yourself to determine atom
inclusion. See get_view (http://www.pymolwiki.org/index.php/Get_View)
for more help.
Hi Jason,
thank you again for the hint.
Hi Johannes,
It's not that hard. The clipping planes are defined by the z coordinate (in
the viewing matrix). So you can get the atoms for a selection, transform to
get the new z coordinate only, and check whether it's in between the planes:
m = cmd.get_model(selection).atom
v = cmd.get_view()
m
Tsjerk Wassenaar wrote:
Hi Johannes,
It's not that hard. The clipping planes are defined by the z
coordinate (in the viewing matrix). So you can get the atoms for a
selection, transform to get the new z coordinate only, and check
whether it's in between the planes:
m =
Hi Johannes,
PyMOL's awareness of and capabilities surrounding clipping planes does
not allow this functionality. Improving clipping planes is a higher
priority, so I hope to have this updated in the near future.
Having said this, you can however, can get the clipping information
from PyMOL and