Re: [PyMOL] Yaw, Pitch and Roll of CGO

2014-02-17 Thread Paweł Tomaszewski
Thank you Thomas
Using camera=0 caused my cone not to do rotations related to the camera
position.
Cone still rotates not about itself, but about axis of global coordinate
system.
Do you have any other ideas?

Cheers,
   Paweł


2014-02-06 17:00 GMT+01:00 Thomas Holder :

> Hi Pawel,
>
> have you tried using the camera=0 argument?
>
> cmd.rotate(axis, angle, object='yourcone', camera=0)
>
> Cheers,
>   Thomas
>
>
 On 05 Feb 2014, at 15:46, Павел Томашевский  wrote:
>
> > Hello
> > I've made a cone CGO (something like a pointer) and now I need to make a
> rotation of the cone. I have got yaw, pitch and roll angle values, but when
> I do 'rotate' command it rotates about axis of the global coordinate system.
> >
> > My question is, how to make a rotation of the CGO about axis that is NOT
> of the global pymol coordinate system but goes through the CGO itself?
> >
> > I hope it's clear what I mean ;)
> >
> > Thank you
> > Pawel
>
>
> --
> Thomas Holder
> PyMOL Developer
> Schrödinger, Inc.
>
>
--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&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

Re: [PyMOL] Yaw, Pitch and Roll of CGO

2014-02-18 Thread Paweł Tomaszewski
Jared, Thomas thank you guys!

Now everything works great :)
The solution was pretty simple and I don't know why it took me so long...
I have a X,Y and Z coordinates from my SensAble Pantom haptic device and
quaternions to do rotations of cone.

The problem was, that in 'translate' function I didn't use 'camera=0'
option, what in did in 'rotate'. Moreover I should set 'origin=[X,Y,Z]'
option as well as 'camera=0' in rotate option.

Now it work smoothly and pretty nice ;)

Thank you
Paweł



2014-02-18 19:40 GMT+01:00 Sampson, Jared :

>  Hi Pawel -
>
>  If you can determine the primary axis of the cone from the tip and the
> center of the circle at the base, you can give `rotate` an arbitrary
> [x,y,z] float vector as its first argument instead of x, y or z.  For
> example, if you generate your cone using something like the following
> Python script:
>
>  ### cone_cgo.py ###
>
>   from pymol.cgo import *
> from pymol import cmd
>
>  # set up the cone
> base_xyz = [1.0, 2.0, 3.0]
> tip_xyz = [4.0, 5.0, 6.0]
> base_radius = 1.0
> tip_radius = 0.0
> base_color = [0.9, 0.0, 0.0]
> tip_color = [0.0, 0.0, 0.9]
>
>  # calculate the cone axis
> cone_axis = [ tip_xyz[0]-base_xyz[0],
>   tip_xyz[1]-base_xyz[1],
>   tip_xyz[2]-base_xyz[2] ]
>
>  # print the axis to use later
> print cone_axis
>
>  # generate the cone CGO text
> obj = [CONE, base_xyz[0], base_xyz[1], base_xyz[2], tip_xyz[0],
> tip_xyz[1], tip_xyz[2], base_radius, tip_radius, base_color[0],
> base_color[1], base_color[2], tip_color[0], tip_color[1], tip_color[2], 1,
> 1]
>
>  # load it
> cmd.load_cgo(obj, 'cone')
>
>  # generate a pseudoatom for reference
> cmd.pseudoatom('point', pos=[2,5,4])
> cmd.show_as('nb_spheres', 'point')
>
>   ### end cone_cgo.py ###
>
>
>  and load it via `run cone_cgo.py`, then you can rotate the cone on its
> axis using, e.g.:
>
>  rotate [3,3,3], 10, object=cone, camera=0
>
>
>  Even with a radially symmetric cone surface, if you look closely, you
> can see the individual polygons changing at the cone base.  You can also
> rotate the scene around the cone axis with, e.g.:
>
>   rotate [3,3,3], 10
>
>
>  Hope that helps.
>
>  Cheers,
> Jared
>
> --
> Jared Sampson
> Xiangpeng Kong Lab
> NYU Langone Medical Center
> 550 First Avenue
> New York, NY 10016
> 212-263-7898
> http://kong.med.nyu.edu/
>
>
>
>
>
>
>  On Feb 17, 2014, at 2:40 PM, Paweł Tomaszewski 
> wrote:
>
>  Thank you Thomas
> Using camera=0 caused my cone not to do rotations related to the camera
> position.
> Cone still rotates not about itself, but about axis of global coordinate
> system.
> Do you have any other ideas?
>
>  Cheers,
>Paweł
>
>
> 2014-02-06 17:00 GMT+01:00 Thomas Holder :
>
>> Hi Pawel,
>>
>> have you tried using the camera=0 argument?
>>
>> cmd.rotate(axis, angle, object='yourcone', camera=0)
>>
>> Cheers,
>>   Thomas
>>
>>
>  On 05 Feb 2014, at 15:46, Павел Томашевский  wrote:
>>
>> > Hello
>> > I've made a cone CGO (something like a pointer) and now I need to make
>> a rotation of the cone. I have got yaw, pitch and roll angle values, but
>> when I do 'rotate' command it rotates about axis of the global coordinate
>> system.
>> >
>> > My question is, how to make a rotation of the CGO about axis that is
>> NOT of the global pymol coordinate system but goes through the CGO itself?
>> >
>> > I hope it's clear what I mean ;)
>> >
>> > Thank you
>> > Pawel
>>
>>
>>  --
>> Thomas Holder
>> PyMOL Developer
>> Schrödinger, Inc.
>>
>>
>
> --
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&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
>
>
>  
> This email message, including any attachments, is for the sole use of the
> intended recipient(s) and may contain information that is proprietary,
> confidential, and exempt from disclosure

