Hi Matt 

I'm not familiar with running Jmol from the command line, but a few things:

> $Jmol -ionx myscript.spt molecule.pdb
> 
> and mysrcript.spt is:
> 
> select all;
> write coords pdb one.pdb;
> select none;
> 
> then one.pdb is created, but it is empty.

I think that you need to add the "-s" switch so that the script will be read.

Ii was me who added those examples in the Wiki, they were taken from a message 
of Bob's 
in the email list, and they are also shown as examples in the Scripting Doc 
page, but the 
simultaneous use of a script file + a molecule file is not documented anywhere. 
I just tested 
it and it works if you do

Jmol -ionxs myscript.spt molecule.pdb

(note the added "s")


> #Place measurement in variable dist
> dist=script("show measurements")
> then, dist14.txt is created, but is empty except for "Show measurements."

I'm not sure this should work. Do you have any doc supporting this script() 
syntax?


> I suspect that Jmol is not loading the pdb file specified in the command
> $Jmol -ionx myscript.spt molecule.pdb

Yes, so it seems. Try   
   Jmol myscript.spt molecule.pdb
and you will see that the pdb is indeed not loaded.


> What am I doing wrong?  Do these command line options work on the Mac?

It's not a Mac issue. I have the same in Windows


> PS  Using 
> $ jmol -s myscript.spt molecule.pdb
> provides the requested results, but it leaves Jmol open.

This is the clue: as I said, add "s" to "-ionx"

Once this is clear I will fix the Wiki

Bob, can we say that these 4 options are possible?

1)   Jmol.jar  molFileName
2)   Jmol.jar  scriptFileName
3)   Jmol.jar  -s scriptFileName
4)   Jmol.jar  -s scriptFileName molFileName




------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to