Jmol is not set up to load arguments into -s headless.spt

While that is an interesting option, it's just not there. I think the thing
to do is use -J instead of -s. This will run an in-line script, which can
then call your headless.spt script with a parameter:

java -jar "%JMOL_HOME%\JmolData.jar" -ion -J "headless.spt('$CC')"

also, I note that when running headless you still need the
*-Djava.awt.headless=true* option, although perhaps on your machine you
have set all Java to be headless.

java -Djava.awt.headless=true -jar "JmolData.jar" -J "prompt 'ok' "
JmolData using command options ["-J", "prompt 'ok'"]
{headlistMaxTimeMs=60000, noConsole=true, exit=true, JmolData=true,
isDataOnly=t
rue}
*Operating headless* display=null nographicsallowed=false
(C) 2012 Jmol Development
Jmol Version: 14.3.15_2015.06.18  2015-06-18 14:51
java.vendor: Java: Oracle Corporation
java.version: Java 1.7.0_71



On Thu, Jun 18, 2015 at 1:26 PM, Whitwell, George <gwhitw...@ncwc.edu>
wrote:

>  Hello,
>
>
>
> I'm using JmolData.jar to load a SMILES string and output the molecule in
> xyz format:
>
>
>
> java -jar "%JMOL_HOME%\JmolData.jar" -ion -s headless.spt $CC
>
> where headless.spt consists of:
>
>
>
> molunit = _arguments[1]
>
> load @molunit
>
> ml = molunit.length
>
> xyzwrite = molunit[2][ml] + ".xyz"
>
> write @xyzwrite
>
>
>
> In this case, the file ".xyz" is written (containing XYZ format for the
> ethane molecule), while:
>
>
>
> script headless.spt("$CC")
>
>
>
> in the application console writes the same file as "CC.xyz", as expected.
> Why is this and what can I do about it?
>
>
>
> Thanks,
>
> George
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department 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
------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to