Difference between revisions of "Fetch Host"

From PyMOLWiki
Jump to navigation Jump to search
(URL)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[Fetch_Host]] controls from which PDB server you download files when using the [[fetch]] command.  You options are:
+
The '''fetch_host''' setting controls from which PDB server you download files when using the [[fetch]] command.  You options are:
 
* pdb
 
* pdb
 
* 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.
  
= See Also =
+
''New in PyMOL 1.3''
[[Fetch]], [[Fetch_Path]]
+
 
 +
== 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 ==
 +
 
 +
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
 +
 
 +
<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 ==
 +
[[fetch]], [[Fetch_Path|fetch_path]]
  
 
[[Category:Settings]]
 
[[Category:Settings]]

Latest revision as of 03:38, 25 November 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