Re: [PyMOL] Yaw, Pitch and Roll of CGO
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], >> 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 ### >> >> >>
Re: [PyMOL] WARNING: glDrawBuffer caused GL error on windows 7
I downloaded it from the link here http://www.pymolwiki.org/index.php/Windows_Install -- Camilo Jiménez On Tue, Feb 18, 2014 at 2:17 PM, Paweł Tomaszewski wrote: > 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] selecting atoms ..
Hi Sampsa - The long list of ids crashes for me as well. Instead of listing each id separately, you can use ranges to define your selections. select paska, id 36-58 select isopaska, id 36-350 If you need to use non-continuous ids, you can use Boolean logic to join the ranges: select isopaska_without_id_59, id 36-58 or id 60-350 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 1:50 PM, Sampsa Riikonen wrote: > Hi, > > I am trying to select a large number of atoms, using a pymol script. > The first script file looks like this: > --- > select paska, id > 36+37+38+39+40+41+42+43+44+45+46+47+48+49+50+51+52+53+54+55+56+57+58 > > The second one like this: > > select isopaska, id > 36+37+38+39+40+41+42+43+44+45+46+47+48+49+50+51+52+53+54+55+56+57+58+59+60+61+62+63+64+65+66+67+68+69+70+71+72+73+74+75+76+77+78+79+80+81+82+83+84+85+86+87+88+89+90+91+92+93+94+95+96+97+98+99+100+101+102+103+104+105+106+107+108+109+110+111+112+113+114+115+116+117+118+119+120+121+122+123+124+125+126+127+128+129+130+131+132+133+134+135+136+137+138+139+140+141+142+143+144+145+146+147+148+149+150+151+152+153+154+155+156+157+158+159+160+161+162+163+164+165+166+167+168+169+170+171+172+173+174+175+176+177+178+179+180+181+182+183+184+185+186+187+188+189+190+191+192+193+194+195+196+197+198+199+200+201+202+203+204+205+206+207+208+209+210+211+212+213+214+215+216+217+218+219+220+221+222+223+224+225+226+227+228+229+230+231+232+233+234+235+236+237+238+239+240+241+242+243+244+245+246+247+248+249+250+251+252+253+254+255+256+257+258+259+260+261+262+263+264+265+266+267+268+269+270+271+272+273+274+275+276+277+278+279+280+281+282+283+284+285+286+287+288+289+290+291+292+293+294+295+296+297+298+299+300+ 301+302+303+304+305+306+307+308+309+310+311+312+313+314+315+316+317+318+319+320+321+322+323+324+325+326+327+328+329+330+331+332+333+334+335+336+337+338+339+340+341+342+343+344+345+346+347+348+349+350 > - > > When running the first script, it works ok, however, if I run the second > one, pymol crashes: > --- > > *** buffer overflow detected ***: python2.7 terminated > === Backtrace: = > /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f171c6ce08c] > /lib/x86_64-linux-gnu/libc.so.6(+0x111020)[0x7f171c6cd020] > ... > --- > > How can I select a laarge number of atoms based on their numbers? > > Regards, > > Sampsa > > > > > -- > 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 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. = -- 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
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 mailto:croov...@gmail.com>> 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 mailto:jared.samp...@nyumc.org>>: 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 mailto:croov...@gmail.com>> 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 mailto:thomas.hol...@schrodinger.com>>: 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, Павел Томашевский mailto:croov...@gmail.com>> 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
Re: [PyMOL] WARNING: glDrawBuffer caused GL error on windows 7
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
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 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. > = > -- Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http
[PyMOL] selecting atoms ..
Hi, I am trying to select a large number of atoms, using a pymol script. The first script file looks like this: --- select paska, id 36+37+38+39+40+41+42+43+44+45+46+47+48+49+50+51+52+53+54+55+56+57+58 The second one like this: select isopaska, id 36+37+38+39+40+41+42+43+44+45+46+47+48+49+50+51+52+53+54+55+56+57+58+59+60+61+62+63+64+65+66+67+68+69+70+71+72+73+74+75+76+77+78+79+80+81+82+83+84+85+86+87+88+89+90+91+92+93+94+95+96+97+98+99+100+101+102+103+104+105+106+107+108+109+110+111+112+113+114+115+116+117+118+119+120+121+122+123+124+125+126+127+128+129+130+131+132+133+134+135+136+137+138+139+140+141+142+143+144+145+146+147+148+149+150+151+152+153+154+155+156+157+158+159+160+161+162+163+164+165+166+167+168+169+170+171+172+173+174+175+176+177+178+179+180+181+182+183+184+185+186+187+188+189+190+191+192+193+194+195+196+197+198+199+200+201+202+203+204+205+206+207+208+209+210+211+212+213+214+215+216+217+218+219+220+221+222+223+224+225+226+227+228+229+230+231+232+233+234+235+236+237+238+239+240+241+242+243+244+245+246+247+248+249+250+251+252+253+254+255+256+257+258+259+260+261+262+263+264+265+266+267+268+269+270+271+272+273+274+275+276+277+278+279+280+281+282+283+284+285+286+287+288+289+290+291+292+293+294+295+296+297+298+299+300+30 1+302+303+304+305+306+307+308+309+310+311+312+313+314+315+316+317+318+319+320+321+322+323+324+325+326+327+328+329+330+331+332+333+334+335+336+337+338+339+340+341+342+343+344+345+346+347+348+349+350 - When running the first script, it works ok, however, if I run the second one, pymol crashes: --- *** buffer overflow detected ***: python2.7 terminated === Backtrace: = /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x5c)[0x7f171c6ce08c] /lib/x86_64-linux-gnu/libc.so.6(+0x111020)[0x7f171c6cd020] ... --- How can I select a laarge number of atoms based on their numbers? Regards, Sampsa -- 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
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 mailto:croov...@gmail.com>> 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 mailto:thomas.hol...@schrodinger.com>>: 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, Павел Томашевский mailto:croov...@gmail.com>> 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 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. = -- 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
Hi Pawel, you should read PyMOL> help(cmd.rotate) This would tell you that the rotate function has a "origin" argument. Hope that helps. Cheers, Thomas On 17 Feb 2014, at 14:40, 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