Re: [Jmol-users] label line, plane ...

2006-10-28 Thread rhuehne
Quoting [EMAIL PROTECTED]:

> I realize that. You are the first to try to use this information, I think.
> Just tell me what you think "shapeInfo" should include.
>

For my purpose, labelling of draw objects, I would need the following  
information for each object:

1) name of the object (e.g.: border1)
2) frame number(s)
3) coordinates of the reference points for each frame number

Regards,
Rolf


This message was sent using IMP, the Internet Messaging Program.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] label line, plane ...

2006-10-27 Thread hansonr
I realize that. You are the first to try to use this information, I think.
Just tell me what you think "shapeInfo" should include.

> [EMAIL PROTECTED] wrote:
>>ah, one more thought!
>>
>>
>>Try
>>
>>var infoString = jmolScriptWait("shapeInfo")
>>
>>or
>>
>>var V = jmolGetPropertyAsArray("shapeInfo").Draw.obj[0].vertices
>>
>>array V will now be a full list of the vertices for all models.
>>
>>
>>
> The command works. But since it doesn't provide for which object the
> coordinates are, I guess I will have to use 'jmolGetPropertyAsJSON' to
> get all necessary information. I have to take a deeper look into that
> before I am able to use it, but I like the possibility to get all
> necessary information for all draw objects at once.
>
>>
>>
>>>[EMAIL PROTECTED] wrote:
>>>
>>>
>The next issue (if  'show draw' works correctly) is to read the
>information from Jmol and to generate the corresponding 'echo'
> command.
>To avoid parsing the message callback stream, I tried the
>'jmolScriptWait' command for the first time. But it totally freezes
>Firefox 1.5.0.7 with Java 1.4.2_11 on SuSE linux 9.3. The browser
>freezes independant of the script command I used.
>
>
Interesting -- this means that those browsers are using the event
 queue.
David Evans at Eli Lilly had this problem with the application (as
opposed
to the applet). The solution for applications was to make sure you call
scriptWait() from a new thread rather than the one associated with a
 user
action, like clicking a button.

Something to try: If the jmolScriptWait function is being run because
 the
user has clicked on a link or button, try making sure that the button
method looks like this:


 onClick="setTimeout('clickAction()', 100)"


the 100-ms delay won't be noticed by the user, but a new thread is
started
that isn't the event queue thread. So it shouldn't hang the program.
 Then

function clickAction() {
 var info = jmolScriptWait("draw $border1;show draw")
}

If anything will work, that stands the best chance.

I seem to remember having this sort of problem with Opera browsers some
eons ago, even with regular scripting, and the only solution was to use
setTimeout() this way with every user-derived action.