Re: [PyMOL] WARNING: glDrawBuffer caused GL error on windows 7

2014-02-18 Thread Paweł Tomaszewski
Hi Camilo.

I've got the same error! But it seems, there's no simple solution for this.
Where do you have your PyMOL from?

Cheers
Pawel


2014-02-18 2:08 GMT+01:00 Camilo Andrés Jimenez Cruz <
camilo.jimen...@gmail.com>:

> Hi everybody
>
> I installed pymol 1.6.x unofficial in windows 7 home. As far as I have
> tested it works well, but the console (as in the screen that the GL window
> shows when I press escape) and the main window keep constantly showing the
> message
>
>  WARNING: glDrawBuffer caused GL error
>
> which is annoying because I can't see the help or any other output to
> there.
>
> Any ideas on how to tackle this?
>
> Thanks
>
> -- Camilo Jiménez
>
>
> --
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121054471&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
>
--
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&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

Re: [PyMOL] Yaw, Pitch and Roll of CGO

2014-02-18 Thread Paweł Tomaszewski
Jared, my haptic device is SensAble Phantom Omni and now it is called
Geomagic Touch. I work on integration it with PyMOL and VRPN.

So far so good, but now I have a little more complicated problem with
rotate and translate functions.

When I set camera=0 in both of them, it doesn't matter if I move the screen
with mouse or not - my cone rotations and translations are absolute to the
global origin.
But when I don't set camera=0 option translations of the cone still works
well but rotations don't.

I think this is because translate function gets coordinates that are not
absolute to the origin but it gets changes - I mean [dx, dy, dz], where
dx=|x-x0|, x is current position and x0 is previous position (the same with
dy and dz). On the other hand rotate function gets origin option params as
absolute values, here [x, y, z] are cone position. Now after turning camera
with mouse translations of the cone are relative to camera position but
origin of rotation is absolute to main coordinate system position.

In this situation I have two origins: origin of rotations that is equal to
position of the cone and some global PyMOL origin where everything begins.

I hope it's clear so far ;)

Now, is it possible to change the origin of rotation not with values that
are absolute to the global origin but with changes relative to it's
previous position. Or maybe I should ask: "Is it possible to CHANGE origin
of rotation, not to SET it?".

I know it's a little complicated to explain what I mean using words, but I
hope I succeeded here ;)

Cheers,
Paweł




2014-02-18 20:24 GMT+01:00 Sampson, Jared :

