From: eric h. <eri...@un...> - 2012-04-16 23:42:39
|
Dear all, thanks to Robert, I wrote the following code to be able to translate and rotate a bounding box (some line codes are still lacking, but all the data I need are below). Translating the box is easy. My problem, is that boundbox command always refer to the molecule axes through (center, vector) or (corner, corner), hence, using this command, it seems to me it is not possible to rotate the boundingbox independently of the molecule axes: the boundbox axes are always aligned on to the molecule axes. That's what I observe. Is there a way to rotate the bounding box independently of the molecule (thus around the molecule axes) ? Thanks in advance for your help. Sincerely. Eric ****** <html> <head> <title>Simple example</title> <script src="./Jmol.js" type="text/javascript"></script> </head> <body> <form> <script type="text/javascript"> jmolInitialize("."); // REQUIRED jmolSetAppletColor("skyblue"); // if you don't want black jmolApplet(800, "load 2PO6.pdb"); jmolBr(); // a radio group jmolHtml("atoms "); jmolRadioGroup([ ["spacefill off", "off"], ["spacefill 20%", "20%", "checked"], ["spacefill 100%", "100%"] ]); jmolBr(); // a button jmolButton("reset", "Reset to original orientation"); // axes jmolScript("axes MOLECULAR"); jmolScript("axes ON"); // a bound box jmolScript("boundbox {*}"); jmolScript("boundbox on"); jmolScript("console"); jmolScript("show boundbox"); jmolScript("print getProperty('boundboxInfo','center')"); jmolScript("print getProperty('boundboxInfo','vector')"); // jmolScript("bbic= getProperty('boundboxInfo','center')"); // jmolScript("print bbic.z"); // rotate boundbox // a link jmolBr(); jmolLink("boundbox CORNERS {25. 40. -15.} {15. 48. 31.}; show boundbox", "Rotate Box"); </script> </form> </body> </html> ****** Le 13 avr. 2012 à 13:18, eric henon a écrit : > Dear Robert, > > > Many thanks, indeed, for your detailed answer. > > That's exaclty the tools I was looking for. > Thus, I'am going to fully dedicate my attention to it now ! > > Thanks again. > Best regards. > Eric > > > Le 13 avr. 2012 à 06:48, Robert Hanson a écrit : > >> Oh, yes! Absolutely! You can place it anywhere you want, around any set of atoms, and then check its coordinates. >> >> For example: >> >> load =1crn >> boundbox {1-3} // first >> boundbox on >> show boundbox >> print boundboxinfo >> getProperty boundboxinfo >> print getProperty("BoundBoxInfo.corner1") >> x = getProperty("BoundBoxInfo.corner0") >> y = getProperty("BoundBoxInfo") >> print y["corner0"] >> >> That sort of thing. Also: >> >> boundbox scale 2.0 {1-3} >> >> boundbox {structureid="H2"} // second helix >> >> >> On Thu, Apr 12, 2012 at 7:41 PM, eric henon <eri...@un...> wrote: >> Hello, >> >> I'm new to Jmol; I'm interested >> in building, rotating, resizing >> an "independent" bounding box enclosing an active site >> in a protein, in order to finally get its cartesian coordinates. >> >> Is Jmol the appropriate tool/langage >> to do that ? >> >> Thanks in advance for your answer. >> Sincerely. >> Eric >> >> >> >> >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2 >> _______________________________________________ >> Jmol-developers mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-developers >> >> >> >> -- >> Robert M. Hanson >> Professor of Chemistry >> St. Olaf College >> 1520 St. Olaf Ave. >> Northfield, MN 55057 >> http://www.stolaf.edu/people/hansonr >> phone: 507-786-3107 >> >> >> If nature does not answer first what we want, >> it is better to take what answer we get. >> >> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900 >> ------------------------------------------------------------------------------ >> For Developers, A Lot Can Happen In A Second. >> Boundary is the first to Know...and Tell You. >> Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! >> http://p.sf.net/sfu/Boundary-d2dvs2_______________________________________________ >> Jmol-developers mailing list >> Jmo...@li... >> https://lists.sourceforge.net/lists/listinfo/jmol-developers > > Eric Henon > Professeur > Universite de Reims Champagne-Ardenne > Institut de Chimie Moleculaire de Reims > http://www.univ-reims.fr/ICMR > CNRS UMR 6229 > UFR des Sciences Exactes et Naturelles > BP 1039 > 51687 Reims Cedex 2 (France) > Tél./Fax : + 33 (0) 3 26 91 84 97 > eri...@un... > Eric Henon Professeur Universite de Reims Champagne-Ardenne Institut de Chimie Moleculaire de Reims http://www.univ-reims.fr/ICMR CNRS UMR 6229 UFR des Sciences Exactes et Naturelles BP 1039 51687 Reims Cedex 2 (France) Tél./Fax : + 33 (0) 3 26 91 84 97 eri...@un... |