>>>Unfortunately it doesn't work. Without 'jmolScriptWait' in 'clickAction'
>>>the method works, but with it the browser freezes.
>>>
>>>
> The freezing problem seems to depend additionally on other things. Today
> Firefox didn't freeze either with or without the timeout. I restarted
> the browser several times and never got a freeze. Yesterday I always got
> a freeze, but I am not aware of any change (not even a reboot or a new X
> server session). So 'jmolScriptWait' unfortunately still remains on my
> "don't use it" list.
>
>
> I noticed a strange behaviour of the 'show draw' command. If the
> definition command and the show command are provided within a single
> 'jmolScript' command, no coordinates are shown. Only if they are
> provided within different 'jmolScript' commands the coordinates are shown:
>
> jmolScript("draw line1 (atomno=1) (atomno=2);  draw line1; show draw;");
>-> WITHOUT COORDINATES
>
> jmolScript("draw line1 (atomno=1) (atomno=2);");
> jmolScript("draw line1; show draw;");
>-> WITH COORDINATES
>
> Sometimes the 'show draw' command freezes Jmol with the following error
> message (I couldn't figure out any specific condition, version 10.9.86):
>
> java.lang.NullPointerException
> at org.jmol.viewer.Draw.getDrawCommand(Draw.java:658)
> at org.jmol.viewer.Draw.getProperty(Draw.java:217)
> at org.jmol.viewer.Frame.getShapeProperty(Frame.java:1096)
> at
> org.jmol.viewer.ModelManager.getShapeProperty(ModelManager.java:393)
> at org.jmol.viewer.Viewer.getShapeProperty(Viewer.java:2475)
> at org.jmol.viewer.Eval.show(Eval.java:4720)
> at org.jmol.viewer.Eval.instructionDispatchLoop(Eval.java:610)
> at org.jmol.viewer.Eval.runEval(Eval.java:104)
> at org.jmol.viewer.Viewer.evalStringWaitStatus(Viewer.java:2289)
> at org.jmol.viewer.ScriptManager.runScript(ScriptManager.java:130)
> at org.jmol.viewer.ScriptManager.runNextScript(ScriptManager.java:119)
> at
> org.jmol.viewer.ScriptManager$ScriptQueueRunnable.run(ScriptManager.java:147)
> at java.lang.Thread.run(Thread.java:534)
>
>
> Besides the Java console shows sometimes the following error message (no
> freezing of Jmol):
>
> java.lang.IllegalArgumentException: null source
> at java.util.EventObject.(EventObject.java:34)
> at java.awt.AWTEvent.(AWTEvent.java:252)
> at java.awt.event.ComponentEvent.(ComponentEvent.java:94)
> at java.awt.event.WindowEvent.(WindowEvent.java:174)
> at java.awt.event.WindowEvent.(WindowEvent.java:211)
> at
> java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.jav

Re: [Jmol-users] label line, plane ...

2006-10-27 Thread Rolf Huehne
[EMAIL PROTECTED] wrote:
>ah, one more thought!
>
>
>Try
>
>var infoString = jmolScriptWait("shapeInfo")
>
>or
>
>var V = jmolGetPropertyAsArray("shapeInfo").Draw.obj[0].vertices
>
>array V will now be a full list of the vertices for all models.
>
>
>  
The command works. But since it doesn't provide for which object the
coordinates are, I guess I will have to use 'jmolGetPropertyAsJSON' to
get all necessary information. I have to take a deeper look into that
before I am able to use it, but I like the possibility to get all
necessary information for all draw objects at once.

>
>  
>>[EMAIL PROTECTED] wrote:
>>
>>
The next issue (if  'show draw' works correctly) is to read the
information from Jmol and to generate the corresponding 'echo' command.
To avoid parsing the message callback stream, I tried the
'jmolScriptWait' command for the first time. But it totally freezes
Firefox 1.5.0.7 with Java 1.4.2_11 on SuSE linux 9.3. The browser
freezes independant of the script command I used.


>>>Interesting -- this means that those browsers are using the event queue.
>>>David Evans at Eli Lilly had this problem with the application (as
>>>opposed
>>>to the applet). The solution for applications was to make sure you call
>>>scriptWait() from a new thread rather than the one associated with a user
>>>action, like clicking a button.
>>>
>>>Something to try: If the jmolScriptWait function is being run because the
>>>user has clicked on a link or button, try making sure that the button
>>>method looks like this:
>>>
>>>
>>> onClick="setTimeout('clickAction()', 100)"
>>>
>>>
>>>the 100-ms delay won't be noticed by the user, but a new thread is
>>>started
>>>that isn't the event queue thread. So it shouldn't hang the program. Then
>>>
>>>function clickAction() {
>>> var info = jmolScriptWait("draw $border1;show draw")
>>>}
>>>
>>>If anything will work, that stands the best chance.
>>>
>>>I seem to remember having this sort of problem with Opera browsers some
>>>eons ago, even with regular scripting, and the only solution was to use
>>>setTimeout() this way with every user-derived action.
>>>
>>>
>>>
>>>  
>>Unfortunately it doesn't work. Without 'jmolScriptWait' in 'clickAction'
>>the method works, but with it the browser freezes.
>>
>>
The freezing problem seems to depend additionally on other things. Today
Firefox didn't freeze either with or without the timeout. I restarted
the browser several times and never got a freeze. Yesterday I always got
a freeze, but I am not aware of any change (not even a reboot or a new X
server session). So 'jmolScriptWait' unfortunately still remains on my
"don't use it" list.


I noticed a strange behaviour of the 'show draw' command. If the
definition command and the show command are provided within a single
'jmolScript' command, no coordinates are shown. Only if they are
provided within different 'jmolScript' commands the coordinates are shown:

jmolScript("draw line1 (atomno=1) (atomno=2);  draw line1; show draw;");
   -> WITHOUT COORDINATES

jmolScript("draw line1 (atomno=1) (atomno=2);");
jmolScript("draw line1; show draw;");
   -> WITH COORDINATES

Sometimes the 'show draw' command freezes Jmol with the following error
message (I couldn't figure out any specific condition, version 10.9.86):

java.lang.NullPointerException
at org.jmol.viewer.Draw.getDrawCommand(Draw.java:658)
at org.jmol.viewer.Draw.getProperty(Draw.java:217)
at org.jmol.viewer.Frame.getShapeProperty(Frame.java:1096)
at org.jmol.viewer.ModelManager.getShapeProperty(ModelManager.java:393)
at org.jmol.viewer.Viewer.getShapeProperty(Viewer.java:2475)
at org.jmol.viewer.Eval.show(Eval.java:4720)
at org.jmol.viewer.Eval.instructionDispatchLoop(Eval.java:610)
at org.jmol.viewer.Eval.runEval(Eval.java:104)
at org.jmol.viewer.Viewer.evalStringWaitStatus(Viewer.java:2289)
at org.jmol.viewer.ScriptManager.runScript(ScriptManager.java:130)
at org.jmol.viewer.ScriptManager.runNextScript(ScriptManager.java:119)
at
org.jmol.viewer.ScriptManager$ScriptQueueRunnable.run(ScriptManager.java:147)
at java.lang.Thread.run(Thread.java:534)


Besides the Java console shows sometimes the following error message (no
freezing of Jmol):

java.lang.IllegalArgumentException: null source
at java.util.EventObject.(EventObject.java:34)
at java.awt.AWTEvent.(AWTEvent.java:252)
at java.awt.event.ComponentEvent.(ComponentEvent.java:94)
at java.awt.event.WindowEvent.(WindowEvent.java:174)
at java.awt.event.WindowEvent.(WindowEvent.java:211)
at
java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:576)
at java.awt.Component.dispatchEventImpl(Component.java:3506)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQ

Re: [Jmol-users] label line, plane ...

2006-10-26 Thread hansonr
ah, one more thought!


Try

var infoString = jmolScriptWait("shapeInfo")

or

var V = jmolGetPropertyAsArray("shapeInfo").Draw.obj[0].vertices

array V will now be a full list of the vertices for all models.


Bob


> [EMAIL PROTECTED] wrote:
>>when you use "show draw" you don't add any qualifiers
>>
>>draw border1  #sort of a "select" for DRAW -- sets "current" object
>>show draw #shows current draw object
>>
>>should give something like:
>>
>>draw border1 {23.890585 32.710503 10.786414} {21.773388 34.16974
>> 10.07222}
>>{20.224413 32.710503 11.682588} {22.34161 31.251266 12.396782}
>>
>>
>>I suspect the reason it seems unpredictable is that sometimes you had the
>>object selected, and sometimes not. But if I'm wrong, reply with the
>> exact
>>wording of the script that is causing the problem.
>>
>>Also, something I keep doing is I sometimes accidentally put the $ in:
>>
>>  draw $border1
>>
>>DON'T DO THAT.
>>
>>
> This didn't make a difference. But I found out that the coordinates are
> only provided if a specific frame is displayed, not with 'frame all' set
> before.
> Since we add amino acid variants as new models in our Jmol viewer,
> 'frame all' is always set initially.
>
> In this context I noticed that Jmol freezes if the frame number is not
> specified and not all atoms specified in the 'draw' command are present
> in all frames. The java console shows the following error message:
>
> java.lang.NullPointerException
> at javax.vecmath.Tuple3f.sub(Tuple3f.java:225)
> at org.jmol.viewer.Draw.scaleDrawing(Draw.java:462)
> at org.jmol.viewer.Draw.setProperty(Draw.java:197)
> at org.jmol.viewer.Frame.setShapeProperty(Frame.java:1092)
> at
> org.jmol.viewer.ModelManager.setShapeProperty(ModelManager.java:386)
> at org.jmol.viewer.Viewer.setShapeProperty(Viewer.java:2463)
> at org.jmol.viewer.Eval.draw(Eval.java:5039)
> at org.jmol.viewer.Eval.instructionDispatchLoop(Eval.java:634)
> at org.jmol.viewer.Eval.runEval(Eval.java:104)
> at org.jmol.viewer.Viewer.evalStringWaitStatus(Viewer.java:2289)
> at org.jmol.viewer.ScriptManager.runScript(ScriptManager.java:130)
> at org.jmol.viewer.ScriptManager.runNextScript(ScriptManager.java:119)
> at
> org.jmol.viewer.ScriptManager$ScriptQueueRunnable.run(ScriptManager.java:147)
> at java.lang.Thread.run(Thread.java:534)
>
>
>>>The next issue (if  'show draw' works correctly) is to read the
>>>information from Jmol and to generate the corresponding 'echo' command.
>>>To avoid parsing the message callback stream, I tried the
>>>'jmolScriptWait' command for the first time. But it totally freezes
>>>Firefox 1.5.0.7 with Java 1.4.2_11 on SuSE linux 9.3. The browser
>>>freezes independant of the script command I used.
>>>
>>
>>Interesting -- this means that those browsers are using the event queue.
>>David Evans at Eli Lilly had this problem with the application (as
>> opposed
>>to the applet). The solution for applications was to make sure you call
>>scriptWait() from a new thread rather than the one associated with a user
>>action, like clicking a button.
>>
>>Something to try: If the jmolScriptWait function is being run because the
>>user has clicked on a link or button, try making sure that the button
>>method looks like this:
>>
>>
>>  onClick="setTimeout('clickAction()', 100)"
>>
>>
>>the 100-ms delay won't be noticed by the user, but a new thread is
>> started
>>that isn't the event queue thread. So it shouldn't hang the program. Then
>>
>>function clickAction() {
>>  var info = jmolScriptWait("draw $border1;show draw")
>>}
>>
>>If anything will work, that stands the best chance.
>>
>>I seem to remember having this sort of problem with Opera browsers some
>>eons ago, even with regular scripting, and the only solution was to use
>>setTimeout() this way with every user-derived action.
>>
>>
>>
> Unfortunately it doesn't work. Without 'jmolScriptWait' in 'clickAction'
> the method works, but with it the browser freezes.
>
> Regards,
> Rolf
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___

Re: [Jmol-users] label line, plane ...

2006-10-26 Thread hansonr
Ah, right, if you have multiple models, and the one draw command was used
to create all the lines at once, "show draw" may not work as advertised.

>>
> This didn't make a difference. But I found out that the coordinates are
> only provided if a specific frame is displayed, not with 'frame all' set
> before.
> Since we add amino acid variants as new models in our Jmol viewer,
> 'frame all' is always set initially.
>
> In this context I noticed that Jmol freezes if the frame number is not
> specified and not all atoms specified in the 'draw' command are present
> in all frames. The java console shows the following error message:
>
> java.lang.NullPointerException
> at javax.vecmath.Tuple3f.sub(Tuple3f.java:225)
> at org.jmol.viewer.Draw.scaleDrawing(Draw.java:462)

found and fixed.


Bob


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] label line, plane ...

