Re: [Jmol-users] Running Jmol in Linux command line

2016-12-19 Thread Angel Herráez



Sorry, I copied the wrong piece of code in my former reply. This is the correct
way:


Hello, Huan 


You are in the right drection.


> Actually, I found a very brief introduction in Jmol Wiki website, where
listed some commands for loading PDB file and 
> running script in command line. However, I did not see any command for
saving data. 


Not specifically to save data, but it's the same method for any Jmol 
command or script.


> write ramachandran "OUTPUT_FILE_NAME"


That is a Jmol script



http://wiki.jmol.org/index.php/Jmol_Application#Command_line_options
tells you can use


 Jmol.jar  fileName  -J script_commands  -s scriptFileName  -j 
script_commands 


So it's probably a question of quotes; please try this way:


Jmol.jar  PDB_FILE -J '
write ramachandran "OUTPUT_FILE_NAME"; '


or


Jmol.jar  PDB_FILE -J "
write ramachandran 'OUTPUT_FILE_NAME'; "


or, when the filemname is not conflictive (ie it does not use spaces or 
nonASCII characters) you can omit the quotes:


Jmol.jar  PDB_FILE -J "
write ramachandran OUTPUT_FILE_NAME; "




If that fails, or if it is more convenient for you, you can save the
script in a 
text file, e.g. named MYSCRIPT.TXT and then


Jmol.jar  PDB_FILE -s MYSCRIPT.TXT


Jmol.jar  PDB_FILE -s "MYSCRIPT.TXT"




  



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Running Jmol in Linux command line

2016-12-19 Thread Rolf Huehne
Am 19.12.16 um 18:13 schrieb Rolf Huehne:
> Am 19.12.16 um 16:37 schrieb Huan Wang:
>> Dear Jmol developers and users,
>>
>> I am a newbie to Jmol and I have a question on running Jmol in Linux
>> command line.
>>
>> Previously, when I prepared Ramachandran plot, I used Jmol interface to
>> open PDB file and typed command in Jmol console as:
>> /write ramachandran "OUTPUT_FILE_NAME"/
>>
>> That was very low efficient especially when dealing with large amount of
>> PDB files. If Jmol could run in command line in Linux system with Bash
>> Shell script, that would be perfect.
>>
>> Actually, I found a very brief introduction in Jmol Wiki website, where
>> listed some commands for loading PDB file and running script in command
>> line. However, I did not see any command for saving data.
>> http://wiki.jmol.org/index.php/Jmol_Application
>> 
>>
>> I tried to use
>> Jmol -n PDB_FILE -J ramachandran "OUT_PUT_FILE_NAME" -x
>> Howeve, it does not save data.
>>
>> I also tried
>> Jmol -n PDB_FILE -J ramachandran -w "OUT_PUT_FILE_NAME" -x
>> It saved the image file, not data.
>>
>> other trials were:
>> Jmol -n PDB_FILE -J ramachandran > "OUT_PUT_FILE_NAME" -x
>> Jmol -n PDB_FILE -J write -j ramachandran "OUT_PUT_FILE_NAME" -x
>>
>> However, none of them worked as I expected...
>>
>> It would be greatly appreciated if anyone could help me.
>>
> Huan, with the '-J' and '-j' command-line options you must provide the
> same script commands like interactively. Since command-line arguments in
> Linux are separated by white-space you have to enclose the script
> commands in quotes. Like Matt I would also recommend to use
> 'JmolData.jar' for batch processing of multiple PDB files:
>
> java -jar JmolData.jar -j "write ramachandran 'ramachandran_data.txt'"
>
Sorry, I forgot the PDB filename which would be placed at the end of the 
command-line:

java -jar JmolData.jar -j "write ramachandran 'ramachandran_data.txt'" 
PDB_FILE

Regards,
Rolf


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Running Jmol in Linux command line

2016-12-19 Thread Rolf Huehne
Am 19.12.16 um 16:37 schrieb Huan Wang:
> Dear Jmol developers and users,
>
> I am a newbie to Jmol and I have a question on running Jmol in Linux
> command line.
>
> Previously, when I prepared Ramachandran plot, I used Jmol interface to
> open PDB file and typed command in Jmol console as:
> /write ramachandran "OUTPUT_FILE_NAME"/
>
> That was very low efficient especially when dealing with large amount of
> PDB files. If Jmol could run in command line in Linux system with Bash
> Shell script, that would be perfect.
>
> Actually, I found a very brief introduction in Jmol Wiki website, where
> listed some commands for loading PDB file and running script in command
> line. However, I did not see any command for saving data.
> http://wiki.jmol.org/index.php/Jmol_Application
> 
>
> I tried to use
> Jmol -n PDB_FILE -J ramachandran "OUT_PUT_FILE_NAME" -x
> Howeve, it does not save data.
>
> I also tried
> Jmol -n PDB_FILE -J ramachandran -w "OUT_PUT_FILE_NAME" -x
> It saved the image file, not data.
>
> other trials were:
> Jmol -n PDB_FILE -J ramachandran > "OUT_PUT_FILE_NAME" -x
> Jmol -n PDB_FILE -J write -j ramachandran "OUT_PUT_FILE_NAME" -x
>
> However, none of them worked as I expected...
>
> It would be greatly appreciated if anyone could help me.
>
Huan, with the '-J' and '-j' command-line options you must provide the 
same script commands like interactively. Since command-line arguments in 
Linux are separated by white-space you have to enclose the script 
commands in quotes. Like Matt I would also recommend to use 
'JmolData.jar' for batch processing of multiple PDB files:

