PatternQuery:Use Cases

From WebChem Wiki
Revision as of 12:27, 2 June 2014 by Lukas (talk | contribs) (Created page with "==Statement of purpose== MotiveQuery (MQ) represents a cutting edge and powerful platform for complex, swift and accurate molecular motifs selection and analysis over a vast v...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Statement of purpose

MotiveQuery (MQ) represents a cutting edge and powerful platform for complex, swift and accurate molecular motifs selection and analysis over a vast variety of structural data. In the following text you can find a numerous use cases which will help you to deep dive into the language and the web service itself. Moreover, following text can also serve as a brief language reference. The full language reference is accessible via our wiki pages.

In order to tune up your queries or just to try an interactive work with the language, feel free to use MotiveExplorer (ME) application, where you can upload a PDB molecule of choice and immediately see the result of queries. ME requires an up-to-date web browser and the Silverlight framework installed. It has been tested under Windows and Mac OS operating systems.

How to read following text

The text is separated to three plus one part which differs by data type queries are operated (Atoms, Residues and Motives). The first two categories deal with only basic Atom or Residue selections. Outputs of these two types of queries are Atoms and Residues respectively. Last category is Motives, which contain numerous advanced queries demonstrating versatility and power of MQ. These queries operate on all results provided by both Atom and Residue queries. The additional part represents a few use cases of complex queries demonstrating possible application of MQ language.

Each query looks like this:

Name of the query()

  • [PDB ID] Here you find an example PDB ID where you can try out the query with MotiveExplorer and a rough description of the query function.
  • This is followed by examples of this query with with the explanation such as Residues("HEM").
  • Type of data query operate on and the expected returned value.
  • e.g. Type: Atoms(symbols: String*) -> Atoms. query Atoms() take 0..n strings in parenthesis ("C", "N", etc.) and based on the input returns a list of individual atoms.


By an atom we mean an individual point in Cartesian coordinate system as provided by ATOM or HETATOM records in PDB input files. Residue refers to any component of a biomacromolecule or a biomacromolecular complex. This includes amino acid residues, nucleotides and ligand, which are commonly referred to as residues as they provide building blocks for proteins and nucleic acids. A single residue is defined by its id and name defined in PDB input file. Subsequently, a motive is any sequence of either atoms or residues generated by MQ. Therefore, both atoms and residues can be considered as motives.  




  • [2hhb] Returns a list of individual atoms based on element type provided in the argument. More elements can be specified, if separated by a comma. In case no argument is provided a list of all the atoms is returned.
  • Atoms("Fe") - Returns all iron atoms in the given structure.
  • Atoms("Fe", "N") - Returns all iron and nitrogen atoms in the given structure.
  • Type: Atoms(symbols: String*) -> Atoms.



Selected Use Cases

Find all post-translational modified aminoacids

  • i.e. Those incodporated in the protein backbone and not hetero atoms
NotAminoAcids().Filter(lambda m: m.Count(HetResidues()) == 0) 
This query queries all the non-standard amino acids for their presence among Hetatom entries. Equivalently:
NotAminoAcids().Filter(lambda m: m.Contains(HetResidues()).Not())