2006-10-26 Thread Rolf Huehne
[EMAIL PROTECTED] wrote:
>when you use "show draw" you don't add any qualifiers
>
>draw border1  #sort of a "select" for DRAW -- sets "current" object
>show draw #shows current draw object
>
>should give something like:
>
>draw border1 {23.890585 32.710503 10.786414} {21.773388 34.16974 10.07222}
>{20.224413 32.710503 11.682588} {22.34161 31.251266 12.396782}
>
>
>I suspect the reason it seems unpredictable is that sometimes you had the
>object selected, and sometimes not. But if I'm wrong, reply with the exact
>wording of the script that is causing the problem.
>
>Also, something I keep doing is I sometimes accidentally put the $ in:
>
>  draw $border1
>
>DON'T DO THAT.
>
>  
This didn't make a difference. But I found out that the coordinates are
only provided if a specific frame is displayed, not with 'frame all' set
before.
Since we add amino acid variants as new models in our Jmol viewer,
'frame all' is always set initially.

In this context I noticed that Jmol freezes if the frame number is not
specified and not all atoms specified in the 'draw' command are present
in all frames. The java console shows the following error message:

java.lang.NullPointerException
at javax.vecmath.Tuple3f.sub(Tuple3f.java:225)
at org.jmol.viewer.Draw.scaleDrawing(Draw.java:462)
at org.jmol.viewer.Draw.setProperty(Draw.java:197)
at org.jmol.viewer.Frame.setShapeProperty(Frame.java:1092)
at org.jmol.viewer.ModelManager.setShapeProperty(ModelManager.java:386)
at org.jmol.viewer.Viewer.setShapeProperty(Viewer.java:2463)
at org.jmol.viewer.Eval.draw(Eval.java:5039)
at org.jmol.viewer.Eval.instructionDispatchLoop(Eval.java:634)
at org.jmol.viewer.Eval.runEval(Eval.java:104)
at org.jmol.viewer.Viewer.evalStringWaitStatus(Viewer.java:2289)
at org.jmol.viewer.ScriptManager.runScript(ScriptManager.java:130)
at org.jmol.viewer.ScriptManager.runNextScript(ScriptManager.java:119)
at
org.jmol.viewer.ScriptManager$ScriptQueueRunnable.run(ScriptManager.java:147)
at java.lang.Thread.run(Thread.java:534)