java -jar JmolData.jar -j "write ramachandran 'ramachandran_data.txt'"

With single quotes as outer quotes the second double quote seems to get 
lost in Jmol 14.6.4 and you must add another double quote:

java -jar JmolData.jar -j 'write ramachandran "ramachandran_data.txt""'

The script commands after '-J' are processed before loading the file, 
while the script commands after '-j' are processed at the end (also 
after a script file called with '-s').

Regards,
Rolf



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Running Jmol in Linux command line

2016-12-19 Thread Angel Herráez
Hello, Huan 

You are in the right drection.

> Actually, I found a very brief introduction in Jmol Wiki website, where 
> listed some commands for loading PDB file and 
> running script in command line. However, I did not see any command for saving 
> data. 

Not specifically to save data, but it's the same method for any Jmol 
command or script.

> write ramachandran "OUTPUT_FILE_NAME"

That is a Jmol script

http://wiki.jmol.org/index.php/Jmol_Application#Command_line_options
tells you can use

 Jmol.jar  fileName  -J script_commands  -s scriptFileName  -j 
script_commands 

So it's probably a question of quotes; please try this way:

Jmol.jar  PDB_FILE -J 'ramachandran "OUTPUT_FILE_NAME"; '

or

Jmol.jar  PDB_FILE -J "ramachandran 'OUTPUT_FILE_NAME'; "

or, when the filemname is not conflictive (ie it does not use spaces or 
nonASCII characters) you can omit the quotes:

Jmol.jar  PDB_FILE -J "ramachandran OUTPUT_FILE_NAME; "


If that fails, or if it is more convenient for you, you can save the script in 
a 
text file, e.g. named MYSCRIPT.TXT and then

Jmol.jar  PDB_FILE -s MYSCRIPT.TXT

Jmol.jar  PDB_FILE -s "MYSCRIPT.TXT"



--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


Re: [Jmol-users] Running Jmol in Linux command line

2016-12-19 Thread Kubasik, Matthew A.
Huan,

You can add a line to your .profile or your .bashrc to recognize an alias to 
run Jmol.

For example, on my mac, I have edited my .profile to include:

alias jmol144="java -jar /Applications/jmol-14.4.0_2015.12.02/Jmol.jar”

This line means that typing jmol144 opens Jmol.

Note that if you are processing a lot of files, you may want JmolData.jar 
instead, which will run your scripts without graphical overhead.

Matt

On Dec 19, 2016, at 10:37 AM, Huan Wang 
mailto:huan.w...@mail.huji.ac.il>> wrote:

Dear Jmol developers and users,

I am a newbie to Jmol and I have a question on running Jmol in Linux command 
line.

Previously, when I prepared Ramachandran plot, I used Jmol interface to open 
PDB file and typed command in Jmol console as:
write ramachandran "OUTPUT_FILE_NAME"

That was very low efficient especially when dealing with large amount of PDB 
files. If Jmol could run in command line in Linux system with Bash Shell 
script, that would be perfect.

Actually, I found a very brief introduction in Jmol Wiki website, where listed 
some commands for loading PDB file and running script in command line. However, 
I did not see any command for saving data.
http://wiki.jmol.org/index.php/Jmol_Application

I tried to use
Jmol -n PDB_FILE -J ramachandran "OUT_PUT_FILE_NAME" -x
Howeve, it does not save data.

I also tried
Jmol -n PDB_FILE -J ramachandran -w "OUT_PUT_FILE_NAME" -x
It saved the image file, not data.

other trials were:
Jmol -n PDB_FILE -J ramachandran > "OUT_PUT_FILE_NAME" -x
Jmol -n PDB_FILE -J write -j ramachandran "OUT_PUT_FILE_NAME" -x

However, none of them worked as I expected...

It would be greatly appreciated if anyone could help me.

Thank you very much.

Best wishes,
Huan
.


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform 
today.http://sdm.link/intel___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users


[Jmol-users] Running Jmol in Linux command line

2016-12-19 Thread Huan Wang
Dear Jmol developers and users,

I am a newbie to Jmol and I have a question on running Jmol in Linux
command line.

Previously, when I prepared Ramachandran plot, I used Jmol interface to
open PDB file and typed command in Jmol console as:
*write ramachandran "OUTPUT_FILE_NAME"*

That was very low efficient especially when dealing with large amount of
PDB files. If Jmol could run in command line in Linux system with Bash
Shell script, that would be perfect.

Actually, I found a very brief introduction in Jmol Wiki website, where
listed some commands for loading PDB file and running script in command
line. However, I did not see any command for saving data.
http://wiki.jmol.org/index.php/Jmol_Application

I tried to use
Jmol -n PDB_FILE -J ramachandran "OUT_PUT_FILE_NAME" -x
Howeve, it does not save data.

I also tried
Jmol -n PDB_FILE -J ramachandran -w "OUT_PUT_FILE_NAME" -x
It saved the image file, not data.

other trials were:
Jmol -n PDB_FILE -J ramachandran > "OUT_PUT_FILE_NAME" -x
Jmol -n PDB_FILE -J write -j ramachandran "OUT_PUT_FILE_NAME" -x

However, none of them worked as I expected...

It would be greatly appreciated if anyone could help me.

Thank you very much.

Best wishes,
Huan
.
--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel___
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users