On Mar 23, 2006, at 1:36 PM, Bob Hanson wrote:

Frieda wrote:
have Jmol compute the coordinates of a moveTo command that would move the center of a specified atomset to the (XY) center of the applet.

Trivial -- just "transformPoint()"

Two things to address here:

1. The question of Jmol computing this moveTo command is what Miguel has said should move to the developer's list, so that does not sound like it is trivial...

2. Not familiar with transformPoint(). I Googled it and came up with:
http://msdn.microsoft.com/workshop/browser/mshtml/reference/ifaces/ displayservices/transformpoint.asp
which says:

IDisplayServices::TransformPoint Method
Syntax
HRESULT TransformPoint(
    POINT *pPoint,
    COORD_SYSTEM eSource,
    COORD_SYSTEM eDestination,
    IHTMLElement *pIElement
);
Parameters
pPoint
[in, out] Pointer to a variable of type POINT that specifies the point to transform and receives the new point after transformation.
eSource
[in] COORD_SYSTEM value that specifies the current frame of reference for the point.
eDestination
[in] COORD_SYSTEM value that specifies the new frame of reference that the point's current coordinates should be transformed to. This parameter cannot be set to COORD_SYSTEM_CONTENT.
pIElement
[in] Pointer to an IHTMLElement interface that specifies the relative element when eSource is set to COORD_SYSTEM_CONTENT.
Return Value
Returns S_OK if successful, or an error value otherwise.

So now I have to admit that I am really out of my depth here. This Microsoft page may be referring to some version of this function that is IE-specific or something, but it is the most intelligible (to me) hit that I got on Google. Even if it is not the correct form of the function, perhaps it gives some idea of what you are suggestiong.

Let's say:
"atomset" = the set of atoms that I want to be the center of rotation and would like to move to the center of the applet, XY "whole model" coordinate system = default coordinate system when model is loaded "atomset-based" coordinate system = new coordinate system after centering atomset

In whole-model system, coordinates for center of atomset to coincide with XY are unknown.
In atomset-based system, these [x,y,z] coordinates are [0,0,0] (right?)

So are you saying that I would use the transformPoint function to ask what 0,0,0 in the atomset-based system would be in the whole model system?

So -
POINT *pPoint would be (0,0,0)
COORD_SYSTEM eSource - how do you specify a frame of reference?
COORD_SYSTEM eDestination - same question
IHTMLElement *pIElement - no idea what this is

...am I on the right track, at least? or is this a more complex question that will be addressed on the developer's list...

Frieda

///////////////////////////////////////////

Frieda Reichsman, PhD
Molecules in Motion
Interactive Molecular Structures
http://www.moleculesinmotion.com

///////////////////////////////////////////





-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to