>>The next issue (if  'show draw' works correctly) is to read the
>>information from Jmol and to generate the corresponding 'echo' command.
>>To avoid parsing the message callback stream, I tried the
>>'jmolScriptWait' command for the first time. But it totally freezes
>>Firefox 1.5.0.7 with Java 1.4.2_11 on SuSE linux 9.3. The browser
>>freezes independant of the script command I used.
>>
>
>Interesting -- this means that those browsers are using the event queue.
>David Evans at Eli Lilly had this problem with the application (as opposed
>to the applet). The solution for applications was to make sure you call
>scriptWait() from a new thread rather than the one associated with a user
>action, like clicking a button.
>
>Something to try: If the jmolScriptWait function is being run because the
>user has clicked on a link or button, try making sure that the button
>method looks like this:
>
>
>  onClick="setTimeout('clickAction()', 100)"
>
>
>the 100-ms delay won't be noticed by the user, but a new thread is started
>that isn't the event queue thread. So it shouldn't hang the program. Then
>
>function clickAction() {
>  var info = jmolScriptWait("draw $border1;show draw")
>}
>
>If anything will work, that stands the best chance.
>
>I seem to remember having this sort of problem with Opera browsers some
>eons ago, even with regular scripting, and the only solution was to use
>setTimeout() this way with every user-derived action.
>
>
>  
Unfortunately it doesn't work. Without 'jmolScriptWait' in 'clickAction'
the method works, but with it the browser freezes.

