Web Service APIs: Search
RESTful Services support data query and retrieval in both JSON and XML formats. The Web Services mailing list will announce when new APIs are available or updated.
The Overview page provides a list of other Web Services offered.
- A generic SEARCH service allowing to POST advanced queries
- Search for ligands and PDB IDs based on a SMILES query
- Search for a sequence with BLAST search
About SEARCH services results
We have more than 80 query options in the advanced search system. All the advanced queries can be done by posting the relevant XML query representation to the search services. The queries can be categorized to four types based on the query results.
- Structure-based queries return a list of PDB IDs. Some examples are Author Name query, Macromolecule Type query, etc.
- Entity-based queries return a list of PDB IDs appended with entity IDs in the format of pdbid:entityid,...,pdbidn:entityidn. Some examples are Sequence BLAST query, Wild Type Protein query, etc.
- Chain-based query, e.g. Chain ID query. The query result is in the format pdbid:chainid,...,pdbidn:chainidn. It is useful for generating report on the specific chains.
- Chemical component queries return a list of ligand IDs. Some examples are Chemical Name query, Chemical structure (SMILES), etc.
BLAST with Structure ID and Chain ID. PostBLASTQuery.java
- EXACT: find an exact structure match
- SUBSTRUCTURE: find ligands that contain the specified structure as a substructure
- SUPERSTRUCTURE: find ligands that are substructures (fragments) of the specified structure /pdb/rest/smilesQuery?smiles=OC(=O)c1ccc(OCc2ccccc2)cc1&search_type=superstructure <% String html4 = "smiles=OC(=O)c1ccc(OCc2ccccc2)cc1&search_type=similarity&similarity=0.7"; String smilesEnc4 = HtmlEncoder.encode(html4); %>
- SIMILARITY: find structures that bind similar ligands.
Specify a similarity threshold to change the degree of similarity in the [0...1] range: 0 dissimilar ... 1 identical.
The similarity is based on the number of chemical features in common between the query and the target molecule. Similarity is calculated using the Tanimoto Coefficient. /pdb/rest/smilesQuery?smiles=OC(=O)c1ccc(OCc2ccccc2)cc1&search_type=similarity&similarity=0.7
This interface exposes the RCSB PDB advanced search interface as an XML Web Service.
To use this service, POST a XML representation of an advanced search to /pdb/rest/search.
XML representation of advanced search
Every advanced search can be represented by XML. To view an example representation, simply execute an advanced search query and then click on the Result tab. One of the links on the top of the page is Query Details.
Every query is described by two data items:
- queryType: the name of the class that is implementing the query
- arguments: depending on the type of query that is being executed one or more differently named arguments need to be provided.