Thomas Stout wrote:

>
> Thanks very much -- this is getting /more/ confusing!  If I add "set 
> debugScript; set loglevel 5;" to the script, nothing changes and the 
> amount of output to the console does not change (I only get "Script 
> completed / Jmol script terminated".

But you also get those "Token" statements -- those are from set 
debugScript; set loglevel 5.


>   However, the coordinates DO load, but no other JMol commands in the 
> script are executed, whether they are placed before or after the 
> "load" command.  Now, if I cut and paste all of those commands from 
> the script file into the console, then every statement is executed!  
> So, I was suspecting the file itself, but I've also tried creating a 
> completely new file with a different name and got the same result....

It's highly unlikely that the other Jmol commands are not executing. 
There is nothing unique about loading a script from a file or loading by 
a script.

There are a few more debugging tricks that you might want to try:

set showScript;      // display script commands as they are processed
set scriptDelay 1000; // 1 sec. delay between commands

Now, you should see exactly what is being executed.





>
> I just tried something else & seem to have gotten it partially 
> working.  I got rid of "zap;" and I changed:
> select :Z;
> center :Z;
>
> to:
>
> select *:Z;
> center *:Z;
>
This should not matter at all.

> and now some additional commands are executing, but not all....I had 
> previously tried "center *;" and that didn't work either.  Here is the 
> full script file (currently):

>
> load FILES "protein.pdb" "ligand.pdb";
> frames ALL;
> select *:Z;
> center *:Z;
> zoom 300;
> spacefill on;
> delay 0.5;
> zoom 100;
>
> It is now getting as far as the first "zoom" - I can clearly observe 
> that!  But, the spacefill is not applied, nor is the subsequent zoom-out.



> However, if I paste all these commands into the console, all are 
> executed successfully!
>
> Here is the output in the console window (from calling the script file 
> via an HTML link):


What browser/platform are you using? I suppose it is possible that the 
delay command is hanging the thread that is assigned to the browser. 
Could be something we are not aware of.

> Eval.instructionDispatchLoop():1206556049237
> Eval
>  pc:0
> 2 statements

the above shows that "debugScript;set loglevel 5" worked.

> ----
> Token[keyword(0x108010b) intValue=16(0x10) value="script"]
> Token[string(0x4) value="load_script"]

do you have a file called "load_script", without any extension? I 
thought it was "load.script". One problem is that your browser may be 
doing something funny with that file because it has no extension. You 
might try renaming it "load_script.txt"

Also, you should be putting fileNames in double quotes:

script "load_script.txt"

I know some people don't do that, and sometimes that's OK, but it is 
always safest to use double quotes around a file name, and sometimes it 
is required (as in the load FILES command). With names like "load" and 
"script" as part of the name, you might  be having a problem there.


>
> ----
> Token[keyword(0x144) intValue=16(0x10) value="frame"]
> Token[keyword(0x8000f) value="all"]
>
> END

END? OK, then that's the end of the script. It must be just

 script load_script
 frames ALL;



> Token[keyword(0x108010b) intValue=16(0x10) value="script"] "load_script"
> Eval.instructionDispatchLoop():1206556049241

Running just 4 ms after the first one, so this is the script file 
executing, I suppose.


> Eval
>  pc:0
> 4 statements
> ----
> Token[keyword(0x1081109) intValue=16(0x10) value="load"]
> Token[identifier(0x1) value="files"]
> Token[string(0x4) value="protein.pdb"]
> Token[string(0x4) value="ligand.pdb"]
>
> ----
> Token[keyword(0x31e) intValue=16(0x10) value="select"]
> Token[keyword(0x80064) value="expressionBegin"]
> Token[keyword(0x8001c) intValue=90(0x5a) value="spec_chain"]
> Token[keyword(0x80065) value="expressionEnd"]
>
> ----
> Token[keyword(0x304) intValue=16(0x10) value="center"]
> Token[keyword(0x80064) value="expressionBegin"]
> Token[keyword(0x8001c) intValue=90(0x5a) value="spec_chain"]
> Token[keyword(0x80065) value="expressionEnd"]
>
> ----
> Token[keyword(0x152f) intValue=16(0x10) value="zoom"]
> Token[integer(0x2) intValue=300(0x12c) value="300"]
>
> END

So your script file says:

load FILES "protein.pdb" "ligand.pdb"
select :Z
center :Z
zoom 300

There aren't any other commands there.

> Token[keyword(0x1081109) intValue=16(0x10) value="load"] files 
> "protein.pdb" "ligand.pdb"
> Successfully loaded:files
> select  *:Z
> Token[keyword(0x304) intValue=16(0x10) value="center"]  *:Z
> Token[keyword(0x152f) intValue=16(0x10) value="zoom"] 300


these are executing from your script file load_script

> Token[keyword(0x144) intValue=16(0x10) value="frame"] 
> Token[keyword(0x8000f) value="all"]
> Script completed


This is executing from your main script

> Jmol script terminated
>
>
> So, it looks to me like it is simply ignoring the last three 
> statements, but I can't figure out why!
>
I'm guessing that the somehow you got mixed up with your files. It's not 
a bug, I know that. Realize:

1) files on servers require exact capitalization. You might have two 
files there, Load_script and load_script, and you aren't running the 
file you think.

2) commands run in the console run exactly as do commands from files. 
There can be no difference. So if you are getting something different in 
the console than from a script file, it means you are not loading the 
file you think you are.

3) the commands

  set showScript true
  set scriptdelay 1000

can be of great assistance. Also, you can quickly check the contents of 
a file from the console using

  print load("some_file_name")

You might discover it isn't the file you think.

4) Another easy trick is to add MESSAGE or PRINT commands to your script.

load FILES "protein.pdb" "ligand.pdb";
frames ALL;
message "frame all executed"
select *:Z;
center *:Z;
print {selected}; # you should see something like "({3171:4822})" reported
zoom 300;
spacefill on;
message "spacefill should be on now"
delay 0.5;
zoom 100;
message "zoom should be 100 now"


If you don't see these message, it means you are not running the file 
you think you are.

> Thanks for your interest!

Sorry you are having a rough introduction. Just a file problem, I think.

Bob

> -Tom
>
> On Tue, Mar 25, 2008 at 4:37 PM, Angel Herráez <[EMAIL PROTECTED] 
> <mailto:[EMAIL PROTECTED]>> wrote:
>
>     Hi, Thomas, welcome to Jmol world!
>
>     I can see no reason for the problem you describe.
>     Try these:
>
>     1.- open the Java console* and see if there is some error there
>     (*find a coffee cup icon in the taskbar, bottom right of your
>     screen, right-click on it,
>     choose "Open Console")
>
>     2.- open Jmol console from the applet pop-up menu and try commands
>     from there,
>     both your "script load.script" and any other commands after that,
>     like "spacefill off".
>     See if they work and if any errors show up there or in the Java
>     console.
>
>
>
>     -------------------------------------------------------------------------
>     Check out the new SourceForge.net Marketplace.
>     It's the best place to buy or sell services for
>     just about anything Open Source.
>     
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>     _______________________________________________
>     Jmol-users mailing list
>     Jmol-users@lists.sourceforge.net
>     <mailto:Jmol-users@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>------------------------------------------------------------------------
>
>-------------------------------------------------------------------------
>Check out the new SourceForge.net Marketplace.
>It's the best place to buy or sell services for
>just about anything Open Source.
>http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Jmol-users mailing list
>Jmol-users@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/jmol-users
>  
>


-- 
Robert M. Hanson
Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to