Regards,
Rolf

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] label line, plane ...

2006-10-26 Thread hansonr
Rolf,

>
> draw border1 PERP 150 PLANE (5:A and carbon and alpha) (6:A and carbon
> and alpha);

easier, BTW:

   draw border1 PERP 150 PLANE (5:A.CA) (6:A.CA)


>
> The plane is drawn correctly but 'show draw' only outputs "draw border1"
> most of the time. (Actually it only worked once, with exactly this
> example and a few others in version 10.9.79  but never again that the
> four coordinates of the corners were shown.)

when you use "show draw" you don't add any qualifiers

draw border1  #sort of a "select" for DRAW -- sets "current" object
show draw #shows current draw object

should give something like:

draw border1 {23.890585 32.710503 10.786414} {21.773388 34.16974 10.07222}
{20.224413 32.710503 11.682588} {22.34161 31.251266 12.396782}


I suspect the reason it seems unpredictable is that sometimes you had the
object selected, and sometimes not. But if I'm wrong, reply with the exact
wording of the script that is causing the problem.

Also, something I keep doing is I sometimes accidentally put the $ in:

  draw $border1

DON'T DO THAT.


>
> The next issue (if  'show draw' works correctly) is to read the
> information from Jmol and to generate the corresponding 'echo' command.
> To avoid parsing the message callback stream, I tried the
> 'jmolScriptWait' command for the first time. But it totally freezes
> Firefox 1.5.0.7 with Java 1.4.2_11 on SuSE linux 9.3. The browser
> freezes independant of the script command I used.

