Another approach would be appending to sys.path, and loading the scripts
with import instead of run.
Arne Dieckmann wrote:
> That is a hot tip. However, can I also specify some path that would tell
> pymol the location of my scripts? I have a number of scripts that I need to
> call while alread
Hi Arne,
You could modify it like this:
python
# make a list of all your directories w/scripts
known_directories = [ "/path/to/dir1", "/path/to/dir2", ... ]
import glob
for p in known_directories:
for f in glob.glob(p+/*.py"):
cmd.do("run " + f)
python end
Cheers,
-- Jason
On M
That is a hot tip. However, can I also specify some path that would tell pymol
the location of my scripts? I have a number of scripts that I need to call
while already in Pymol and I do not want to type in the complete path every
time. Also, copying these scripts to the current working directory
Hi Jason,
Thanks for the info and lines of script. It did the job :) .
Best
Afonso
On Sun, Sep 18, 2011 at 5:55 AM, Jason Vertrees
wrote:
> Hi Alfonso,
>
> PyMOL knows about more spectrum types but cannot take advantage of
> them (at this point). You will need to do something different if you
Hi Lina,
Here's my trick for doing this. I created a directory called
pymol_scripts. Then, the scripts I download from the PyMOLWiki are put
them into this directory. Then using the following code in my
.pymolrc, PyMOL will automatically run these scripts for me on
startup:
python
import glob
for
On Mon, Sep 19, 2011 at 3:56 PM, Thomas Holder <
spel...@users.sourceforge.net> wrote:
> Hi Lina,
>
>
> Another question here,
>>
>> can I show the whole residue as a ball, and different residues connect by
>> (virtual) bonds.
>>
>
> combine ribbon and CA spheres:
>
> hide everything
> show ribbo
Hi Lina,
> Another question here,
>
> can I show the whole residue as a ball, and different residues connect
> by (virtual) bonds.
combine ribbon and CA spheres:
hide everything
show ribbon
show spheres, name CA
set sphere_scale, 0.5
set ribbon_width, 5
Cheers,
Thomas
--
Thomas Holder
MP
Hi Lina,
you can put a .pymolrc file in your home directory, it's a script that
PyMOL will read on each startup. You can have it either in PyMOL syntax
or as a python script, depending on the file extension.
/home/lina/.pymolrc (in PyMOL syntax)
/home/lina/.pymolrc.py (in python syntax)