Am 18.08.2013 20:09, schrieb Rolf Huehne:
> In Perl it could look like this (not tested):
>
> --------------
>     chdir("my_jmol_path");
>     my @jmol_output = `java -jar JmolData.jar -n -J 'function
> my_print(value) {for (var z in value.lines) { print "DATA:\t" + z; }}
> my_print("Hello from Jmol"); load =1deh; my_print(script("show
> orientation"));'`;
>
>     foreach my $jmol_output_line(@jmol_output) {
>       my $data = substr($jmol_output_line, 5);
>       print $data;
>     }
> --------------
>
Sorry, I forgot the test for "DATA: " at the beginning of the output loop:

   if (substr($jmol_output_line, 0, 5) eq "DATA: ") {
     ...
   }

Regards,
Rolf


-- 

Rolf Huehne
Postdoc

Leibniz Institute for Age Research - Fritz Lipmann Institute (FLI)
Beutenbergstrasse 11
07745 Jena, Germany

Phone:   +49 3641 65 6205
Fax:     +49 3641 65 6210
E-Mail:  [email protected]
Website: http://www.fli-leibniz.de

           Scientific Director: Prof. Dr. K. Lenhard Rudolph
        Head of Administration: Dr. Daniele Barthel
Chairman of Board of Trustees: Dennys Klein

VAT No: DE 153 925 464
Register of Associations: No. 296, Amtsgericht Jena
Tax Number: 162/141/08228


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to