Interesting -- this means that those browsers are using the event queue.
David Evans at Eli Lilly had this problem with the application (as opposed
to the applet). The solution for applications was to make sure you call
scriptWait() from a new thread rather than the one associated with a user
action, like clicking a button.

Something to try: If the jmolScriptWait function is being run because the
user has clicked on a link or button, try making sure that the button
method looks like this:


  onClick="setTimeout('clickAction()', 100)"


the 100-ms delay won't be noticed by the user, but a new thread is started
that isn't the event queue thread. So it shouldn't hang the program. Then

function clickAction() {
  var info = jmolScriptWait("draw $border1;show draw")
}

If anything will work, that stands the best chance.

I seem to remember having this sort of problem with Opera browsers some
eons ago, even with regular scripting, and the only solution was to use
setTimeout() this way with every user-derived action.



Bob




-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] label line, plane ...

2006-10-26 Thread Rolf Huehne
[EMAIL PROTECTED] wrote:
>Well, what do you know! The new echo x y capability easily extends to 3D
>
>set echo myecho {x y z}
>set echo myecho (atomno=3)
>set echo myecho (*)
>
>It wasn't "draw", it wasn't "text" or "label" -- it was just the idea of a
>"3D-echo"
>
>You have to love it when it's THAT easy. When you
>
>set echo myecho (*)
>set echo myecho center
>echo X
>
>you get an X as nearly as I can place it centered on the geometric center
>of the molecule. Note that fractional coordinates are allowed.
>
>set echo myecho {1/2 1/2 1/2}
>
>:)
>
>  
In contrast to the 'draw object' solution there remains one problem to
be solved.
How do I know which coordinates I must provide to echo to label a
specific draw object?

The 'show draw' command is supposed to show the command to generate the
draw object that is considered as current, including the coordinates of
the reference points. (By the way, it would be more secure if the name
of the draw object could be specified directly, e.g. "show draw $plane1".)
But this only works extremely rare and unpredictable in version 10.9.85
(also in 10.9.79, I havn't checked others).

Take for example this command (PDB entry 1deh):

draw border1 PERP 150 PLANE (5:A and carbon and alpha) (6:A and carbon
and alpha);

The plane is drawn correctly but 'show draw' only outputs "draw border1"
most of the time. (Actually it only worked once, with exactly this
example and a few others in version 10.9.79  but never again that the
four coordinates of the corners were shown.)

The next issue (if  'show draw' works correctly) is to read the
information from Jmol and to generate the corresponding 'echo' command.
To avoid parsing the message callback stream, I tried the
'jmolScriptWait' command for the first time. But it totally freezes
Firefox 1.5.0.7 with Java 1.4.2_11 on SuSE linux 9.3. The browser
freezes independant of the script command I used.

Regards,
Rolf


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] label line, plane ...

2006-10-25 Thread hansonr
Well, what do you know! The new echo x y capability easily extends to 3D

set echo myecho {x y z}
set echo myecho (atomno=3)
set echo myecho (*)

It wasn't "draw", it wasn't "text" or "label" -- it was just the idea of a
"3D-echo"

You have to love it when it's THAT easy. When you

set echo myecho (*)
set echo myecho center
echo X

you get an X as nearly as I can place it centered on the geometric center
of the molecule. Note that fractional coordinates are allowed.

set echo myecho {1/2 1/2 1/2}

:)

Bob



