Hi,
If you don't need the GUI you can access your command using the extend 
command.

In your script, put something like:

from pymol import cmd

def foo(bar):
     print bar

cmd.extend('foo', foo)


Then in pymol first use the 'run' command to have pymol read your 
script, and then call the function as usual.
foo 1


HTH,
Matt Baumgartner

On 04/01/2014 08:23 AM, mante...@gmail.com wrote:
> Hi all,
>
> I'm trying to run a PyMOL script from command line that invokes some
> custom plugins I've written. Everything works as supposed in GUI mode,
> but when running the script from command line, the parser complains that
> can't find any of the plugin commands included in the PyMOL script.
>
> This is the message I'm getting:
>
> Traceback (most recent call last):
>     File "/home/matt/PyMOL/modules/pymol/parser.py", line 464, in parse
>       exec(layer.com2+"\n",self.pymol_names,self.pymol_names)
>     File "<string>", line 1
>        cellcalc 3,3,3
>
>
> Any ideas?
>
> Thanks in advance
>
> matt
>
> ------------------------------------------------------------------------------
> _______________________________________________
> 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


------------------------------------------------------------------------------
_______________________________________________
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