Fetch Path: Difference between revisions

From PyMOLWiki
Jump to navigation Jump to search
No edit summary
(os.path.expanduser)
 
Line 4: Line 4:
If you have a local copy of the PDB on your machine, say in directory '''/spc/pdb''' then, once you set [[Fetch_Path]] to that directory the [[fetch]] command will look in '''/spc/pdb''' before going to the PDB for your file.  Also, the files fetched from the PDB are stored here once downloaded. PyMOL will only look for files starting with the pdb code in lower case.
If you have a local copy of the PDB on your machine, say in directory '''/spc/pdb''' then, once you set [[Fetch_Path]] to that directory the [[fetch]] command will look in '''/spc/pdb''' before going to the PDB for your file.  Also, the files fetched from the PDB are stored here once downloaded. PyMOL will only look for files starting with the pdb code in lower case.


= Usage and Examples =
= Examples =
 
On Linux or MacOS:
<source lang="python">
<source lang="python">
set fetch_path, path
set fetch_path, /spc/pdb
set fetch_path, /spc/pdb
</source>


set fetch_path, D:\mypdbs\
On Windows:
<source lang="python">
set fetch_path, D:\mypdbs
</source>
</source>


= Hints =
Using <code>~/fetch_path</code>:
If you have a local directory for storing files then put
<source lang="python">
<source lang="python">
set fetch_path, /your/path/here
cmd.set('fetch_path', cmd.exp_path('~/fetch_path'), quiet=0)
</source>
</source>
in your [[pymolrc]] file to auto set this setting.
 
= Hints =
 
Put this in your [[pymolrc]] to make it permanent.


= See Also =
= See Also =
[[fetch]]
* [[fetch]]
* [[pymolrc]]


[[Category:Settings]]
[[Category:Settings]]

Latest revision as of 09:59, 15 December 2016

Fetch_Path sets the default path that PyMOL uses to load files from before it tries to download them from the PDB.

Details

If you have a local copy of the PDB on your machine, say in directory /spc/pdb then, once you set Fetch_Path to that directory the fetch command will look in /spc/pdb before going to the PDB for your file. Also, the files fetched from the PDB are stored here once downloaded. PyMOL will only look for files starting with the pdb code in lower case.

Examples

On Linux or MacOS:

set fetch_path, /spc/pdb

On Windows:

set fetch_path, D:\mypdbs

Using ~/fetch_path:

cmd.set('fetch_path', cmd.exp_path('~/fetch_path'), quiet=0)

Hints

Put this in your pymolrc to make it permanent.

See Also