From: András F. W. <wac...@tt...> - 2021-03-24 09:22:13
|
Dear fellow PyMOL users, I have found a solution (at least a workaround): pymol -cpihq <<EOF import pymol.plugins pymol.plugins.initialize(-1) ... EOF This way all plug-ins are loaded in the same way as when graphics mode is used, but the legacy Tk-based app part (which threw the exception) is not initialized. Kind regards, Andras On 3/24/21 9:48 AM, András Ferenc WACHA wrote: > Dear fellow PyMOL users, > > I'm trying to run open source PyMOL v2.4.0 on a Linux computer with no > X11 available (as part of a script on a HPC cluster). I noticed that > plug-ins are not loaded automatically, therefore I force the required > plug-in (pmlbeta) to load as follows: > > pymol -cpihq <<EOF > > import pymol.plugins > > pymol.plugins.plugin_load('pmlbeta') # or "apbs_tools" or > "lightingsettings_gui" > > EOF > > However, an exception is thrown by PyMOL: > > Exception in thread Thread-2: > Traceback (most recent call last): > File "/opt/miniconda3/envs/gmxbatch/lib/python3.9/threading.py", > line 954, in _bootstrap_inner > self.run() > File "/opt/miniconda3/envs/gmxbatch/lib/python3.9/threading.py", > line 892, in run > self._target(*self._args, **self._kwargs) > File > "/opt/miniconda3/envs/gmxbatch/lib/python3.9/site-packages/pymol/plugins/legacysupport.py", > line 134, in starttk > app.root = Tkinter.Tk() > File > "/opt/miniconda3/envs/gmxbatch/lib/python3.9/tkinter/__init__.py", > line 2270, in __init__ > self.tk = _tkinter.create(screenName, baseName, className, > interactive, wantobjects, useTk, sync, use) > _tkinter.TclError: no display name and no $DISPLAY environment variable > > I have ascertained that the exception occurs even before the > __init__.py module of my plugin starts running. > > In principle, my plug-in does not strictly need graphics, I would like > to use only the custom commands supplied by my plug-in (e.g. with > cmd.extend()). > > Is this possible? Or do I do something wrong (e.g. the forced loading > of the plug-in)? > > Kind regards, > > Andras Wacha > > > > _______________________________________________ > PyMOL-users mailing list > Archives: http://www.mail-archive.com/pym...@li... > Unsubscribe: https://sourceforge.net/projects/pymol/lists/pymol-users/unsubscribe -- András Ferenc Wacha, PhD research fellow, CREDO instrument responsible Biological Nanochemistry Research Group (310) Institute of Materials and Environmental Chemistry Research Centre for Natural Sciences (RCNS) Magyar tudósok körútja 2. H-1117 Budapest, Hungary Phone: +36-1-382-6427 Web: http://bionano.ttk.hu CREDO SAXS instrument: http://credo.ttk.hu |