Difference between revisions of "Database Connection"

From Jmol
Jump to navigation Jump to search
(load from databases)
(update of database server URLs)
Line 17: Line 17:
 
Macromolecular structures may be retrieved from the PDB database:
 
Macromolecular structures may be retrieved from the PDB database:
 
* Using the Jmol application, top menu bar <code>File > Get PDB</code>. A dialog is displayed where you can type a 4-character PDB ID.
 
* Using the Jmol application, top menu bar <code>File > Get PDB</code>. A dialog is displayed where you can type a 4-character PDB ID.
* Using the script language: use '''an equal sign''' followed by the 4-character PDB ID (no spaces). Example: <code>load =1CRN</code> for crambin.
+
* Using the script language:  
 +
** use '''an equal sign''' followed by the 4-character PDB ID (no spaces). Example: <code>load =1CRN</code> for crambin.
 +
** use '''an equal sign''' followed by <code>pdb</code>, a forward slash, and the 4-character PDB ID (no spaces). Example: <code>load =pdb/1CRN</code> for crambin.
  
 
For additional options (nucleic acid secondary structure, validation or domain annotations), see [{{ScriptingDoc}}#loadfiletypes the <code>load</code> command]
 
For additional options (nucleic acid secondary structure, validation or domain annotations), see [{{ScriptingDoc}}#loadfiletypes the <code>load</code> command]
Line 26: Line 28:
  
 
===Database location===
 
===Database location===
By default, Jmol will connect to the PDB server, at http://files.rcsb.org/view/ for macromolecules and at http://www.rcsb.org/pdb/files/ligand/ for ligands.
+
By default Jmol will connect to the PDB server at https://files.rcsb.org/download/ for macromolecules (when using the '=id' option) and at https://files.rcsb.org/ligands/download/ for ligands (when using the '==id' option).
 
To force the use of another server, you can do:
 
To force the use of another server, you can do:
 
  set loadFormat = "  "
 
  set loadFormat = "  "
Line 34: Line 36:
  
 
Examples:
 
Examples:
  set loadFormat = "<nowiki>http://www.rcsb.org/pdb/files/%FILE.pdb.gz</nowiki>"
+
  set loadFormat = "<nowiki>https://files.rcsb.org/download/%FILE.pdb</nowiki>"
 
  set loadFormat = "<nowiki>http://www.ebi.ac.uk/msd-srv/oca/oca-bin/save-pdb?id=%FILE</nowiki>"
 
  set loadFormat = "<nowiki>http://www.ebi.ac.uk/msd-srv/oca/oca-bin/save-pdb?id=%FILE</nowiki>"
  set loadLigandFormat = "<nowiki>http://www.rcsb.org/pdb/files/ligand/%FILE.cif</nowiki>"
+
  set loadLigandFormat = "<nowiki>https://files.rcsb.org/ligands/download/%FILE.cif</nowiki>"
  
 
=== PDB Europe ===
 
=== PDB Europe ===
Line 42: Line 44:
  
 
To retrieve models from them, '''in mmCIF format''':
 
To retrieve models from them, '''in mmCIF format''':
* Using the script language: use '''an asterisk sign''' followed by the 4-character PDB ID (no spaces). Example: <code>load *1CRN</code> for crambin.
+
* Using the script language:  
 +
** use '''an asterisk sign''' followed by the 4-character PDB ID (no spaces). Example: <code>load *1CRN</code> for crambin.
 +
** use '''an equal sign''' followed by <code>pdbe</code>, a forward slash, and the 4-character PDB ID (no spaces). Example: <code>load =pdbe/1CRN</code> for crambin.
  
 
For additional options (nucleic acid secondary structure, validation or domain annotations), see [{{ScriptingDoc}}#loadfiletypes the <code>load</code> command]
 
For additional options (nucleic acid secondary structure, validation or domain annotations), see [{{ScriptingDoc}}#loadfiletypes the <code>load</code> command]
Line 53: Line 57:
 
''Note'': the SMILES will be converted to a 3D model in the server.
 
''Note'': the SMILES will be converted to a 3D model in the server.
 
* Using the Jmol application, top menu bar <code>File > Get MOL</code>. A dialog is displayed where you can type the name or identifier.
 
* Using the Jmol application, top menu bar <code>File > Get MOL</code>. A dialog is displayed where you can type the name or identifier.
* Using the script language: use '''a dollar sign''' followed by the name or identifier (no spaces). If the name contains spaces, enclose between quotes. Examples: <code>load $aspirin</code>; <code>load "$acetylsalycilic acid"</code>
+
* Using the script language:  
 +
** use '''a dollar sign''' followed by the name or identifier (no spaces). If the name contains spaces, enclose between quotes. Examples: <code>load $aspirin</code>; <code>load "$acetylsalycilic acid"</code>
 +
** use '''an equal sign''' followed by <code>nci</code>, a forward slash, and the name or identifier. Example: <code>load =nci/$aspirin</code>
  
 
===Database location===
 
===Database location===
By default, Jmol will connect to the CACTUS server at http://cactus.nci.nih.gov/chemical/structure
+
By default, Jmol will connect to the CACTUS server at https://cactus.nci.nih.gov/chemical/structure/
 
To force the use of another server, you can do:
 
To force the use of another server, you can do:
 
  set nihResolverFormat = "  "
 
  set nihResolverFormat = "  "
Line 64: Line 70:
  
 
Examples:
 
Examples:
  set nihResolverFormat = "<nowiki>http://cactus.nci.nih.gov/chemical/structure/%FILE</nowiki>"
+
  set nihResolverFormat = "<nowiki>https://cactus.nci.nih.gov/chemical/structure/%FILE</nowiki>"
  set smilesURLformat = "<nowiki>http://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=True</nowiki>"
+
  set smilesURLformat = "<nowiki>https://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=true</nowiki>"
  
  
Line 73: Line 79:
 
Chemical structures may be retrieved from this database by name
 
Chemical structures may be retrieved from this database by name
 
* Using the Jmol application, top menu bar <code>File > Get MOL</code>. A dialog is displayed where you can type the name or identifier, prefixed with a : sign.
 
* Using the Jmol application, top menu bar <code>File > Get MOL</code>. A dialog is displayed where you can type the name or identifier, prefixed with a : sign.
* Using the script language: use '''a colon sign''' followed by the name or identifier (no spaces). If the name contains spaces, enclose between quotes. Examples:
+
* Using the script language:  
 +
** use '''a colon sign''' followed by the name or identifier (no spaces). If the name contains spaces, enclose between quotes.  
 +
** use '''an equal sign''' followed by <code>pubchem</code>, a forward slash, and the name or identifier.
 +
Examples:
 
** <code>load :aspirin</code>
 
** <code>load :aspirin</code>
 +
** <code>load =pubchem/aspirin</code>
 
** <code>load ":acetylsalycilic acid"</code>
 
** <code>load ":acetylsalycilic acid"</code>
 
* For a more explicit indication of the kind of identifier that is being provided, a tag and an extra colon are included:
 
* For a more explicit indication of the kind of identifier that is being provided, a tag and an extra colon are included:

Revision as of 11:55, 29 August 2016

Connection of Jmol to databases

Jmol can connect to certain databases in order to directly retrieve structures. This applies to the Jmol application, to the JSmol HTML5 object and to the Jmol signed applet. (The unsigned applet is not allowed connection to external servers and so does not support this method.)

Note: After changes (2016) in the way some databases allow access, old versions of Jmol will fail to retrieve the structures. Updating your Jmol will fix this problem. Example of this failure:
ERROR in script: unrecognized file format for file
http://cactus.nci.nih.gov/chemical/structure/tylenol/file?format=sdf&get3d=True
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>

PDB

(The RCSB Protein Data Bank, also Wordlwide PDB, wwPDB)

Macromolecular structures may be retrieved from the PDB database:

  • Using the Jmol application, top menu bar File > Get PDB. A dialog is displayed where you can type a 4-character PDB ID.
  • Using the script language:
    • use an equal sign followed by the 4-character PDB ID (no spaces). Example: load =1CRN for crambin.
    • use an equal sign followed by pdb, a forward slash, and the 4-character PDB ID (no spaces). Example: load =pdb/1CRN for crambin.

For additional options (nucleic acid secondary structure, validation or domain annotations), see the load command

Ligand structures can also be retrieved (in CIF format) from the PDB:

  • Using the Jmol application, top menu bar File > Get PDB. You must type an equal sign before the 3-character PDB ID of the ligand.
  • Using the script language: use two equal signs. Example: load ==ETB for ethyl-coenzyme A.

Database location

By default Jmol will connect to the PDB server at https://files.rcsb.org/download/ for macromolecules (when using the '=id' option) and at https://files.rcsb.org/ligands/download/ for ligands (when using the '==id' option). To force the use of another server, you can do:

set loadFormat = "  "
set loadLigandFormat = "  "

and put between the quotes the url in the proper request format; use %FILE at the position where the PDB ID should be inserted into the url. More details

Examples:

set loadFormat = "https://files.rcsb.org/download/%FILE.pdb"
set loadFormat = "http://www.ebi.ac.uk/msd-srv/oca/oca-bin/save-pdb?id=%FILE"
set loadLigandFormat = "https://files.rcsb.org/ligands/download/%FILE.cif"

PDB Europe

EMBL-EBI's Protein Data Bank in Europe (PDBe) keeps a mirror of the PDB data.

To retrieve models from them, in mmCIF format:

  • Using the script language:
    • use an asterisk sign followed by the 4-character PDB ID (no spaces). Example: load *1CRN for crambin.
    • use an equal sign followed by pdbe, a forward slash, and the 4-character PDB ID (no spaces). Example: load =pdbe/1CRN for crambin.

For additional options (nucleic acid secondary structure, validation or domain annotations), see the load command

NCI/NIH

National Cancer Institute, CADD Group's Chemoinformatics Tools, Chemical Identifier Resolver (CACTUS server).

Chemical structures may be retrieved from this database by using a common name, a IUPAC name, a SMILES, an InChI, an InChIKey, a Chemical Abstracts registry number...

Note: the SMILES will be converted to a 3D model in the server.

  • Using the Jmol application, top menu bar File > Get MOL. A dialog is displayed where you can type the name or identifier.
  • Using the script language:
    • use a dollar sign followed by the name or identifier (no spaces). If the name contains spaces, enclose between quotes. Examples: load $aspirin; load "$acetylsalycilic acid"
    • use an equal sign followed by nci, a forward slash, and the name or identifier. Example: load =nci/$aspirin

Database location

By default, Jmol will connect to the CACTUS server at https://cactus.nci.nih.gov/chemical/structure/ To force the use of another server, you can do:

set nihResolverFormat = "  "
set smilesURLformat = "  "

and put between the quotes the url in the proper request format; use %FILE at the position where the name or ID should be inserted into the url. More details

Examples:

set nihResolverFormat = "https://cactus.nci.nih.gov/chemical/structure/%FILE"
set smilesURLformat = "https://cactus.nci.nih.gov/chemical/structure/%FILE/file?format=sdf&get3d=true"


PubChem

National Center for Biotechnology Information, PubChem.

Chemical structures may be retrieved from this database by name

  • Using the Jmol application, top menu bar File > Get MOL. A dialog is displayed where you can type the name or identifier, prefixed with a : sign.
  • Using the script language:
    • use a colon sign followed by the name or identifier (no spaces). If the name contains spaces, enclose between quotes.
    • use an equal sign followed by pubchem, a forward slash, and the name or identifier.

Examples:

    • load :aspirin
    • load =pubchem/aspirin
    • load ":acetylsalycilic acid"
  • For a more explicit indication of the kind of identifier that is being provided, a tag and an extra colon are included:
    • load :name:tylenol
    • load :cas:103-90-2
    • load :cid:1983
    • load :smiles:CC(=O)Nc1ccc(cc1)O // the :smiles: tag is required


Crystallographic Open Database

The COD website holds an open-access collection of crystal structures of organic, inorganic, metal-organic compounds and minerals, excluding biopolymers.

(Feature added in Jmol Version 14.3.12_2015.01.21)

Chemical structures (in CIF format) may be retrieved from this database by numeric code

  • Using the script language: use an equal sign followed by 'cod', a forward slash and the numeric code of the compound (no spaces). Example:
    • load =cod/1000041

Contributors

AngelHerraez, Rzepa