BUT, Dmitry, realize that the way the calls work, at least in the applet, the call is initiated in a new thread, and the calling function return is made. I think the term there is "asyncronous." So don't expect direct returns from your functions. This complicates the issue, because you then have to start looking for a value, or Miguel has to set up events to trigger when some sort of result is ready. I think that's one of the problems.
Bob Hanson
Dmitry Markman wrote:
I think we're already discussed it
I think that jmol is a great (extremely good, actually) achievement
but I think it's hugely overprotected: there are a lot (unnecessary at least I think so)
final classes protected/package methods that don't allow to use
jmol API in the most efficient way for every particular application
especially if we want to fast parameter changes and have a direct access to underlying api
for example to see orientation we must use script but it's not hard to see that all script do (finally) it's the following:
String getOrientationText() { return getMoveToText() + "\nOR\n" + getRotateZyzText(); }
String getMoveToText() { axisangleT.set(matrixRotate); float degrees = axisangleT.angle * degreesPerRadian; StringBuffer sb = new StringBuffer(); sb.append("moveTo 1"); if (degrees < 0.01f) { sb.append(" 0 0 0 0"); } ..... }
so to obtain very basic property of any 3d model we have to use script that is just big overhead
(new thread parsing loop e.t.c.)
Viewer is a final class so we can't extends it in any way
imagine we have application that wants to change coordinates of the existed atoms inside of the model
and I want to change x,y,z coordinate of every atoms as fast as possible
how we'd do that?
there is no public method setAtomPoint3f or similar
(at least I wasn't able to find it)
there is no public method to change Matrix4f of the current model
(for example we want to show model from non inertial coordinate
system and we want to calculate rotation very quickly : we calculate matrix
and we want to apply that matrix to the model)
so basically I want to set coordinate of all my atoms and send to the viewer command to rerender screen I don't think that reloading xyz model every time I want to change few coordinates is a good idea
I personally think that using rasmol scripts in the jmol hugely overused
I don't argue it's very convenient for the authoring applets
or similar
but for embedding jmol viewer to any arbitrary environment it's not that good
(nobody can predict any possible usage of that great package,
that software will be always "smarter" than its creators :-) )
for setting jmol style like ribbons that's really not important because you call it just once
so script could be used
there is 2 extreme cases
everything via API
or
everything via script
I'd like to have something in between
if somebody like to use script he/she should have ability to do so
but if somebody likes to use API he/she should have the options to do that too
sincerely
Dmitry Markman
On Feb 23, 2005, at 9:13 PM, Miguel wrote:
Hi Miguel,
We would like to be able to get and set orientation of molecules through the API, but the method does not seem to be public:
String getOrientationText() { return transformManager.getOrientationText(); }
I guess this method returns 4 numbers: the first three are the coordinates
of the
axis about which the molecule is to be rotated, the last one is the angle.
Is it possible to make this method public? And better, have a symmetrical
public method
setOrientation(String s) that receives 4 numbers (three coordinates and
one angle)
to set the orientation of the molecule?
Thank you very much in advance, Charles
The right way to access this is through the script command 'show orientation'
You can then take the results and feed them back into the moveTo command
Be advised that the results may be many more than 4 numbers. Zoom &
translations are included. Currently it does not behave correctly when the
center of rotation has been shifted away from the default. I anticipate
that more parameters will be added to this in the future.
I strongly recommend that you consider it a text script that you can subsequently execute.
Miguel
-------------------------------------------------- Michael T. Howard [EMAIL PROTECTED] 23 Algonquin Avenue tele 978-474-4559 Andover, MA 01810-5527 cell 978-886-3697 USA fax 978-662-3126 --------------------------------------------------
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
Dmitry Markman
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op�k _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107 Professor of Chemistry, St. Olaf College 1520 St. Olaf Ave., Northfield, MN 55057 mailto:[EMAIL PROTECTED] http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
