This is a read-only mirror of pymolwiki.org

Difference between revisions of "Fetch Host"

From PyMOL Wiki
Jump to navigation Jump to search
m (3 revisions)
m (1 revision)
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
 
* pdbe
 
* pdbe
 
* pdbj
 
* pdbj
 +
* mirror URL with "divided" layout ''(new in PyMOL 1.6)''
  
 
for the standard RCSB (pdb), pdb mirror in europe, and the pdb mirror in Japan.
 
for the standard RCSB (pdb), pdb mirror in europe, and the pdb mirror in Japan.
  
 
''New in PyMOL 1.3''
 
''New in PyMOL 1.3''
 +
 +
== Details ==
 +
 +
The exact URL (or list of URLs to try) is stored in <code>pymol.importing.hostPaths[type]</code>. The '''fetch_host''' setting only applies to the incomplete (not starting with <code>scheme://</code>) URL entries there.
  
 
== Usage ==
 
== Usage ==
Line 13: Line 18:
 
  set fetch_host, pdbe
 
  set fetch_host, pdbe
 
  set fetch_host, pdbj
 
  set fetch_host, pdbj
 +
set fetch_host, http://ftp.wwpdb.org/pub/pdb
 +
set fetch_host, file:///local/mirror/pub/pdb
 +
 +
<syntaxhighlight lang="python">
 +
# Paths which are appended to fetch_host
 +
import pymol
 +
pymol.importing.hostPaths["cif"] = "/data/structures/divided/mmCIF/{mid}/{code}.cif.gz"
 +
pymol.importing.hostPaths["pdb"] = "/data/structures/divided/pdb/{mid}/pdb{code}.ent.gz"
 +
</syntaxhighlight>
 +
 +
<syntaxhighlight lang="python">
 +
# Don't use fetch_host, use a custom URL
 +
import pymol
 +
pymol.importing.hostPaths["cif"] = "http://files.rcsb.org/download/{code}.{type}.gz"
 +
pymol.importing.hostPaths["pdb"] = "http://files.rcsb.org/download/{code}.{type}.gz"
 +
</syntaxhighlight>
  
 
== See Also ==
 
== See Also ==

Latest revision as of 04:50, 11 December 2017

The fetch_host setting controls from which PDB server you download files when using the fetch command. You options are:

  • pdb
  • pdbe
  • pdbj
  • mirror URL with "divided" layout (new in PyMOL 1.6)

for the standard RCSB (pdb), pdb mirror in europe, and the pdb mirror in Japan.

New in PyMOL 1.3

Details

The exact URL (or list of URLs to try) is stored in pymol.importing.hostPaths[type]. The fetch_host setting only applies to the incomplete (not starting with scheme://) URL entries there.

Usage

set fetch_host, pdb
set fetch_host, pdbe
set fetch_host, pdbj
set fetch_host, http://ftp.wwpdb.org/pub/pdb
set fetch_host, file:///local/mirror/pub/pdb
# Paths which are appended to fetch_host
import pymol
pymol.importing.hostPaths["cif"] = "/data/structures/divided/mmCIF/{mid}/{code}.cif.gz"
pymol.importing.hostPaths["pdb"] = "/data/structures/divided/pdb/{mid}/pdb{code}.ent.gz"
# Don't use fetch_host, use a custom URL
import pymol
pymol.importing.hostPaths["cif"] = "http://files.rcsb.org/download/{code}.{type}.gz"
pymol.importing.hostPaths["pdb"] = "http://files.rcsb.org/download/{code}.{type}.gz"

See Also

fetch, fetch_path