Hi Ritu,

for doing stuff in batch mode, you should put the complete procedure in 
the script, including parameters and function call. Then run PyMOL like 
this:

pymol -cqr example.py

That's all.

Cheers,
   Thomas

On 05/08/2012 11:30 PM, Rituparna Sengupta wrote:
> Hi,
>
> I'm wondering if anyone could tell me if there is a way of running a plugin 
> in batch mode. I tried running it as a script but does not work when I use 
> pymol -c or pymol -cq. The script has multiple arguments in the form of a 
> list. I assign the variables to a list and then use that list to run the 
> script. It works when the GUI is open (because I can assign values to a 
> variable), but doesn't when I use -c or -cq (can't assign values from the 
> command line.
>
> File name: example.py
>
> I used the extend command to extend the plugin to the command line (as 
> described in the plugin tutorial). The end of the file has something like 
> this:
>
> def dosomething(app):
>
>
>   a=tkSimpleDialog.askstring('sumthing',
>   'Enter variable: ',
>   parent=app.root)
>   b=tkSimpleDialog.askstring('sumthing',
>   'Enter variable: ',
>   parent=app.root)
>
>   c=tkSimpleDialog.askinteger('sumthing',
>   'Enter variable: ',
>   parent=app.root)
>   info=[a, b, c]
>   do_Something(info)
>
>
> cmd.extend('do_Something', do_Something)

>
> When the GUI is open, I assign the values of a, b and c to a variable string 
> like: inf=['a', 'b', c]; by typing into the pymol command line. Then I can 
> run the plugin using: do_Something(inf)
> But I can't assign the values of a, b, and c to inf when using batch mode. I 
> don't know how to. If anybody has any suggestions, please let me know. I'll 
> be grateful for any advice.
> Thanks in advance
>
> Ritu

-- 
Thomas Holder
MPI for Developmental Biology
Spemannstr. 35
D-72076 Tübingen

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Reply via email to