>  Hi Pawel -
>
>  Glad you were able to make it work.  Also, that haptic device (I guess
> the new version is the Geomagic Touch?) looks pretty neat.
>
>  I'm now realizing that when you asked "how to make a rotation of the CGO
> about axis that is NOT of the global pymol coordinate system but goes
> through the CGO itself" you probably didn't necessarily mean a rotation
> about the cone's primary axis, because that doesn't really do a whole lot
> unless your object isn't radially symmetric!
>
>  For correctness' sake, however, I need to amend my previous response.
>  It turns out I chose unfortunate values for the cone base and tip
> positions in my example, which resulted in the cone axis going through the
> global coordinate origin.  My previous attempt fails for cones that don't
> point at or away from the origin.  Whoops!
>
>  Thomas'  suggestion about the origin argument fixes it, though.  So for
> my example, I'd also need either the tip or the base position:
>
>  # print the values to use later
> print "tip_xyz = %s" % tip_xyz   # need this, too!
> print "axis = %s" % cone_axis
>
>
>  and then rotate the cone with, e.g.:
>
>  rotate [3,3,3], 10, object=cone, camera=0, origin=[4,5,6]
>
>
>  or everything with, e.g.:
>
>   rotate [3,3,3], 10, origin=[4,5,6]
>
>
>  Cheers,
> Jared
>
>  --
> Jared Sampson
> Xiangpeng Kong Lab
> NYU Langone Medical Center
> 550 First Avenue
> New York, NY 10016
> 212-263-7898
> http://kong.med.nyu.edu/
>
>
>
>
>
>
>  On Feb 18, 2014, at 2:04 PM, Paweł Tomaszewski 
>  wrote:
>
>  Jared, Thomas thank you guys!
>
> Now everything works great :)
> The solution was pretty simple and I don't know why it took me so long...
> I have a X,Y and Z coordinates from my SensAble Pantom haptic device and
> quaternions to do rotations of cone.
>
>  The problem was, that in 'translate' function I didn't use 'camera=0'
> option, what in did in 'rotate'. Moreover I should set 'origin=[X,Y,Z]'
> option as well as 'camera=0' in rotate option.
>
>  Now it work smoothly and pretty nice ;)
>
>  Thank you
> Paweł
>
>
>
> 2014-02-18 19:40 GMT+01:00 Sampson, Jared :
>
>> Hi Pawel -
>>
>>  If you can determine the primary axis of the cone from the tip and the
>> center of the circle at the base, you can give `rotate` an arbitrary
>> [x,y,z] float vector as its first argument instead of x, y or z.  For
>> example, if you generate your cone using something like the following
>> Python script:
>>
>>  ### cone_cgo.py ###
>>
>>   from pymol.cgo import *
>> from pymol import cmd
>>
>>  # set up the cone
>> base_xyz = [1.0, 2.0, 3.0]
>> tip_xyz = [4.0, 5.0, 6.0]
>> base_radius = 1.0
>> tip_radius = 0.0
>> base_color = [0.9, 0.0, 0.0]
>> tip_color = [0.0, 0.0, 0.9]
>>
>>  # calculate the cone axis
>> cone_axis = [ tip_xyz[0]-base_xyz[0],
>>   tip_xyz[1]-base_xyz[1],
>

[PyMOL] How to get TTT matrix in PyMOL 1.7.6?

2015-08-06 Thread Paweł Tomaszewski
Hello,
I've created a CGO in pymol script (a cone) and I need to make some
transformations on it. I've found that it is easier for me to modify a TTT
matrix rather than using translate/rotate functions.

Documentation says [http://www.pymolwiki.org/index.php/Get_object_matrix]
get_object_matrix is unsupported operation. So how to get/set TTT?

The problem is, that I get (from external source) position in quaternions
and now I need to make my CGO position equal to those quaternion. How can I
make it work?

Thanks
Paweł Tomaszewski
--
___
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

Re: [PyMOL] How to get TTT matrix in PyMOL 1.7.6?

2015-08-18 Thread Paweł Tomaszewski
Thanks Jared,
I have tried the transformations.py script, and here is what I've got:
- I get a quaternions from external source (a 3d manipulator) in a
classical form: [x,y,z,w]
- I use function: quaternion_matrix(quaternion) from transformations.py
script:

m = quaternion_matrix([x, y, z, w])# m is an array of an arrays (4x4)
M = [m[0,0], m[0,1], m[0,2], m[0,3], m[1,0], m[1,1], m[1,2], m[1,3],
m[2,0], m[2,1], m[2,2], m[2,3], m[3,0], m[3,1], m[3,2], m[3,3]]   # so i
need to convert it to a vector 16x1
cmd.transform_selection("all", M, homogenous=1)  # its time to apply the
vector into a transform_selection function; homogenous=0 also doesn't work
print M # print works fine ;)

But the function transform_selection does not work and I don't really know
why, rotation doesn't occur.
Maybe it's because the selection is wrong? On the scene I have a CGO (an
arrow) and even when I change the selection string from "all" to "arrow" it
doesn't rotate either.
What exactly is the "selection", could this be a CGO?

I have also noticed, that function cmd.rotate(...) works for my CGO "arrow"
when I set property object="arrow" and I put some arbitrary "hardcoded"
parameters (axis and angle).
Maybe the better way would be use this function?
But I'm not really sure which function from transformations.py script
should I use to convert quaternions to axis and angle params required by
cmd.rotate() function...
any ideas?

Cheers,
Pawel T.





2015-08-13 18:34 GMT+02:00 Sampson, Jared :

> Hi Paweł -
>
> Honestly, if you prefer to use matrices, I'd say just go ahead and use
> get_object_matrix; I doubt it's going away any time soon.  You may want to
> use this in combination with transform_selection
> <http://www.pymolwiki.org/index.php/Transform_selection>.
>
> Also maybe check out Christoph Gohlke's transformations.py script
> <http://www.pymolwiki.org/index.php/Transformations>.  It offers several
> tools for manipulating quaternions, matrices, and angle/axis operations.  I
> think there's also a newer version on his website, which is linked from the
> wiki page.
>
> Cheers,
> Jared
>
> --
> Jared Sampson
> Xiangpeng Kong Lab
> NYU Langone Medical Center
> http://kong.med.nyu.edu/
>
>
>
>
>
>
> On Aug 6, 2015, at 4:04 AM, Paweł Tomaszewski  wrote:
>
> Hello,
> I've created a CGO in pymol script (a cone) and I need to make some
> transformations on it. I've found that it is easier for me to modify a TTT
> matrix rather than using translate/rotate functions.
>
> Documentation says [http://www.pymolwiki.org/index.php/Get_object_matrix]
> get_object_matrix is unsupported operation. So how to get/set TTT?
>
> The problem is, that I get (from external source) position in quaternions
> and now I need to make my CGO position equal to those quaternion. How can I
> make it work?
>
> Thanks
> Paweł Tomaszewski
>
> --
> ___
> 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
>
>
>
> 
> This email message, including any attachments, is for the sole use of the
> intended recipient(s) and may contain information that is proprietary,
> confidential, and exempt from disclosure under applicable law. Any
> unauthorized review, use, disclosure, or distribution is prohibited. If you
> have received this email in error please notify the sender by return email
> and delete the original message. Please note, the recipient should check
> this email and any attachments for the presence of viruses. The
> organization accepts no liability for any damage caused by any virus
> transmitted by this email.
> =
>
--
___
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

Re: [PyMOL] VR for Pymol?

2016-08-16 Thread Paweł Tomaszewski
Hello,
That's not a big deal but I am working on some project where you can
interactively explore protein structure in PyMOL using some VR device in my
case this is SensAble Phantom Omni.

You can watch first working version of my project here (video is in polish,
but you can ask any questions in comments or here on PyMOL mailing list):
https://www.youtube.com/watch?v=JySK4F6PYLs


Thank you
Paweł Tomaszewski


2016-06-17 15:47 GMT+02:00 Albert :

> Hello:
>
> Does anybody have any idea whether PyMol support Virtual Reality (VR)?
> Can we use the following VR devices to visualize PyMOl in computer?
>
> http://www.polygon.com/2016/1/5/10719326/nvidia-virtual-
> reality-performance-power
>
> https://www.youtube.com/watch?v=U4JPhUr_d7g
>
> If yes, will any VR device on the market work for PyMol?
>
> Thanks a lot
>
> 
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning
> reports. http://sdm.link/zohomanageengine
> ___
> 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
>
--
___
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

[PyMOL] Finding RNA/DNA complementary base pairs using PyMOL

2017-03-13 Thread Paweł Tomaszewski
Dear all,
Is there a function or script which in simple way can find a complementary
base-pairs in my (deoxy)ribonucleic acid?

Suppose I have some double stranded RNA/DNA structure loaded into PyMOL.
Now I've chosen some nocleotyde or set of many nucleotydes and just want to
find residues of its complementary base-pairs (A-T, A-U, C-G).

Thanks a lot,
Paweł
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
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