> yes, something like that might work:
>
> draw textID TEXT {whatever} "your text"
>
>
>> Implementation of the new draw object 'text', that places a text at a
>> specified position.
>> If I wanted to have for example a plane perpendicular to the line
>> between the alpha carbon atoms of 2 amino acid residues, labelled as
>> "boundary1", I could then define the following objects:
>>
>> draw boundary1 PERP PLANE (atomno=15) (atomno=25);
>> draw boundary1_label PERP TEXT (atomno=15) (atomno=25) OFFSET {x y z}
>> "boundary1"
>>
>> Regards,
>> Rolf
>>
>> -
>> Using Tomcat but need to do more? Need to support web services,
>> security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>> Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> ___
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>
>
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] label line, plane ...

2006-10-25 Thread hansonr
yes, something like that might work:

draw textID TEXT {whatever} "your text"


> Implementation of the new draw object 'text', that places a text at a
> specified position.
> If I wanted to have for example a plane perpendicular to the line
> between the alpha carbon atoms of 2 amino acid residues, labelled as
> "boundary1", I could then define the following objects:
>
> draw boundary1 PERP PLANE (atomno=15) (atomno=25);
> draw boundary1_label PERP TEXT (atomno=15) (atomno=25) OFFSET {x y z}
> "boundary1"
>
> Regards,
> Rolf
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] label line, plane ...

2006-10-25 Thread Rolf Huehne
[EMAIL PROTECTED] wrote:
>this was in my drafts box. Not sure I sent it.
>
>Rick,
>
>Gotta think out of the box on this one.
>
>  
>>Is there a way to label a line or plane created by the "draw" command?
>>
>>i.e. draw line1 {0.0 0.0 0.0} {4.0 0.0 0.0}; select $line1; label "x";
>>
>
>Ahhh, custom axes, eh?
>
>No, sorry, can't do that. Labels are strictly properties of atoms. And you
>can only select atoms as well, not drawn objects.
>
>Depends how much control you have over your subject matter. Here's what I
>would do:
>
>1) Create a file labels.xyz:
>
>2
>just 2 labels
>He 4.1 0.0 0.0
>Xe -0.1 0.0 0.0
>
>2) load labels.xyz along with your file:
>
>
>load "fileset" "myfile.xyz" "labels.xyz"
>restrict */1001 # turn off all atoms in second "labels" frame
>frame 0;
>draw xaxis {0 0 0} {4 0 0}  #property of both frames
>select _He; label x #label is in frame 2001
>select _Xe; label 0 #label is in frame 2001
>
>frame 1001   # no labels
>frame 2001   # no molecule
>frame 0  # everything
>
>
>The frame command just prior to draw determines what you see when.
>
>
>load "fileset" "myfile.xyz" "labels.xyz"
>restrict */1001 # turn off all atoms in second "labels" frame
>frame 1001;
>draw xaxis {0 0 0} {4 0 0}  #property of frame 1001
>select _He; label x #label is in frame 2001
>select _Xe; label 0 #label is in frame 2001
>
>frame 1001   # molecule, axis, but no labels
>frame 2001   # just labels
>frame 0  # everything
>
>
>or
>
>
>load "fileset" "myfile.xyz" "labels.xyz"
>restrict */1001 # turn off all atoms in second "labels" frame
>frame 2001
>draw xaxis {0 0 0} {4 0 0}  #property of frame 2001
>select _He; label x #label is in frame 2001
>select _Xe; label 0 #label is in frame 2001
>
>frame 1001   # no axis or labels
>frame 2001   # no molecule
>frame 0  # everything
>
>
>  
This "fake atom" solution has several disadvantages. One disadvatage is,
that you have to know exactly where to place the fake atom. This means
you have to know how Jmol determines the coordinates of the reference
points for the draw objects you want to label and make the same
calculation.
Another disadvantage is that a new model/frame is added to the
structure, which would be for example problematic for NMR structures
with multiple models/frames. And inserting the fake atoms into an
existing model/frame would also be problematic.

Bob, you said that it will not be possible in the current system to use
'select' or 'label' for 'draw objects'. But what do you think of the
following idea:

