Hi Louris -

If your view is centered on the atom from which you would like to draw the 
line, and oriented the way you want it, you can achieve something similar to 
what it sounds like you want with the following commands.

center myAtom
move x, -4           # `move` works in camera space
pseudoatom myMarker  # creates a pseudoatom called “marker” at the center of 
the screen
move x, 4            # move it back
distance myLine, myAtom, myMarker

To customize the line, have a look at the dash_* settings.  You can show the 
pseudoatom as a sphere as well.  If you want to draw something else (triangle, 
square, etc.) rather than a sphere, you’ll have to do it as a CGO, and the 
“axes.py" script Takanori suggested will be helpful.  You can get the 
coordinates of the pseudoatom using 
iterate_state<http://www.pymolwiki.org/index.php/Iterate_state>.

Hope that helps.

Cheers,
Jared

--
Jared Sampson
Xiangpeng Kong Lab
NYU Langone Medical Center
http://kong.med.nyu.edu/






On Nov 19, 2014, at 7:14 AM, Feitsma, L.J. 
<l.j.feit...@uu.nl<mailto:l.j.feit...@uu.nl>> wrote:

Hi all,

I have a small question about transformations with the view matrix in pymol, 
since I’m not very familiar with the architecture of the matrix.

E.g. I take some coordinates [x1,y1,z1], and using cgo objects, I want to draw 
a line/triangle/square to a point distance 4 to the right on the screen (so not 
4 in object x-coördinates!).
How can I use the information in [0:8] of the view matrix to calculate object 
coordinates [x2, y2, z2] needed to draw the line between [x1, y1, z1] and [x2, 
y2, z2]?

Does anyone has an example script, or link about which matrix operation I need 
for this?

Kind regards,

Louris Feitsma

Crystal and Structural Chemistry

Utrecht University

Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539182

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk_______________________________________________
PyMOL-users mailing list 
(PyMOL-users@lists.sourceforge.net<mailto:PyMOL-users@lists.sourceforge.net>)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to