Implementation of the new draw object 'text', that places a text at a
specified position.
If I wanted to have for example a plane perpendicular to the line
between the alpha carbon atoms of 2 amino acid residues, labelled as
"boundary1", I could then define the following objects:

draw boundary1 PERP PLANE (atomno=15) (atomno=25);
draw boundary1_label PERP TEXT (atomno=15) (atomno=25) OFFSET {x y z}
"boundary1"

Regards,
Rolf

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] label line, plane ...

2006-10-24 Thread hansonr
this was in my drafts box. Not sure I sent it.

Rick,

Gotta think out of the box on this one.

>
> Is there a way to label a line or plane created by the "draw" command?
>
> i.e. draw line1 {0.0 0.0 0.0} {4.0 0.0 0.0}; select $line1; label "x";

Ahhh, custom axes, eh?

No, sorry, can't do that. Labels are strictly properties of atoms. And you
can only select atoms as well, not drawn objects.

Depends how much control you have over your subject matter. Here's what I
would do:

1) Create a file labels.xyz:

2
just 2 labels
He 4.1 0.0 0.0
Xe -0.1 0.0 0.0

2) load labels.xyz along with your file:


load "fileset" "myfile.xyz" "labels.xyz"
restrict */1001 # turn off all atoms in second "labels" frame
frame 0;
draw xaxis {0 0 0} {4 0 0}  #property of both frames
select _He; label x #label is in frame 2001
select _Xe; label 0 #label is in frame 2001

frame 1001   # no labels
frame 2001   # no molecule
frame 0  # everything


The frame command just prior to draw determines what you see when.


load "fileset" "myfile.xyz" "labels.xyz"
restrict */1001 # turn off all atoms in second "labels" frame
frame 1001;
draw xaxis {0 0 0} {4 0 0}  #property of frame 1001
select _He; label x #label is in frame 2001
select _Xe; label 0 #label is in frame 2001

frame 1001   # molecule, axis, but no labels
frame 2001   # just labels
frame 0  # everything


or


load "fileset" "myfile.xyz" "labels.xyz"
restrict */1001 # turn off all atoms in second "labels" frame
frame 2001
draw xaxis {0 0 0} {4 0 0}  #property of frame 2001
select _He; label x #label is in frame 2001
select _Xe; label 0 #label is in frame 2001

frame 1001   # no axis or labels
frame 2001   # no molecule
frame 0  # everything


Enjoy!

Bob


>
> Thanks, Rick
>
> Dr. Richard Spinney
> Department of Chemistry
> Ohio State University
> 100 West 18th Ave
> Columbus, OH
> 43210
> (614) 247-6847
>
>
>
> -
Using Tomcat but need to do more? Need to support web services,
security?
> Get stuff done quickly with pre-integrated technology to make your job
easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>





-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] label line, plane ...

2006-10-23 Thread hansonr
Rick,

Gotta think out of the box on this one.

>
> Is there a way to label a line or plane created by the "draw" command?
>
> i.e. draw line1 {0.0 0.0 0.0} {4.0 0.0 0.0}; select $line1; label "x";

Ahhh, custom axes, eh?

No, sorry, you can't do that. Labels are strictly properties of atoms. In
addition, you can only select atoms, not drawn objects, so "select $line1"
is out.

Depends how much control you have over your subject matter. Here's what I
would do:

...no, wait. I'm not going to tell you. ;)

Let me leave it as a puzzle to the Jmol users. We want:

1) to be able to draw any label of any sort, any font, any size, any
color, anywhere on any model, at a particular 3D molecular location, and

2) to be able to display and hide that label at will.

This can be done in Jmol. How would you do it?

If we don't hear a response in a suitable timeframe for Rick, I have a
sealed envolope here.

Bob



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] label line, plane ...

2006-10-23 Thread rspinney

Is there a way to label a line or plane created by the "draw" command?

i.e. draw line1 {0.0 0.0 0.0} {4.0 0.0 0.0}; select $line1; label "x";

Thanks, Rick

Dr. Richard Spinney
Department of Chemistry
Ohio State University
100 West 18th Ave
Columbus, OH
43210
(614) 247-6847



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users