<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://webchemwiki.biodata.ceitec.cz/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dave</id>
	<title>WebChemistry Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://webchemwiki.biodata.ceitec.cz/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Dave"/>
	<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/Special:Contributions/Dave"/>
	<updated>2026-04-21T15:39:15Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=LiteMol:Embedding&amp;diff=2223</id>
		<title>LiteMol:Embedding</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=LiteMol:Embedding&amp;diff=2223"/>
		<updated>2016-08-09T11:50:00Z</updated>

		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;To find out how to embed LiteMol, please check the example included with with source code distribution.  LiteMol has a very flexible plugin architecture and allows you to cust...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;To find out how to embed LiteMol, please check the example included with with source code distribution.&lt;br /&gt;
&lt;br /&gt;
LiteMol has a very flexible plugin architecture and allows you to customise which components you want to include. The examples also show how to write your own components and control schemes.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:UserManual&amp;diff=1240</id>
		<title>PatternQuery:UserManual</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:UserManual&amp;diff=1240"/>
		<updated>2015-04-26T22:23:19Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PatternQuery&#039;&#039;&#039; (&#039;&#039;&#039;PQ&#039;&#039;&#039;) is interactive, user-friendly and platform independent web service enabling users to effectively define, extract and analyze biomolecular structural patterns using the &#039;&#039;&#039;PatternQuery language&#039;&#039;&#039;. Such analysis is particularly useful not only in a structural and functional assignment of uncharacterized or newly determined proteins, but also represents a key point in rational design and engineering of novel functional sites and comparative protein structural analyses.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;PQ&#039;&#039;&#039; is provided as a web service for mining the whole [http://pdb.org/pdb/home/home.do PDB database], however it can also be restricted based on numerous metadata, such as the &#039;&#039;Release date&#039;&#039;, &#039;&#039;Resolution&#039;&#039;, &#039;&#039;EC number&#039;&#039; and so on. Therefore, only structures relevant for your research are processed. Additionally, smaller datasets can be processed by the [[PatternQuery:Explorer | PatternQuery Explorer]] application. Larger in-house databases can be processed with the [[PatternQuery:Command Line | command line application]].&lt;br /&gt;
&lt;br /&gt;
Below you can find the &#039;&#039;&#039;PQ&#039;&#039;&#039; user manual, which contains all the information you need in order to make efficient use of &#039;&#039;&#039;PQ&#039;&#039;&#039;. Additional support is provided on the [http://webchem.ncbr.muni.cz/Platform/PatternQuery/Index &#039;&#039;&#039;PQ&#039;&#039;&#039; web pages]. When you first access the &#039;&#039;&#039;PQ&#039;&#039;&#039; page, you will find basic information in the Quick Help tab, and useful examples in the Samples tab. Follow the green ? buttons to access the embedded interactive guides that assist you in setting up your calculations and interpreting the results. Many tool tips are available when hovering over various elements of the interface.&lt;br /&gt;
----&lt;br /&gt;
===[[PatternQuery:Introduction | Introduction]]===&lt;br /&gt;
----&lt;br /&gt;
===[[PatternQuery:Terminology | Terminology]]===&lt;br /&gt;
#[[PatternQuery:Terminology#Atom | Atom]]&lt;br /&gt;
#[[PatternQuery:Terminology#Residue | Residue]]&lt;br /&gt;
#[[PatternQuery:Terminology#Fragment | Fragment]]&lt;br /&gt;
#[[PatternQuery:Terminology#Query | Query]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===[[PatternQuery:Principles | Principles of the PQ language]]===&lt;br /&gt;
#[[PatternQuery:Principles#Example, Part One | Example - introduction]]&lt;br /&gt;
#[[PatternQuery:Principles#Basic Principles of the Language | Basic Principle]]&lt;br /&gt;
#[[PatternQuery:Principles#Example, Part One | Example - revised]]&lt;br /&gt;
----&lt;br /&gt;
===[[PatternQuery:How to build a query | How to build a query]]===&lt;br /&gt;
#[[PatternQuery:How to build a query#How to think about queries | How to think about query]]&lt;br /&gt;
#[[PatternQuery:How to build a query#Ready-to-use examples | Ready-to-use examples]]&lt;br /&gt;
----&lt;br /&gt;
===[[PatternQuery:Use Cases | Biological use cases]]===&lt;br /&gt;
#[[PatternQuery:Use Cases#Find all post-translational modified amino acids | Post-translational modified aminoacids]]&lt;br /&gt;
#[[PatternQuery:Use Cases#Identify Zinc fingers | Zinc fingers]]&lt;br /&gt;
#[[PatternQuery:Use Cases#Identify all the residues, which contain a sugar ring | Residue containing carbohydrate moiety]]&lt;br /&gt;
----&lt;br /&gt;
===[[PatternQuery:Explorer | PatternQuery Explorer]]===&lt;br /&gt;
# [[PatternQuery:Explorer#Launch PatternQuery Explorer app | Launch application]]&lt;br /&gt;
# [[PatternQuery:Explorer#Get started with PatternQuery Explorer | How to work with it]]&lt;br /&gt;
# [[PatternQuery:Explorer#Executing Query &amp;amp; interpreting results | Execute query]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===[[PatternQuery:Service Organization | Using PatternQuery Service]]===&lt;br /&gt;
# [[PatternQuery:Service Organization#Synopsis Page | Synopsis Page]]&lt;br /&gt;
# [[PatternQuery:Service Organization#Job Submission | Job submission]]&lt;br /&gt;
# [[PatternQuery:Service Organization#Specifics Page | Result analysis]]&lt;br /&gt;
# [[PatternQuery:Specifics Page| Specifics Page]]&lt;br /&gt;
## [[PatternQuery:Specifics Page#Calculation Summary| Calculation Summary]]&lt;br /&gt;
## [[PatternQuery:Specifics Page#Fragment Details | Fragment Details]]&lt;br /&gt;
## [[PatternQuery:Specifics Page#Structure Details | Structure Details ]]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===[[PatternQuery:Language_Reference | Language reference]]===&lt;br /&gt;
----&lt;br /&gt;
===[[PatternQuery:Command Line | Command line version &amp;amp; Technical details]]===&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=1183</id>
		<title>PatternQuery:Language Reference</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=1183"/>
		<updated>2015-04-23T20:48:18Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
PatternQuery (PQ) is a user friendly chemical language primarily designed for defining atom patterns in molecules. PQ combines the clarity and brevity of programming languages with  the versatility of natural language, aiming for an efficient inclusion of chemical and biochemical knowledge into the definition of patterns. PQ allows definitions based on chemical connectivity and three-dimensional structure at the same time. Additionally, in the case of molecules based on residue chains (such as proteins, nucleic acids, saccharides, etc.), PQ allows the user to include any amount of information regarding the residue level structure directly into the definition of the patternss.&lt;br /&gt;
&lt;br /&gt;
PatternQuery is a subset of the Python programming language. Therefore, if you have experience with it, it should not be a problem to use PQ as well.&lt;br /&gt;
&lt;br /&gt;
* The language is case sensitive - &amp;quot;filter&amp;quot; is NOT the same as &amp;quot;FiLtEr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some of the functions return &#039;&#039;&#039;&amp;lt;code&amp;gt;PatternSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; while other return &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039;. &lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;PatternSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a sequence of &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039; (the sets of atoms).&lt;br /&gt;
&lt;br /&gt;
When a molecule is queried, say using the expression &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt; a sequences of patterns each containing 6 atoms (5 C and 1 O) is returned. However, some functions such as &amp;lt;code&amp;gt;Filter&amp;lt;/code&amp;gt; need to operate on a single pattern (the set of atoms) - not the whole sequences. The query &amp;lt;code&amp;gt;Residues().Filter(lambda r: r.Count(Atoms()) &amp;gt; 10)&amp;lt;/code&amp;gt; first finds all residue patterns (&#039;&#039;&#039;&amp;lt;code&amp;gt;PatternSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039;) and then passes every single &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039; (set of atoms) to a function that counts the atoms in the pattern and returns True if there is at least 11 of them. This is the reasoning behind these two types.&lt;br /&gt;
&lt;br /&gt;
== Basic Query Functions ==&lt;br /&gt;
&#039;&#039;Basic building blocks of the language - i.e. atoms, residues, and the like.&#039;&#039;&lt;br /&gt;
=== AminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues with the 20 basic amino acid names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: ChargeType&amp;amp;#58; String = &amp;quot;&amp;quot; - &#039;&#039;Specify type of the charge. Allowed values: Positive, Negative, Aromatic, Polar, NonPolar.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All amino acids.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids(ChargeType = &amp;quot;Polar&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Amino acids with polar charge.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIdRange(minId&amp;amp;#58; Integer, maxId&amp;amp;#58; ?Integer) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with minId &amp;lt;= atomId &amp;lt;= maxId.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: minId&amp;amp;#58; Integer - &#039;&#039;Minimum id.&#039;&#039; &lt;br /&gt;
: maxId&amp;amp;#58; ?Integer - &#039;&#039;Maximum id. If not specified, maxId = minId.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIdRange(152, 161)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with id between 152 and 161 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms with ids 1, 2, 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Allowed names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomNames(&amp;quot;O1&amp;quot;,&amp;quot;NH1&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with names O1 or NH1.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Atoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;Atoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified element symbols. If no symbols are specified, yields all atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;,&amp;quot;Ca&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with element symbol Zn or Ca&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Chains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Chains(identifiers&amp;amp;#58; Value*) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Splits the structures into chains. If no identifiers are specified, all chains are returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: identifiers&amp;amp;#58; Value* - &#039;&#039;Chain identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all chains.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains without specific identifier.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains A and B.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Helices ===&lt;br /&gt;
&amp;lt;code&amp;gt;Helices() -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all helices. This assumes the information about helices was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Helices()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all helices.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HetResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;HetResidues() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that contain HET atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (ignores water).&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues(NoWaters=False)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (includes water).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ModifiedResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ModifiedResidues(parentNames&amp;amp;#58; String*) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of modified residues that originate from the specified name. If no names are specified, yields all modified residues one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: parentNames&amp;amp;#58; String* - &#039;&#039;Parent residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ModifiedResidues(&amp;quot;MET&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues modified from MET (for example MSE).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Named ===&lt;br /&gt;
&amp;lt;code&amp;gt;Named(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Names&#039; the pattern by its lowest atom id.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).Named().AmbientAtoms(7)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;When exported, the result files will have names in the format &#039;[parent id]_[pseudorandom number]_[zn atomid]&#039;. If the Named function was not used, the name would be just &#039;[parent id]_[pseudorandom number]&#039;.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that are not any of the 20 basic amino acids.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not amino acids.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms that do not have id 1, 2, nor 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have a specified name.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Forbidden names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomNames(&amp;quot;O4&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not called O4.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtoms(symbols&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that are not particular elements.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String+ - &#039;&#039;Forbidden element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtoms(&amp;quot;O&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotResidues(names&amp;amp;#58; Value+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues that are not called by the specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; Value+ - &#039;&#039;Forbidden residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotResidues(&amp;quot;THR&amp;quot;,&amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not THR or CYS.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RegularMotifs ===&lt;br /&gt;
&amp;lt;code&amp;gt;RegularMotifs(regex&amp;amp;#58; Value) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Identifies regular motifs. The protein is split into individual chains and the residues are sorted by their Sequence Number before the motifs are identified. The query does not check if adjacent residues have consecutive Sequence Numbers. The query works in two modes: Amino and Nucleotide, on amino acids and nucleotides respectively. In the Amino mode, all the derivatives of standard residues are treated as the standard residues, as long as this information is properly annotated in MODRES or _pdbx_struct_mod_residue field. The default mode is &#039;Amino&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: regex&amp;amp;#58; Value - &#039;&#039;Regular expression on one letter abbreviations of amino acids.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: Type&amp;amp;#58; String = &amp;quot;Amino&amp;quot; - &#039;&#039;Determines the type of the query. Allowed values: Amino, Nucleotide.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;RGD&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all RGD motifs.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;ACGTU&amp;quot;, Type = &#039;Nucleotide&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all consecutive occurrences of the ACGTU nucleotides.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;.HC.&amp;quot;).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all 4 residue motifs with ?-HIS-CYS-? that are connected.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIdRange(chain&amp;amp;#58; String, min&amp;amp;#58; Integer, max&amp;amp;#58; ?Integer) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific chain and min &amp;lt;= sequence number &amp;lt;= max.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: chain&amp;amp;#58; String - &#039;&#039;Chain identifier. Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
: min&amp;amp;#58; Integer - &#039;&#039;Minimum sequence number.&#039;&#039; &lt;br /&gt;
: max&amp;amp;#58; ?Integer - &#039;&#039;Maximum sequence number. If not specified, max = min.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIdRange(&amp;quot;A&amp;quot;, 161, 165)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues on chain A with seq. number between 161 and 165 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIds(ids&amp;amp;#58; String+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific identifiers. If the structure does not contain a residue with the given identifier, it is skipped.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; String+ - &#039;&#039;One or more identifiers in the format &#039;NUMBER [CHAIN] [i:INSERTIONCODE]&#039; (parameters in [] are optional, for example &#039;175 i:12&#039; or &#039;143 B&#039;). Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIds(&amp;quot;132 A&amp;quot;, &amp;quot;178 A&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues A 123 and A 178 (provided the input structure contains them).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Residues ===&lt;br /&gt;
&amp;lt;code&amp;gt;Residues(names&amp;amp;#58; String*) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specified names. If no names are specified, yields all residues one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String* - &#039;&#039;Allowed residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;, &amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HIS or CYS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RingAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;RingAtoms(atom&amp;amp;#58; Atoms, ring&amp;amp;#58; ?Rings) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all rings atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atom&amp;amp;#58; Atoms - &#039;&#039;Atom types.&#039;&#039; &lt;br /&gt;
: ring&amp;amp;#58; ?Rings - &#039;&#039;Specific ring.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RingAtoms(Atoms(&amp;quot;C&amp;quot;), Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on a ring with 4C and O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Rings ===&lt;br /&gt;
&amp;lt;code&amp;gt;Rings(atoms&amp;amp;#58; Value*) -&amp;amp;gt; Rings&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of rings with particular atoms. If no atoms are specified, yields all rings (cycles) one by one. The order of atoms matters.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atoms&amp;amp;#58; Value* - &#039;&#039;Ring atoms.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with 5C and 1O atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;]), Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;N&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N or C-C-C-N-N atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Sheets ===&lt;br /&gt;
&amp;lt;code&amp;gt;Sheets() -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all sheets. This assumes the information about sheets was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Sheets()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all sheets.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Advanced Query Functions ==&lt;br /&gt;
&#039;&#039;Advanced building blocks of the language.&#039;&#039;&lt;br /&gt;
=== Flatten ===&lt;br /&gt;
&amp;lt;code&amp;gt;Flatten(patterns&amp;amp;#58; PatternSeq, selector&amp;amp;#58; Pattern-&amp;gt;PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of sequence of patterns into a single &#039;flat&#039; sequence.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to project.&#039;&#039; &lt;br /&gt;
: selector&amp;amp;#58; Pattern-&amp;gt;PatternSeq - &#039;&#039;The selector.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).Flatten(lambda m: m.Find(Atoms(&amp;quot;C&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Inside ===&lt;br /&gt;
&amp;lt;code&amp;gt;Inside(patterns&amp;amp;#58; PatternSeq, where&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds patterns within another pattern. Equivalent to where.Flatten(lambda m: m.Find(patterns))&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to find.&#039;&#039; &lt;br /&gt;
: where&amp;amp;#58; PatternSeq - &#039;&#039;Where to find them.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Inside(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Or ===&lt;br /&gt;
&amp;lt;code&amp;gt;Or(patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Merges several pattern sequences into one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1), Rings())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all zincs and their connected residues or rings.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToAtoms(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; patterns and yields all unique atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms on HIS residues one by one.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToResidues(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; patterns and yields all unique residues one by one. The residues contain only the atoms that have been yielded by the inner query.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).ToResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms grouped by residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Union ===&lt;br /&gt;
&amp;lt;code&amp;gt;Union(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; patterns and yields one created from their unique atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings().Union()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Creates a single pattern that contains all rings.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Filter Functions ==&lt;br /&gt;
&#039;&#039;Functions useful for filtering patterns.&#039;&#039;&lt;br /&gt;
=== Contains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Contains(where&amp;amp;#58; Pattern, what&amp;amp;#58; PatternSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a pattern is contained within another one. Equivalent to where.Count(what) &amp;gt; 0.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; PatternSeq - &#039;&#039;What to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues().Filter(lambda m: m.Contains(Rings(5*[&#039;C&#039;]+[&#039;O&#039;])).Not())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HET residues that do not contain a 5CO ring.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Count ===&lt;br /&gt;
&amp;lt;code&amp;gt;Count(where&amp;amp;#58; Pattern, what&amp;amp;#58; PatternSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts all occurrences of pattern &#039;what&#039; in pattern &#039;where&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;Where to count it.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; PatternSeq - &#039;&#039;What pattern to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;m.Count(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the count of HIS residues in the pattern m. Where m is a Pattern (for example when using the Filter function or returned by the ToPattern() function). This example will not work directly and is here to illustrate a concept.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1).Filter(lambda m: m.Count(Residues(&amp;quot;HIS&amp;quot;)) == 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Patterns with Zn atoms and its connected residues with exactly 2 HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ExecuteIf ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExecuteIf(query&amp;amp;#58; PatternSeq, condition&amp;amp;#58; Pattern-&amp;gt;Bool) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Executes a query only if the condition is met. Otherwise, return an empty sequence of patterns.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: query&amp;amp;#58; PatternSeq - &#039;&#039;Query to execute.&#039;&#039; &lt;br /&gt;
: condition&amp;amp;#58; Pattern-&amp;gt;Bool - &#039;&#039;Condition that must be satisfied for the parent structure/pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that have resolution lower than 2.4ang.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids().ExecuteIf(lambda p: p.Count(Atoms(&#039;Fe&#039;)) &amp;gt; 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all amino acids in structures that have at least 3 Fe atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filter ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filter(patterns&amp;amp;#58; PatternSeq, filter&amp;amp;#58; Pattern-&amp;gt;Bool) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Filters a sequence of patterns with a given predicate.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to filter.&#039;&#039; &lt;br /&gt;
: filter&amp;amp;#58; Pattern-&amp;gt;Bool - &#039;&#039;Filter predicate.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda m: m.Count(Atoms(&amp;quot;C&amp;quot;)) &amp;gt;= 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain at least 3 C atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnected ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnected(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular pattern is a connected graph.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all patterns with a Zn and residues within 3 ang, where all the ambient residues are connected to the central atom.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnectedTo(where&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular pattern is connected to any other specified pattern. The patterns must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Pattern sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.IsConnectedTo(Rings()))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are connected to a ring they do not belong to.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsNotConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsNotConnectedTo(what&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular pattern is not connected to any other specified pattern. The patterns must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Pattern sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda r: r.IsNotConnectedTo(Atoms(&amp;quot;Ca&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all residues that are not connected to Ca atoms. The residue itself can still contain Ca atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NearestDistanceTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;NearestDistanceTo(where&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds the distance to a particular pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Pattern sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda m: m.NearestDistanceTo(Residues(&amp;quot;ASP&amp;quot;)) &amp;gt;= 5)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are at least 5 (angstroms) away from any ASP residue.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== SeqCount ===&lt;br /&gt;
&amp;lt;code&amp;gt;SeqCount(what&amp;amp;#58; PatternSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts the length of a sequence of motifs.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; PatternSeq - &#039;&#039;What pattern sequence to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.Find(Residues(&amp;quot;HIS&amp;quot;)).SeqCount() &amp;gt; 1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a sequence of patterns with Zn atom and residues within 3ang if the pattern contains at least 2 HIS residues.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Topology Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the topology of patterns.&#039;&#039;&lt;br /&gt;
=== ConnectedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedAtoms(pattern&amp;amp;#58; PatternSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by n layers of atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of atom layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;MAN&amp;quot;).ConnectedAtoms(2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all MAN residues and then adds two connected levels of atoms to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ConnectedResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedResidues(pattern&amp;amp;#58; PatternSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by n layers of residues.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of residue layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all Zn atoms and adds all residues that are connected to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Path ===&lt;br /&gt;
&amp;lt;code&amp;gt;Path(patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new pattern from &#039;connected&#039; parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to path.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Path(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds patterns with two O and one C atoms where the C atoms is connected to the O ones.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Star ===&lt;br /&gt;
&amp;lt;code&amp;gt;Star(center&amp;amp;#58; PatternSeq, patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new pattern from a central one and connected parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: center&amp;amp;#58; PatternSeq - &#039;&#039;Center pattern.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to chain.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Star(Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds patterns with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Star(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds patterns with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Geometry Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the geometry of patterns.&#039;&#039;&lt;br /&gt;
=== AmbientAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientAtoms(pattern&amp;amp;#58; PatternSeq, r&amp;amp;#58; Number) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by atoms that within the given radius from the inner pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original pattern.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;).AmbientAtoms(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds Fe atoms and all atoms within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AmbientResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientResidues(pattern&amp;amp;#58; PatternSeq, r&amp;amp;#58; Number) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by residues that have at least one atom within the given radius from the inner pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original pattern.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(6 * [&amp;quot;C&amp;quot;]).AmbientResidues(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds rings with 6C atoms and all residues within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Cluster ===&lt;br /&gt;
&amp;lt;code&amp;gt;Cluster(r&amp;amp;#58; Number, patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all patterns that are pairwise closer than r (angstroms).&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two patterns in the cluster.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to cluster.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of one or more rings with 5C and O atoms and one or more Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filled ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filled(pattern&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Adds all atoms that fall within the circumsphere (with radius multiplied by the factor) of the basic pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: RadiusFactor&amp;amp;#58; Number = 0.75 - &#039;&#039;Circumsphere radius factor.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Residues(&amp;quot;HIS&amp;quot;)).Filled(RadiusFactor = 0.75)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds clusters of HIS residues and all atoms within the circumsphere.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Near ===&lt;br /&gt;
&amp;lt;code&amp;gt;Near(r&amp;amp;#58; Number, patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all patterns that are pairwise closer than r (angstroms) and checks if the &amp;quot;counts&amp;quot; match.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two sub-patterns in the pattern.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to &#039;cluster&#039;.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Near(4, Atoms(&amp;quot;Ca&amp;quot;), Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of a single ring with 5C and O atoms and two Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Meta-data Functions ==&lt;br /&gt;
&#039;&#039;Functions dealing with meta-data about structures such as release date or authors.&#039;&#039;&lt;br /&gt;
=== Authors ===&lt;br /&gt;
&amp;lt;code&amp;gt;Authors(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns authors of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;ECNumbers(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns Enzymatic Commission numbers assigned to enzymes in the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== EntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;EntitySources(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns entity sources of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ExperimentMethod ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExperimentMethod(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the experiment method. The value is always an upper-case string. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ExperimentMethod() == &amp;quot;INFRARED SPECTROSCOPY&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllAuthors ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllAuthors(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllAuthors(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllECNumbers(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given Enzymatic Commission numbers. It is possible to enter just a number prefix without the &#039;.&#039;. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllECNumbers(&amp;quot;3.2.1.18&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllEntitySources(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismIds(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismIds(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganisms(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganisms(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllKeywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllKeywords(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllKeywords(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismIds(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismIds(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganisms(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganisms(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyAuthor ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyAuthor(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyAuthor(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyECNumber ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyECNumber(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given Enzymatic Commission number. It is possible to enter just a number prefix without the &#039;.&#039;s. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyECNumber(&amp;quot;3.2.1.19&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyEntitySources(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganism(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganism(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismId(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismId(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyKeyword ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyKeyword(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyKeyword(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganism(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganism(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismId(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismId(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismGenus(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismIds(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganisms(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Keywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;Keywords(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns keywords of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionDate(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionYear(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismGenus(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismIds(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganisms(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== PolymerType ===&lt;br /&gt;
&amp;lt;code&amp;gt;PolymerType(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the polymer type of the structure. Possible values are: NotAssigned, Protein, DNA, RNA, ProteinDNA, ProteinRNA, NucleicAcids, Mixture, Sugar, Other. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.PolymerType() == &amp;quot;ProteinDNA&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometry ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometry(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry of the parent structure. Possible values are: NotAssigned, Monomer, Homomer, Heteromer. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ProteinStoichiometry() == &amp;quot;Heteromer&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometryString ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometryString(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry string of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ReleaseDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseDate(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ReleaseYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseYear(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Resolution ===&lt;br /&gt;
&amp;lt;code&amp;gt;Resolution(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the resolution in angstroms of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Weight ===&lt;br /&gt;
&amp;lt;code&amp;gt;Weight(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the weight of the molecule in kDa. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Weight() &amp;gt; 100000.0)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Miscellaneous Functions ==&lt;br /&gt;
&#039;&#039;Various useful functions. These function often require a special setup (i.e. only useful in Scripting window or in specific applications).&#039;&#039;&lt;br /&gt;
=== AminoSequenceString ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoSequenceString(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a string of single-letter amino acids contained in the pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Pattern(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a string representing amino acids in the pattern &#039;1tqn_12&#039;.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(Pattern(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all regular patterns that correspond to the AMK sequence in 1tqn_12.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomProperty ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomProperty(atomPattern&amp;amp;#58; Pattern, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;If the property exists and the pattern consists of a single atom, returns the property. Otherwise, returns Nothing.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atomPattern&amp;amp;#58; Pattern - &#039;&#039;Single atom pattern.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Property name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;a.AtomProperty(&amp;quot;charge&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Gets the &#039;charge&#039; property of the atom a. Where a is a single atom Pattern. This example will not work directly.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.AtomProperty(&amp;quot;charge&amp;quot;) &amp;gt;= 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All atoms with the charge property greater or equal to 2. This example will only work in cases where a suitable property is defined. For example in Scripting window in the Charges app.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomSimilarity(a&amp;amp;#58; Pattern, b&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on atoms (element symbols) of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Pattern - &#039;&#039;First pattern.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Pattern - &#039;&#039;Second pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(),Pattern(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity between the current pattern and 1tqn_12. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CommonAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;CommonAtoms(modelId&amp;amp;#58; String) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a single pattern with atoms common with the model. Properties checked: atom id, element symbol, chain, residue number. This query is useful for example for atom selection in SiteBinder.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: modelId&amp;amp;#58; String - &#039;&#039;Id of the model.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CommonAtoms(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a pattern formed by atoms common with the &#039;1tqn_12&#039; structure.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CSA ===&lt;br /&gt;
&amp;lt;code&amp;gt;CSA() -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Entries from Catalytic Site Atlas represented as patterns. Works only if used from the command line version of Queries and property configured.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CSA()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All CSA sites for the given structure. This example will only work if used from the command line version of Queries and property configured.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Current ===&lt;br /&gt;
&amp;lt;code&amp;gt;Current() -&amp;amp;gt; Pattern&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;A variable that is assigned by the application environment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(), Pattern(&amp;quot;model&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the atom similarity of the current pattern and the model. This example will work for example when defining a structure descriptor in SiteBinder and there is a structure with id &#039;model&#039; loaded.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Descriptor ===&lt;br /&gt;
&amp;lt;code&amp;gt;Descriptor(pattern&amp;amp;#58; Pattern, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns the descriptor. If the descriptor does not exist, &#039;null&#039; is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern that represents entire structure.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Descriptor name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Current().Descriptor(&amp;quot;similarity&amp;quot;) &amp;gt;= 0.75&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns True if &#039;similarity&#039; descriptor of the current pattern is at least 0.75. This example will work for example in SiteBinder&#039;s structure selection if the &#039;similarity&#039; descriptor has been previously defined.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== DynamicInvoke ===&lt;br /&gt;
&amp;lt;code&amp;gt;DynamicInvoke(value&amp;amp;#58; Value, name&amp;amp;#58; String, isProperty&amp;amp;#58; Bool, args&amp;amp;#58; Value) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Dynamically invoke a member. (internal)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: value&amp;amp;#58; Value - &#039;&#039;InnerQuery.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Member name.&#039;&#039; &lt;br /&gt;
: isProperty&amp;amp;#58; Bool - &#039;&#039;Is this a property.&#039;&#039; &lt;br /&gt;
: args&amp;amp;#58; Value - &#039;&#039;Array of arguments.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Find ===&lt;br /&gt;
&amp;lt;code&amp;gt;Find(source&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts the source pattern to a structure and finds patterns within it.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: source&amp;amp;#58; Pattern - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern(), Pattern(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; patterns, but ignores N atoms. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;model&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GroupedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;GroupedAtoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Groups atoms using the element symbol and then returns each group as a single pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO, patterns with 5xC and 1xO atoms are returned.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms(&#039;C&#039;, &#039;O&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO-6xH, patterns with 5xC and 1xO atoms are returned (but the H atoms are ignored).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Pattern ===&lt;br /&gt;
&amp;lt;code&amp;gt;Pattern(structureName&amp;amp;#58; String) -&amp;amp;gt; Pattern&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a structure represented as a pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: structureName&amp;amp;#58; String - &#039;&#039;Name of a structure.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Pattern(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the structure &#039;1tqn_12&#039; represented as a pattern. Usable in defining descriptors or in Scripting window (using MQ.Execute).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueSimilarity(a&amp;amp;#58; Pattern, b&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on residue names of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Pattern - &#039;&#039;First pattern.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Pattern - &#039;&#039;Second pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueSimilarity(Current(), Pattern(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the residue similarity between the current pattern and &#039;1tqn_12&#039;. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToPattern ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToPattern(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Pattern&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of Patterns (AtomSetSeq) to a single Pattern by merging all atoms into a single atom set. The Pattern type is required by some function such as AtomSimilarity.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToPattern()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Converts a sequence of HIS residue Patterns to a single Pattern.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern(), Pattern(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; patterns, but ignores N atoms.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Value Functions ==&lt;br /&gt;
&#039;&#039;Functions such as addition or comparison of numbers.&#039;&#039;&lt;br /&gt;
=== Abs ===&lt;br /&gt;
&amp;lt;code&amp;gt;Abs(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Abs&#039; function of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Abs(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Divide (/) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Divide(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Divide&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x / y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Equal (==) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Equal(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Equal&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x == y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Greater (&amp;amp;gt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Greater(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Greater&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GreaterEqual (&amp;amp;gt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;GreaterEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;GreaterEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Less (&amp;amp;lt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Less(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Less&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LessEqual (&amp;amp;lt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LessEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;LessEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalAnd (&amp;amp;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalAnd(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalAnd&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;amp; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalNot (Not) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalNot(x&amp;amp;#58; Bool) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalNot&#039; of the input value. This function can be called using the shorthand &#039;Not&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Bool - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalNot(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;x.Not()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalOr (|) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalOr(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalOr&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x | y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalXor (Xor) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalXor(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalXor&#039; of the input values. This function can be called using the shorthand &#039;Xor&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalXor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Xor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Minus (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Minus(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the arithmetic negation of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Arithmetic negation of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotEqual (!=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotEqual(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;NotEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x != y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Plus (+) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Plus(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Plus&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x + y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Power (^) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Power(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Power&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x ^ y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Subtract (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Subtract(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Subtract&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x - y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Times (*) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Times(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Times&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x * y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=1182</id>
		<title>PatternQuery:Language Reference</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=1182"/>
		<updated>2015-04-23T20:47:45Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
PatternQuery (PQ) is a user friendly chemical language primarily designed for defining atom patterns in molecules. PQ combines the clarity and brevity of programming languages with  the versatility of natural language, aiming for an efficient inclusion of chemical and biochemical knowledge into the definition of patterns. PQ allows definitions based on chemical connectivity and three-dimensional structure at the same time. Additionally, in the case of molecules based on residue chains (such as proteins, nucleic acids, saccharides, etc.), PQ allows the user to include any amount of information regarding the residue level structure directly into the definition of the patternss.&lt;br /&gt;
&lt;br /&gt;
PatternQuery is a subset of the Python programming language. Therefore, if you have experience with it, it should not be a problem to use PQ as well.&lt;br /&gt;
&lt;br /&gt;
* The language is case sensitive - &amp;quot;filter&amp;quot; is NOT the same as &amp;quot;FiLtEr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some of the functions return &#039;&#039;&#039;&amp;lt;code&amp;gt;PatternSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; while other return &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039;. &lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;PatternSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a sequence of &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039; (the sets of atoms).&lt;br /&gt;
&lt;br /&gt;
When a molecule is queried, say using the expression &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt; a sequences of patterns each containing 6 atoms (5 C and 1 O) is returned. However, some functions such as &amp;lt;code&amp;gt;Filter&amp;lt;/code&amp;gt; need to operate on a single pattern (the set of atoms) - not the whole sequences. The query &amp;lt;code&amp;gt;Filter(Residues(), lambda r: r.Count(Atoms()) &amp;gt; 10)&amp;lt;/code&amp;gt; first finds all residue patterns (&#039;&#039;&#039;&amp;lt;code&amp;gt;PatternSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039;) and then passes every single &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039; (set of atoms) to a function that counts the atoms in the pattern and returns True if there is at least 11 of them. This is the reasoning behind these two types.&lt;br /&gt;
&lt;br /&gt;
== Basic Query Functions ==&lt;br /&gt;
&#039;&#039;Basic building blocks of the language - i.e. atoms, residues, and the like.&#039;&#039;&lt;br /&gt;
=== AminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues with the 20 basic amino acid names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: ChargeType&amp;amp;#58; String = &amp;quot;&amp;quot; - &#039;&#039;Specify type of the charge. Allowed values: Positive, Negative, Aromatic, Polar, NonPolar.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All amino acids.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids(ChargeType = &amp;quot;Polar&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Amino acids with polar charge.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIdRange(minId&amp;amp;#58; Integer, maxId&amp;amp;#58; ?Integer) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with minId &amp;lt;= atomId &amp;lt;= maxId.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: minId&amp;amp;#58; Integer - &#039;&#039;Minimum id.&#039;&#039; &lt;br /&gt;
: maxId&amp;amp;#58; ?Integer - &#039;&#039;Maximum id. If not specified, maxId = minId.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIdRange(152, 161)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with id between 152 and 161 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms with ids 1, 2, 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Allowed names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomNames(&amp;quot;O1&amp;quot;,&amp;quot;NH1&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with names O1 or NH1.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Atoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;Atoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified element symbols. If no symbols are specified, yields all atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;,&amp;quot;Ca&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with element symbol Zn or Ca&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Chains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Chains(identifiers&amp;amp;#58; Value*) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Splits the structures into chains. If no identifiers are specified, all chains are returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: identifiers&amp;amp;#58; Value* - &#039;&#039;Chain identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all chains.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains without specific identifier.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains A and B.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Helices ===&lt;br /&gt;
&amp;lt;code&amp;gt;Helices() -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all helices. This assumes the information about helices was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Helices()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all helices.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HetResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;HetResidues() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that contain HET atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (ignores water).&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues(NoWaters=False)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (includes water).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ModifiedResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ModifiedResidues(parentNames&amp;amp;#58; String*) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of modified residues that originate from the specified name. If no names are specified, yields all modified residues one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: parentNames&amp;amp;#58; String* - &#039;&#039;Parent residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ModifiedResidues(&amp;quot;MET&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues modified from MET (for example MSE).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Named ===&lt;br /&gt;
&amp;lt;code&amp;gt;Named(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Names&#039; the pattern by its lowest atom id.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).Named().AmbientAtoms(7)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;When exported, the result files will have names in the format &#039;[parent id]_[pseudorandom number]_[zn atomid]&#039;. If the Named function was not used, the name would be just &#039;[parent id]_[pseudorandom number]&#039;.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that are not any of the 20 basic amino acids.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not amino acids.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms that do not have id 1, 2, nor 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have a specified name.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Forbidden names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomNames(&amp;quot;O4&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not called O4.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtoms(symbols&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that are not particular elements.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String+ - &#039;&#039;Forbidden element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtoms(&amp;quot;O&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotResidues(names&amp;amp;#58; Value+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues that are not called by the specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; Value+ - &#039;&#039;Forbidden residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotResidues(&amp;quot;THR&amp;quot;,&amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not THR or CYS.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RegularMotifs ===&lt;br /&gt;
&amp;lt;code&amp;gt;RegularMotifs(regex&amp;amp;#58; Value) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Identifies regular motifs. The protein is split into individual chains and the residues are sorted by their Sequence Number before the motifs are identified. The query does not check if adjacent residues have consecutive Sequence Numbers. The query works in two modes: Amino and Nucleotide, on amino acids and nucleotides respectively. In the Amino mode, all the derivatives of standard residues are treated as the standard residues, as long as this information is properly annotated in MODRES or _pdbx_struct_mod_residue field. The default mode is &#039;Amino&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: regex&amp;amp;#58; Value - &#039;&#039;Regular expression on one letter abbreviations of amino acids.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: Type&amp;amp;#58; String = &amp;quot;Amino&amp;quot; - &#039;&#039;Determines the type of the query. Allowed values: Amino, Nucleotide.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;RGD&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all RGD motifs.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;ACGTU&amp;quot;, Type = &#039;Nucleotide&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all consecutive occurrences of the ACGTU nucleotides.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;.HC.&amp;quot;).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all 4 residue motifs with ?-HIS-CYS-? that are connected.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIdRange(chain&amp;amp;#58; String, min&amp;amp;#58; Integer, max&amp;amp;#58; ?Integer) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific chain and min &amp;lt;= sequence number &amp;lt;= max.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: chain&amp;amp;#58; String - &#039;&#039;Chain identifier. Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
: min&amp;amp;#58; Integer - &#039;&#039;Minimum sequence number.&#039;&#039; &lt;br /&gt;
: max&amp;amp;#58; ?Integer - &#039;&#039;Maximum sequence number. If not specified, max = min.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIdRange(&amp;quot;A&amp;quot;, 161, 165)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues on chain A with seq. number between 161 and 165 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIds(ids&amp;amp;#58; String+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific identifiers. If the structure does not contain a residue with the given identifier, it is skipped.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; String+ - &#039;&#039;One or more identifiers in the format &#039;NUMBER [CHAIN] [i:INSERTIONCODE]&#039; (parameters in [] are optional, for example &#039;175 i:12&#039; or &#039;143 B&#039;). Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIds(&amp;quot;132 A&amp;quot;, &amp;quot;178 A&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues A 123 and A 178 (provided the input structure contains them).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Residues ===&lt;br /&gt;
&amp;lt;code&amp;gt;Residues(names&amp;amp;#58; String*) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specified names. If no names are specified, yields all residues one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String* - &#039;&#039;Allowed residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;, &amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HIS or CYS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RingAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;RingAtoms(atom&amp;amp;#58; Atoms, ring&amp;amp;#58; ?Rings) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all rings atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atom&amp;amp;#58; Atoms - &#039;&#039;Atom types.&#039;&#039; &lt;br /&gt;
: ring&amp;amp;#58; ?Rings - &#039;&#039;Specific ring.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RingAtoms(Atoms(&amp;quot;C&amp;quot;), Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on a ring with 4C and O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Rings ===&lt;br /&gt;
&amp;lt;code&amp;gt;Rings(atoms&amp;amp;#58; Value*) -&amp;amp;gt; Rings&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of rings with particular atoms. If no atoms are specified, yields all rings (cycles) one by one. The order of atoms matters.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atoms&amp;amp;#58; Value* - &#039;&#039;Ring atoms.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with 5C and 1O atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;]), Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;N&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N or C-C-C-N-N atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Sheets ===&lt;br /&gt;
&amp;lt;code&amp;gt;Sheets() -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all sheets. This assumes the information about sheets was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Sheets()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all sheets.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Advanced Query Functions ==&lt;br /&gt;
&#039;&#039;Advanced building blocks of the language.&#039;&#039;&lt;br /&gt;
=== Flatten ===&lt;br /&gt;
&amp;lt;code&amp;gt;Flatten(patterns&amp;amp;#58; PatternSeq, selector&amp;amp;#58; Pattern-&amp;gt;PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of sequence of patterns into a single &#039;flat&#039; sequence.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to project.&#039;&#039; &lt;br /&gt;
: selector&amp;amp;#58; Pattern-&amp;gt;PatternSeq - &#039;&#039;The selector.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).Flatten(lambda m: m.Find(Atoms(&amp;quot;C&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Inside ===&lt;br /&gt;
&amp;lt;code&amp;gt;Inside(patterns&amp;amp;#58; PatternSeq, where&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds patterns within another pattern. Equivalent to where.Flatten(lambda m: m.Find(patterns))&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to find.&#039;&#039; &lt;br /&gt;
: where&amp;amp;#58; PatternSeq - &#039;&#039;Where to find them.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Inside(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Or ===&lt;br /&gt;
&amp;lt;code&amp;gt;Or(patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Merges several pattern sequences into one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1), Rings())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all zincs and their connected residues or rings.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToAtoms(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; patterns and yields all unique atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms on HIS residues one by one.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToResidues(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; patterns and yields all unique residues one by one. The residues contain only the atoms that have been yielded by the inner query.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).ToResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms grouped by residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Union ===&lt;br /&gt;
&amp;lt;code&amp;gt;Union(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; patterns and yields one created from their unique atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings().Union()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Creates a single pattern that contains all rings.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Filter Functions ==&lt;br /&gt;
&#039;&#039;Functions useful for filtering patterns.&#039;&#039;&lt;br /&gt;
=== Contains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Contains(where&amp;amp;#58; Pattern, what&amp;amp;#58; PatternSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a pattern is contained within another one. Equivalent to where.Count(what) &amp;gt; 0.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; PatternSeq - &#039;&#039;What to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues().Filter(lambda m: m.Contains(Rings(5*[&#039;C&#039;]+[&#039;O&#039;])).Not())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HET residues that do not contain a 5CO ring.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Count ===&lt;br /&gt;
&amp;lt;code&amp;gt;Count(where&amp;amp;#58; Pattern, what&amp;amp;#58; PatternSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts all occurrences of pattern &#039;what&#039; in pattern &#039;where&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;Where to count it.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; PatternSeq - &#039;&#039;What pattern to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;m.Count(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the count of HIS residues in the pattern m. Where m is a Pattern (for example when using the Filter function or returned by the ToPattern() function). This example will not work directly and is here to illustrate a concept.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1).Filter(lambda m: m.Count(Residues(&amp;quot;HIS&amp;quot;)) == 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Patterns with Zn atoms and its connected residues with exactly 2 HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ExecuteIf ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExecuteIf(query&amp;amp;#58; PatternSeq, condition&amp;amp;#58; Pattern-&amp;gt;Bool) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Executes a query only if the condition is met. Otherwise, return an empty sequence of patterns.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: query&amp;amp;#58; PatternSeq - &#039;&#039;Query to execute.&#039;&#039; &lt;br /&gt;
: condition&amp;amp;#58; Pattern-&amp;gt;Bool - &#039;&#039;Condition that must be satisfied for the parent structure/pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that have resolution lower than 2.4ang.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids().ExecuteIf(lambda p: p.Count(Atoms(&#039;Fe&#039;)) &amp;gt; 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all amino acids in structures that have at least 3 Fe atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filter ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filter(patterns&amp;amp;#58; PatternSeq, filter&amp;amp;#58; Pattern-&amp;gt;Bool) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Filters a sequence of patterns with a given predicate.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to filter.&#039;&#039; &lt;br /&gt;
: filter&amp;amp;#58; Pattern-&amp;gt;Bool - &#039;&#039;Filter predicate.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda m: m.Count(Atoms(&amp;quot;C&amp;quot;)) &amp;gt;= 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain at least 3 C atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnected ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnected(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular pattern is a connected graph.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all patterns with a Zn and residues within 3 ang, where all the ambient residues are connected to the central atom.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnectedTo(where&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular pattern is connected to any other specified pattern. The patterns must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Pattern sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.IsConnectedTo(Rings()))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are connected to a ring they do not belong to.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsNotConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsNotConnectedTo(what&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular pattern is not connected to any other specified pattern. The patterns must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Pattern sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda r: r.IsNotConnectedTo(Atoms(&amp;quot;Ca&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all residues that are not connected to Ca atoms. The residue itself can still contain Ca atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NearestDistanceTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;NearestDistanceTo(where&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds the distance to a particular pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Pattern sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda m: m.NearestDistanceTo(Residues(&amp;quot;ASP&amp;quot;)) &amp;gt;= 5)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are at least 5 (angstroms) away from any ASP residue.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== SeqCount ===&lt;br /&gt;
&amp;lt;code&amp;gt;SeqCount(what&amp;amp;#58; PatternSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts the length of a sequence of motifs.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; PatternSeq - &#039;&#039;What pattern sequence to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.Find(Residues(&amp;quot;HIS&amp;quot;)).SeqCount() &amp;gt; 1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a sequence of patterns with Zn atom and residues within 3ang if the pattern contains at least 2 HIS residues.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Topology Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the topology of patterns.&#039;&#039;&lt;br /&gt;
=== ConnectedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedAtoms(pattern&amp;amp;#58; PatternSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by n layers of atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of atom layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;MAN&amp;quot;).ConnectedAtoms(2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all MAN residues and then adds two connected levels of atoms to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ConnectedResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedResidues(pattern&amp;amp;#58; PatternSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by n layers of residues.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of residue layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all Zn atoms and adds all residues that are connected to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Path ===&lt;br /&gt;
&amp;lt;code&amp;gt;Path(patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new pattern from &#039;connected&#039; parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to path.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Path(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds patterns with two O and one C atoms where the C atoms is connected to the O ones.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Star ===&lt;br /&gt;
&amp;lt;code&amp;gt;Star(center&amp;amp;#58; PatternSeq, patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new pattern from a central one and connected parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: center&amp;amp;#58; PatternSeq - &#039;&#039;Center pattern.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to chain.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Star(Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds patterns with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Star(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds patterns with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Geometry Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the geometry of patterns.&#039;&#039;&lt;br /&gt;
=== AmbientAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientAtoms(pattern&amp;amp;#58; PatternSeq, r&amp;amp;#58; Number) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by atoms that within the given radius from the inner pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original pattern.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;).AmbientAtoms(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds Fe atoms and all atoms within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AmbientResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientResidues(pattern&amp;amp;#58; PatternSeq, r&amp;amp;#58; Number) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by residues that have at least one atom within the given radius from the inner pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original pattern.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(6 * [&amp;quot;C&amp;quot;]).AmbientResidues(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds rings with 6C atoms and all residues within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Cluster ===&lt;br /&gt;
&amp;lt;code&amp;gt;Cluster(r&amp;amp;#58; Number, patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all patterns that are pairwise closer than r (angstroms).&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two patterns in the cluster.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to cluster.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of one or more rings with 5C and O atoms and one or more Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filled ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filled(pattern&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Adds all atoms that fall within the circumsphere (with radius multiplied by the factor) of the basic pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: RadiusFactor&amp;amp;#58; Number = 0.75 - &#039;&#039;Circumsphere radius factor.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Residues(&amp;quot;HIS&amp;quot;)).Filled(RadiusFactor = 0.75)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds clusters of HIS residues and all atoms within the circumsphere.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Near ===&lt;br /&gt;
&amp;lt;code&amp;gt;Near(r&amp;amp;#58; Number, patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all patterns that are pairwise closer than r (angstroms) and checks if the &amp;quot;counts&amp;quot; match.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two sub-patterns in the pattern.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to &#039;cluster&#039;.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Near(4, Atoms(&amp;quot;Ca&amp;quot;), Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of a single ring with 5C and O atoms and two Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Meta-data Functions ==&lt;br /&gt;
&#039;&#039;Functions dealing with meta-data about structures such as release date or authors.&#039;&#039;&lt;br /&gt;
=== Authors ===&lt;br /&gt;
&amp;lt;code&amp;gt;Authors(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns authors of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;ECNumbers(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns Enzymatic Commission numbers assigned to enzymes in the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== EntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;EntitySources(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns entity sources of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ExperimentMethod ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExperimentMethod(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the experiment method. The value is always an upper-case string. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ExperimentMethod() == &amp;quot;INFRARED SPECTROSCOPY&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllAuthors ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllAuthors(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllAuthors(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllECNumbers(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given Enzymatic Commission numbers. It is possible to enter just a number prefix without the &#039;.&#039;. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllECNumbers(&amp;quot;3.2.1.18&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllEntitySources(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismIds(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismIds(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganisms(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganisms(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllKeywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllKeywords(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllKeywords(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismIds(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismIds(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganisms(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganisms(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyAuthor ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyAuthor(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyAuthor(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyECNumber ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyECNumber(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given Enzymatic Commission number. It is possible to enter just a number prefix without the &#039;.&#039;s. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyECNumber(&amp;quot;3.2.1.19&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyEntitySources(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganism(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganism(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismId(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismId(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyKeyword ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyKeyword(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyKeyword(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganism(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganism(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismId(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismId(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismGenus(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismIds(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganisms(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Keywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;Keywords(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns keywords of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionDate(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionYear(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismGenus(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismIds(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganisms(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== PolymerType ===&lt;br /&gt;
&amp;lt;code&amp;gt;PolymerType(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the polymer type of the structure. Possible values are: NotAssigned, Protein, DNA, RNA, ProteinDNA, ProteinRNA, NucleicAcids, Mixture, Sugar, Other. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.PolymerType() == &amp;quot;ProteinDNA&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometry ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometry(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry of the parent structure. Possible values are: NotAssigned, Monomer, Homomer, Heteromer. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ProteinStoichiometry() == &amp;quot;Heteromer&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometryString ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometryString(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry string of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ReleaseDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseDate(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ReleaseYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseYear(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Resolution ===&lt;br /&gt;
&amp;lt;code&amp;gt;Resolution(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the resolution in angstroms of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Weight ===&lt;br /&gt;
&amp;lt;code&amp;gt;Weight(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the weight of the molecule in kDa. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Weight() &amp;gt; 100000.0)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Miscellaneous Functions ==&lt;br /&gt;
&#039;&#039;Various useful functions. These function often require a special setup (i.e. only useful in Scripting window or in specific applications).&#039;&#039;&lt;br /&gt;
=== AminoSequenceString ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoSequenceString(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a string of single-letter amino acids contained in the pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Pattern(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a string representing amino acids in the pattern &#039;1tqn_12&#039;.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(Pattern(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all regular patterns that correspond to the AMK sequence in 1tqn_12.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomProperty ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomProperty(atomPattern&amp;amp;#58; Pattern, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;If the property exists and the pattern consists of a single atom, returns the property. Otherwise, returns Nothing.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atomPattern&amp;amp;#58; Pattern - &#039;&#039;Single atom pattern.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Property name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;a.AtomProperty(&amp;quot;charge&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Gets the &#039;charge&#039; property of the atom a. Where a is a single atom Pattern. This example will not work directly.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.AtomProperty(&amp;quot;charge&amp;quot;) &amp;gt;= 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All atoms with the charge property greater or equal to 2. This example will only work in cases where a suitable property is defined. For example in Scripting window in the Charges app.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomSimilarity(a&amp;amp;#58; Pattern, b&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on atoms (element symbols) of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Pattern - &#039;&#039;First pattern.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Pattern - &#039;&#039;Second pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(),Pattern(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity between the current pattern and 1tqn_12. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CommonAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;CommonAtoms(modelId&amp;amp;#58; String) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a single pattern with atoms common with the model. Properties checked: atom id, element symbol, chain, residue number. This query is useful for example for atom selection in SiteBinder.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: modelId&amp;amp;#58; String - &#039;&#039;Id of the model.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CommonAtoms(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a pattern formed by atoms common with the &#039;1tqn_12&#039; structure.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CSA ===&lt;br /&gt;
&amp;lt;code&amp;gt;CSA() -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Entries from Catalytic Site Atlas represented as patterns. Works only if used from the command line version of Queries and property configured.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CSA()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All CSA sites for the given structure. This example will only work if used from the command line version of Queries and property configured.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Current ===&lt;br /&gt;
&amp;lt;code&amp;gt;Current() -&amp;amp;gt; Pattern&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;A variable that is assigned by the application environment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(), Pattern(&amp;quot;model&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the atom similarity of the current pattern and the model. This example will work for example when defining a structure descriptor in SiteBinder and there is a structure with id &#039;model&#039; loaded.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Descriptor ===&lt;br /&gt;
&amp;lt;code&amp;gt;Descriptor(pattern&amp;amp;#58; Pattern, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns the descriptor. If the descriptor does not exist, &#039;null&#039; is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern that represents entire structure.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Descriptor name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Current().Descriptor(&amp;quot;similarity&amp;quot;) &amp;gt;= 0.75&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns True if &#039;similarity&#039; descriptor of the current pattern is at least 0.75. This example will work for example in SiteBinder&#039;s structure selection if the &#039;similarity&#039; descriptor has been previously defined.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== DynamicInvoke ===&lt;br /&gt;
&amp;lt;code&amp;gt;DynamicInvoke(value&amp;amp;#58; Value, name&amp;amp;#58; String, isProperty&amp;amp;#58; Bool, args&amp;amp;#58; Value) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Dynamically invoke a member. (internal)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: value&amp;amp;#58; Value - &#039;&#039;InnerQuery.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Member name.&#039;&#039; &lt;br /&gt;
: isProperty&amp;amp;#58; Bool - &#039;&#039;Is this a property.&#039;&#039; &lt;br /&gt;
: args&amp;amp;#58; Value - &#039;&#039;Array of arguments.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Find ===&lt;br /&gt;
&amp;lt;code&amp;gt;Find(source&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts the source pattern to a structure and finds patterns within it.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: source&amp;amp;#58; Pattern - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern(), Pattern(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; patterns, but ignores N atoms. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;model&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GroupedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;GroupedAtoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Groups atoms using the element symbol and then returns each group as a single pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO, patterns with 5xC and 1xO atoms are returned.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms(&#039;C&#039;, &#039;O&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO-6xH, patterns with 5xC and 1xO atoms are returned (but the H atoms are ignored).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Pattern ===&lt;br /&gt;
&amp;lt;code&amp;gt;Pattern(structureName&amp;amp;#58; String) -&amp;amp;gt; Pattern&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a structure represented as a pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: structureName&amp;amp;#58; String - &#039;&#039;Name of a structure.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Pattern(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the structure &#039;1tqn_12&#039; represented as a pattern. Usable in defining descriptors or in Scripting window (using MQ.Execute).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueSimilarity(a&amp;amp;#58; Pattern, b&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on residue names of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Pattern - &#039;&#039;First pattern.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Pattern - &#039;&#039;Second pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueSimilarity(Current(), Pattern(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the residue similarity between the current pattern and &#039;1tqn_12&#039;. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToPattern ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToPattern(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Pattern&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of Patterns (AtomSetSeq) to a single Pattern by merging all atoms into a single atom set. The Pattern type is required by some function such as AtomSimilarity.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToPattern()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Converts a sequence of HIS residue Patterns to a single Pattern.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern(), Pattern(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; patterns, but ignores N atoms.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Value Functions ==&lt;br /&gt;
&#039;&#039;Functions such as addition or comparison of numbers.&#039;&#039;&lt;br /&gt;
=== Abs ===&lt;br /&gt;
&amp;lt;code&amp;gt;Abs(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Abs&#039; function of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Abs(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Divide (/) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Divide(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Divide&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x / y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Equal (==) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Equal(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Equal&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x == y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Greater (&amp;amp;gt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Greater(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Greater&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GreaterEqual (&amp;amp;gt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;GreaterEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;GreaterEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Less (&amp;amp;lt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Less(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Less&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LessEqual (&amp;amp;lt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LessEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;LessEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalAnd (&amp;amp;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalAnd(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalAnd&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;amp; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalNot (Not) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalNot(x&amp;amp;#58; Bool) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalNot&#039; of the input value. This function can be called using the shorthand &#039;Not&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Bool - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalNot(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;x.Not()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalOr (|) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalOr(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalOr&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x | y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalXor (Xor) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalXor(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalXor&#039; of the input values. This function can be called using the shorthand &#039;Xor&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalXor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Xor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Minus (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Minus(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the arithmetic negation of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Arithmetic negation of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotEqual (!=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotEqual(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;NotEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x != y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Plus (+) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Plus(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Plus&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x + y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Power (^) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Power(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Power&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x ^ y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Subtract (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Subtract(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Subtract&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x - y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Times (*) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Times(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Times&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x * y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=1181</id>
		<title>PatternQuery:Language Reference</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=1181"/>
		<updated>2015-04-23T20:46:56Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
PatternQuery (PQ) is a user friendly chemical language primarily designed for defining atom patterns in molecules. PQ combines the clarity and brevity of programming languages with  the versatility of natural language, aiming for an efficient inclusion of chemical and biochemical knowledge into the definition of patterns. PQ allows definitions based on chemical connectivity and three-dimensional structure at the same time. Additionally, in the case of molecules based on residue chains (such as proteins, nucleic acids, saccharides, etc.), PQ allows the user to include any amount of information regarding the residue level structure directly into the definition of the patternss.&lt;br /&gt;
&lt;br /&gt;
PatternQuery is a subset of the Python programming language. Therefore, if you have experience with it, it should not be a problem to use PQ as well.&lt;br /&gt;
&lt;br /&gt;
* The language is case sensitive - &amp;quot;filter&amp;quot; is NOT the same as &amp;quot;FiLtEr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some of the functions return &#039;&#039;&#039;&amp;lt;code&amp;gt;PatternSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; while other return &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039;. &lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;PatternSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a sequence of &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039; (the sets of atoms).&lt;br /&gt;
&lt;br /&gt;
When a molecule is queried, say using the expression &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt; a sequences of patterns each containing 6 atoms (5 C and 1 O) is returned. However, some functions such as &amp;lt;code&amp;gt;Filter&amp;lt;/code&amp;gt; need to operate on a single pattern (the set of atoms) - not the whole sequences. The query &amp;lt;code&amp;gt;Filter(Residues(), lambda r: r.Count(Atoms()) &amp;gt; 10)&amp;lt;/code&amp;gt; first finds all residue patterns (&#039;&#039;&#039;&amp;lt;code&amp;gt;PatternSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039;) and then passes every single &#039;&#039;&#039;&amp;lt;code&amp;gt;Pattern&amp;lt;/code&amp;gt;&#039;&#039;&#039; (set of atoms) to a function that counts the atoms in the pattern and returns True if there is at least 11 of them. This is the reasoning behind these two types.== Basic Query Functions ==&lt;br /&gt;
&#039;&#039;Basic building blocks of the language - i.e. atoms, residues, and the like.&#039;&#039;&lt;br /&gt;
=== AminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues with the 20 basic amino acid names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: ChargeType&amp;amp;#58; String = &amp;quot;&amp;quot; - &#039;&#039;Specify type of the charge. Allowed values: Positive, Negative, Aromatic, Polar, NonPolar.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All amino acids.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids(ChargeType = &amp;quot;Polar&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Amino acids with polar charge.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIdRange(minId&amp;amp;#58; Integer, maxId&amp;amp;#58; ?Integer) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with minId &amp;lt;= atomId &amp;lt;= maxId.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: minId&amp;amp;#58; Integer - &#039;&#039;Minimum id.&#039;&#039; &lt;br /&gt;
: maxId&amp;amp;#58; ?Integer - &#039;&#039;Maximum id. If not specified, maxId = minId.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIdRange(152, 161)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with id between 152 and 161 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms with ids 1, 2, 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Allowed names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomNames(&amp;quot;O1&amp;quot;,&amp;quot;NH1&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with names O1 or NH1.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Atoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;Atoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified element symbols. If no symbols are specified, yields all atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;,&amp;quot;Ca&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with element symbol Zn or Ca&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Chains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Chains(identifiers&amp;amp;#58; Value*) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Splits the structures into chains. If no identifiers are specified, all chains are returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: identifiers&amp;amp;#58; Value* - &#039;&#039;Chain identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all chains.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains without specific identifier.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains A and B.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Helices ===&lt;br /&gt;
&amp;lt;code&amp;gt;Helices() -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all helices. This assumes the information about helices was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Helices()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all helices.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HetResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;HetResidues() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that contain HET atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (ignores water).&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues(NoWaters=False)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (includes water).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ModifiedResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ModifiedResidues(parentNames&amp;amp;#58; String*) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of modified residues that originate from the specified name. If no names are specified, yields all modified residues one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: parentNames&amp;amp;#58; String* - &#039;&#039;Parent residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ModifiedResidues(&amp;quot;MET&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues modified from MET (for example MSE).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Named ===&lt;br /&gt;
&amp;lt;code&amp;gt;Named(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Names&#039; the pattern by its lowest atom id.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).Named().AmbientAtoms(7)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;When exported, the result files will have names in the format &#039;[parent id]_[pseudorandom number]_[zn atomid]&#039;. If the Named function was not used, the name would be just &#039;[parent id]_[pseudorandom number]&#039;.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that are not any of the 20 basic amino acids.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not amino acids.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms that do not have id 1, 2, nor 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have a specified name.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Forbidden names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomNames(&amp;quot;O4&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not called O4.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtoms(symbols&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that are not particular elements.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String+ - &#039;&#039;Forbidden element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtoms(&amp;quot;O&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotResidues(names&amp;amp;#58; Value+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues that are not called by the specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; Value+ - &#039;&#039;Forbidden residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotResidues(&amp;quot;THR&amp;quot;,&amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not THR or CYS.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RegularMotifs ===&lt;br /&gt;
&amp;lt;code&amp;gt;RegularMotifs(regex&amp;amp;#58; Value) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Identifies regular motifs. The protein is split into individual chains and the residues are sorted by their Sequence Number before the motifs are identified. The query does not check if adjacent residues have consecutive Sequence Numbers. The query works in two modes: Amino and Nucleotide, on amino acids and nucleotides respectively. In the Amino mode, all the derivatives of standard residues are treated as the standard residues, as long as this information is properly annotated in MODRES or _pdbx_struct_mod_residue field. The default mode is &#039;Amino&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: regex&amp;amp;#58; Value - &#039;&#039;Regular expression on one letter abbreviations of amino acids.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: Type&amp;amp;#58; String = &amp;quot;Amino&amp;quot; - &#039;&#039;Determines the type of the query. Allowed values: Amino, Nucleotide.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;RGD&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all RGD motifs.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;ACGTU&amp;quot;, Type = &#039;Nucleotide&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all consecutive occurrences of the ACGTU nucleotides.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;.HC.&amp;quot;).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all 4 residue motifs with ?-HIS-CYS-? that are connected.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIdRange(chain&amp;amp;#58; String, min&amp;amp;#58; Integer, max&amp;amp;#58; ?Integer) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific chain and min &amp;lt;= sequence number &amp;lt;= max.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: chain&amp;amp;#58; String - &#039;&#039;Chain identifier. Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
: min&amp;amp;#58; Integer - &#039;&#039;Minimum sequence number.&#039;&#039; &lt;br /&gt;
: max&amp;amp;#58; ?Integer - &#039;&#039;Maximum sequence number. If not specified, max = min.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIdRange(&amp;quot;A&amp;quot;, 161, 165)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues on chain A with seq. number between 161 and 165 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIds(ids&amp;amp;#58; String+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific identifiers. If the structure does not contain a residue with the given identifier, it is skipped.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; String+ - &#039;&#039;One or more identifiers in the format &#039;NUMBER [CHAIN] [i:INSERTIONCODE]&#039; (parameters in [] are optional, for example &#039;175 i:12&#039; or &#039;143 B&#039;). Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIds(&amp;quot;132 A&amp;quot;, &amp;quot;178 A&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues A 123 and A 178 (provided the input structure contains them).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Residues ===&lt;br /&gt;
&amp;lt;code&amp;gt;Residues(names&amp;amp;#58; String*) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specified names. If no names are specified, yields all residues one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String* - &#039;&#039;Allowed residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;, &amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HIS or CYS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RingAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;RingAtoms(atom&amp;amp;#58; Atoms, ring&amp;amp;#58; ?Rings) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all rings atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atom&amp;amp;#58; Atoms - &#039;&#039;Atom types.&#039;&#039; &lt;br /&gt;
: ring&amp;amp;#58; ?Rings - &#039;&#039;Specific ring.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RingAtoms(Atoms(&amp;quot;C&amp;quot;), Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on a ring with 4C and O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Rings ===&lt;br /&gt;
&amp;lt;code&amp;gt;Rings(atoms&amp;amp;#58; Value*) -&amp;amp;gt; Rings&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of rings with particular atoms. If no atoms are specified, yields all rings (cycles) one by one. The order of atoms matters.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atoms&amp;amp;#58; Value* - &#039;&#039;Ring atoms.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with 5C and 1O atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;]), Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;N&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N or C-C-C-N-N atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Sheets ===&lt;br /&gt;
&amp;lt;code&amp;gt;Sheets() -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all sheets. This assumes the information about sheets was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Sheets()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all sheets.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Advanced Query Functions ==&lt;br /&gt;
&#039;&#039;Advanced building blocks of the language.&#039;&#039;&lt;br /&gt;
=== Flatten ===&lt;br /&gt;
&amp;lt;code&amp;gt;Flatten(patterns&amp;amp;#58; PatternSeq, selector&amp;amp;#58; Pattern-&amp;gt;PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of sequence of patterns into a single &#039;flat&#039; sequence.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to project.&#039;&#039; &lt;br /&gt;
: selector&amp;amp;#58; Pattern-&amp;gt;PatternSeq - &#039;&#039;The selector.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).Flatten(lambda m: m.Find(Atoms(&amp;quot;C&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Inside ===&lt;br /&gt;
&amp;lt;code&amp;gt;Inside(patterns&amp;amp;#58; PatternSeq, where&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds patterns within another pattern. Equivalent to where.Flatten(lambda m: m.Find(patterns))&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to find.&#039;&#039; &lt;br /&gt;
: where&amp;amp;#58; PatternSeq - &#039;&#039;Where to find them.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Inside(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Or ===&lt;br /&gt;
&amp;lt;code&amp;gt;Or(patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Merges several pattern sequences into one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1), Rings())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all zincs and their connected residues or rings.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToAtoms(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; patterns and yields all unique atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms on HIS residues one by one.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToResidues(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; patterns and yields all unique residues one by one. The residues contain only the atoms that have been yielded by the inner query.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).ToResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms grouped by residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Union ===&lt;br /&gt;
&amp;lt;code&amp;gt;Union(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; patterns and yields one created from their unique atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings().Union()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Creates a single pattern that contains all rings.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Filter Functions ==&lt;br /&gt;
&#039;&#039;Functions useful for filtering patterns.&#039;&#039;&lt;br /&gt;
=== Contains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Contains(where&amp;amp;#58; Pattern, what&amp;amp;#58; PatternSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a pattern is contained within another one. Equivalent to where.Count(what) &amp;gt; 0.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; PatternSeq - &#039;&#039;What to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues().Filter(lambda m: m.Contains(Rings(5*[&#039;C&#039;]+[&#039;O&#039;])).Not())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HET residues that do not contain a 5CO ring.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Count ===&lt;br /&gt;
&amp;lt;code&amp;gt;Count(where&amp;amp;#58; Pattern, what&amp;amp;#58; PatternSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts all occurrences of pattern &#039;what&#039; in pattern &#039;where&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;Where to count it.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; PatternSeq - &#039;&#039;What pattern to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;m.Count(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the count of HIS residues in the pattern m. Where m is a Pattern (for example when using the Filter function or returned by the ToPattern() function). This example will not work directly and is here to illustrate a concept.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1).Filter(lambda m: m.Count(Residues(&amp;quot;HIS&amp;quot;)) == 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Patterns with Zn atoms and its connected residues with exactly 2 HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ExecuteIf ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExecuteIf(query&amp;amp;#58; PatternSeq, condition&amp;amp;#58; Pattern-&amp;gt;Bool) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Executes a query only if the condition is met. Otherwise, return an empty sequence of patterns.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: query&amp;amp;#58; PatternSeq - &#039;&#039;Query to execute.&#039;&#039; &lt;br /&gt;
: condition&amp;amp;#58; Pattern-&amp;gt;Bool - &#039;&#039;Condition that must be satisfied for the parent structure/pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that have resolution lower than 2.4ang.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids().ExecuteIf(lambda p: p.Count(Atoms(&#039;Fe&#039;)) &amp;gt; 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all amino acids in structures that have at least 3 Fe atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filter ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filter(patterns&amp;amp;#58; PatternSeq, filter&amp;amp;#58; Pattern-&amp;gt;Bool) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Filters a sequence of patterns with a given predicate.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to filter.&#039;&#039; &lt;br /&gt;
: filter&amp;amp;#58; Pattern-&amp;gt;Bool - &#039;&#039;Filter predicate.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda m: m.Count(Atoms(&amp;quot;C&amp;quot;)) &amp;gt;= 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain at least 3 C atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnected ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnected(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular pattern is a connected graph.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all patterns with a Zn and residues within 3 ang, where all the ambient residues are connected to the central atom.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnectedTo(where&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular pattern is connected to any other specified pattern. The patterns must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Pattern sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.IsConnectedTo(Rings()))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are connected to a ring they do not belong to.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsNotConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsNotConnectedTo(what&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular pattern is not connected to any other specified pattern. The patterns must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Pattern sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda r: r.IsNotConnectedTo(Atoms(&amp;quot;Ca&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all residues that are not connected to Ca atoms. The residue itself can still contain Ca atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NearestDistanceTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;NearestDistanceTo(where&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds the distance to a particular pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Pattern - &#039;&#039;A pattern to test.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Pattern sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda m: m.NearestDistanceTo(Residues(&amp;quot;ASP&amp;quot;)) &amp;gt;= 5)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are at least 5 (angstroms) away from any ASP residue.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== SeqCount ===&lt;br /&gt;
&amp;lt;code&amp;gt;SeqCount(what&amp;amp;#58; PatternSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts the length of a sequence of motifs.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; PatternSeq - &#039;&#039;What pattern sequence to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.Find(Residues(&amp;quot;HIS&amp;quot;)).SeqCount() &amp;gt; 1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a sequence of patterns with Zn atom and residues within 3ang if the pattern contains at least 2 HIS residues.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Topology Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the topology of patterns.&#039;&#039;&lt;br /&gt;
=== ConnectedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedAtoms(pattern&amp;amp;#58; PatternSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by n layers of atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of atom layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;MAN&amp;quot;).ConnectedAtoms(2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all MAN residues and then adds two connected levels of atoms to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ConnectedResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedResidues(pattern&amp;amp;#58; PatternSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by n layers of residues.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of residue layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all Zn atoms and adds all residues that are connected to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Path ===&lt;br /&gt;
&amp;lt;code&amp;gt;Path(patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new pattern from &#039;connected&#039; parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to path.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Path(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds patterns with two O and one C atoms where the C atoms is connected to the O ones.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Star ===&lt;br /&gt;
&amp;lt;code&amp;gt;Star(center&amp;amp;#58; PatternSeq, patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new pattern from a central one and connected parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: center&amp;amp;#58; PatternSeq - &#039;&#039;Center pattern.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to chain.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Star(Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds patterns with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Star(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds patterns with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Geometry Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the geometry of patterns.&#039;&#039;&lt;br /&gt;
=== AmbientAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientAtoms(pattern&amp;amp;#58; PatternSeq, r&amp;amp;#58; Number) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by atoms that within the given radius from the inner pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original pattern.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;).AmbientAtoms(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds Fe atoms and all atoms within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AmbientResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientResidues(pattern&amp;amp;#58; PatternSeq, r&amp;amp;#58; Number) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner pattern by residues that have at least one atom within the given radius from the inner pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original pattern.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate patterns if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(6 * [&amp;quot;C&amp;quot;]).AmbientResidues(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds rings with 6C atoms and all residues within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Cluster ===&lt;br /&gt;
&amp;lt;code&amp;gt;Cluster(r&amp;amp;#58; Number, patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all patterns that are pairwise closer than r (angstroms).&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two patterns in the cluster.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to cluster.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of one or more rings with 5C and O atoms and one or more Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filled ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filled(pattern&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Adds all atoms that fall within the circumsphere (with radius multiplied by the factor) of the basic pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; PatternSeq - &#039;&#039;Basic pattern.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: RadiusFactor&amp;amp;#58; Number = 0.75 - &#039;&#039;Circumsphere radius factor.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Residues(&amp;quot;HIS&amp;quot;)).Filled(RadiusFactor = 0.75)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds clusters of HIS residues and all atoms within the circumsphere.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Near ===&lt;br /&gt;
&amp;lt;code&amp;gt;Near(r&amp;amp;#58; Number, patterns&amp;amp;#58; PatternSeq+) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all patterns that are pairwise closer than r (angstroms) and checks if the &amp;quot;counts&amp;quot; match.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two sub-patterns in the pattern.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq+ - &#039;&#039;Patterns to &#039;cluster&#039;.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Near(4, Atoms(&amp;quot;Ca&amp;quot;), Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of a single ring with 5C and O atoms and two Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Meta-data Functions ==&lt;br /&gt;
&#039;&#039;Functions dealing with meta-data about structures such as release date or authors.&#039;&#039;&lt;br /&gt;
=== Authors ===&lt;br /&gt;
&amp;lt;code&amp;gt;Authors(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns authors of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;ECNumbers(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns Enzymatic Commission numbers assigned to enzymes in the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== EntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;EntitySources(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns entity sources of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ExperimentMethod ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExperimentMethod(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the experiment method. The value is always an upper-case string. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ExperimentMethod() == &amp;quot;INFRARED SPECTROSCOPY&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllAuthors ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllAuthors(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllAuthors(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllECNumbers(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given Enzymatic Commission numbers. It is possible to enter just a number prefix without the &#039;.&#039;. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllECNumbers(&amp;quot;3.2.1.18&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllEntitySources(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismIds(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismIds(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganisms(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganisms(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllKeywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllKeywords(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllKeywords(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismIds(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismIds(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganisms(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganisms(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyAuthor ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyAuthor(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyAuthor(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyECNumber ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyECNumber(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given Enzymatic Commission number. It is possible to enter just a number prefix without the &#039;.&#039;s. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyECNumber(&amp;quot;3.2.1.19&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyEntitySources(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganism(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganism(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismId(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismId(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyKeyword ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyKeyword(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyKeyword(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganism(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganism(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismGenus(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismId(pattern&amp;amp;#58; Pattern, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismId(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismGenus(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismIds(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganisms(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Keywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;Keywords(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns keywords of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionDate(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionYear(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismGenus(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismIds(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganisms(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== PolymerType ===&lt;br /&gt;
&amp;lt;code&amp;gt;PolymerType(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the polymer type of the structure. Possible values are: NotAssigned, Protein, DNA, RNA, ProteinDNA, ProteinRNA, NucleicAcids, Mixture, Sugar, Other. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.PolymerType() == &amp;quot;ProteinDNA&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometry ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometry(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry of the parent structure. Possible values are: NotAssigned, Monomer, Homomer, Heteromer. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ProteinStoichiometry() == &amp;quot;Heteromer&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometryString ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometryString(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry string of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ReleaseDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseDate(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ReleaseYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseYear(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Resolution ===&lt;br /&gt;
&amp;lt;code&amp;gt;Resolution(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the resolution in angstroms of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Weight ===&lt;br /&gt;
&amp;lt;code&amp;gt;Weight(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the weight of the molecule in kDa. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Weight() &amp;gt; 100000.0)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Miscellaneous Functions ==&lt;br /&gt;
&#039;&#039;Various useful functions. These function often require a special setup (i.e. only useful in Scripting window or in specific applications).&#039;&#039;&lt;br /&gt;
=== AminoSequenceString ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoSequenceString(pattern&amp;amp;#58; Pattern) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a string of single-letter amino acids contained in the pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Pattern(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a string representing amino acids in the pattern &#039;1tqn_12&#039;.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(Pattern(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all regular patterns that correspond to the AMK sequence in 1tqn_12.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomProperty ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomProperty(atomPattern&amp;amp;#58; Pattern, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;If the property exists and the pattern consists of a single atom, returns the property. Otherwise, returns Nothing.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atomPattern&amp;amp;#58; Pattern - &#039;&#039;Single atom pattern.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Property name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;a.AtomProperty(&amp;quot;charge&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Gets the &#039;charge&#039; property of the atom a. Where a is a single atom Pattern. This example will not work directly.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.AtomProperty(&amp;quot;charge&amp;quot;) &amp;gt;= 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All atoms with the charge property greater or equal to 2. This example will only work in cases where a suitable property is defined. For example in Scripting window in the Charges app.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomSimilarity(a&amp;amp;#58; Pattern, b&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on atoms (element symbols) of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Pattern - &#039;&#039;First pattern.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Pattern - &#039;&#039;Second pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(),Pattern(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity between the current pattern and 1tqn_12. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CommonAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;CommonAtoms(modelId&amp;amp;#58; String) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a single pattern with atoms common with the model. Properties checked: atom id, element symbol, chain, residue number. This query is useful for example for atom selection in SiteBinder.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: modelId&amp;amp;#58; String - &#039;&#039;Id of the model.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CommonAtoms(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a pattern formed by atoms common with the &#039;1tqn_12&#039; structure.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CSA ===&lt;br /&gt;
&amp;lt;code&amp;gt;CSA() -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Entries from Catalytic Site Atlas represented as patterns. Works only if used from the command line version of Queries and property configured.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CSA()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All CSA sites for the given structure. This example will only work if used from the command line version of Queries and property configured.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Current ===&lt;br /&gt;
&amp;lt;code&amp;gt;Current() -&amp;amp;gt; Pattern&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;A variable that is assigned by the application environment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(), Pattern(&amp;quot;model&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the atom similarity of the current pattern and the model. This example will work for example when defining a structure descriptor in SiteBinder and there is a structure with id &#039;model&#039; loaded.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Descriptor ===&lt;br /&gt;
&amp;lt;code&amp;gt;Descriptor(pattern&amp;amp;#58; Pattern, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns the descriptor. If the descriptor does not exist, &#039;null&#039; is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: pattern&amp;amp;#58; Pattern - &#039;&#039;Pattern that represents entire structure.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Descriptor name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Current().Descriptor(&amp;quot;similarity&amp;quot;) &amp;gt;= 0.75&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns True if &#039;similarity&#039; descriptor of the current pattern is at least 0.75. This example will work for example in SiteBinder&#039;s structure selection if the &#039;similarity&#039; descriptor has been previously defined.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== DynamicInvoke ===&lt;br /&gt;
&amp;lt;code&amp;gt;DynamicInvoke(value&amp;amp;#58; Value, name&amp;amp;#58; String, isProperty&amp;amp;#58; Bool, args&amp;amp;#58; Value) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Dynamically invoke a member. (internal)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: value&amp;amp;#58; Value - &#039;&#039;InnerQuery.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Member name.&#039;&#039; &lt;br /&gt;
: isProperty&amp;amp;#58; Bool - &#039;&#039;Is this a property.&#039;&#039; &lt;br /&gt;
: args&amp;amp;#58; Value - &#039;&#039;Array of arguments.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Find ===&lt;br /&gt;
&amp;lt;code&amp;gt;Find(source&amp;amp;#58; Pattern, patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts the source pattern to a structure and finds patterns within it.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: source&amp;amp;#58; Pattern - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern(), Pattern(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; patterns, but ignores N atoms. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;model&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GroupedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;GroupedAtoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; PatternSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Groups atoms using the element symbol and then returns each group as a single pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO, patterns with 5xC and 1xO atoms are returned.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms(&#039;C&#039;, &#039;O&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO-6xH, patterns with 5xC and 1xO atoms are returned (but the H atoms are ignored).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Pattern ===&lt;br /&gt;
&amp;lt;code&amp;gt;Pattern(structureName&amp;amp;#58; String) -&amp;amp;gt; Pattern&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a structure represented as a pattern.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: structureName&amp;amp;#58; String - &#039;&#039;Name of a structure.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Pattern(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the structure &#039;1tqn_12&#039; represented as a pattern. Usable in defining descriptors or in Scripting window (using MQ.Execute).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueSimilarity(a&amp;amp;#58; Pattern, b&amp;amp;#58; Pattern) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on residue names of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Pattern - &#039;&#039;First pattern.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Pattern - &#039;&#039;Second pattern.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueSimilarity(Current(), Pattern(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the residue similarity between the current pattern and &#039;1tqn_12&#039;. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToPattern ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToPattern(patterns&amp;amp;#58; PatternSeq) -&amp;amp;gt; Pattern&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of Patterns (AtomSetSeq) to a single Pattern by merging all atoms into a single atom set. The Pattern type is required by some function such as AtomSimilarity.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query patterns from MotiveExplorer or Queries service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: patterns&amp;amp;#58; PatternSeq - &#039;&#039;Patterns to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToPattern()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Converts a sequence of HIS residue Patterns to a single Pattern.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern(), Pattern(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToPattern())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; patterns, but ignores N atoms.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Value Functions ==&lt;br /&gt;
&#039;&#039;Functions such as addition or comparison of numbers.&#039;&#039;&lt;br /&gt;
=== Abs ===&lt;br /&gt;
&amp;lt;code&amp;gt;Abs(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Abs&#039; function of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Abs(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Divide (/) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Divide(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Divide&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x / y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Equal (==) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Equal(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Equal&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x == y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Greater (&amp;amp;gt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Greater(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Greater&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GreaterEqual (&amp;amp;gt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;GreaterEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;GreaterEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Less (&amp;amp;lt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Less(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Less&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LessEqual (&amp;amp;lt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LessEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;LessEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalAnd (&amp;amp;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalAnd(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalAnd&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;amp; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalNot (Not) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalNot(x&amp;amp;#58; Bool) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalNot&#039; of the input value. This function can be called using the shorthand &#039;Not&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Bool - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalNot(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;x.Not()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalOr (|) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalOr(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalOr&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x | y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalXor (Xor) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalXor(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalXor&#039; of the input values. This function can be called using the shorthand &#039;Xor&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalXor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Xor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Minus (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Minus(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the arithmetic negation of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Arithmetic negation of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotEqual (!=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotEqual(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;NotEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x != y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Plus (+) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Plus(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Plus&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x + y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Power (^) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Power(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Power&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x ^ y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Subtract (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Subtract(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Subtract&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x - y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Times (*) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Times(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Times&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x * y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Command_Line&amp;diff=1180</id>
		<title>PatternQuery:Command Line</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Command_Line&amp;diff=1180"/>
		<updated>2015-04-23T20:34:37Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* MotiveQuery Specific Structure */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is help for version 1.0.15.4.22 or newer. The help text for other versions can be viewed using the &#039;&#039;--help&#039;&#039; command when running the application.&lt;br /&gt;
&lt;br /&gt;
=Technical details=&lt;br /&gt;
===Where to find PatternQuery===&lt;br /&gt;
&#039;&#039;&#039;PatternQuery&#039;&#039;&#039; is freely available online since May 2014 at http://ncbr.muni.cz/PatternQuery. There is no login requirement for accessing &#039;&#039;&#039;PatternQuery&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===What you need in order to run PatternQuery===&lt;br /&gt;
* Up to date internet browser with WebGL support. &lt;br /&gt;
* JavaScript enabled.&lt;br /&gt;
&lt;br /&gt;
Check if your browser is [http://get.webgl.org WebGL] and [http://www.enable-javascript.com/ Javascript] compliant.&lt;br /&gt;
&lt;br /&gt;
Note that you can run &#039;&#039;&#039;PatternQuery&#039;&#039;&#039; and download the results even if your browser doesn&#039;t support WebGL. &lt;br /&gt;
WebGL is only necessary for the 3D visualization functionality.&lt;br /&gt;
&lt;br /&gt;
In some older browsers, the interactive user guide which provides help for the GUI interface does not work optimally.&lt;br /&gt;
&lt;br /&gt;
= Running the Offline Service =&lt;br /&gt;
-----------------------&lt;br /&gt;
Just download the latest release of [http://webchem.ncbr.muni.cz/Platform/PatternQuery/DownloadService PatternQuery application]. The service can be executed using the command (latest .NET Framework required): &lt;br /&gt;
&amp;lt;pre&amp;gt;WebChemistry.Queries.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
In Linux (where available) and MacOS, the latest version the Mono Framework (http://mono-project.com/) must be used to run the application:&lt;br /&gt;
&amp;lt;pre&amp;gt;mono WebChemistry.Queries.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The configuration is specified using the JSON format.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Example ===&lt;br /&gt;
This is the general shape of the JSON input configuration.&lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
  &amp;quot;InputFolders&amp;quot;: [&lt;br /&gt;
    &amp;quot;c:\\TestData\\PDB\\SampleSet1&amp;quot;&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;Queries&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;NAGs&amp;quot;,&lt;br /&gt;
      &amp;quot;QueryString&amp;quot;: &amp;quot;Residues(\&amp;quot;NAG\&amp;quot;)&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;MANs&amp;quot;,&lt;br /&gt;
      &amp;quot;QueryString&amp;quot;: &amp;quot;Residues(&#039;MAN&#039;)&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;StatisticsOnly&amp;quot;: false,&lt;br /&gt;
  &amp;quot;CSAPath&amp;quot;: &amp;quot;c:\\data\\csa.dat&amp;quot;,&lt;br /&gt;
  &amp;quot;MaxParallelism&amp;quot;: 8&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There has to be exactly one configuration file for each validation run. Every value, as well as settings&#039; names, is surrounded in quotation marks (&amp;quot; &amp;quot; or &#039; &#039;). Backslashes (\) have to be escaped (\\). File system paths can be absolute as well as relative (/ works as well in paths).&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
* &#039;&#039;&#039;InputFolders&#039;&#039;&#039; [ String[] ]&lt;br /&gt;
: &#039;&#039;A list of folders containing the input structures.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Queries&#039;&#039;&#039; [ [[#QueryInfo_details|QueryInfo]] ]&lt;br /&gt;
: &#039;&#039;A list of queries.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;StatisticsOnly&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;If `true`, the files with fragments are not exported.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CSAPath&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Optional path to a file with CSA database that allows the CSA() query to work. The file is a CSV file that must contain the columns `PdbID, SiteNumber, ResidueName, ChainId, ResidueNumber, ...`&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxParallelism&#039;&#039;&#039; [ Int32 ], Default value = 8&lt;br /&gt;
: &#039;&#039;The maximum number of structures that can be processed simultaneously.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Descriptions ===&lt;br /&gt;
===== &amp;lt;span id=&#039;QueryInfo_details&#039;&amp;gt;QueryInfo&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Id&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;A unique identifier of the query.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;QueryString&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;The query expression.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Output Description ==&lt;br /&gt;
&lt;br /&gt;
=== General Structure ===&lt;br /&gt;
* &#039;&#039;&#039;[WorkingDirectory]&#039;&#039;&#039; - &#039;&#039;Working directory of the application.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Contains the result of the computation.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;log.txt&#039;&#039;&#039; - &#039;&#039;Contains the console output of the application.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;status.json&#039;&#039;&#039; - &#039;&#039;Contains general information of the computation (running time, version, etc.).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== MotiveQuery Specific Structure ===&lt;br /&gt;
* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Folder with computation result&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;query_id&#039;&#039;&#039; - &#039;&#039;Folder for each query named by its unique id.&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;patterns&#039;&#039;&#039; - &#039;&#039;Folder with patterns stored in PDB format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;data.json&#039;&#039;&#039; - &#039;&#039;Information about the result in JSON format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;patterns.csv&#039;&#039;&#039; - &#039;&#039;Information about the patterns in CSV format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;metadata_summary.csv&#039;&#039;&#039; - &#039;&#039;Information about the metadata (origin organism, EC number, etc.) in CSV format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;structures.csv&#039;&#039;&#039; - &#039;&#039;Information about structures that contain the given patterns in CSV format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;structures.csv&#039;&#039;&#039; - &#039;&#039;Information about all structures that were queried in CSV format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;structures.json&#039;&#039;&#039; - &#039;&#039;Information about all structures that were queried in JSON format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;summary.json&#039;&#039;&#039; - &#039;&#039;Summary information (number of found patterns, etc.) about the computation in JSON format.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Command_Line&amp;diff=1179</id>
		<title>PatternQuery:Command Line</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Command_Line&amp;diff=1179"/>
		<updated>2015-04-23T20:34:10Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* What you need in order to run MotiveQuery */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is help for version 1.0.15.4.22 or newer. The help text for other versions can be viewed using the &#039;&#039;--help&#039;&#039; command when running the application.&lt;br /&gt;
&lt;br /&gt;
=Technical details=&lt;br /&gt;
===Where to find PatternQuery===&lt;br /&gt;
&#039;&#039;&#039;PatternQuery&#039;&#039;&#039; is freely available online since May 2014 at http://ncbr.muni.cz/PatternQuery. There is no login requirement for accessing &#039;&#039;&#039;PatternQuery&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===What you need in order to run PatternQuery===&lt;br /&gt;
* Up to date internet browser with WebGL support. &lt;br /&gt;
* JavaScript enabled.&lt;br /&gt;
&lt;br /&gt;
Check if your browser is [http://get.webgl.org WebGL] and [http://www.enable-javascript.com/ Javascript] compliant.&lt;br /&gt;
&lt;br /&gt;
Note that you can run &#039;&#039;&#039;PatternQuery&#039;&#039;&#039; and download the results even if your browser doesn&#039;t support WebGL. &lt;br /&gt;
WebGL is only necessary for the 3D visualization functionality.&lt;br /&gt;
&lt;br /&gt;
In some older browsers, the interactive user guide which provides help for the GUI interface does not work optimally.&lt;br /&gt;
&lt;br /&gt;
= Running the Offline Service =&lt;br /&gt;
-----------------------&lt;br /&gt;
Just download the latest release of [http://webchem.ncbr.muni.cz/Platform/PatternQuery/DownloadService PatternQuery application]. The service can be executed using the command (latest .NET Framework required): &lt;br /&gt;
&amp;lt;pre&amp;gt;WebChemistry.Queries.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
In Linux (where available) and MacOS, the latest version the Mono Framework (http://mono-project.com/) must be used to run the application:&lt;br /&gt;
&amp;lt;pre&amp;gt;mono WebChemistry.Queries.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The configuration is specified using the JSON format.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Example ===&lt;br /&gt;
This is the general shape of the JSON input configuration.&lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
  &amp;quot;InputFolders&amp;quot;: [&lt;br /&gt;
    &amp;quot;c:\\TestData\\PDB\\SampleSet1&amp;quot;&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;Queries&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;NAGs&amp;quot;,&lt;br /&gt;
      &amp;quot;QueryString&amp;quot;: &amp;quot;Residues(\&amp;quot;NAG\&amp;quot;)&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;MANs&amp;quot;,&lt;br /&gt;
      &amp;quot;QueryString&amp;quot;: &amp;quot;Residues(&#039;MAN&#039;)&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;StatisticsOnly&amp;quot;: false,&lt;br /&gt;
  &amp;quot;CSAPath&amp;quot;: &amp;quot;c:\\data\\csa.dat&amp;quot;,&lt;br /&gt;
  &amp;quot;MaxParallelism&amp;quot;: 8&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There has to be exactly one configuration file for each validation run. Every value, as well as settings&#039; names, is surrounded in quotation marks (&amp;quot; &amp;quot; or &#039; &#039;). Backslashes (\) have to be escaped (\\). File system paths can be absolute as well as relative (/ works as well in paths).&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
* &#039;&#039;&#039;InputFolders&#039;&#039;&#039; [ String[] ]&lt;br /&gt;
: &#039;&#039;A list of folders containing the input structures.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Queries&#039;&#039;&#039; [ [[#QueryInfo_details|QueryInfo]] ]&lt;br /&gt;
: &#039;&#039;A list of queries.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;StatisticsOnly&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;If `true`, the files with fragments are not exported.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CSAPath&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Optional path to a file with CSA database that allows the CSA() query to work. The file is a CSV file that must contain the columns `PdbID, SiteNumber, ResidueName, ChainId, ResidueNumber, ...`&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxParallelism&#039;&#039;&#039; [ Int32 ], Default value = 8&lt;br /&gt;
: &#039;&#039;The maximum number of structures that can be processed simultaneously.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Descriptions ===&lt;br /&gt;
===== &amp;lt;span id=&#039;QueryInfo_details&#039;&amp;gt;QueryInfo&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Id&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;A unique identifier of the query.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;QueryString&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;The query expression.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Output Description ==&lt;br /&gt;
&lt;br /&gt;
=== General Structure ===&lt;br /&gt;
* &#039;&#039;&#039;[WorkingDirectory]&#039;&#039;&#039; - &#039;&#039;Working directory of the application.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Contains the result of the computation.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;log.txt&#039;&#039;&#039; - &#039;&#039;Contains the console output of the application.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;status.json&#039;&#039;&#039; - &#039;&#039;Contains general information of the computation (running time, version, etc.).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== MotiveQuery Specific Structure ===&lt;br /&gt;
* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Folder with computation result&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;query_id&#039;&#039;&#039; - &#039;&#039;Folder for each query named by its unique id.&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;patterns&#039;&#039;&#039; - &#039;&#039;Folder with patterns stored in PDB format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;data.json&#039;&#039;&#039; - &#039;&#039;Information about the result in JSON format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;patterns.csv&#039;&#039;&#039; - &#039;&#039;Information about the patterns in CSV format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;metadata_summary.csv&#039;&#039;&#039; - &#039;&#039;Information about the metadata (origin organism, EC number, etc.) in CSV format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;structures.csv&#039;&#039;&#039; - &#039;&#039;Information about structures that contain the given fragments in CSV format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;structures.csv&#039;&#039;&#039; - &#039;&#039;Information about all structures that were queried in CSV format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;structures.json&#039;&#039;&#039; - &#039;&#039;Information about all structures that were queried in JSON format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;summary.json&#039;&#039;&#039; - &#039;&#039;Summary information (number of found patterns, etc.) about the computation in JSON format.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Command_Line&amp;diff=1178</id>
		<title>PatternQuery:Command Line</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Command_Line&amp;diff=1178"/>
		<updated>2015-04-23T20:33:58Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Where to find MotiveQuery */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is help for version 1.0.15.4.22 or newer. The help text for other versions can be viewed using the &#039;&#039;--help&#039;&#039; command when running the application.&lt;br /&gt;
&lt;br /&gt;
=Technical details=&lt;br /&gt;
===Where to find PatternQuery===&lt;br /&gt;
&#039;&#039;&#039;PatternQuery&#039;&#039;&#039; is freely available online since May 2014 at http://ncbr.muni.cz/PatternQuery. There is no login requirement for accessing &#039;&#039;&#039;PatternQuery&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===What you need in order to run MotiveQuery===&lt;br /&gt;
* Up to date internet browser with WebGL support. &lt;br /&gt;
* JavaScript enabled.&lt;br /&gt;
&lt;br /&gt;
Check if your browser is [http://get.webgl.org WebGL] and [http://www.enable-javascript.com/ Javascript] compliant.&lt;br /&gt;
&lt;br /&gt;
Note that you can run &#039;&#039;&#039;PatternQuery&#039;&#039;&#039; and download the results even if your browser doesn&#039;t support WebGL. &lt;br /&gt;
WebGL is only necessary for the 3D visualization functionality.&lt;br /&gt;
&lt;br /&gt;
In some older browsers, the interactive user guide which provides help for the GUI interface does not work optimally.&lt;br /&gt;
&lt;br /&gt;
= Running the Offline Service =&lt;br /&gt;
-----------------------&lt;br /&gt;
Just download the latest release of [http://webchem.ncbr.muni.cz/Platform/PatternQuery/DownloadService PatternQuery application]. The service can be executed using the command (latest .NET Framework required): &lt;br /&gt;
&amp;lt;pre&amp;gt;WebChemistry.Queries.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
In Linux (where available) and MacOS, the latest version the Mono Framework (http://mono-project.com/) must be used to run the application:&lt;br /&gt;
&amp;lt;pre&amp;gt;mono WebChemistry.Queries.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The configuration is specified using the JSON format.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Example ===&lt;br /&gt;
This is the general shape of the JSON input configuration.&lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
  &amp;quot;InputFolders&amp;quot;: [&lt;br /&gt;
    &amp;quot;c:\\TestData\\PDB\\SampleSet1&amp;quot;&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;Queries&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;NAGs&amp;quot;,&lt;br /&gt;
      &amp;quot;QueryString&amp;quot;: &amp;quot;Residues(\&amp;quot;NAG\&amp;quot;)&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;MANs&amp;quot;,&lt;br /&gt;
      &amp;quot;QueryString&amp;quot;: &amp;quot;Residues(&#039;MAN&#039;)&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;StatisticsOnly&amp;quot;: false,&lt;br /&gt;
  &amp;quot;CSAPath&amp;quot;: &amp;quot;c:\\data\\csa.dat&amp;quot;,&lt;br /&gt;
  &amp;quot;MaxParallelism&amp;quot;: 8&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There has to be exactly one configuration file for each validation run. Every value, as well as settings&#039; names, is surrounded in quotation marks (&amp;quot; &amp;quot; or &#039; &#039;). Backslashes (\) have to be escaped (\\). File system paths can be absolute as well as relative (/ works as well in paths).&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
* &#039;&#039;&#039;InputFolders&#039;&#039;&#039; [ String[] ]&lt;br /&gt;
: &#039;&#039;A list of folders containing the input structures.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Queries&#039;&#039;&#039; [ [[#QueryInfo_details|QueryInfo]] ]&lt;br /&gt;
: &#039;&#039;A list of queries.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;StatisticsOnly&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;If `true`, the files with fragments are not exported.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CSAPath&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Optional path to a file with CSA database that allows the CSA() query to work. The file is a CSV file that must contain the columns `PdbID, SiteNumber, ResidueName, ChainId, ResidueNumber, ...`&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxParallelism&#039;&#039;&#039; [ Int32 ], Default value = 8&lt;br /&gt;
: &#039;&#039;The maximum number of structures that can be processed simultaneously.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Descriptions ===&lt;br /&gt;
===== &amp;lt;span id=&#039;QueryInfo_details&#039;&amp;gt;QueryInfo&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Id&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;A unique identifier of the query.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;QueryString&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;The query expression.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Output Description ==&lt;br /&gt;
&lt;br /&gt;
=== General Structure ===&lt;br /&gt;
* &#039;&#039;&#039;[WorkingDirectory]&#039;&#039;&#039; - &#039;&#039;Working directory of the application.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Contains the result of the computation.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;log.txt&#039;&#039;&#039; - &#039;&#039;Contains the console output of the application.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;status.json&#039;&#039;&#039; - &#039;&#039;Contains general information of the computation (running time, version, etc.).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== MotiveQuery Specific Structure ===&lt;br /&gt;
* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Folder with computation result&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;query_id&#039;&#039;&#039; - &#039;&#039;Folder for each query named by its unique id.&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;patterns&#039;&#039;&#039; - &#039;&#039;Folder with patterns stored in PDB format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;data.json&#039;&#039;&#039; - &#039;&#039;Information about the result in JSON format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;patterns.csv&#039;&#039;&#039; - &#039;&#039;Information about the patterns in CSV format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;metadata_summary.csv&#039;&#039;&#039; - &#039;&#039;Information about the metadata (origin organism, EC number, etc.) in CSV format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;structures.csv&#039;&#039;&#039; - &#039;&#039;Information about structures that contain the given fragments in CSV format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;structures.csv&#039;&#039;&#039; - &#039;&#039;Information about all structures that were queried in CSV format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;structures.json&#039;&#039;&#039; - &#039;&#039;Information about all structures that were queried in JSON format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;summary.json&#039;&#039;&#039; - &#039;&#039;Summary information (number of found patterns, etc.) about the computation in JSON format.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Command_Line&amp;diff=1177</id>
		<title>PatternQuery:Command Line</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Command_Line&amp;diff=1177"/>
		<updated>2015-04-23T20:33:41Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is help for version 1.0.15.4.22 or newer. The help text for other versions can be viewed using the &#039;&#039;--help&#039;&#039; command when running the application.&lt;br /&gt;
&lt;br /&gt;
=Technical details=&lt;br /&gt;
===Where to find MotiveQuery===&lt;br /&gt;
&#039;&#039;&#039;PatternQuery&#039;&#039;&#039; is freely available online since May 2014 at http://ncbr.muni.cz/PatternQuery. There is no login requirement for accessing &#039;&#039;&#039;PatternQuery&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===What you need in order to run MotiveQuery===&lt;br /&gt;
* Up to date internet browser with WebGL support. &lt;br /&gt;
* JavaScript enabled.&lt;br /&gt;
&lt;br /&gt;
Check if your browser is [http://get.webgl.org WebGL] and [http://www.enable-javascript.com/ Javascript] compliant.&lt;br /&gt;
&lt;br /&gt;
Note that you can run &#039;&#039;&#039;PatternQuery&#039;&#039;&#039; and download the results even if your browser doesn&#039;t support WebGL. &lt;br /&gt;
WebGL is only necessary for the 3D visualization functionality.&lt;br /&gt;
&lt;br /&gt;
In some older browsers, the interactive user guide which provides help for the GUI interface does not work optimally.&lt;br /&gt;
&lt;br /&gt;
= Running the Offline Service =&lt;br /&gt;
-----------------------&lt;br /&gt;
Just download the latest release of [http://webchem.ncbr.muni.cz/Platform/PatternQuery/DownloadService PatternQuery application]. The service can be executed using the command (latest .NET Framework required): &lt;br /&gt;
&amp;lt;pre&amp;gt;WebChemistry.Queries.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
In Linux (where available) and MacOS, the latest version the Mono Framework (http://mono-project.com/) must be used to run the application:&lt;br /&gt;
&amp;lt;pre&amp;gt;mono WebChemistry.Queries.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The configuration is specified using the JSON format.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Example ===&lt;br /&gt;
This is the general shape of the JSON input configuration.&lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
  &amp;quot;InputFolders&amp;quot;: [&lt;br /&gt;
    &amp;quot;c:\\TestData\\PDB\\SampleSet1&amp;quot;&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;Queries&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;NAGs&amp;quot;,&lt;br /&gt;
      &amp;quot;QueryString&amp;quot;: &amp;quot;Residues(\&amp;quot;NAG\&amp;quot;)&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;MANs&amp;quot;,&lt;br /&gt;
      &amp;quot;QueryString&amp;quot;: &amp;quot;Residues(&#039;MAN&#039;)&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;StatisticsOnly&amp;quot;: false,&lt;br /&gt;
  &amp;quot;CSAPath&amp;quot;: &amp;quot;c:\\data\\csa.dat&amp;quot;,&lt;br /&gt;
  &amp;quot;MaxParallelism&amp;quot;: 8&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There has to be exactly one configuration file for each validation run. Every value, as well as settings&#039; names, is surrounded in quotation marks (&amp;quot; &amp;quot; or &#039; &#039;). Backslashes (\) have to be escaped (\\). File system paths can be absolute as well as relative (/ works as well in paths).&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
* &#039;&#039;&#039;InputFolders&#039;&#039;&#039; [ String[] ]&lt;br /&gt;
: &#039;&#039;A list of folders containing the input structures.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Queries&#039;&#039;&#039; [ [[#QueryInfo_details|QueryInfo]] ]&lt;br /&gt;
: &#039;&#039;A list of queries.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;StatisticsOnly&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;If `true`, the files with fragments are not exported.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CSAPath&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Optional path to a file with CSA database that allows the CSA() query to work. The file is a CSV file that must contain the columns `PdbID, SiteNumber, ResidueName, ChainId, ResidueNumber, ...`&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxParallelism&#039;&#039;&#039; [ Int32 ], Default value = 8&lt;br /&gt;
: &#039;&#039;The maximum number of structures that can be processed simultaneously.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Descriptions ===&lt;br /&gt;
===== &amp;lt;span id=&#039;QueryInfo_details&#039;&amp;gt;QueryInfo&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Id&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;A unique identifier of the query.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;QueryString&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;The query expression.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Output Description ==&lt;br /&gt;
&lt;br /&gt;
=== General Structure ===&lt;br /&gt;
* &#039;&#039;&#039;[WorkingDirectory]&#039;&#039;&#039; - &#039;&#039;Working directory of the application.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Contains the result of the computation.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;log.txt&#039;&#039;&#039; - &#039;&#039;Contains the console output of the application.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;status.json&#039;&#039;&#039; - &#039;&#039;Contains general information of the computation (running time, version, etc.).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== MotiveQuery Specific Structure ===&lt;br /&gt;
* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Folder with computation result&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;query_id&#039;&#039;&#039; - &#039;&#039;Folder for each query named by its unique id.&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;patterns&#039;&#039;&#039; - &#039;&#039;Folder with patterns stored in PDB format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;data.json&#039;&#039;&#039; - &#039;&#039;Information about the result in JSON format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;patterns.csv&#039;&#039;&#039; - &#039;&#039;Information about the patterns in CSV format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;metadata_summary.csv&#039;&#039;&#039; - &#039;&#039;Information about the metadata (origin organism, EC number, etc.) in CSV format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;structures.csv&#039;&#039;&#039; - &#039;&#039;Information about structures that contain the given fragments in CSV format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;structures.csv&#039;&#039;&#039; - &#039;&#039;Information about all structures that were queried in CSV format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;structures.json&#039;&#039;&#039; - &#039;&#039;Information about all structures that were queried in JSON format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;summary.json&#039;&#039;&#039; - &#039;&#039;Summary information (number of found patterns, etc.) about the computation in JSON format.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=1147</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=1147"/>
		<updated>2015-02-24T10:38:20Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* A More Formal Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups and &#039;&#039;&#039;we want to find all HET residues in it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: the ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types of queries outlined in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simply an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Or | Or()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Path | Path()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|none|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=1146</id>
		<title>PatternQuery:Language Reference</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=1146"/>
		<updated>2015-01-07T21:35:02Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* RegularMotifs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
MotiveQuery (MQ) is a user friendly chemical language primarily designed for defining structural fragments. MQ combines the clarity and brevity of programming languages with  the versatility of natural language, aiming for an efficient inclusion of chemical and biochemical knowledge into the definition of structural fragments. MQ allows definitions based on chemical connectivity and three-dimensional structure at the same time. Additionally, in the case of molecules based on residue chains (such as proteins, nucleic acids, saccharides, etc.), MQ allows the user to include any amount of information regarding the residue level structure directly into the definition of the fragments.&lt;br /&gt;
&lt;br /&gt;
MotiveQuery is a subset of the Python programming language. Therefore, if you have experience with it, it should not be a problem to use MQ as well.&lt;br /&gt;
&lt;br /&gt;
* The language is case sensitive - &amp;quot;filter&amp;quot; is NOT the same as &amp;quot;FiLtEr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some of the functions return &#039;&#039;&#039;&amp;lt;code&amp;gt;FragmentSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; while other return &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039;. &lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;FragmentSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a sequence of &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039; (the sets of atoms).&lt;br /&gt;
&lt;br /&gt;
When a molecule is queried, say using the expression &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt; a sequences of fragments each containing 6 atoms (5 C and 1 O) is returned. However, some functions such as &amp;lt;code&amp;gt;Filter&amp;lt;/code&amp;gt; need to operate on a single fragment (the set of atoms) - not the whole sequences. The query &amp;lt;code&amp;gt;Filter(Residues(), lambda r: r.Count(Atoms()) &amp;gt; 10)&amp;lt;/code&amp;gt; first finds all residue &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragments&amp;lt;/code&amp;gt;&#039;&#039;&#039; (sequence) and then passes every single &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039; (set of atoms) to a function that counts the atoms in the fragment and returns True if there is at least 11 of them. This is the reasoning behind these two types.&lt;br /&gt;
&lt;br /&gt;
== Using MotiveQuery in Silverlight applications ==&lt;br /&gt;
&lt;br /&gt;
MotiveQuery can be used in SiteBinder, EEM Charges, and MotiveExplorer from the the corresponding UI elements. Moreover, it is possible to use MQ from the Scripting window. This is achieved using the &amp;lt;code&amp;gt;MQ.Execute&amp;lt;/code&amp;gt; function. The function takes two parameters: the query and an optional target structure list.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
These examples can be executed from the Scripting window of SiteBinder, MotiveExplorer, or other Silverlight applications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;q = Atoms(&amp;quot;Zn&amp;quot;).ConnectedAtoms(2) &lt;br /&gt;
MQ.Execute(q)&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command finds all fragments specified by the query q in all loaded structures.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;MQ.Execute(Residues(&amp;quot;HEM&amp;quot;), [ Session.StructureMap[&amp;quot;1tqn&amp;quot;], Session.StructureMap[&amp;quot;2wer&amp;quot;] ])&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command finds all HEM residues in structures 1tqn and 2wer (provided structures with these names are loaded).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;q = AtomSimilarity(Fragment(&amp;quot;model&amp;quot;), Fragment(&amp;quot;1gtz_0&amp;quot;))&lt;br /&gt;
MQ.Execute(q)&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command computes the atom similarity (Jaccard coefficient) for structures model and 1gtz_0.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;q = ResidueSimilarity(Fragment(&amp;quot;model&amp;quot;), Current())&lt;br /&gt;
MQ.Execute(q, Session.Structures)&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command computes the residue similarity (Jaccard coefficient) for the structure with id &#039;model&#039; (which is loaded using the Fragment function) and all other loaded structures (computed one by one using the function Current()). The result is returned in CSV format.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Basic Query Functions ==&lt;br /&gt;
&#039;&#039;Basic building blocks of the language - i.e. atoms, residues, and the like.&#039;&#039;&lt;br /&gt;
=== AminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues with the 20 basic amino acid names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: ChargeType&amp;amp;#58; String = &amp;quot;&amp;quot; - &#039;&#039;Specify type of the charge. Allowed values: Positive, Negative, Aromatic, Polar, NonPolar.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All amino acids.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids(ChargeType = &amp;quot;Polar&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Amino acids with polar charge.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIdRange(minId&amp;amp;#58; Integer, maxId&amp;amp;#58; ?Integer) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with minId &amp;lt;= atomId &amp;lt;= maxId.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: minId&amp;amp;#58; Integer - &#039;&#039;Minimum id.&#039;&#039; &lt;br /&gt;
: maxId&amp;amp;#58; ?Integer - &#039;&#039;Maximum id. If not specified, maxId = minId.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIdRange(152, 161)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with id between 152 and 161 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms with ids 1, 2, 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Allowed names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomNames(&amp;quot;O1&amp;quot;,&amp;quot;NH1&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with names O1 or NH1.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Atoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;Atoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified element symbols. If no symbols are specified, yields all atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;,&amp;quot;Ca&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with element symbol Zn or Ca&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Helices ===&lt;br /&gt;
&amp;lt;code&amp;gt;Helices() -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all helices. This assumes the information about helices was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Helices()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all helices.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HetResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;HetResidues() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that contain HET atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (ignores water).&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues(NoWaters=False)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (includes water).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Chains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Chains(identifiers&amp;amp;#58; Value*) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Splits the structures into chains. If no identifiers are specified, all chains are returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: identifiers&amp;amp;#58; Value* - &#039;&#039;Chain identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all chains.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains without specific identifier.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains A and B.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Named ===&lt;br /&gt;
&amp;lt;code&amp;gt;Named(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Names&#039; the fragment by its lowest atom id.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).Named().AmbientAtoms(7)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;When exported, the result files will have names in the format &#039;[parent id]_[pseudorandom number]_[zn atomid]&#039;. If the Named function was not used, the name would be just &#039;[parent id]_[pseudorandom number]&#039;.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that are not any of the 20 basic amino acids.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not amino acids.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms that do not have id 1, 2, nor 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have a specified name.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Forbidden names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomNames(&amp;quot;O4&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not called O4.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtoms(symbols&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that are not particular elements.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String+ - &#039;&#039;Forbidden element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtoms(&amp;quot;O&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotResidues(names&amp;amp;#58; Value+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues that are not called by the specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; Value+ - &#039;&#039;Forbidden residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotResidues(&amp;quot;THR&amp;quot;,&amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not THR or CYS.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RegularMotifs ===&lt;br /&gt;
&amp;lt;code&amp;gt;RegularMotifs(regex&amp;amp;#58; Value) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Identifies regular motifs. The protein is split into individual chains and the residues are sorted by their Sequence Number before the motifs are identified. The query does not check if adjacent residues have consecutive Sequence Numbers. The query works in two modes: Amino and Nucleotide, on amino acids and nucleotides respectively. In the Amino mode, all the derivatives of standard residues are treated as the standard residues, as long as this information is properly annotated in MODRES or _pdbx_struct_mod_residue field. The default mode is &#039;Amino&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Arguments&lt;br /&gt;
: regex&amp;amp;#58; Value - &#039;&#039;Regular expression on one letter abbreviations of amino acids.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: Type&amp;amp;#58; String = &amp;quot;Amino&amp;quot; - &#039;&#039;Determines the type of the query. Allowed values: Amino, Nucleotide.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;RGD&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all RGD motifs.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;ACGTU&amp;quot;, Type = &#039;Nucleotide&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all consecutive occurrences of the ACGTU nucleotides.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;.HC.&amp;quot;).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all 4 residue motifs with ?-HIS-CYS-? that are connected.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== ResidueIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIdRange(chain&amp;amp;#58; String, min&amp;amp;#58; Integer, max&amp;amp;#58; ?Integer) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific chain and min &amp;lt;= sequence number &amp;lt;= max.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: chain&amp;amp;#58; String - &#039;&#039;Chain identifier. Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
: min&amp;amp;#58; Integer - &#039;&#039;Minimum sequence number.&#039;&#039; &lt;br /&gt;
: max&amp;amp;#58; ?Integer - &#039;&#039;Maximum sequence number. If not specified, max = min.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIdRange(&amp;quot;A&amp;quot;, 161, 165)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues on chain A with seq. number between 161 and 165 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIds(ids&amp;amp;#58; String+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific identifiers. If the structure does not contain a residue with the given identifier, it is skipped.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; String+ - &#039;&#039;One or more identifiers in the format &#039;NUMBER [CHAIN] [i:INSERTIONCODE]&#039; (parameters in [] are optional, for example &#039;175 i:12&#039; or &#039;143 B&#039;). Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIds(&amp;quot;132 A&amp;quot;, &amp;quot;178 A&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues A 123 and A 178 (provided the input structure contains them).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Residues ===&lt;br /&gt;
&amp;lt;code&amp;gt;Residues(names&amp;amp;#58; String*) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specified names. If no names are specified, yields all residues one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String* - &#039;&#039;Allowed residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;, &amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HIS or CYS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RingAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;RingAtoms(atom&amp;amp;#58; Atoms, ring&amp;amp;#58; ?Rings) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all rings atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atom&amp;amp;#58; Atoms - &#039;&#039;Atom types.&#039;&#039; &lt;br /&gt;
: ring&amp;amp;#58; ?Rings - &#039;&#039;Specific ring.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RingAtoms(Atoms(&amp;quot;C&amp;quot;), Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on a ring with 4C and O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Rings ===&lt;br /&gt;
&amp;lt;code&amp;gt;Rings(atoms&amp;amp;#58; Value*) -&amp;amp;gt; Rings&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of rings with particular atoms. If no atoms are specified, yields all rings (cycles) one by one. The order of atoms matters.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atoms&amp;amp;#58; Value* - &#039;&#039;Ring atoms.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with 5C and 1O atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;]), Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;N&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N or C-C-C-N-N atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Sheets ===&lt;br /&gt;
&amp;lt;code&amp;gt;Sheets() -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all sheets. This assumes the information about sheets was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Sheets()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all sheets.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Advanced Query Functions ==&lt;br /&gt;
&#039;&#039;Advanced building blocks of the language.&#039;&#039;&lt;br /&gt;
=== Flatten ===&lt;br /&gt;
&amp;lt;code&amp;gt;Flatten(fragments&amp;amp;#58; FragmentSeq, selector&amp;amp;#58; Fragment-&amp;gt;FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of sequence of fragments into a single &#039;flat&#039; sequence.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to project.&#039;&#039; &lt;br /&gt;
: selector&amp;amp;#58; Fragment-&amp;gt;FragmentSeq - &#039;&#039;The selector.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).Flatten(lambda m: m.Find(Atoms(&amp;quot;C&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Inside ===&lt;br /&gt;
&amp;lt;code&amp;gt;Inside(fragments&amp;amp;#58; FragmentSeq, where&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds fragments within another fragment. Equivalent to where.Flatten(lambda m: m.Find(fragments))&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to find.&#039;&#039; &lt;br /&gt;
: where&amp;amp;#58; FragmentSeq - &#039;&#039;Where to find them.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Inside(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Or ===&lt;br /&gt;
&amp;lt;code&amp;gt;Or(fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Merges several fragment sequences into one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1), Rings())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all zincs and their connected residues or rings.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToAtoms(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; fragments and yields all unique atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms on HIS residues one by one.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToResidues(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; fragments and yields all unique residues one by one. The residues contain only the atoms that have been yielded by the inner query.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).ToResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms grouped by residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Union ===&lt;br /&gt;
&amp;lt;code&amp;gt;Union(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; fragments and yields one created from their unique atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings().Union()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Creates a single fragment that contains all rings.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Filter Functions ==&lt;br /&gt;
&#039;&#039;Functions useful for filtering fragments.&#039;&#039;&lt;br /&gt;
=== Contains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Contains(where&amp;amp;#58; Fragment, what&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a fragment is contained within another one. Equivalent to where.Count(what) &amp;gt; 0.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; FragmentSeq - &#039;&#039;What to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues().Filter(lambda m: m.Contains(Rings(5*[&#039;C&#039;]+[&#039;O&#039;])).Not())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HET residues that do not contain a 5CO ring.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Count ===&lt;br /&gt;
&amp;lt;code&amp;gt;Count(where&amp;amp;#58; Fragment, what&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts all occurrences of fragment &#039;what&#039; in fragment &#039;where&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;Where to count it.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; FragmentSeq - &#039;&#039;What fragment to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;m.Count(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the count of HIS residues in the fragment m. Where m is a Fragment (for example when using the Filter function or returned by the ToFragment() function). This example will not work directly and is here to illustrate a concept.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1).Filter(lambda m: m.Count(Residues(&amp;quot;HIS&amp;quot;)) == 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Fragments with Zn atoms and its connected residues with exactly 2 HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ExecuteIf ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExecuteIf(query&amp;amp;#58; FragmentSeq, condition&amp;amp;#58; Fragment-&amp;gt;Bool) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Executes a query only if the condition is met. Otherwise, return an empty sequence of fragments.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: query&amp;amp;#58; FragmentSeq - &#039;&#039;Query to execute.&#039;&#039; &lt;br /&gt;
: condition&amp;amp;#58; Fragment-&amp;gt;Bool - &#039;&#039;Condition that must be satisfied for the parent structure/fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that have resolution lower than 2.4ang.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids().ExecuteIf(lambda p: p.Count(Atoms(&#039;Fe&#039;)) &amp;gt; 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all amino acids in structures that have at least 3 Fe atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filter ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filter(fragments&amp;amp;#58; FragmentSeq, filter&amp;amp;#58; Fragment-&amp;gt;Bool) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Filters a sequence of fragments with a given predicate.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to filter.&#039;&#039; &lt;br /&gt;
: filter&amp;amp;#58; Fragment-&amp;gt;Bool - &#039;&#039;Filter predicate.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda m: m.Count(Atoms(&amp;quot;C&amp;quot;)) &amp;gt;= 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain at least 3 C atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnected ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnected(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular fragment is a connected graph.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all fragments with a Zn and residues within 3 ang, where all the ambient residues are connected to the central atom.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnectedTo(where&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular fragment is connected to any other specified fragment. The fragments must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragment sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.IsConnectedTo(Rings()))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are connected to a ring they do not belong to.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsNotConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsNotConnectedTo(what&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular fragment is not connected to any other specified fragment. The fragments must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragment sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda r: r.IsNotConnectedTo(Atoms(&amp;quot;Ca&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all residues that are not connected to Ca atoms. The residue itself can still contain Ca atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NearestDistanceTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;NearestDistanceTo(where&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds the distance to a particular fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragment sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda m: m.NearestDistanceTo(Residues(&amp;quot;ASP&amp;quot;)) &amp;gt;= 5)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are at least 5 (angstroms) away from any ASP residue.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== SeqCount ===&lt;br /&gt;
&amp;lt;code&amp;gt;SeqCount(what&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts the length of a sequence of motifs.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; FragmentSeq - &#039;&#039;What fragment sequence to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.Find(Residues(&amp;quot;HIS&amp;quot;)).SeqCount() &amp;gt; 1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a sequence of fragments with Zn atom and residues within 3ang if the fragment contains at least 2 HIS residues.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Topology Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the topology of fragments.&#039;&#039;&lt;br /&gt;
=== ConnectedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedAtoms(fragment&amp;amp;#58; FragmentSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by n layers of atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of atom layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;MAN&amp;quot;).ConnectedAtoms(2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all MAN residues and then adds two connected levels of atoms to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ConnectedResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedResidues(fragment&amp;amp;#58; FragmentSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by n layers of residues.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of residue layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all Zn atoms and adds all residues that are connected to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Path ===&lt;br /&gt;
&amp;lt;code&amp;gt;Path(fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new fragment from &#039;connected&#039; parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to path.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Path(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds fragments with two O and one C atoms where the C atoms is connected to the O ones.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Star ===&lt;br /&gt;
&amp;lt;code&amp;gt;Star(center&amp;amp;#58; FragmentSeq, fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new fragment from a central one and connected parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: center&amp;amp;#58; FragmentSeq - &#039;&#039;Center fragment.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to chain.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Star(Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds fragments with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Star(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds fragments with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Geometry Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the geometry of fragments.&#039;&#039;&lt;br /&gt;
=== AmbientAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientAtoms(fragment&amp;amp;#58; FragmentSeq, r&amp;amp;#58; Number) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by atoms that within the given radius from the inner fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original fragment.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;).AmbientAtoms(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds Fe atoms and all atoms within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AmbientResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientResidues(fragment&amp;amp;#58; FragmentSeq, r&amp;amp;#58; Number) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by residues that have at least one atom within the given radius from the inner fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original fragment.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(6 * [&amp;quot;C&amp;quot;]).AmbientResidues(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds rings with 6C atoms and all residues within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Cluster ===&lt;br /&gt;
&amp;lt;code&amp;gt;Cluster(r&amp;amp;#58; Number, fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all fragments that are pairwise closer than r (angstroms).&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two fragments in the cluster.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to cluster.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of one or more rings with 5C and O atoms and one or more Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filled ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filled(fragment&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Adds all atoms that fall within the circumsphere (with radius multiplied by the factor) of the basic fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: RadiusFactor&amp;amp;#58; Number = 0.75 - &#039;&#039;Circumsphere radius factor.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Residues(&amp;quot;HIS&amp;quot;)).Filled(RadiusFactor = 0.75)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds clusters of HIS residues and all atoms within the circumsphere.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Near ===&lt;br /&gt;
&amp;lt;code&amp;gt;Near(r&amp;amp;#58; Number, fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all fragments that are pairwise closer than r (angstroms) and checks if the &amp;quot;counts&amp;quot; match.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two sub-fragments in the fragment.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to &#039;cluster&#039;.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Near(4, Atoms(&amp;quot;Ca&amp;quot;), Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of a single ring with 5C and O atoms and two Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Meta-data Functions ==&lt;br /&gt;
&#039;&#039;Functions dealing with meta-data about structures such as release date or authors.&#039;&#039;&lt;br /&gt;
=== Authors ===&lt;br /&gt;
&amp;lt;code&amp;gt;Authors(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns authors of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;ECNumbers(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns Enzymatic Commission numbers assigned to enzymes in the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== EntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;EntitySources(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns entity sources of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ExperimentMethod ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExperimentMethod(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the experiment method. The value is always an upper-case string. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ExperimentMethod() == &amp;quot;INFRARED SPECTROSCOPY&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllAuthors ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllAuthors(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllAuthors(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllECNumbers(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given Enzymatic Commission numbers. It is possible to enter just a number prefix without the &#039;.&#039;. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllECNumbers(&amp;quot;3.2.1.18&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllEntitySources(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismIds(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismIds(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganisms(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganisms(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllKeywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllKeywords(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllKeywords(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismIds(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismIds(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganisms(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganisms(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyAuthor ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyAuthor(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyAuthor(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyECNumber ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyECNumber(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given Enzymatic Commission number. It is possible to enter just a number prefix without the &#039;.&#039;s. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyECNumber(&amp;quot;3.2.1.19&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyEntitySources(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganism(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganism(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismId(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismId(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyKeyword ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyKeyword(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyKeyword(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganism(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganism(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismId(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismId(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismGenus(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismIds(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganisms(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Keywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;Keywords(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns keywords of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionDate(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionYear(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismGenus(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismIds(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganisms(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== PolymerType ===&lt;br /&gt;
&amp;lt;code&amp;gt;PolymerType(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the polymer type of the structure. Possible values are: NotAssigned, Protein, DNA, RNA, ProteinDNA, ProteinRNA, NucleicAcids, Mixture, Sugar, Other. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.PolymerType() == &amp;quot;ProteinDNA&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometry ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometry(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry of the parent structure. Possible values are: NotAssigned, Monomer, Homomer, Heteromer. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ProteinStoichiometry() == &amp;quot;Heteromer&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometryString ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometryString(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry string of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ReleaseDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseDate(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ReleaseYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseYear(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Resolution ===&lt;br /&gt;
&amp;lt;code&amp;gt;Resolution(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the resolution in angstroms of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Weight ===&lt;br /&gt;
&amp;lt;code&amp;gt;Weight(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the weight of the molecule in kDa. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Weight() &amp;gt; 100000.0)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Miscellaneous Functions ==&lt;br /&gt;
&#039;&#039;Various useful functions. These function often require a special setup (i.e. only useful in Scripting window or in specific applications).&#039;&#039;&lt;br /&gt;
=== AminoSequenceString ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoSequenceString(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a string of single-letter amino acids contained in the fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Fragment(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a string representing amino acids in the fragment &#039;1tqn_12&#039;.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(Fragment(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all regular fragments that correspond to the AMK sequence in 1tqn_12.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomProperty ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomProperty(atomFragment&amp;amp;#58; Fragment, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;If the property exists and the fragment consists of a single atom, returns the property. Otherwise, returns Nothing.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atomFragment&amp;amp;#58; Fragment - &#039;&#039;Single atom fragment.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Property name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;a.AtomProperty(&amp;quot;charge&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Gets the &#039;charge&#039; property of the atom a. Where a is a single atom Fragment. This example will not work directly.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.AtomProperty(&amp;quot;charge&amp;quot;) &amp;gt;= 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All atoms with the charge property greater or equal to 2. This example will only work in cases where a suitable property is defined. For example in Scripting window in the Charges app.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomSimilarity(a&amp;amp;#58; Fragment, b&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on atoms (element symbols) of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Fragment - &#039;&#039;First fragment.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Fragment - &#039;&#039;Second fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(),Fragment(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity between the current fragment and 1tqn_12. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CommonAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;CommonAtoms(modelId&amp;amp;#58; String) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a single fragment with atoms common with the model. Properties checked: atom id, element symbol, chain, residue number. This query is useful for example for atom selection in SiteBinder.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: modelId&amp;amp;#58; String - &#039;&#039;Id of the model.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CommonAtoms(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a fragment formed by atoms common with the &#039;1tqn_12&#039; structure.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CSA ===&lt;br /&gt;
&amp;lt;code&amp;gt;CSA() -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Entries from Catalytic Site Atlas represented as fragments. Works only if used from the command line version of MotiveQuery and property configured.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CSA()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All CSA sites for the given structure. This example will only work if used from the command line version of MotiveQuery and property configured.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Current ===&lt;br /&gt;
&amp;lt;code&amp;gt;Current() -&amp;amp;gt; Fragment&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;A variable that is assigned by the application environment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(), Fragment(&amp;quot;model&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the atom similarity of the current fragment and the model. This example will work for example when defining a structure descriptor in SiteBinder and there is a structure with id &#039;model&#039; loaded.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Descriptor ===&lt;br /&gt;
&amp;lt;code&amp;gt;Descriptor(fragment&amp;amp;#58; Fragment, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns the descriptor. If the descriptor does not exist, &#039;null&#039; is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment that represents entire structure.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Descriptor name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Current().Descriptor(&amp;quot;similarity&amp;quot;) &amp;gt;= 0.75&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns True if &#039;similarity&#039; descriptor of the current fragment is at least 0.75. This example will work for example in SiteBinder&#039;s structure selection if the &#039;similarity&#039; descriptor has been previously defined.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== DynamicInvoke ===&lt;br /&gt;
&amp;lt;code&amp;gt;DynamicInvoke(value&amp;amp;#58; Value, name&amp;amp;#58; String, isProperty&amp;amp;#58; Bool, args&amp;amp;#58; Value) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Dynamically invoke a member. (internal)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: value&amp;amp;#58; Value - &#039;&#039;InnerQuery.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Member name.&#039;&#039; &lt;br /&gt;
: isProperty&amp;amp;#58; Bool - &#039;&#039;Is this a property.&#039;&#039; &lt;br /&gt;
: args&amp;amp;#58; Value - &#039;&#039;Array of arguments.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Find ===&lt;br /&gt;
&amp;lt;code&amp;gt;Find(source&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts the source fragment to a structure and finds fragments within it.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: source&amp;amp;#58; Fragment - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment(), Fragment(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; fragments, but ignores N atoms. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;model&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Fragment ===&lt;br /&gt;
&amp;lt;code&amp;gt;Fragment(structureName&amp;amp;#58; String) -&amp;amp;gt; Fragment&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a structure represented as a fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: structureName&amp;amp;#58; String - &#039;&#039;Name of a structure.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Fragment(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the structure &#039;1tqn_12&#039; represented as a fragment. Usable in defining descriptors or in Scripting window (using MQ.Execute).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GroupedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;GroupedAtoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Groups atoms using the element symbol and then returns each group as a single fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO, fragments with 5xC and 1xO atoms are returned.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms(&#039;C&#039;, &#039;O&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO-6xH, fragments with 5xC and 1xO atoms are returned (but the H atoms are ignored).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueSimilarity(a&amp;amp;#58; Fragment, b&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on residue names of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Fragment - &#039;&#039;First fragment.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Fragment - &#039;&#039;Second fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueSimilarity(Current(), Fragment(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the residue similarity between the current fragment and &#039;1tqn_12&#039;. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToFragment ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToFragment(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Fragment&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of Fragments (FragmentSeq) to a single Fragment by merging all atoms into a single atom set. The Fragment type is required by some function such as AtomSimilarity.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToFragment()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Converts a sequence of HIS residue Fragments to a single Fragment.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment(), Fragment(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; fragments, but ignores N atoms.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Value Functions ==&lt;br /&gt;
&#039;&#039;Functions such as addition or comparison of numbers.&#039;&#039;&lt;br /&gt;
=== Abs ===&lt;br /&gt;
&amp;lt;code&amp;gt;Abs(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Abs&#039; function of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Abs(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Divide (/) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Divide(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Divide&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x / y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Equal (==) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Equal(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Equal&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x == y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Greater (&amp;amp;gt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Greater(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Greater&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GreaterEqual (&amp;amp;gt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;GreaterEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;GreaterEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Less (&amp;amp;lt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Less(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Less&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LessEqual (&amp;amp;lt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LessEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;LessEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalAnd (&amp;amp;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalAnd(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalAnd&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;amp; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalNot (Not) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalNot(x&amp;amp;#58; Bool) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalNot&#039; of the input value. This function can be called using the shorthand &#039;Not&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Bool - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalNot(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;x.Not()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalOr (|) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalOr(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalOr&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x | y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalXor (Xor) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalXor(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalXor&#039; of the input values. This function can be called using the shorthand &#039;Xor&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalXor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Xor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Minus (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Minus(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the arithmetic negation of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Arithmetic negation of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotEqual (!=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotEqual(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;NotEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x != y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Plus (+) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Plus(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Plus&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x + y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Power (^) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Power(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Power&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x ^ y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Subtract (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Subtract(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Subtract&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x - y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Times (*) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Times(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Times&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x * y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Explorer&amp;diff=1138</id>
		<title>PatternQuery:Explorer</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Explorer&amp;diff=1138"/>
		<updated>2014-12-28T22:23:42Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Launch MotiveQuery Explorer app */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When mining the whole Protein Data Bank for structural fragments it is always better to look before you leap. This is one of the purposes of the &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039; application. This JavaScript/HTML is tailored for:&lt;br /&gt;
# Querying user submitted data (up to 100 structures).&lt;br /&gt;
# Query smaller subsets of the Protein Data Bank&lt;br /&gt;
# &#039;&#039;&#039;Tweaking queries before mining the PDB database&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The last point would be probably of the most interest for the wide-range of users. In the following visual you will learn how to work with &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the service is not working the way it should, please check your browser compliances in the [[MotiveQuery:Command_Line#Technical details | technical details section]].&lt;br /&gt;
&lt;br /&gt;
==Launch MotiveQuery Explorer app==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer1.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer1b.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | Follow either &#039;&#039;&#039;Explorer&#039;&#039;&#039; link or &#039;&#039;&#039;Query Playground&#039;&#039;&#039; tab at the &#039;&#039;&#039;Synopsis&#039;&#039;&#039; page, in order to launch the application.&lt;br /&gt;
 | Create a new session or load a previous one.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Get started with MotiveQuery Explorer==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer2.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer3.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | The UI of the &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039; consists of several elements. At the top of the page you can find a link and a date until when all the results will be stored. Start with loading your data...&lt;br /&gt;
 | Upload your own structures in a numerous of supported formats (*.pdb, *.cif, *.pqr, *.mol, *.mol2). It is possible to upload multiple files at the same time or use a single ZIP file (*.zip) containing multiple files inside it. Similarly you can load entries from the Protein Data Bank.&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer4.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer5.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | You can to query a subset of Protein Data Bank based on numerous metadata. At first select a property you would like to filter by, then select a comparison method and finally fill in the demanded value. Please read carefully hints and examples below each selected property. Different properties can have different means of providing input values. Note that you can also include a logical expressions. For example: &#039;&#039;&#039;S &amp;amp; !N&#039;&#039;&#039; in &#039;&#039;Atom&#039;&#039; property means that just structures containing a sulfur atom and none nitrogen will be considered. Multiple filters can be applied at the same time.&lt;br /&gt;
 | Once you are happy with the specified filters, you can view a subset of the PDB. Either the &#039;&#039;&#039;First 15 entries&#039;&#039;&#039; based on their id or &#039;&#039;&#039;Random 15 entries&#039;&#039;&#039;.&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer6.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer7.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | This list highlights a fraction of the PDB structures satisfying your criteria. You can also check, how many structures these conditions apply to. Browse structures and tick them to add to the  dataset you would like to query. Do not forget to &#039;&#039;&#039;+ Add Selected&#039;&#039;&#039; when you are happy with your selection. You can periodically &#039;&#039;fetch&#039;&#039; random structures satisfying your criteria and select those you would like to &#039;&#039;&#039;add&#039;&#039;&#039; to your dataset as well.&lt;br /&gt;
 | After loading structures, browse the list of loaded entries in order to inspect further details in the PDB.org or see their validation reports in &#039;&#039;&#039;Validator&amp;lt;sup&amp;gt;DB&amp;lt;/sup&amp;gt;&#039;&#039;&#039;. You can easily modify the list as well. Either by further adding new entries or deleting the present ones. Also note the &#039;&#039;&#039;Log panel&#039;&#039;&#039; at the bottom of the web page, since it contains valuable information from the process of loading structures.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Executing Query &amp;amp; interpreting results==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer8.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer9.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | When you have loaded at least a single structure, you can immediately start typing queries in the query box at the top of the page. If you are unsure on how to create query, first browse the principles behind the [[MotiveQuery:Principles | &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language]] and learn how to [[MotiveQuery:How_to_build_a_query | build a query]]. [[MotiveQuery:Use_Cases | Case studies]] and [[MotiveQuery:Language_Reference | language reference]] might come handy as well.&lt;br /&gt;
 | After the query is executed, which usually takes no more than a few seconds, you can inspect them in the browser or download them for further processing. You cab come back to this session later using it&#039;s web address, the results are kept for at least a month.&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=1137</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=1137"/>
		<updated>2014-12-28T22:21:54Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Basic Principles of the Language */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups and &#039;&#039;&#039;we want to find all HET residues in it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: the ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types of queries outlined in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Or | Or()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Path | Path()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|none|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=1136</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=1136"/>
		<updated>2014-12-28T22:21:16Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Intuitive Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups and &#039;&#039;&#039;we want to find all HET residues in it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types of queries outlined in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Or | Or()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Path | Path()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|none|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Terminology&amp;diff=1135</id>
		<title>PatternQuery:Terminology</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Terminology&amp;diff=1135"/>
		<updated>2014-12-28T22:19:18Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Residue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The key terms used within the &#039;&#039;&#039;MotiveQuery (MQ)&#039;&#039;&#039; environment are defined below. It is important to establish these terms before moving on the description of the principles on which &#039;&#039;&#039;MQ&#039;&#039;&#039; is built. Any input file containing biomolecular structures is parsed and interpreted at several levels. Any of them can be successfully used when creating queries.&lt;br /&gt;
&lt;br /&gt;
=Atom=&lt;br /&gt;
All biomolecules are made up of a set of atoms. In the &#039;&#039;&#039;MQ&#039;&#039;&#039; environment, each atom is uniquely identified in the input file by its &#039;&#039;atom name&#039;&#039;, &#039;&#039;id&#039;&#039;, &#039;&#039;chemical element&#039;&#039;, &#039;&#039;chain and a residue details the atom belongs to (&#039;&#039;residue name&#039;&#039; and &#039;&#039;id&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
=Residue=&lt;br /&gt;
The term residues is generally used to refer to any component of a biomolecule. Within the &#039;&#039;&#039;MQ&#039;&#039;&#039; environment, any collection of atoms bound by chemical bonds (covalent, coordinative or ionic) is considered a residue if this fact is appropriately indicated in the input file. Specifically, all the atoms that make up a residue should have the same &#039;&#039;residue name&#039;&#039; (3-letter code) , &#039;&#039;residue serial number&#039;&#039; and &#039;&#039;chain identifier&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Fragment=&lt;br /&gt;
Fragment is a subset of atoms of the input biomolecule. It can also be understood as an arrangement of either atoms or residues. Therefore, individual atoms and residues can be considered as fragments as well.&lt;br /&gt;
&lt;br /&gt;
=Query=&lt;br /&gt;
Query is a single declarative expression of the &#039;&#039;&#039;MQ&#039;&#039;&#039; language  which describes one or more structural fragments inside an input biomolecule.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Terminology&amp;diff=1134</id>
		<title>PatternQuery:Terminology</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Terminology&amp;diff=1134"/>
		<updated>2014-12-28T22:18:48Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Atom */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The key terms used within the &#039;&#039;&#039;MotiveQuery (MQ)&#039;&#039;&#039; environment are defined below. It is important to establish these terms before moving on the description of the principles on which &#039;&#039;&#039;MQ&#039;&#039;&#039; is built. Any input file containing biomolecular structures is parsed and interpreted at several levels. Any of them can be successfully used when creating queries.&lt;br /&gt;
&lt;br /&gt;
=Atom=&lt;br /&gt;
All biomolecules are made up of a set of atoms. In the &#039;&#039;&#039;MQ&#039;&#039;&#039; environment, each atom is uniquely identified in the input file by its &#039;&#039;atom name&#039;&#039;, &#039;&#039;id&#039;&#039;, &#039;&#039;chemical element&#039;&#039;, &#039;&#039;chain and a residue details the atom belongs to (&#039;&#039;residue name&#039;&#039; and &#039;&#039;id&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
=Residue=&lt;br /&gt;
We generally use the term residue to refer to any component of a biomolecule. Within the &#039;&#039;&#039;MQ&#039;&#039;&#039; environment, any collection of atoms bound by chemical bonds (covalent, coordinative or ionic) is considered a residue if this fact is appropriately indicated in the input file. Specifically, all the atoms that make up a residue should have the same &#039;&#039;residue name&#039;&#039; (3-letter code) , &#039;&#039;residue serial number&#039;&#039; and &#039;&#039;chain identifier&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Fragment=&lt;br /&gt;
Fragment is a subset of atoms of the input biomolecule. It can also be understood as an arrangement of either atoms or residues. Therefore, individual atoms and residues can be considered as fragments as well.&lt;br /&gt;
&lt;br /&gt;
=Query=&lt;br /&gt;
Query is a single declarative expression of the &#039;&#039;&#039;MQ&#039;&#039;&#039; language  which describes one or more structural fragments inside an input biomolecule.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Terminology&amp;diff=1133</id>
		<title>PatternQuery:Terminology</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Terminology&amp;diff=1133"/>
		<updated>2014-12-28T22:18:21Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Query */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The key terms used within the &#039;&#039;&#039;MotiveQuery (MQ)&#039;&#039;&#039; environment are defined below. It is important to establish these terms before moving on the description of the principles on which &#039;&#039;&#039;MQ&#039;&#039;&#039; is built. Any input file containing biomolecular structures is parsed and interpreted at several levels. Any of them can be successfully used when creating queries.&lt;br /&gt;
&lt;br /&gt;
=Atom=&lt;br /&gt;
All biomolecules are made up of a set of atoms. In the &#039;&#039;&#039;MQ&#039;&#039;&#039; environment, each atom is uniquely identified in the input file by its &#039;&#039;atom name&#039;&#039;, &#039;&#039;id&#039;&#039;, &#039;&#039;chemical element&#039;&#039;, &#039;&#039;chain and a residue details the atom belong to (&#039;&#039;residue name&#039;&#039; and &#039;&#039;id&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
=Residue=&lt;br /&gt;
We generally use the term residue to refer to any component of a biomolecule. Within the &#039;&#039;&#039;MQ&#039;&#039;&#039; environment, any collection of atoms bound by chemical bonds (covalent, coordinative or ionic) is considered a residue if this fact is appropriately indicated in the input file. Specifically, all the atoms that make up a residue should have the same &#039;&#039;residue name&#039;&#039; (3-letter code) , &#039;&#039;residue serial number&#039;&#039; and &#039;&#039;chain identifier&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Fragment=&lt;br /&gt;
Fragment is a subset of atoms of the input biomolecule. It can also be understood as an arrangement of either atoms or residues. Therefore, individual atoms and residues can be considered as fragments as well.&lt;br /&gt;
&lt;br /&gt;
=Query=&lt;br /&gt;
Query is a single declarative expression of the &#039;&#039;&#039;MQ&#039;&#039;&#039; language  which describes one or more structural fragments inside an input biomolecule.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Terminology&amp;diff=1132</id>
		<title>PatternQuery:Terminology</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Terminology&amp;diff=1132"/>
		<updated>2014-12-28T22:17:50Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Fragment */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The key terms used within the &#039;&#039;&#039;MotiveQuery (MQ)&#039;&#039;&#039; environment are defined below. It is important to establish these terms before moving on the description of the principles on which &#039;&#039;&#039;MQ&#039;&#039;&#039; is built. Any input file containing biomolecular structures is parsed and interpreted at several levels. Any of them can be successfully used when creating queries.&lt;br /&gt;
&lt;br /&gt;
=Atom=&lt;br /&gt;
All biomolecules are made up of a set of atoms. In the &#039;&#039;&#039;MQ&#039;&#039;&#039; environment, each atom is uniquely identified in the input file by its &#039;&#039;atom name&#039;&#039;, &#039;&#039;id&#039;&#039;, &#039;&#039;chemical element&#039;&#039;, &#039;&#039;chain and a residue details the atom belong to (&#039;&#039;residue name&#039;&#039; and &#039;&#039;id&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
=Residue=&lt;br /&gt;
We generally use the term residue to refer to any component of a biomolecule. Within the &#039;&#039;&#039;MQ&#039;&#039;&#039; environment, any collection of atoms bound by chemical bonds (covalent, coordinative or ionic) is considered a residue if this fact is appropriately indicated in the input file. Specifically, all the atoms that make up a residue should have the same &#039;&#039;residue name&#039;&#039; (3-letter code) , &#039;&#039;residue serial number&#039;&#039; and &#039;&#039;chain identifier&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Fragment=&lt;br /&gt;
Fragment is a subset of atoms of the input biomolecule. It can also be understood as an arrangement of either atoms or residues. Therefore, individual atoms and residues can be considered as fragments as well.&lt;br /&gt;
&lt;br /&gt;
=Query=&lt;br /&gt;
Query is a single declarative expression of the &#039;&#039;&#039;MQ&#039;&#039;&#039; language  which describes a structural fragment.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Terminology&amp;diff=1131</id>
		<title>PatternQuery:Terminology</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Terminology&amp;diff=1131"/>
		<updated>2014-12-28T22:15:47Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Query */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The key terms used within the &#039;&#039;&#039;MotiveQuery (MQ)&#039;&#039;&#039; environment are defined below. It is important to establish these terms before moving on the description of the principles on which &#039;&#039;&#039;MQ&#039;&#039;&#039; is built. Any input file containing biomolecular structures is parsed and interpreted at several levels. Any of them can be successfully used when creating queries.&lt;br /&gt;
&lt;br /&gt;
=Atom=&lt;br /&gt;
All biomolecules are made up of a set of atoms. In the &#039;&#039;&#039;MQ&#039;&#039;&#039; environment, each atom is uniquely identified in the input file by its &#039;&#039;atom name&#039;&#039;, &#039;&#039;id&#039;&#039;, &#039;&#039;chemical element&#039;&#039;, &#039;&#039;chain and a residue details the atom belong to (&#039;&#039;residue name&#039;&#039; and &#039;&#039;id&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
=Residue=&lt;br /&gt;
We generally use the term residue to refer to any component of a biomolecule. Within the &#039;&#039;&#039;MQ&#039;&#039;&#039; environment, any collection of atoms bound by chemical bonds (covalent, coordinative or ionic) is considered a residue if this fact is appropriately indicated in the input file. Specifically, all the atoms that make up a residue should have the same &#039;&#039;residue name&#039;&#039; (3-letter code) , &#039;&#039;residue serial number&#039;&#039; and &#039;&#039;chain identifier&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=Fragment=&lt;br /&gt;
Fragment is a subset of biomolecule defined by a query. Basically, it is any arrangement of either atoms or residues. Therefore, both atoms and also residues can be considered as fragments too.&lt;br /&gt;
&lt;br /&gt;
=Query=&lt;br /&gt;
Query is a single declarative expression of the &#039;&#039;&#039;MQ&#039;&#039;&#039; language  which describes a structural fragment.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Explorer&amp;diff=1130</id>
		<title>PatternQuery:Explorer</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Explorer&amp;diff=1130"/>
		<updated>2014-12-28T22:14:16Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Executing Query &amp;amp; interpreting results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When mining the whole Protein Data Bank for structural fragments it is always better to look before you leap. This is one of the purposes of the &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039; application. This JavaScript/HTML is tailored for:&lt;br /&gt;
# Querying user submitted data (up to 100 structures).&lt;br /&gt;
# Query smaller subsets of the Protein Data Bank&lt;br /&gt;
# &#039;&#039;&#039;Tweaking queries before mining the PDB database&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The last point would be probably of the most interest for the wide-range of users. In the following visual you will learn how to work with &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the service is not working the way it should, please check your browser compliances in the [[MotiveQuery:Command_Line#Technical details | technical details section]].&lt;br /&gt;
&lt;br /&gt;
==Launch MotiveQuery Explorer app==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer1.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer1b.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | Follow either &#039;&#039;&#039;Explorer&#039;&#039;&#039; link or &#039;&#039;&#039;Query Playground&#039;&#039;&#039; tab at the &#039;&#039;&#039;Synopsis&#039;&#039;&#039; page, in order to launch the application.&lt;br /&gt;
 | Create a new session or load the previous one.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get started with MotiveQuery Explorer==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer2.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer3.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | The UI of the &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039; consists of several elements. At the top of the page you can find a link and a date until when all the results will be stored. Start with loading your data...&lt;br /&gt;
 | Upload your own structures in a numerous of supported formats (*.pdb, *.cif, *.pqr, *.mol, *.mol2). It is possible to upload multiple files at the same time or use a single ZIP file (*.zip) containing multiple files inside it. Similarly you can load entries from the Protein Data Bank.&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer4.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer5.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | You can to query a subset of Protein Data Bank based on numerous metadata. At first select a property you would like to filter by, then select a comparison method and finally fill in the demanded value. Please read carefully hints and examples below each selected property. Different properties can have different means of providing input values. Note that you can also include a logical expressions. For example: &#039;&#039;&#039;S &amp;amp; !N&#039;&#039;&#039; in &#039;&#039;Atom&#039;&#039; property means that just structures containing a sulfur atom and none nitrogen will be considered. Multiple filters can be applied at the same time.&lt;br /&gt;
 | Once you are happy with the specified filters, you can view a subset of the PDB. Either the &#039;&#039;&#039;First 15 entries&#039;&#039;&#039; based on their id or &#039;&#039;&#039;Random 15 entries&#039;&#039;&#039;.&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer6.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer7.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | This list highlights a fraction of the PDB structures satisfying your criteria. You can also check, how many structures these conditions apply to. Browse structures and tick them to add to the  dataset you would like to query. Do not forget to &#039;&#039;&#039;+ Add Selected&#039;&#039;&#039; when you are happy with your selection. You can periodically &#039;&#039;fetch&#039;&#039; random structures satisfying your criteria and select those you would like to &#039;&#039;&#039;add&#039;&#039;&#039; to your dataset as well.&lt;br /&gt;
 | After loading structures, browse the list of loaded entries in order to inspect further details in the PDB.org or see their validation reports in &#039;&#039;&#039;Validator&amp;lt;sup&amp;gt;DB&amp;lt;/sup&amp;gt;&#039;&#039;&#039;. You can easily modify the list as well. Either by further adding new entries or deleting the present ones. Also note the &#039;&#039;&#039;Log panel&#039;&#039;&#039; at the bottom of the web page, since it contains valuable information from the process of loading structures.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Executing Query &amp;amp; interpreting results==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer8.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer9.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | When you have loaded at least a single structure, you can immediately start typing queries in the query box at the top of the page. If you are unsure on how to create query, first browse the principles behind the [[MotiveQuery:Principles | &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language]] and learn how to [[MotiveQuery:How_to_build_a_query | build a query]]. [[MotiveQuery:Use_Cases | Case studies]] and [[MotiveQuery:Language_Reference | language reference]] might come handy as well.&lt;br /&gt;
 | After the query is executed, which usually takes no more than a few seconds, you can inspect them in the browser or download them for further processing. You cab come back to this session later using it&#039;s web address, the results are kept for at least a month.&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Explorer&amp;diff=1129</id>
		<title>PatternQuery:Explorer</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Explorer&amp;diff=1129"/>
		<updated>2014-12-28T22:12:18Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Get started with MotiveQuery Explorer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When mining the whole Protein Data Bank for structural fragments it is always better to look before you leap. This is one of the purposes of the &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039; application. This JavaScript/HTML is tailored for:&lt;br /&gt;
# Querying user submitted data (up to 100 structures).&lt;br /&gt;
# Query smaller subsets of the Protein Data Bank&lt;br /&gt;
# &#039;&#039;&#039;Tweaking queries before mining the PDB database&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The last point would be probably of the most interest for the wide-range of users. In the following visual you will learn how to work with &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the service is not working the way it should, please check your browser compliances in the [[MotiveQuery:Command_Line#Technical details | technical details section]].&lt;br /&gt;
&lt;br /&gt;
==Launch MotiveQuery Explorer app==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer1.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer1b.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | Follow either &#039;&#039;&#039;Explorer&#039;&#039;&#039; link or &#039;&#039;&#039;Query Playground&#039;&#039;&#039; tab at the &#039;&#039;&#039;Synopsis&#039;&#039;&#039; page, in order to launch the application.&lt;br /&gt;
 | Create a new session or load the previous one.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get started with MotiveQuery Explorer==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer2.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer3.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | The UI of the &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039; consists of several elements. At the top of the page you can find a link and a date until when all the results will be stored. Start with loading your data...&lt;br /&gt;
 | Upload your own structures in a numerous of supported formats (*.pdb, *.cif, *.pqr, *.mol, *.mol2). It is possible to upload multiple files at the same time or use a single ZIP file (*.zip) containing multiple files inside it. Similarly you can load entries from the Protein Data Bank.&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer4.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer5.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | You can to query a subset of Protein Data Bank based on numerous metadata. At first select a property you would like to filter by, then select a comparison method and finally fill in the demanded value. Please read carefully hints and examples below each selected property. Different properties can have different means of providing input values. Note that you can also include a logical expressions. For example: &#039;&#039;&#039;S &amp;amp; !N&#039;&#039;&#039; in &#039;&#039;Atom&#039;&#039; property means that just structures containing a sulfur atom and none nitrogen will be considered. Multiple filters can be applied at the same time.&lt;br /&gt;
 | Once you are happy with the specified filters, you can view a subset of the PDB. Either the &#039;&#039;&#039;First 15 entries&#039;&#039;&#039; based on their id or &#039;&#039;&#039;Random 15 entries&#039;&#039;&#039;.&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer6.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer7.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | This list highlights a fraction of the PDB structures satisfying your criteria. You can also check, how many structures these conditions apply to. Browse structures and tick them to add to the  dataset you would like to query. Do not forget to &#039;&#039;&#039;+ Add Selected&#039;&#039;&#039; when you are happy with your selection. You can periodically &#039;&#039;fetch&#039;&#039; random structures satisfying your criteria and select those you would like to &#039;&#039;&#039;add&#039;&#039;&#039; to your dataset as well.&lt;br /&gt;
 | After loading structures, browse the list of loaded entries in order to inspect further details in the PDB.org or see their validation reports in &#039;&#039;&#039;Validator&amp;lt;sup&amp;gt;DB&amp;lt;/sup&amp;gt;&#039;&#039;&#039;. You can easily modify the list as well. Either by further adding new entries or deleting the present ones. Also note the &#039;&#039;&#039;Log panel&#039;&#039;&#039; at the bottom of the web page, since it contains valuable information from the process of loading structures.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Executing Query &amp;amp; interpreting results==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer8.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer9.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | When you have loaded at least a single structure, you can immediately start typing queries in the query box at the top of the page. If you are unsure on how to create query, first browse the principles behind the [[MotiveQuery:Principles | &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language]] and learn how to [[MotiveQuery:How_to_build_a_query | build a query]]. [[MotiveQuery:Use_Cases | Case studies]] and [[MotiveQuery:Language_Reference | language reference]] might come handy as well.&lt;br /&gt;
 | After the query is executed, the results are visualized in no time, you can inspect them in the browser or download them for further processing. You are free to come back to this web address later, the results are kept for at least a month.&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Explorer&amp;diff=1128</id>
		<title>PatternQuery:Explorer</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Explorer&amp;diff=1128"/>
		<updated>2014-12-28T22:08:59Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When mining the whole Protein Data Bank for structural fragments it is always better to look before you leap. This is one of the purposes of the &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039; application. This JavaScript/HTML is tailored for:&lt;br /&gt;
# Querying user submitted data (up to 100 structures).&lt;br /&gt;
# Query smaller subsets of the Protein Data Bank&lt;br /&gt;
# &#039;&#039;&#039;Tweaking queries before mining the PDB database&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The last point would be probably of the most interest for the wide-range of users. In the following visual you will learn how to work with &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
If the service is not working the way it should, please check your browser compliances in the [[MotiveQuery:Command_Line#Technical details | technical details section]].&lt;br /&gt;
&lt;br /&gt;
==Launch MotiveQuery Explorer app==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer1.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer1b.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | Follow either &#039;&#039;&#039;Explorer&#039;&#039;&#039; link or &#039;&#039;&#039;Query Playground&#039;&#039;&#039; tab at the &#039;&#039;&#039;Synopsis&#039;&#039;&#039; page, in order to launch the application.&lt;br /&gt;
 | Create a new session or load the previous one.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Get started with MotiveQuery Explorer==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer2.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer3.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | The UI of the &#039;&#039;&#039;MotiveQuery Explorer&#039;&#039;&#039; consists of several elements. At the top of the page you can find a link and a date until when all the results will be stored. Start with loading your data...&lt;br /&gt;
 | Upload your own structures in a numerous of supported formats (*.pdb, *.cif, *.pqr, *.mol, *.mol2), multiple files can be uploaded at time, in case they are zipped (*.zip). Similarly you can load entries from the Protein Data Bank.&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer4.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer5.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | You can to query a subset of Protein Data Bank based on numerous metadata. At first select a property you would like to filter by, then select a comparison method and finally fill in the demanded value. Please read carefully hints and examples below each selected property. Different properties can have different means of providing input values. Note that you can also include a logical expressions. For example: &#039;&#039;&#039;S &amp;amp; !N&#039;&#039;&#039; in &#039;&#039;Atom&#039;&#039; property means that just structures containing a sulfur atom and none nitrogen will be considered. Multiple filters can be applied at the same time.&lt;br /&gt;
 | Once you are happy with the specified filters, you can view a subset of the PDB. Either the &#039;&#039;&#039;First 15 entries&#039;&#039;&#039; based on their id or &#039;&#039;&#039;Random 15 entries&#039;&#039;&#039;.&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer6.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer7.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | This list highlights a fraction of the PDB structures satisfying your criteria. You can also check, how many structures these conditions apply to. Browse structures and tick them to add to the  dataset you would like to query. Do not forget to &#039;&#039;&#039;+ Add Selected&#039;&#039;&#039; when you are happy with your selection. You can periodically &#039;&#039;fetch&#039;&#039; random structures satisfying your criteria and select those you would like to &#039;&#039;&#039;add&#039;&#039;&#039; to your dataset as well.&lt;br /&gt;
 | After loading structures, browse the list of loaded entries in order to inspect further details in the PDB.org or see their validation reports in &#039;&#039;&#039;Validator&amp;lt;sup&amp;gt;DB&amp;lt;/sup&amp;gt;&#039;&#039;&#039;. You can easily modify the list as well. Either by further adding new entries or deleting the present ones. Also note the &#039;&#039;&#039;Status bar&#039;&#039;&#039; at the bottom of the web page, since it contains valuable information from the process of loading structures.&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Executing Query &amp;amp; interpreting results==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Explorer8.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Explorer9.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | When you have loaded at least a single structure, you can immediately start typing queries in the query box at the top of the page. If you are unsure on how to create query, first browse the principles behind the [[MotiveQuery:Principles | &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language]] and learn how to [[MotiveQuery:How_to_build_a_query | build a query]]. [[MotiveQuery:Use_Cases | Case studies]] and [[MotiveQuery:Language_Reference | language reference]] might come handy as well.&lt;br /&gt;
 | After the query is executed, the results are visualized in no time, you can inspect them in the browser or download them for further processing. You are free to come back to this web address later, the results are kept for at least a month.&lt;br /&gt;
 |}&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Service_Organization&amp;diff=1125</id>
		<title>PatternQuery:Service Organization</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Service_Organization&amp;diff=1125"/>
		<updated>2014-12-28T20:16:55Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;Motive Query&#039;&#039;&#039; service is aimed for querying large datasets of structures from the [http://www.rcsb.org/pdb/home/home.do Protein Data Bank]. For the perfecting your query or querying smaller datasets or even user-uploaded data, please use [[MotiveQuery:MotiveExplorer | MotiveQuery Explorer]] instead.&lt;br /&gt;
&lt;br /&gt;
If you would like to run &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; at your home institution, please download a [[MotiveQuery:Command_Line | command-line]] version. The following visual will guide you through the process of submitting you calculation so as the interpreting results.&lt;br /&gt;
&lt;br /&gt;
=Synopsis Page=&lt;br /&gt;
[[File:MotiveQuery-Service0.png | right | thumb | 650px| &#039;&#039;&#039;MotiveQuery Service&#039;&#039;&#039; UI]]&lt;br /&gt;
The &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; synopsis page is divided into a number of tabs:&lt;br /&gt;
* &#039;&#039;&#039;Quick Help&#039;&#039;&#039; and &#039;&#039;&#039;Samples&#039;&#039;&#039; tab provides information to help you orient better.&lt;br /&gt;
* &#039;&#039;&#039;Support&#039;&#039;&#039; provides a simple user interface for asking questions related to a &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language or service. We do our best to come back to your questions as soon as possible. &#039;&#039;&#039;Query Playground&#039;&#039;&#039; represents an interface for the [[MotiveQuery:MotiveExplorer | MotiveQuery Explorer]] application where you can tune up your queries before doing the database-wide searches.&lt;br /&gt;
* &#039;&#039;&#039;Query Protein Data Bank&#039;&#039;&#039; is a simple interface for creating a database wide &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; calculation.&lt;br /&gt;
* &#039;&#039;&#039;Command Line Version&#039;&#039;&#039; enables you to download a MotiveQuery service and run it at your home institution over your in-house database in a supported format (*.pdb, *.cif, *.pqr, *.mol and *.sdf).&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Job Submission=&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot; style=&amp;quot;margin: 1em 1em 1em 1em;&amp;quot; width=&amp;quot;650px&amp;quot;&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Service1.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Service2.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | The UI of the &#039;&#039;&#039;MotiveQuery Service&#039;&#039;&#039; job submission page allows user to submit a new query calculation. First time user can take a look at some of the example queries. If you have run any calculations with &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; already, you can browse the results.&lt;br /&gt;
 | At first, decide whether you would like to query an entire Protein Data Bank, its subset based on a variety of different properties, or you have a list of PDB entries of your interest.&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Service3.png| 650px]]&lt;br /&gt;
 | [[File:MotiveQuery-Service4.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | You can to query a subset of Protein Data Bank based on numerous metadata. At first select a property you would like to filter by, then select a comparison method and finally fill in the demanded value. Please read carefully hints and examples below each selected property. Different properties can have different means of providing input values. Note that you can also include a logical expressions. For example: &#039;&#039;&#039;S &amp;amp; !N&#039;&#039;&#039; in &#039;&#039;Atom&#039;&#039; property means that just structures containing a sulfur atom and none nitrogen atom will be considered. Multiple filters can be applied at the same time.&lt;br /&gt;
 | Once you select a data set, you can specify multiple queries which will be executed. If you are unsure on how to compose a query, try one of the provided examples. You can also take a look into our [[MotiveQuery:How_to_build_a_query | case studies]] or consult the [[MotiveQuery:Language_Reference | language reference]]. In case none of these help, ask us a question via &#039;&#039;&#039;Support&#039;&#039;&#039; tab. We will be happy to answer you in the shortest possible time. Do &#039;&#039;&#039;not forget&#039;&#039;&#039; to click &#039;&#039;&#039;+ Add&#039;&#039;&#039; after you finish composing query.&lt;br /&gt;
 |-&lt;br /&gt;
 | [[File:MotiveQuery-Service5.png| 650px]]&lt;br /&gt;
 |-&lt;br /&gt;
 | As soon as you specify a query or queries and so data set, you can tick an option to validate all the ligands and non-standard residues for their structure integrity using [[ValidatorDB:UserManual | Validator&amp;lt;sup&amp;gt;DB&amp;lt;/sup&amp;gt;]] and, finally, submit the calculation. Based on the number of processed structures, the execution time can be in the range of minutes (thousands of structures) to an hour (whole Protein Data Bank). Bookmark the newly generated web address as the results will be available here upon the calculation finishes.&lt;br /&gt;
 |}&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Please continue reading to the [[MotiveQuery:Specifics Page | Specifics page]], where you can find additional info on downloading and inspecting your results.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:UserManual&amp;diff=1078</id>
		<title>PatternQuery:UserManual</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:UserManual&amp;diff=1078"/>
		<updated>2014-12-26T12:47:19Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; (&#039;&#039;&#039;MQ&#039;&#039;&#039;) is interactive, user-friendly and platform independent web service enabling user to effectively define, extract and analyze biomolecular structural fragments using &#039;&#039;&#039;MotiveQuery language&#039;&#039;&#039;. Such analysis is particularly useful not only in a structural and functional assignment of uncharacterized or newly determined proteins, but also represents a key point in rational design and engineering of novel functional sites and comparative protein structural analyses.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;MQ&#039;&#039;&#039; is provided as a web service for mining the whole [http://pdb.org/pdb/home/home.do PDB database], however it can also be restricted based on numerous metadata, such as the &#039;&#039;Release date&#039;&#039;, &#039;&#039;Resolution&#039;&#039;, &#039;&#039;EC number&#039;&#039; and so on. Therefore, only structures relevant for your research are processed. Additionally, smaller amount of user structures can be processed in the [[MotiveQuery:MotiveExplorer | MotiveExplorer]] application. Larger in-house databases can be processed with the [[MotiveQuery:Command Line | command line application]].&lt;br /&gt;
&lt;br /&gt;
Below you can find the &#039;&#039;&#039;MQ&#039;&#039;&#039; user manual, which contains all the information you need in order to make efficient use of &#039;&#039;&#039;MQ&#039;&#039;&#039;. Additional support is provided on the [http://webchem.ncbr.muni.cz/Platform/MotiveQuery/Index &#039;&#039;&#039;MQ&#039;&#039;&#039; web pages]. When you first access the &#039;&#039;&#039;MQ&#039;&#039;&#039; page, you will find basic information in the Quick Help tab, and useful examples in the Samples tab. Follow the green ? buttons to access the embedded interactive guides that assist you in setting up your calculations and interpreting the results. Many tool tips are available when hovering over various elements of the interface.&lt;br /&gt;
----&lt;br /&gt;
===[[MotiveQuery:Introduction | Introduction]]===&lt;br /&gt;
----&lt;br /&gt;
===[[MotiveQuery:Terminology | Terminology]]===&lt;br /&gt;
#[[MotiveQuery:Terminology#Atom | Atom]]&lt;br /&gt;
#[[MotiveQuery:Terminology#Residue | Residue]]&lt;br /&gt;
#[[MotiveQuery:Terminology#Fragment | Fragment]]&lt;br /&gt;
#[[MotiveQuery:Terminology#Query | Query]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===[[MotiveQuery:Principles | Principles of the MQ language]]===&lt;br /&gt;
#[[MotiveQuery:Principles#Example, Part One | Example - introduction]]&lt;br /&gt;
#[[MotiveQuery:Principles#Basic Principles of the Language | Basic Principle]]&lt;br /&gt;
#[[MotiveQuery:Principles#Example, Part One | Example - revised]]&lt;br /&gt;
----&lt;br /&gt;
===[[MotiveQuery:How to build a query | How to build a query]]===&lt;br /&gt;
#[[MotiveQuery:How to build a query#How to think about queries | How to think about query]]&lt;br /&gt;
#[[MotiveQuery:How to build a query#Ready-to-use examples | Ready-to-use examples]]&lt;br /&gt;
----&lt;br /&gt;
===[[MotiveQuery:Use Cases | Biological use cases]]===&lt;br /&gt;
#[[MotiveQuery:Use Cases#Find all post-translational modified amino acids | Post-translational modified aminoacids]]&lt;br /&gt;
#[[MotiveQuery:Use Cases#Identify Zinc fingers | Zinc fingers]]&lt;br /&gt;
#[[MotiveQuery:Use Cases#Identify all the residues, which contain a sugar ring | Residue containing carbohydrate moiety]]&lt;br /&gt;
----&lt;br /&gt;
===[[MotiveQuery:MotiveExplorer | MotiveQuery Explorer]]===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===[[MotiveQuery:Service Organization | Using MotiveQuery service]]===&lt;br /&gt;
----&lt;br /&gt;
===[[MotiveQuery:Language_Reference | Language reference]]===&lt;br /&gt;
----&lt;br /&gt;
===[[MotiveQuery:Command Line | Command line version &amp;amp; Technical details]]===&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=Main_Page&amp;diff=1015</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=Main_Page&amp;diff=1015"/>
		<updated>2014-12-24T17:31:51Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
=== [[MotiveQuery:UserManual | MotiveQuery]] ===&lt;br /&gt;
=== [[MotiveValidator]] ===&lt;br /&gt;
=== [[ValidatorDB:UserManual | ValidatorDB]] ===&lt;br /&gt;
=== [[ChargeCalculator:UserManual | AtomicChargeCalculator]] ===&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=1014</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=1014"/>
		<updated>2014-12-24T17:03:35Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Example, Part One */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups and &#039;&#039;&#039;we want to find all HET residues in it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types queries outline in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Or | Or()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Path | Path()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|none|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Command_Line&amp;diff=991</id>
		<title>PatternQuery:Command Line</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Command_Line&amp;diff=991"/>
		<updated>2014-12-23T14:56:01Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is help for version 1.0.14.11.28 or newer. The help text for other versions can be viewed using the &#039;&#039;--help&#039;&#039; command when running the application.&lt;br /&gt;
&lt;br /&gt;
=Technical details=&lt;br /&gt;
===Where to find MotiveQuery===&lt;br /&gt;
&#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; is freely available online since May 2014 at http://ncbr.muni.cz/MotiveQuery. There is no login requirement for accessing &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===What you need in order to run MotiveQuery===&lt;br /&gt;
* Up to date internet browser with WebGL support. &lt;br /&gt;
* JavaScript enabled.&lt;br /&gt;
&lt;br /&gt;
Check if your browser is [http://get.webgl.org WebGL] and [http://www.enable-javascript.com/ Javascript] compliant.&lt;br /&gt;
&lt;br /&gt;
Note that you can run &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; and download the results even if your browser doesn&#039;t support WebGL. &lt;br /&gt;
WebGL is only necessary for the 3D visualization functionality.&lt;br /&gt;
&lt;br /&gt;
In some older browsers, the interactive user guide which provides help for the GUI interface does not work optimally.&lt;br /&gt;
&lt;br /&gt;
= Running the Offline Service =&lt;br /&gt;
-----------------------&lt;br /&gt;
The service can be executed using the command (latest .NET Framework required): &lt;br /&gt;
&amp;lt;pre&amp;gt;WebChemistry.MotiveQuery.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
In Linux (where available) and MacOS, the latest version the Mono Framework (http://mono-project.com/) must be used to run the application:&lt;br /&gt;
&amp;lt;pre&amp;gt;mono WebChemistry.MotiveQuery.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, on Linux and MacOS, an official version of .NET Framework should become available during 2015.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The configuration is specified using the JSON format.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Example ===&lt;br /&gt;
This is the general shape of the JSON input configuration.&lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
  &amp;quot;InputFolders&amp;quot;: [&lt;br /&gt;
    &amp;quot;c:\\TestData\\PDB\\SampleSet1&amp;quot;&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;Queries&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;NAGs&amp;quot;,&lt;br /&gt;
      &amp;quot;QueryString&amp;quot;: &amp;quot;Residues(\&amp;quot;NAG\&amp;quot;)&amp;quot;&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;MANs&amp;quot;,&lt;br /&gt;
      &amp;quot;QueryString&amp;quot;: &amp;quot;Residues(&#039;MAN&#039;)&amp;quot;&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;StatisticsOnly&amp;quot;: false,&lt;br /&gt;
  &amp;quot;CSAPath&amp;quot;: &amp;quot;c:\\data\\csa.dat&amp;quot;,&lt;br /&gt;
  &amp;quot;MaxParallelism&amp;quot;: 8&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There has to be exactly one configuration file for each validation run. Every value, as well as settings&#039; names, is surrounded in quotation marks (&amp;quot; &amp;quot; or &#039; &#039;). Backslashes (\) have to be escaped (\\). File system paths can be absolute as well as relative (/ works as well in paths).&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
* &#039;&#039;&#039;InputFolders&#039;&#039;&#039; [ String[] ]&lt;br /&gt;
: &#039;&#039;A list of folders containing the input structures.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Queries&#039;&#039;&#039; [ [[#QueryInfo_details|QueryInfo]] ]&lt;br /&gt;
: &#039;&#039;A list of queries.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;StatisticsOnly&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;If `true`, the files with fragments are not exported.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CSAPath&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Optional path to a file with CSA database that allows the CSA() query to work. The file is a CSV file that must contain the columns `PdbID, SiteNumber, ?, ?, ChainId, ResidueNumber, ...`&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxParallelism&#039;&#039;&#039; [ Int32 ], Default value = 8&lt;br /&gt;
: &#039;&#039;The maximum number of structures that can be processed simultaneously.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Descriptions ===&lt;br /&gt;
===== &amp;lt;span id=&#039;QueryInfo_details&#039;&amp;gt;QueryInfo&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Id&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;A unique identifier of the query.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;QueryString&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;The query expression.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Output Description ==&lt;br /&gt;
&lt;br /&gt;
=== General Structure ===&lt;br /&gt;
* &#039;&#039;&#039;[WorkingDirectory]&#039;&#039;&#039; - &#039;&#039;Working directory of the application.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Contains the result of the computation.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;log.txt&#039;&#039;&#039; - &#039;&#039;Contains the console output of the application.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;status.json&#039;&#039;&#039; - &#039;&#039;Contains general information of the computation (running time, version, etc.).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== MotiveQuery Specific Structure ===&lt;br /&gt;
* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Folder with computation result&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;query_id&#039;&#039;&#039; - &#039;&#039;Folder for each query named by its unique id.&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;fragments&#039;&#039;&#039; - &#039;&#039;Folder with fragments stored in PDB format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;data.json&#039;&#039;&#039; - &#039;&#039;Information about the result in JSON format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;fragments.csv&#039;&#039;&#039; - &#039;&#039;Information about the fragments in CSV format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;metadata_summary.csv&#039;&#039;&#039; - &#039;&#039;Information about the metadata (origin organism, EC number, etc.) in CSV format.&#039;&#039;&lt;br /&gt;
:::: &#039;&#039;&#039;structures.csv&#039;&#039;&#039; - &#039;&#039;Information about structures that contain the given fragments in CSV format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;structures.csv&#039;&#039;&#039; - &#039;&#039;Information about all structures that were queried in CSV format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;structures.json&#039;&#039;&#039; - &#039;&#039;Information about all structures that were queried in JSON format.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;summary.json&#039;&#039;&#039; - &#039;&#039;Summary information (number of found fragments, etc.) about the computation in JSON format.&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=990</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=990"/>
		<updated>2014-12-23T05:26:03Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* A More Formal Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups and &#039;&#039;&#039;we want to find all HET residues in it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types queries outline in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Or | Or()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Path | Path()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|none|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=989</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=989"/>
		<updated>2014-12-23T05:25:21Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* A More Formal Description */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups and &#039;&#039;&#039;we want to find all HET residues in it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types queries outline in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Or | Or()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Star | Star()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|none|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=944</id>
		<title>PatternQuery:Language Reference</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=944"/>
		<updated>2014-12-17T20:23:38Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
MotiveQuery (MQ) is a user friendly chemical language primarily designed for defining structural fragments. MQ combines the clarity and brevity of programming languages with  the versatility of natural language, aiming for an efficient inclusion of chemical and biochemical knowledge into the definition of structural fragments. MQ allows definitions based on chemical connectivity and three-dimensional structure at the same time. Additionally, in the case of molecules based on residue chains (such as proteins, nucleic acids, saccharides, etc.), MQ allows the user to include any amount of information regarding the residue level structure directly into the definition of the fragments.&lt;br /&gt;
&lt;br /&gt;
MotiveQuery is a subset of the Python programming language. Therefore, if you have experience with it, it should not be a problem to use MQ as well.&lt;br /&gt;
&lt;br /&gt;
* The language is case sensitive - &amp;quot;filter&amp;quot; is NOT the same as &amp;quot;FiLtEr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some of the functions return &#039;&#039;&#039;&amp;lt;code&amp;gt;FragmentSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; while other return &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039;. &lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;FragmentSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a sequence of &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039; (the sets of atoms).&lt;br /&gt;
&lt;br /&gt;
When a molecule is queried, say using the expression &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt; a sequences of fragments each containing 6 atoms (5 C and 1 O) is returned. However, some functions such as &amp;lt;code&amp;gt;Filter&amp;lt;/code&amp;gt; need to operate on a single fragment (the set of atoms) - not the whole sequences. The query &amp;lt;code&amp;gt;Filter(Residues(), lambda r: r.Count(Atoms()) &amp;gt; 10)&amp;lt;/code&amp;gt; first finds all residue &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragments&amp;lt;/code&amp;gt;&#039;&#039;&#039; (sequence) and then passes every single &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039; (set of atoms) to a function that counts the atoms in the fragment and returns True if there is at least 11 of them. This is the reasoning behind these two types.&lt;br /&gt;
&lt;br /&gt;
== Using MotiveQuery in Silverlight applications ==&lt;br /&gt;
&lt;br /&gt;
MotiveQuery can be used in SiteBinder, EEM Charges, and MotiveExplorer from the the corresponding UI elements. Moreover, it is possible to use MQ from the Scripting window. This is achieved using the &amp;lt;code&amp;gt;MQ.Execute&amp;lt;/code&amp;gt; function. The function takes two parameters: the query and an optional target structure list.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
These examples can be executed from the Scripting window of SiteBinder, MotiveExplorer, or other Silverlight applications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;q = Atoms(&amp;quot;Zn&amp;quot;).ConnectedAtoms(2) &lt;br /&gt;
MQ.Execute(q)&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command finds all fragments specified by the query q in all loaded structures.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;MQ.Execute(Residues(&amp;quot;HEM&amp;quot;), [ Session.StructureMap[&amp;quot;1tqn&amp;quot;], Session.StructureMap[&amp;quot;2wer&amp;quot;] ])&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command finds all HEM residues in structures 1tqn and 2wer (provided structures with these names are loaded).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;q = AtomSimilarity(Fragment(&amp;quot;model&amp;quot;), Fragment(&amp;quot;1gtz_0&amp;quot;))&lt;br /&gt;
MQ.Execute(q)&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command computes the atom similarity (Jaccard coefficient) for structures model and 1gtz_0.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;q = ResidueSimilarity(Fragment(&amp;quot;model&amp;quot;), Current())&lt;br /&gt;
MQ.Execute(q, Session.Structures)&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command computes the residue similarity (Jaccard coefficient) for the structure with id &#039;model&#039; (which is loaded using the Fragment function) and all other loaded structures (computed one by one using the function Current()). The result is returned in CSV format.&#039;&#039;== Basic Query Functions ==&lt;br /&gt;
&#039;&#039;Basic building blocks of the language - i.e. atoms, residues, and the like.&#039;&#039;&lt;br /&gt;
=== AminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues with the 20 basic amino acid names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: ChargeType&amp;amp;#58; String = &amp;quot;&amp;quot; - &#039;&#039;Specify type of the charge. Allowed values: Positive, Negative, Aromatic, Polar, NonPolar.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All amino acids.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids(ChargeType = &amp;quot;Polar&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Amino acids with polar charge.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIdRange(minId&amp;amp;#58; Integer, maxId&amp;amp;#58; ?Integer) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with minId &amp;lt;= atomId &amp;lt;= maxId.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: minId&amp;amp;#58; Integer - &#039;&#039;Minimum id.&#039;&#039; &lt;br /&gt;
: maxId&amp;amp;#58; ?Integer - &#039;&#039;Maximum id. If not specified, maxId = minId.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIdRange(152, 161)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with id between 152 and 161 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms with ids 1, 2, 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Allowed names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomNames(&amp;quot;O1&amp;quot;,&amp;quot;NH1&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with names O1 or NH1.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Atoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;Atoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified element symbols. If no symbols are specified, yields all atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;,&amp;quot;Ca&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with element symbol Zn or Ca&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Helices ===&lt;br /&gt;
&amp;lt;code&amp;gt;Helices() -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all helices. This assumes the information about helices was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Helices()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all helices.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HetResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;HetResidues() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that contain HET atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (ignores water).&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues(NoWaters=False)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (includes water).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Chains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Chains(identifiers&amp;amp;#58; Value*) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Splits the structures into chains. If no identifiers are specified, all chains are returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: identifiers&amp;amp;#58; Value* - &#039;&#039;Chain identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all chains.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains without specific identifier.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains A and B.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Named ===&lt;br /&gt;
&amp;lt;code&amp;gt;Named(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Names&#039; the fragment by its lowest atom id.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).Named().AmbientAtoms(7)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;When exported, the result files will have names in the format &#039;[parent id]_[pseudorandom number]_[zn atomid]&#039;. If the Named function was not used, the name would be just &#039;[parent id]_[pseudorandom number]&#039;.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that are not any of the 20 basic amino acids.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not amino acids.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms that do not have id 1, 2, nor 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have a specified name.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Forbidden names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomNames(&amp;quot;O4&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not called O4.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtoms(symbols&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that are not particular elements.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String+ - &#039;&#039;Forbidden element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtoms(&amp;quot;O&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotResidues(names&amp;amp;#58; Value+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues that are not called by the specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; Value+ - &#039;&#039;Forbidden residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotResidues(&amp;quot;THR&amp;quot;,&amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not THR or CYS.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RegularMotifs ===&lt;br /&gt;
&amp;lt;code&amp;gt;RegularMotifs(regex&amp;amp;#58; Value) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Identifies regular motifs. The protein is split into individual chains and the residues are sorted by their Sequence Number before the motifs are identified. The query does not check if adjacent residues have consecutive Sequence Numbers. The query works in two modes: Amino and Nucleotide, on amino acids and nucleotides respectively. The default mode is &#039;Amino&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: regex&amp;amp;#58; Value - &#039;&#039;Regular expression on one letter abbreviations of amino acids.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: Type&amp;amp;#58; String = &amp;quot;Amino&amp;quot; - &#039;&#039;Determines the type of the query. Allowed values: Amino, Nucleotide.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;RGD&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all RGD motifs.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;ACGTU&amp;quot;, Type = &#039;Nucleotide&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all consecutive occurrences of the ACGTU nucleotides.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;.HC.&amp;quot;).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all 4 residue motifs with ?-HIS-CYS-? that are connected.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIdRange(chain&amp;amp;#58; String, min&amp;amp;#58; Integer, max&amp;amp;#58; ?Integer) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific chain and min &amp;lt;= sequence number &amp;lt;= max.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: chain&amp;amp;#58; String - &#039;&#039;Chain identifier. Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
: min&amp;amp;#58; Integer - &#039;&#039;Minimum sequence number.&#039;&#039; &lt;br /&gt;
: max&amp;amp;#58; ?Integer - &#039;&#039;Maximum sequence number. If not specified, max = min.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIdRange(&amp;quot;A&amp;quot;, 161, 165)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues on chain A with seq. number between 161 and 165 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIds(ids&amp;amp;#58; String+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific identifiers. If the structure does not contain a residue with the given identifier, it is skipped.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; String+ - &#039;&#039;One or more identifiers in the format &#039;NUMBER [CHAIN] [i:INSERTIONCODE]&#039; (parameters in [] are optional, for example &#039;175 i:12&#039; or &#039;143 B&#039;). Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIds(&amp;quot;132 A&amp;quot;, &amp;quot;178 A&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues A 123 and A 178 (provided the input structure contains them).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Residues ===&lt;br /&gt;
&amp;lt;code&amp;gt;Residues(names&amp;amp;#58; String*) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specified names. If no names are specified, yields all residues one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String* - &#039;&#039;Allowed residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;, &amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HIS or CYS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RingAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;RingAtoms(atom&amp;amp;#58; Atoms, ring&amp;amp;#58; ?Rings) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all rings atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atom&amp;amp;#58; Atoms - &#039;&#039;Atom types.&#039;&#039; &lt;br /&gt;
: ring&amp;amp;#58; ?Rings - &#039;&#039;Specific ring.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RingAtoms(Atoms(&amp;quot;C&amp;quot;), Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on a ring with 4C and O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Rings ===&lt;br /&gt;
&amp;lt;code&amp;gt;Rings(atoms&amp;amp;#58; Value*) -&amp;amp;gt; Rings&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of rings with particular atoms. If no atoms are specified, yields all rings (cycles) one by one. The order of atoms matters.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atoms&amp;amp;#58; Value* - &#039;&#039;Ring atoms.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with 5C and 1O atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;]), Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;N&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N or C-C-C-N-N atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Sheets ===&lt;br /&gt;
&amp;lt;code&amp;gt;Sheets() -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all sheets. This assumes the information about sheets was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Sheets()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all sheets.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Advanced Query Functions ==&lt;br /&gt;
&#039;&#039;Advanced building blocks of the language.&#039;&#039;&lt;br /&gt;
=== Flatten ===&lt;br /&gt;
&amp;lt;code&amp;gt;Flatten(fragments&amp;amp;#58; FragmentSeq, selector&amp;amp;#58; Fragment-&amp;gt;FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of sequence of fragments into a single &#039;flat&#039; sequence.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to project.&#039;&#039; &lt;br /&gt;
: selector&amp;amp;#58; Fragment-&amp;gt;FragmentSeq - &#039;&#039;The selector.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).Flatten(lambda m: m.Find(Atoms(&amp;quot;C&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Inside ===&lt;br /&gt;
&amp;lt;code&amp;gt;Inside(fragments&amp;amp;#58; FragmentSeq, where&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds fragments within another fragment. Equivalent to where.Flatten(lambda m: m.Find(fragments))&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to find.&#039;&#039; &lt;br /&gt;
: where&amp;amp;#58; FragmentSeq - &#039;&#039;Where to find them.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Inside(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Or ===&lt;br /&gt;
&amp;lt;code&amp;gt;Or(fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Merges several fragment sequences into one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1), Rings())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all zincs and their connected residues or rings.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToAtoms(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; fragments and yields all unique atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms on HIS residues one by one.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToResidues(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; fragments and yields all unique residues one by one. The residues contain only the atoms that have been yielded by the inner query.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).ToResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms grouped by residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Union ===&lt;br /&gt;
&amp;lt;code&amp;gt;Union(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; fragments and yields one created from their unique atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings().Union()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Creates a single fragment that contains all rings.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Filter Functions ==&lt;br /&gt;
&#039;&#039;Functions useful for filtering fragments.&#039;&#039;&lt;br /&gt;
=== Contains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Contains(where&amp;amp;#58; Fragment, what&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a fragment is contained within another one. Equivalent to where.Count(what) &amp;gt; 0.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; FragmentSeq - &#039;&#039;What to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues().Filter(lambda m: m.Contains(Rings(5*[&#039;C&#039;]+[&#039;O&#039;])).Not())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HET residues that do not contain a 5CO ring.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Count ===&lt;br /&gt;
&amp;lt;code&amp;gt;Count(where&amp;amp;#58; Fragment, what&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts all occurrences of fragment &#039;what&#039; in fragment &#039;where&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;Where to count it.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; FragmentSeq - &#039;&#039;What fragment to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;m.Count(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the count of HIS residues in the fragment m. Where m is a Fragment (for example when using the Filter function or returned by the ToFragment() function). This example will not work directly and is here to illustrate a concept.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1).Filter(lambda m: m.Count(Residues(&amp;quot;HIS&amp;quot;)) == 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Fragments with Zn atoms and its connected residues with exactly 2 HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ExecuteIf ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExecuteIf(query&amp;amp;#58; FragmentSeq, condition&amp;amp;#58; Fragment-&amp;gt;Bool) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Executes a query only if the condition is met. Otherwise, return an empty sequence of fragments.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: query&amp;amp;#58; FragmentSeq - &#039;&#039;Query to execute.&#039;&#039; &lt;br /&gt;
: condition&amp;amp;#58; Fragment-&amp;gt;Bool - &#039;&#039;Condition that must be satisfied for the parent structure/fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that have resolution lower than 2.4ang.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids().ExecuteIf(lambda p: p.Count(Atoms(&#039;Fe&#039;)) &amp;gt; 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all amino acids in structures that have at least 3 Fe atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filter ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filter(fragments&amp;amp;#58; FragmentSeq, filter&amp;amp;#58; Fragment-&amp;gt;Bool) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Filters a sequence of fragments with a given predicate.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to filter.&#039;&#039; &lt;br /&gt;
: filter&amp;amp;#58; Fragment-&amp;gt;Bool - &#039;&#039;Filter predicate.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda m: m.Count(Atoms(&amp;quot;C&amp;quot;)) &amp;gt;= 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain at least 3 C atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnected ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnected(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular fragment is a connected graph.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all fragments with a Zn and residues within 3 ang, where all the ambient residues are connected to the central atom.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnectedTo(where&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular fragment is connected to any other specified fragment. The fragments must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragment sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.IsConnectedTo(Rings()))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are connected to a ring they do not belong to.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsNotConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsNotConnectedTo(what&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular fragment is not connected to any other specified fragment. The fragments must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragment sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda r: r.IsNotConnectedTo(Atoms(&amp;quot;Ca&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all residues that are not connected to Ca atoms. The residue itself can still contain Ca atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NearestDistanceTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;NearestDistanceTo(where&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds the distance to a particular fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragment sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda m: m.NearestDistanceTo(Residues(&amp;quot;ASP&amp;quot;)) &amp;gt;= 5)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are at least 5 (angstroms) away from any ASP residue.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== SeqCount ===&lt;br /&gt;
&amp;lt;code&amp;gt;SeqCount(what&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts the length of a sequence of motifs.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; FragmentSeq - &#039;&#039;What fragment sequence to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.Find(Residues(&amp;quot;HIS&amp;quot;)).SeqCount() &amp;gt; 1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a sequence of fragments with Zn atom and residues within 3ang if the fragment contains at least 2 HIS residues.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Topology Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the topology of fragments.&#039;&#039;&lt;br /&gt;
=== ConnectedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedAtoms(fragment&amp;amp;#58; FragmentSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by n layers of atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of atom layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;MAN&amp;quot;).ConnectedAtoms(2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all MAN residues and then adds two connected levels of atoms to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ConnectedResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedResidues(fragment&amp;amp;#58; FragmentSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by n layers of residues.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of residue layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all Zn atoms and adds all residues that are connected to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Path ===&lt;br /&gt;
&amp;lt;code&amp;gt;Path(fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new fragment from &#039;connected&#039; parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to path.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Path(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds fragments with two O and one C atoms where the C atoms is connected to the O ones.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Star ===&lt;br /&gt;
&amp;lt;code&amp;gt;Star(center&amp;amp;#58; FragmentSeq, fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new fragment from a central one and connected parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: center&amp;amp;#58; FragmentSeq - &#039;&#039;Center fragment.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to chain.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Star(Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds fragments with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Star(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds fragments with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Geometry Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the geometry of fragments.&#039;&#039;&lt;br /&gt;
=== AmbientAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientAtoms(fragment&amp;amp;#58; FragmentSeq, r&amp;amp;#58; Number) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by atoms that within the given radius from the inner fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original fragment.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;).AmbientAtoms(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds Fe atoms and all atoms within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AmbientResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientResidues(fragment&amp;amp;#58; FragmentSeq, r&amp;amp;#58; Number) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by residues that have at least one atom within the given radius from the inner fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original fragment.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(6 * [&amp;quot;C&amp;quot;]).AmbientResidues(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds rings with 6C atoms and all residues within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Cluster ===&lt;br /&gt;
&amp;lt;code&amp;gt;Cluster(r&amp;amp;#58; Number, fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all fragments that are pairwise closer than r (angstroms).&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two fragments in the cluster.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to cluster.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of one or more rings with 5C and O atoms and one or more Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filled ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filled(fragment&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Adds all atoms that fall within the circumsphere (with radius multiplied by the factor) of the basic fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: RadiusFactor&amp;amp;#58; Number = 0.75 - &#039;&#039;Circumsphere radius factor.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Residues(&amp;quot;HIS&amp;quot;)).Filled(RadiusFactor = 0.75)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds clusters of HIS residues and all atoms within the circumsphere.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Near ===&lt;br /&gt;
&amp;lt;code&amp;gt;Near(r&amp;amp;#58; Number, fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all fragments that are pairwise closer than r (angstroms) and checks if the &amp;quot;counts&amp;quot; match.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two sub-fragments in the fragment.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to &#039;cluster&#039;.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Near(4, Atoms(&amp;quot;Ca&amp;quot;), Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of a single ring with 5C and O atoms and two Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Meta-data Functions ==&lt;br /&gt;
&#039;&#039;Functions dealing with meta-data about structures such as release date or authors.&#039;&#039;&lt;br /&gt;
=== Authors ===&lt;br /&gt;
&amp;lt;code&amp;gt;Authors(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns authors of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;ECNumbers(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns Enzymatic Commission numbers assigned to enzymes in the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== EntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;EntitySources(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns entity sources of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ExperimentMethod ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExperimentMethod(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the experiment method. The value is always an upper-case string. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ExperimentMethod() == &amp;quot;INFRARED SPECTROSCOPY&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllAuthors ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllAuthors(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllAuthors(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllECNumbers(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given Enzymatic Commission numbers. It is possible to enter just a number prefix without the &#039;.&#039;. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllECNumbers(&amp;quot;3.2.1.18&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllEntitySources(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismIds(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismIds(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganisms(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganisms(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllKeywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllKeywords(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllKeywords(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismIds(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismIds(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganisms(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganisms(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyAuthor ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyAuthor(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyAuthor(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyECNumber ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyECNumber(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given Enzymatic Commission number. It is possible to enter just a number prefix without the &#039;.&#039;s. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyECNumber(&amp;quot;3.2.1.19&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyEntitySources(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganism(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganism(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismId(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismId(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyKeyword ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyKeyword(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyKeyword(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganism(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganism(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismId(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismId(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismGenus(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismIds(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganisms(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Keywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;Keywords(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns keywords of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionDate(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionYear(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismGenus(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismIds(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganisms(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== PolymerType ===&lt;br /&gt;
&amp;lt;code&amp;gt;PolymerType(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the polymer type of the structure. Possible values are: NotAssigned, Protein, DNA, RNA, ProteinDNA, ProteinRNA, NucleicAcids, Mixture, Sugar, Other. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.PolymerType() == &amp;quot;ProteinDNA&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometry ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometry(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry of the parent structure. Possible values are: NotAssigned, Monomer, Homomer, Heteromer. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ProteinStoichiometry() == &amp;quot;Heteromer&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometryString ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometryString(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry string of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ReleaseDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseDate(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ReleaseYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseYear(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Resolution ===&lt;br /&gt;
&amp;lt;code&amp;gt;Resolution(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the resolution in angstroms of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Weight ===&lt;br /&gt;
&amp;lt;code&amp;gt;Weight(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the weight of the molecule in kDa. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Weight() &amp;gt; 100000.0)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Miscellaneous Functions ==&lt;br /&gt;
&#039;&#039;Various useful functions. These function often require a special setup (i.e. only useful in Scripting window or in specific applications).&#039;&#039;&lt;br /&gt;
=== AminoSequenceString ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoSequenceString(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a string of single-letter amino acids contained in the fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Fragment(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a string representing amino acids in the fragment &#039;1tqn_12&#039;.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(Fragment(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all regular fragments that correspond to the AMK sequence in 1tqn_12.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomProperty ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomProperty(atomFragment&amp;amp;#58; Fragment, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;If the property exists and the fragment consists of a single atom, returns the property. Otherwise, returns Nothing.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atomFragment&amp;amp;#58; Fragment - &#039;&#039;Single atom fragment.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Property name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;a.AtomProperty(&amp;quot;charge&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Gets the &#039;charge&#039; property of the atom a. Where a is a single atom Fragment. This example will not work directly.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.AtomProperty(&amp;quot;charge&amp;quot;) &amp;gt;= 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All atoms with the charge property greater or equal to 2. This example will only work in cases where a suitable property is defined. For example in Scripting window in the Charges app.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomSimilarity(a&amp;amp;#58; Fragment, b&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on atoms (element symbols) of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Fragment - &#039;&#039;First fragment.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Fragment - &#039;&#039;Second fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(),Fragment(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity between the current fragment and 1tqn_12. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CommonAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;CommonAtoms(modelId&amp;amp;#58; String) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a single fragment with atoms common with the model. Properties checked: atom id, element symbol, chain, residue number. This query is useful for example for atom selection in SiteBinder.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: modelId&amp;amp;#58; String - &#039;&#039;Id of the model.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CommonAtoms(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a fragment formed by atoms common with the &#039;1tqn_12&#039; structure.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CSA ===&lt;br /&gt;
&amp;lt;code&amp;gt;CSA() -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Entries from Catalytic Site Atlas represented as fragments. Works only if used from the command line version of MotiveQuery and property configured.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CSA()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All CSA sites for the given structure. This example will only work if used from the command line version of MotiveQuery and property configured.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Current ===&lt;br /&gt;
&amp;lt;code&amp;gt;Current() -&amp;amp;gt; Fragment&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;A variable that is assigned by the application environment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(), Fragment(&amp;quot;model&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the atom similarity of the current fragment and the model. This example will work for example when defining a structure descriptor in SiteBinder and there is a structure with id &#039;model&#039; loaded.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Descriptor ===&lt;br /&gt;
&amp;lt;code&amp;gt;Descriptor(fragment&amp;amp;#58; Fragment, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns the descriptor. If the descriptor does not exist, &#039;null&#039; is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment that represents entire structure.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Descriptor name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Current().Descriptor(&amp;quot;similarity&amp;quot;) &amp;gt;= 0.75&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns True if &#039;similarity&#039; descriptor of the current fragment is at least 0.75. This example will work for example in SiteBinder&#039;s structure selection if the &#039;similarity&#039; descriptor has been previously defined.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== DynamicInvoke ===&lt;br /&gt;
&amp;lt;code&amp;gt;DynamicInvoke(value&amp;amp;#58; Value, name&amp;amp;#58; String, isProperty&amp;amp;#58; Bool, args&amp;amp;#58; Value) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Dynamically invoke a member. (internal)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: value&amp;amp;#58; Value - &#039;&#039;InnerQuery.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Member name.&#039;&#039; &lt;br /&gt;
: isProperty&amp;amp;#58; Bool - &#039;&#039;Is this a property.&#039;&#039; &lt;br /&gt;
: args&amp;amp;#58; Value - &#039;&#039;Array of arguments.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Find ===&lt;br /&gt;
&amp;lt;code&amp;gt;Find(source&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts the source fragment to a structure and finds fragments within it.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: source&amp;amp;#58; Fragment - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment(), Fragment(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; fragments, but ignores N atoms. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;model&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Fragment ===&lt;br /&gt;
&amp;lt;code&amp;gt;Fragment(structureName&amp;amp;#58; String) -&amp;amp;gt; Fragment&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a structure represented as a fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: structureName&amp;amp;#58; String - &#039;&#039;Name of a structure.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Fragment(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the structure &#039;1tqn_12&#039; represented as a fragment. Usable in defining descriptors or in Scripting window (using MQ.Execute).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GroupedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;GroupedAtoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Groups atoms using the element symbol and then returns each group as a single fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO, fragments with 5xC and 1xO atoms are returned.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms(&#039;C&#039;, &#039;O&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO-6xH, fragments with 5xC and 1xO atoms are returned (but the H atoms are ignored).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueSimilarity(a&amp;amp;#58; Fragment, b&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on residue names of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Fragment - &#039;&#039;First fragment.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Fragment - &#039;&#039;Second fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueSimilarity(Current(), Fragment(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the residue similarity between the current fragment and &#039;1tqn_12&#039;. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToFragment ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToFragment(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Fragment&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of Fragments (FragmentSeq) to a single Fragment by merging all atoms into a single atom set. The Fragment type is required by some function such as AtomSimilarity.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToFragment()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Converts a sequence of HIS residue Fragments to a single Fragment.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment(), Fragment(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; fragments, but ignores N atoms.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Value Functions ==&lt;br /&gt;
&#039;&#039;Functions such as addition or comparison of numbers.&#039;&#039;&lt;br /&gt;
=== Abs ===&lt;br /&gt;
&amp;lt;code&amp;gt;Abs(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Abs&#039; function of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Abs(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Divide (/) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Divide(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Divide&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x / y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Equal (==) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Equal(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Equal&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x == y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Greater (&amp;amp;gt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Greater(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Greater&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GreaterEqual (&amp;amp;gt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;GreaterEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;GreaterEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Less (&amp;amp;lt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Less(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Less&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LessEqual (&amp;amp;lt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LessEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;LessEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalAnd (&amp;amp;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalAnd(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalAnd&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;amp; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalNot (Not) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalNot(x&amp;amp;#58; Bool) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalNot&#039; of the input value. This function can be called using the shorthand &#039;Not&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Bool - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalNot(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;x.Not()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalOr (|) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalOr(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalOr&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x | y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalXor (Xor) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalXor(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalXor&#039; of the input values. This function can be called using the shorthand &#039;Xor&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalXor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Xor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Minus (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Minus(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the arithmetic negation of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Arithmetic negation of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotEqual (!=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotEqual(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;NotEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x != y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Plus (+) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Plus(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Plus&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x + y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Power (^) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Power(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Power&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x ^ y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Subtract (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Subtract(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Subtract&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x - y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Times (*) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Times(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Times&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x * y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=942</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=942"/>
		<updated>2014-12-17T03:29:08Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Example, Part One */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups and &#039;&#039;&#039;we want to find all HET residues in it&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types queries outline in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Cluster | Cluster()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Star | Star()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|none|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=941</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=941"/>
		<updated>2014-12-17T03:28:13Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Example, Part One */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups and we want to find all HET residues in it.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types queries outline in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Cluster | Cluster()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Star | Star()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|none|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=940</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=940"/>
		<updated>2014-12-17T03:24:27Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Example, Revised */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&#039;&#039;&#039;Goal: Find all HET residues in a protein.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types queries outline in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Cluster | Cluster()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Star | Star()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|none|500px]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|none|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=939</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=939"/>
		<updated>2014-12-17T03:16:42Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Example, Part One */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&#039;&#039;&#039;Goal: Find all HET residues in a protein.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes simply:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types queries outline in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Cluster | Cluster()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Star | Star()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|center|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|center|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|center|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=938</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=938"/>
		<updated>2014-12-17T02:51:56Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Example, Revised */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&#039;&#039;&#039;Goal: Find all HET residues in a protein.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = new List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = new List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = new NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = new List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types queries outline in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Cluster | Cluster()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Star | Star()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|center|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|center|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|center|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=937</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=937"/>
		<updated>2014-12-17T02:45:07Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&#039;&#039;&#039;Goal: Find all HET residues in a protein.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = new List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = new List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = new NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = new List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
===Intuitive Description===&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types queries outline in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===A More Formal Description===&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Cluster | Cluster()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Star | Star()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|center|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|center|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|center|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=936</id>
		<title>PatternQuery:Principles</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Principles&amp;diff=936"/>
		<updated>2014-12-17T02:42:56Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;&#039;A new paradigm for describing structural fragments in molecules&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This text describes the basic principles of the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language for describing structural fragments in molecules. First, the text puts two approaches for identifying molecular fragments in contrast: the imperative approach, and the declarative one, taken by the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language. Next, basic principles of the language are illustrated on several examples and later described in a more formal way. Finally, the original example is revisited and explained in the terms of the newly introduced concepts.&lt;br /&gt;
&lt;br /&gt;
==Example, Part One==&lt;br /&gt;
&#039;&#039;&#039;Goal: Find all HET residues in a protein.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Let’s assume we have loaded a protein stored in a PDB or mmCIF file with correctly annotated HET groups.&lt;br /&gt;
&lt;br /&gt;
The characteristics of an imperative approach is explicitly stating steps that need to be performed in order achieve a particular goal. In contrast a declarative approach states the goal we would like to achieve, leaving the individual steps as an &amp;quot;implementation detail&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Using the imperative approach, we would do something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
result = new List()&lt;br /&gt;
for residue in molecule.Residues:&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    result.Add(residue)&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the declarative approach, our code would look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example to &amp;quot;all HET residues and atoms within 4A around them&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
In the imperative approach we would need to do something along the following lines:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
temp = new List()&lt;br /&gt;
&lt;br /&gt;
for residue in molecule.Residues():&lt;br /&gt;
  if residue.IsHet():&lt;br /&gt;
    temp.Add(residue)&lt;br /&gt;
&lt;br /&gt;
neighborhoodLookup = new NeighborhoodLookup(molecule.Atoms())&lt;br /&gt;
result = new List()&lt;br /&gt;
&lt;br /&gt;
for residue in temp:&lt;br /&gt;
  surroundings = neiborhoodLookup.Find(residue.Atoms, 4.0)&lt;br /&gt;
  result.Add(union(residue, surroundings))&lt;br /&gt;
&lt;br /&gt;
return result&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Declaratively, our code would be just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues().AmbientAtoms(4.0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Internally, the function &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; might run code similar to the imperative version. However, what is important is that this complexity is hidden from the user when the declarative approach is used.&lt;br /&gt;
&lt;br /&gt;
Now, let’s extend our example even further: &amp;quot;all HET residues and atoms within 4A around them, where the entire structure contains at least one calcium atom&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We will not bother the reader with writing down the imperative version - implementing the condition &amp;quot;at least one calcium atom&amp;quot; is rather boring. However, using the declarative approach, the description of the fragment becomes just:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(4.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Basic Principles of the Language==&lt;br /&gt;
&lt;br /&gt;
As we&#039;ve seen in the example above, it is very easy to &#039;&#039;compose&#039;&#039; our ideas about the final shape of the fragment we are interested in. The way this works is that the input molecule is decomposed into a stream of fragments. These streams can then be modified and combined into new streams, which can be modified and combined again.&lt;br /&gt;
&lt;br /&gt;
As an example, take the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;)&amp;lt;/code&amp;gt;. What the &#039;&#039;&#039;MotiveQuery&#039;&#039;&#039; language does is to extract all calcium atoms from the input molecule and represent them as a stream of sets containing one atom each as illustrated on the image below:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca).png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
Now, each element of this stream can be modified, for example to include all atoms 4A within the original calcium atom. Now we have a stream of sets of atoms, where each set contains the original Ca atom and the atoms within the given radius. This would be represented by the query &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt; and is illustrated on the image bellow:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
In the next step, we might wish to keep only these fragments that contain at least 6 atoms. This is achieved by looking at each fragment, counting the number of atoms and throwing away these fragments that do not meet the criteria. Written as a query, this could be represented as &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4).Filter(lambda m: m.Count(Atoms()) &amp;gt;= 6)&amp;lt;/code&amp;gt;. In the graphical form:&lt;br /&gt;
&lt;br /&gt;
[[Image:MotiveQuery-Principles Atoms(Ca) surr filt.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
The previous filter query also demonstrates another interesting concept of the language: ability to identify fragments within fragments, which is what the expression &amp;lt;code&amp;gt;m.Count(Atoms())&amp;lt;/code&amp;gt; does - the &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; query is executed for each fragment from the original input sequence provided by the expression &amp;lt;code&amp;gt;Atoms(&#039;Ca&#039;).AmbientAtoms(4)&amp;lt;/code&amp;gt;, and creates a new sequence of fragments that each contain a single atom. Then the Count function takes over and returns the number of fragments produced by its argument. In this way, the query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt; inside the Count function can be replaced by any function that also produces a sequence of fragments, for example &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Rings | Rings()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Finally, streams of fragments can be combined. For example, let’s say we want to find all pairs of calcium atoms that are no further than 4A within each other. This can be achieved using the query &amp;lt;code&amp;gt;Near(4, Atoms(&#039;Ca&#039;), Atoms(&#039;Ca&#039;))&amp;lt;/code&amp;gt;. So this query takes as the input two identical streams of calcium atoms and for each pair of them determines if the atoms are closer than 4A to each other. For each pair that satisfies this condition, a new fragment from the 2 atoms is created. Therefore, the result of the above &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt; query is a stream of sets of atoms (fragments) that each contain two calcium atoms that are no further than 4A from each other:&lt;br /&gt;
&lt;br /&gt;
[[Image:Near.png|center|600px]]&lt;br /&gt;
&lt;br /&gt;
With these basic types queries outline in the previous paragraphs, the sky&#039;s the limit. Due to the composable nature of the language if a new type of motif emerges, only a single function needs to be added to the language for it to work with all its other parts. As an example, assume we didn’t know that proteins had secondary structure called “sheet” and we just discovered it and a fancy algorithm to identify these &amp;quot;sheets&amp;quot;. Now we would be interested in how this new type of protein substructure interacts with other parts of the molecule. All that would be needed is to add a function called &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Sheets | Sheets()]]&amp;lt;/code&amp;gt; to the language and immediately we would be able to analyze and filter it’s neighborhood using the functions &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Basic Principles, More Formally this Time==&lt;br /&gt;
There are two basic data structures that the language is built upon. These are:&lt;br /&gt;
* &#039;&#039;&#039;Fragment&#039;&#039;&#039;. A fragment is simple an arbitrary set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;Fragment Sequence&#039;&#039;&#039;. A sequence of fragments. In mathematical terms, can be understood as a &amp;quot;set of fragments&amp;quot; which is another way of saying &amp;quot;set of sets of atoms&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
And on these data structures, there are three basic types of queries:&lt;br /&gt;
* &#039;&#039;&#039;Generator queries&#039;&#039;&#039;. Generator queries, as the name suggests, generate sequences of fragments from the original input. They are the tool that transforms the input molecule into a stream of fragments that can be later modified or combined. Examples of these queries include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Atoms | Atoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Residues | Residues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#RegularMotifs | RegularMotifs()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Modifier queries&#039;&#039;&#039;. These queries operate on individual fragments and modify them or throw them away. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | AmbientAtoms()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#ConnectedResidues | ConnectedResidues()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | Filter()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Combinator queries&#039;&#039;&#039;. Combinatorial queries take as input two or more sequence of fragments and combine them into a single new sequence that satisfies given criteria. Examples include &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Near | Near()]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Cluster | Cluster()]]&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Star | Star()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Example, Revised==&lt;br /&gt;
Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
HetResidues()&lt;br /&gt;
  .AmbientAtoms(3.0)&lt;br /&gt;
  .Filter(lambda m: m.Count(Atoms(&#039;Ca&#039;)) &amp;gt;= 1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This corresponds to the following process.&lt;br /&gt;
&lt;br /&gt;
# A generator query &amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt; is executed that produces a sequence of fragments that are composed of atoms corresponding to HET residues.&lt;br /&gt;
# Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each fragment.&lt;br /&gt;
# Finally, each fragment in the modified sequence is examined: all “calcium atom fragments” are identified and counted. Only these fragments that contain at least 1 Ca atom are kept.&lt;br /&gt;
&lt;br /&gt;
Graphically:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#HetResidues | HetResidues()]]&amp;lt;/code&amp;gt;.&lt;br /&gt;
[[Image:MotiveQuery-Principles-HetResidues.png|center|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms.png|center|500px]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[[MotiveQuery:Language_Reference#Filter | .Filter(lambda l: l.count(Atoms(&#039;Ca&#039;)) &amp;gt; 0)]]&amp;lt;/code&amp;gt;&lt;br /&gt;
[[Image:MotiveQuery-Principles-AmbientAtoms-filter.png|center|500px]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=885</id>
		<title>PatternQuery:Language Reference</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Language_Reference&amp;diff=885"/>
		<updated>2014-12-15T22:08:42Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
MotiveQuery (MQ) is a user friendly chemical language primarily designed for defining structural fragments. MQ combines the clarity and brevity of programming languages with  the versatility of natural language, aiming for an efficient inclusion of chemical and biochemical knowledge into the definition of structural fragments. MQ allows definitions based on chemical connectivity and three-dimensional structure at the same time. Additionally, in the case of molecules based on residue chains (such as proteins, nucleic acids, saccharides, etc.), MQ allows the user to include any amount of information regarding the residue level structure directly into the definition of the fragments.&lt;br /&gt;
&lt;br /&gt;
MotiveQuery is a subset of the Python programming language. Therefore, if you have experience with it, it should not be a problem to use MQ as well.&lt;br /&gt;
&lt;br /&gt;
* The language is case sensitive - &amp;quot;filter&amp;quot; is NOT the same as &amp;quot;FiLtEr&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Some of the functions return &#039;&#039;&#039;&amp;lt;code&amp;gt;FragmentSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; while other return &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039;. &lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a set of atoms.&lt;br /&gt;
* &#039;&#039;&#039;&amp;lt;code&amp;gt;FragmentSeq&amp;lt;/code&amp;gt;&#039;&#039;&#039; is a sequence of &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039; (the sets of atoms).&lt;br /&gt;
&lt;br /&gt;
When a molecule is queried, say using the expression &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt; a sequences of fragments each containing 6 atoms (5 C and 1 O) is returned. However, some functions such as &amp;lt;code&amp;gt;Filter&amp;lt;/code&amp;gt; need to operate on a single fragment (the set of atoms) - not the whole sequences. The query &amp;lt;code&amp;gt;Filter(Residues(), lambda r: r.Count(Atoms()) &amp;gt; 10)&amp;lt;/code&amp;gt; first finds all residue &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragments&amp;lt;/code&amp;gt;&#039;&#039;&#039; (sequence) and then passes every single &#039;&#039;&#039;&amp;lt;code&amp;gt;Fragment&amp;lt;/code&amp;gt;&#039;&#039;&#039; (set of atoms) to a function that counts the atoms in the fragment and returns True if there is at least 11 of them. This is the reasoning behind these two types.&lt;br /&gt;
&lt;br /&gt;
== Using MotiveQuery in Silverlight applications ==&lt;br /&gt;
&lt;br /&gt;
MotiveQuery can be used in SiteBinder, EEM Charges, and MotiveExplorer from the the corresponding UI elements. Moreover, it is possible to use MQ from the Scripting window. This is achieved using the &amp;lt;code&amp;gt;MQ.Execute&amp;lt;/code&amp;gt; function. The function takes two parameters: the query and an optional target structure list.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
These examples can be executed from the Scripting window of SiteBinder, MotiveExplorer, or other Silverlight applications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;q = Atoms(&amp;quot;Zn&amp;quot;).ConnectedAtoms(2) &lt;br /&gt;
MQ.Execute(q)&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command finds all fragments specified by the query q in all loaded structures.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;MQ.Execute(Residues(&amp;quot;HEM&amp;quot;), [ Session.StructureMap[&amp;quot;1tqn&amp;quot;], Session.StructureMap[&amp;quot;2wer&amp;quot;] ])&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command finds all HEM residues in structures 1tqn and 2wer (provided structures with these names are loaded).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;q = AtomSimilarity(Fragment(&amp;quot;model&amp;quot;), Fragment(&amp;quot;1gtz_0&amp;quot;))&lt;br /&gt;
MQ.Execute(q)&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command computes the atom similarity (Jaccard coefficient) for structures model and 1gtz_0.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;q = ResidueSimilarity(Fragment(&amp;quot;model&amp;quot;), Current())&lt;br /&gt;
MQ.Execute(q, Session.Structures)&amp;lt;/pre&amp;gt;&lt;br /&gt;
: &#039;&#039;This command computes the residue similarity (Jaccard coefficient) for the structure with id &#039;model&#039; (which is loaded using the Fragment function) and all other loaded structures (computed one by one using the function Current()). The result is returned in CSV format.&#039;&#039;&lt;br /&gt;
== Basic Query Functions ==&lt;br /&gt;
&#039;&#039;Basic building blocks of the language - i.e. atoms, residues, and the like.&#039;&#039;&lt;br /&gt;
=== AminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues with the 20 basic amino acid names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: ChargeType&amp;amp;#58; String = &amp;quot;&amp;quot; - &#039;&#039;Specify type of the charge. Allowed values: Positive, Negative, Aromatic, Polar, NonPolar.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All amino acids.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids(ChargeType = &amp;quot;Polar&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Amino acids with polar charge.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIdRange(minId&amp;amp;#58; Integer, maxId&amp;amp;#58; ?Integer) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with minId &amp;lt;= atomId &amp;lt;= maxId.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: minId&amp;amp;#58; Integer - &#039;&#039;Minimum id.&#039;&#039; &lt;br /&gt;
: maxId&amp;amp;#58; ?Integer - &#039;&#039;Maximum id. If not specified, maxId = minId.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIdRange(152, 161)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with id between 152 and 161 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms with ids 1, 2, 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Allowed names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomNames(&amp;quot;O1&amp;quot;,&amp;quot;NH1&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with names O1 or NH1.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Atoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;Atoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms with specified element symbols. If no symbols are specified, yields all atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;,&amp;quot;Ca&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms with element symbol Zn or Ca&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Helices ===&lt;br /&gt;
&amp;lt;code&amp;gt;Helices() -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all helices. This assumes the information about helices was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Helices()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all helices.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HetResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;HetResidues() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that contain HET atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (ignores water).&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues(NoWaters=False)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain HET atoms (includes water).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Chains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Chains(identifiers&amp;amp;#58; Value*) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Splits the structures into chains. If no identifiers are specified, all chains are returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: identifiers&amp;amp;#58; Value* - &#039;&#039;Chain identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all chains.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains without specific identifier.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Chains(&amp;quot;A&amp;quot;, &amp;quot;B&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns chains A and B.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Named ===&lt;br /&gt;
&amp;lt;code&amp;gt;Named(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Names&#039; the fragment by its lowest atom id.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).Named().AmbientAtoms(7)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;When exported, the result files will have names in the format &#039;[parent id]_[pseudorandom number]_[zn atomid]&#039;. If the Named function was not used, the name would be just &#039;[parent id]_[pseudorandom number]&#039;.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAminoAcids ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAminoAcids() -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of all residues that are not any of the 20 basic amino acids.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAminoAcids()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not amino acids.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomIds(ids&amp;amp;#58; Integer+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have specified identifiers.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; Integer+ - &#039;&#039;Identifiers.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomIds(1, 2, 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns atoms that do not have id 1, 2, nor 3.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtomNames ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtomNames(names&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that do not have a specified name.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String+ - &#039;&#039;Forbidden names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtomNames(&amp;quot;O4&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not called O4.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotAtoms(symbols&amp;amp;#58; String+) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of atoms that are not particular elements.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String+ - &#039;&#039;Forbidden element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotAtoms(&amp;quot;O&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms that are not O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotResidues(names&amp;amp;#58; Value+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues that are not called by the specified names.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; Value+ - &#039;&#039;Forbidden residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;NotResidues(&amp;quot;THR&amp;quot;,&amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that are not THR or CYS.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RegularMotifs ===&lt;br /&gt;
&amp;lt;code&amp;gt;RegularMotifs(regex&amp;amp;#58; Value) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Identifies regular motifs. The protein is split into individual chains and the residues are sorted by their Sequence Number before the motifs are identified. The query does not check if adjacent residues have consecutive Sequence Numbers. The query works in two modes: Amino and Nucleotide, on amino acids and nucleotides respectively. The default mode is &#039;Amino&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: regex&amp;amp;#58; Value - &#039;&#039;Regular expression on one letter abbreviations of amino acids.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: Type&amp;amp;#58; String = &amp;quot;Amino&amp;quot; - &#039;&#039;Determines the type of the query. Allowed values: Amino, Nucleotide.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;RGD&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all RGD motifs.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;ACGTU&amp;quot;, Type = &#039;Nucleotide&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all consecutive occurrences of the ACGTU nucleotides.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(&amp;quot;.HC.&amp;quot;).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all 4 residue motifs with ?-HIS-CYS-? that are connected.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIdRange ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIdRange(chain&amp;amp;#58; String, min&amp;amp;#58; Integer, max&amp;amp;#58; ?Integer) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific chain and min &amp;lt;= sequence number &amp;lt;= max.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: chain&amp;amp;#58; String - &#039;&#039;Chain identifier. Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
: min&amp;amp;#58; Integer - &#039;&#039;Minimum sequence number.&#039;&#039; &lt;br /&gt;
: max&amp;amp;#58; ?Integer - &#039;&#039;Maximum sequence number. If not specified, max = min.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIdRange(&amp;quot;A&amp;quot;, 161, 165)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues on chain A with seq. number between 161 and 165 inclusive.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueIds(ids&amp;amp;#58; String+) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specific identifiers. If the structure does not contain a residue with the given identifier, it is skipped.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: ids&amp;amp;#58; String+ - &#039;&#039;One or more identifiers in the format &#039;NUMBER [CHAIN] [i:INSERTIONCODE]&#039; (parameters in [] are optional, for example &#039;175 i:12&#039; or &#039;143 B&#039;). Case sensitive (a != A).&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueIds(&amp;quot;132 A&amp;quot;, &amp;quot;178 A&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues A 123 and A 178 (provided the input structure contains them).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Residues ===&lt;br /&gt;
&amp;lt;code&amp;gt;Residues(names&amp;amp;#58; String*) -&amp;amp;gt; Residues&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of residues with specified names. If no names are specified, yields all residues one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: names&amp;amp;#58; String* - &#039;&#039;Allowed residue names.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;, &amp;quot;CYS&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HIS or CYS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== RingAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;RingAtoms(atom&amp;amp;#58; Atoms, ring&amp;amp;#58; ?Rings) -&amp;amp;gt; Atoms&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all rings atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atom&amp;amp;#58; Atoms - &#039;&#039;Atom types.&#039;&#039; &lt;br /&gt;
: ring&amp;amp;#58; ?Rings - &#039;&#039;Specific ring.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;RingAtoms(Atoms(&amp;quot;C&amp;quot;), Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on a ring with 4C and O.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Rings ===&lt;br /&gt;
&amp;lt;code&amp;gt;Rings(atoms&amp;amp;#58; Value*) -&amp;amp;gt; Rings&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Sequence of rings with particular atoms. If no atoms are specified, yields all rings (cycles) one by one. The order of atoms matters.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atoms&amp;amp;#58; Value* - &#039;&#039;Ring atoms.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with 5C and 1O atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;])&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N atoms.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;]), Rings([&amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;N&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all rings with C-C-N-C-N or C-C-C-N-N atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Sheets ===&lt;br /&gt;
&amp;lt;code&amp;gt;Sheets() -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns all sheets. This assumes the information about sheets was present in the input structure.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Sheets()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all sheets.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Advanced Query Functions ==&lt;br /&gt;
&#039;&#039;Advanced building blocks of the language.&#039;&#039;&lt;br /&gt;
=== Flatten ===&lt;br /&gt;
&amp;lt;code&amp;gt;Flatten(fragments&amp;amp;#58; FragmentSeq, selector&amp;amp;#58; Fragment-&amp;gt;FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of sequence of fragments into a single &#039;flat&#039; sequence.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to project.&#039;&#039; &lt;br /&gt;
: selector&amp;amp;#58; Fragment-&amp;gt;FragmentSeq - &#039;&#039;The selector.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).Flatten(lambda m: m.Find(Atoms(&amp;quot;C&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Inside ===&lt;br /&gt;
&amp;lt;code&amp;gt;Inside(fragments&amp;amp;#58; FragmentSeq, where&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds fragments within another fragment. Equivalent to where.Flatten(lambda m: m.Find(fragments))&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to find.&#039;&#039; &lt;br /&gt;
: where&amp;amp;#58; FragmentSeq - &#039;&#039;Where to find them.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Inside(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms on HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Or ===&lt;br /&gt;
&amp;lt;code&amp;gt;Or(fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Merges several fragment sequences into one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Or(Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1), Rings())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all zincs and their connected residues or rings.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToAtoms(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; fragments and yields all unique atoms one by one.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all atoms on HIS residues one by one.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToResidues(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; fragments and yields all unique residues one by one. The residues contain only the atoms that have been yielded by the inner query.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to split.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).ToResidues()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all C atoms grouped by residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Union ===&lt;br /&gt;
&amp;lt;code&amp;gt;Union(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Collects all &#039;inner&#039; fragments and yields one created from their unique atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to merge.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings().Union()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Creates a single fragment that contains all rings.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Filter Functions ==&lt;br /&gt;
&#039;&#039;Functions useful for filtering fragments.&#039;&#039;&lt;br /&gt;
=== Contains ===&lt;br /&gt;
&amp;lt;code&amp;gt;Contains(where&amp;amp;#58; Fragment, what&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a fragment is contained within another one. Equivalent to where.Count(what) &amp;gt; 0.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; FragmentSeq - &#039;&#039;What to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;HetResidues().Filter(lambda m: m.Contains(Rings(5*[&#039;C&#039;]+[&#039;O&#039;])).Not())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all HET residues that do not contain a 5CO ring.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Count ===&lt;br /&gt;
&amp;lt;code&amp;gt;Count(where&amp;amp;#58; Fragment, what&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Counts all occurrences of fragment &#039;what&#039; in fragment &#039;where&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;Where to count it.&#039;&#039; &lt;br /&gt;
: what&amp;amp;#58; FragmentSeq - &#039;&#039;What fragment to count.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;m.Count(Residues(&amp;quot;HIS&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the count of HIS residues in the fragment m. Where m is a Fragment (for example when using the Filter function or returned by the ToFragment() function). This example will not work directly and is here to illustrate a concept.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1).Filter(lambda m: m.Count(Residues(&amp;quot;HIS&amp;quot;)) == 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Fragments with Zn atoms and its connected residues with exactly 2 HIS residues.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ExecuteIf ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExecuteIf(query&amp;amp;#58; FragmentSeq, condition&amp;amp;#58; Fragment-&amp;gt;Bool) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Executes a query only if the condition is met. Otherwise, return an empty sequence of fragments.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: query&amp;amp;#58; FragmentSeq - &#039;&#039;Query to execute.&#039;&#039; &lt;br /&gt;
: condition&amp;amp;#58; Fragment-&amp;gt;Bool - &#039;&#039;Condition that must be satisfied for the parent structure/fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that have resolution lower than 2.4ang.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AminoAcids().ExecuteIf(lambda p: p.Count(Atoms(&#039;Fe&#039;)) &amp;gt; 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all amino acids in structures that have at least 3 Fe atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filter ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filter(fragments&amp;amp;#58; FragmentSeq, filter&amp;amp;#58; Fragment-&amp;gt;Bool) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Filters a sequence of fragments with a given predicate.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to filter.&#039;&#039; &lt;br /&gt;
: filter&amp;amp;#58; Fragment-&amp;gt;Bool - &#039;&#039;Filter predicate.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda m: m.Count(Atoms(&amp;quot;C&amp;quot;)) &amp;gt;= 3)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all residues that contain at least 3 C atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnected ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnected(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular fragment is a connected graph.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientResidues(3).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all fragments with a Zn and residues within 3 ang, where all the ambient residues are connected to the central atom.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsConnectedTo(where&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular fragment is connected to any other specified fragment. The fragments must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragment sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.IsConnectedTo(Rings()))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are connected to a ring they do not belong to.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== IsNotConnectedTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;IsNotConnectedTo(what&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Checks if a particular fragment is not connected to any other specified fragment. The fragments must have empty intersection for this function to return true.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: what&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragment sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().Filter(lambda r: r.IsNotConnectedTo(Atoms(&amp;quot;Ca&amp;quot;)))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all residues that are not connected to Ca atoms. The residue itself can still contain Ca atoms.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NearestDistanceTo ===&lt;br /&gt;
&amp;lt;code&amp;gt;NearestDistanceTo(where&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Finds the distance to a particular fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: where&amp;amp;#58; Fragment - &#039;&#039;A fragment to test.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragment sequence to test against.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda m: m.NearestDistanceTo(Residues(&amp;quot;ASP&amp;quot;)) &amp;gt;= 5)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all atoms that are at least 5 (angstroms) away from any ASP residue.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Topology Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the topology of fragments.&#039;&#039;&lt;br /&gt;
=== ConnectedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedAtoms(fragment&amp;amp;#58; FragmentSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by n layers of atoms.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of atom layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;MAN&amp;quot;).ConnectedAtoms(2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all MAN residues and then adds two connected levels of atoms to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ConnectedResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;ConnectedResidues(fragment&amp;amp;#58; FragmentSeq, n&amp;amp;#58; Integer) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by n layers of residues.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: n&amp;amp;#58; Integer - &#039;&#039;Number of residue layers to connect.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all Zn atoms and adds all residues that are connected to them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Path ===&lt;br /&gt;
&amp;lt;code&amp;gt;Path(fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new fragment from &#039;connected&#039; parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to path.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Path(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds fragments with two O and one C atoms where the C atoms is connected to the O ones.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Star ===&lt;br /&gt;
&amp;lt;code&amp;gt;Star(center&amp;amp;#58; FragmentSeq, fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Creates a new fragment from a central one and connected parts.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: center&amp;amp;#58; FragmentSeq - &#039;&#039;Center fragment.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to chain.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Star(Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds fragments with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).Star(Atoms(&amp;quot;O&amp;quot;), Atoms(&amp;quot;O&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds fragments with two O atoms and one C atom in the center.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Geometry Functions ==&lt;br /&gt;
&#039;&#039;Functions that rely on the geometry of fragments.&#039;&#039;&lt;br /&gt;
=== AmbientAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientAtoms(fragment&amp;amp;#58; FragmentSeq, r&amp;amp;#58; Number) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by atoms that within the given radius from the inner fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original fragment.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;).AmbientAtoms(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds Fe atoms and all atoms within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AmbientResidues ===&lt;br /&gt;
&amp;lt;code&amp;gt;AmbientResidues(fragment&amp;amp;#58; FragmentSeq, r&amp;amp;#58; Number) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Surrounds the inner fragment by residues that have at least one atom within the given radius from the inner fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Radius.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: ExcludeBase&amp;amp;#58; Bool = False - &#039;&#039;Exclude the central original fragment.&#039;&#039; &lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: YieldNamedDuplicates&amp;amp;#58; Bool = False - &#039;&#039;Yield duplicate fragments if they have a different name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Rings(6 * [&amp;quot;C&amp;quot;]).AmbientResidues(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds rings with 6C atoms and all residues within 4 (angstroms) from each of them.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Cluster ===&lt;br /&gt;
&amp;lt;code&amp;gt;Cluster(r&amp;amp;#58; Number, fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all fragments that are pairwise closer than r (angstroms).&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two fragments in the cluster.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to cluster.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of one or more rings with 5C and O atoms and one or more Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Filled ===&lt;br /&gt;
&amp;lt;code&amp;gt;Filled(fragment&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Adds all atoms that fall within the circumsphere (with radius multiplied by the factor) of the basic fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; FragmentSeq - &#039;&#039;Basic fragment.&#039;&#039; &lt;br /&gt;
;Options&lt;br /&gt;
: NoWaters&amp;amp;#58; Bool = True - &#039;&#039;Ignore water residues such as HOH.&#039;&#039; &lt;br /&gt;
: RadiusFactor&amp;amp;#58; Number = 0.75 - &#039;&#039;Circumsphere radius factor.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Cluster(4, Residues(&amp;quot;HIS&amp;quot;)).Filled(RadiusFactor = 0.75)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds clusters of HIS residues and all atoms within the circumsphere.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Near ===&lt;br /&gt;
&amp;lt;code&amp;gt;Near(r&amp;amp;#58; Number, fragments&amp;amp;#58; FragmentSeq+) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Clusters all fragments that are pairwise closer than r (angstroms) and checks if the &amp;quot;counts&amp;quot; match.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: r&amp;amp;#58; Number - &#039;&#039;Maximum distance between two sub-fragments in the fragment.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq+ - &#039;&#039;Fragments to &#039;cluster&#039;.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Near(4, Atoms(&amp;quot;Ca&amp;quot;), Atoms(&amp;quot;Ca&amp;quot;), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Finds all instance of a single ring with 5C and O atoms and two Ca atoms that are closer than 4 (angstroms).&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Meta-data Functions ==&lt;br /&gt;
&#039;&#039;Functions dealing with meta-data about structures such as release date or authors.&#039;&#039;&lt;br /&gt;
=== Authors ===&lt;br /&gt;
&amp;lt;code&amp;gt;Authors(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns authors of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;ECNumbers(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns Enzymatic Commission numbers assigned to enzymes in the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== EntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;EntitySources(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns entity sources of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ExperimentMethod ===&lt;br /&gt;
&amp;lt;code&amp;gt;ExperimentMethod(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the experiment method. The value is always an upper-case string. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ExperimentMethod() == &amp;quot;INFRARED SPECTROSCOPY&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllAuthors ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllAuthors(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllAuthors(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllECNumbers ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllECNumbers(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given Enzymatic Commission numbers. It is possible to enter just a number prefix without the &#039;.&#039;. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllECNumbers(&amp;quot;3.2.1.18&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllEntitySources(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganismIds(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganismIds(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllHostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllHostOrganisms(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllHostOrganisms(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllKeywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllKeywords(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllKeywords(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganismIds(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismIds(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAllOriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAllOriginOrganisms(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains all given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAllOriginOrganisms(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyAuthor ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyAuthor(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given authors. The comparison is case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyAuthor(&amp;quot;Holmes&amp;quot;, &amp;quot;Watson&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyECNumber ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyECNumber(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given Enzymatic Commission number. It is possible to enter just a number prefix without the &#039;.&#039;s. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyECNumber(&amp;quot;3.2.1.19&amp;quot;, &amp;quot;3.3&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyEntitySources ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyEntitySources(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given entity sources. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyEntitySources(&amp;quot;GMO&amp;quot;, &amp;quot;Natural&amp;quot;, &amp;quot;Synthetic&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganism(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganism(&amp;quot;Spodoptera frugiperda&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyHostOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyHostOrganismId(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismId(&amp;quot;7108&amp;quot;, &amp;quot;11244&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyKeyword ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyKeyword(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given keywords. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyKeyword(&amp;quot;membrane&amp;quot;, &amp;quot;glycoprotein&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganism ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganism(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism names. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganism(&amp;quot;Nipah virus&amp;quot;, &amp;quot;Mus musculus&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismGenus(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismGenus(&amp;quot;X&amp;quot;, &amp;quot;Y&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HasAnyOriginOrganismId ===&lt;br /&gt;
&amp;lt;code&amp;gt;HasAnyOriginOrganismId(fragment&amp;amp;#58; Fragment, properties&amp;amp;#58; String+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
: properties&amp;amp;#58; String+ - &#039;&#039;Properties.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismId(&amp;quot;121791&amp;quot;, &amp;quot;10090&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that contain all given properties.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismGenus(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganismIds(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== HostOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;HostOrganisms(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns host organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Keywords ===&lt;br /&gt;
&amp;lt;code&amp;gt;Keywords(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns keywords of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionDate(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LatestRevisionYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;LatestRevisionYear(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the latest revision year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.LatestRevisionYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismGenus ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismGenus(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganismIds ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganismIds(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== OriginOrganisms ===&lt;br /&gt;
&amp;lt;code&amp;gt;OriginOrganisms(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns origin organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== PolymerType ===&lt;br /&gt;
&amp;lt;code&amp;gt;PolymerType(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the polymer type of the structure. Possible values are: NotAssigned, Protein, DNA, RNA, ProteinDNA, ProteinRNA, NucleicAcids, Mixture, Sugar, Other. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.PolymerType() == &amp;quot;ProteinDNA&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometry ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometry(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry of the parent structure. Possible values are: NotAssigned, Monomer, Homomer, Heteromer. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ProteinStoichiometry() == &amp;quot;Heteromer&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ProteinStoichiometryString ===&lt;br /&gt;
&amp;lt;code&amp;gt;ProteinStoichiometryString(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the protein stoichiometry string of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== ReleaseDate ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseDate(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release date of the parent structure. The value has to be compared to the DateTime(year, month, day) object. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseDate() &amp;gt;= DateTime(2008, 1, 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ReleaseYear ===&lt;br /&gt;
&amp;lt;code&amp;gt;ReleaseYear(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Integer&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the release year of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.ReleaseYear() == 2006)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Resolution ===&lt;br /&gt;
&amp;lt;code&amp;gt;Resolution(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the resolution in angstroms of the parent structure. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Resolution() &amp;lt;= 2.4)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Weight ===&lt;br /&gt;
&amp;lt;code&amp;gt;Weight(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Get the weight of the molecule in kDa. If the value is not available, null is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues().ExecuteIf(lambda p: p.Weight() &amp;gt; 100000.0)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns residues in structures that satisfy the property.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Miscellaneous Functions ==&lt;br /&gt;
&#039;&#039;Various useful functions. These function often require a special setup (i.e. only useful in Scripting window or in specific applications).&#039;&#039;&lt;br /&gt;
=== AminoSequenceString ===&lt;br /&gt;
&amp;lt;code&amp;gt;AminoSequenceString(fragment&amp;amp;#58; Fragment) -&amp;amp;gt; String&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a string of single-letter amino acids contained in the fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Fragment(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a string representing amino acids in the fragment &#039;1tqn_12&#039;.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;RegularMotifs(Fragment(&amp;quot;1tqn_12&amp;quot;).AminoSequenceString())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns all regular fragments that correspond to the AMK sequence in 1tqn_12.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomProperty ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomProperty(atomFragment&amp;amp;#58; Fragment, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;If the property exists and the fragment consists of a single atom, returns the property. Otherwise, returns Nothing.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: atomFragment&amp;amp;#58; Fragment - &#039;&#039;Single atom fragment.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Property name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;a.AtomProperty(&amp;quot;charge&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Gets the &#039;charge&#039; property of the atom a. Where a is a single atom Fragment. This example will not work directly.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Atoms().Filter(lambda a: a.AtomProperty(&amp;quot;charge&amp;quot;) &amp;gt;= 2)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All atoms with the charge property greater or equal to 2. This example will only work in cases where a suitable property is defined. For example in Scripting window in the Charges app.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== AtomSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;AtomSimilarity(a&amp;amp;#58; Fragment, b&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on atoms (element symbols) of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Fragment - &#039;&#039;First fragment.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Fragment - &#039;&#039;Second fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(),Fragment(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity between the current fragment and 1tqn_12. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CommonAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;CommonAtoms(modelId&amp;amp;#58; String) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a single fragment with atoms common with the model. Properties checked: atom id, element symbol, chain, residue number. This query is useful for example for atom selection in SiteBinder.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: modelId&amp;amp;#58; String - &#039;&#039;Id of the model.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CommonAtoms(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns a fragment formed by atoms common with the &#039;1tqn_12&#039; structure.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== CSA ===&lt;br /&gt;
&amp;lt;code&amp;gt;CSA() -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Entries from Catalytic Site Atlas represented as fragments. Works only if used from the command line version of MotiveQuery and property configured.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;CSA()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;All CSA sites for the given structure. This example will only work if used from the command line version of MotiveQuery and property configured.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Current ===&lt;br /&gt;
&amp;lt;code&amp;gt;Current() -&amp;amp;gt; Fragment&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;A variable that is assigned by the application environment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current(), Fragment(&amp;quot;model&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the atom similarity of the current fragment and the model. This example will work for example when defining a structure descriptor in SiteBinder and there is a structure with id &#039;model&#039; loaded.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Descriptor ===&lt;br /&gt;
&amp;lt;code&amp;gt;Descriptor(fragment&amp;amp;#58; Fragment, name&amp;amp;#58; String) -&amp;amp;gt; ?&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns the descriptor. If the descriptor does not exist, &#039;null&#039; is returned.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragment&amp;amp;#58; Fragment - &#039;&#039;Fragment that represents entire structure.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Descriptor name.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Current().Descriptor(&amp;quot;similarity&amp;quot;) &amp;gt;= 0.75&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns True if &#039;similarity&#039; descriptor of the current fragment is at least 0.75. This example will work for example in SiteBinder&#039;s structure selection if the &#039;similarity&#039; descriptor has been previously defined.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== DynamicInvoke ===&lt;br /&gt;
&amp;lt;code&amp;gt;DynamicInvoke(value&amp;amp;#58; Value, name&amp;amp;#58; String, isProperty&amp;amp;#58; Bool, args&amp;amp;#58; Value) -&amp;amp;gt; Value&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Dynamically invoke a member. (internal)&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: value&amp;amp;#58; Value - &#039;&#039;InnerQuery.&#039;&#039; &lt;br /&gt;
: name&amp;amp;#58; String - &#039;&#039;Member name.&#039;&#039; &lt;br /&gt;
: isProperty&amp;amp;#58; Bool - &#039;&#039;Is this a property.&#039;&#039; &lt;br /&gt;
: args&amp;amp;#58; Value - &#039;&#039;Array of arguments.&#039;&#039; &lt;br /&gt;
----&lt;br /&gt;
=== Find ===&lt;br /&gt;
&amp;lt;code&amp;gt;Find(source&amp;amp;#58; Fragment, fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts the source fragment to a structure and finds fragments within it.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: source&amp;amp;#58; Fragment - &#039;&#039;Where to look.&#039;&#039; &lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to find.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment(), Fragment(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; fragments, but ignores N atoms. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;model&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Fragment ===&lt;br /&gt;
&amp;lt;code&amp;gt;Fragment(structureName&amp;amp;#58; String) -&amp;amp;gt; Fragment&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Returns a structure represented as a fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: structureName&amp;amp;#58; String - &#039;&#039;Name of a structure.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Fragment(&amp;quot;1tqn_12&amp;quot;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns the structure &#039;1tqn_12&#039; represented as a fragment. Usable in defining descriptors or in Scripting window (using MQ.Execute).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GroupedAtoms ===&lt;br /&gt;
&amp;lt;code&amp;gt;GroupedAtoms(symbols&amp;amp;#58; String*) -&amp;amp;gt; FragmentSeq&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Groups atoms using the element symbol and then returns each group as a single fragment.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: symbols&amp;amp;#58; String* - &#039;&#039;Allowed element symbols.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO, fragments with 5xC and 1xO atoms are returned.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;GroupedAtoms(&#039;C&#039;, &#039;O&#039;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Returns groups of all atom types. For example if the input has atoms 5xC-1xO-6xH, fragments with 5xC and 1xO atoms are returned (but the H atoms are ignored).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ResidueSimilarity ===&lt;br /&gt;
&amp;lt;code&amp;gt;ResidueSimilarity(a&amp;amp;#58; Fragment, b&amp;amp;#58; Fragment) -&amp;amp;gt; Real&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes Jaccard/Tanimoto coefficient on residue names of both structures.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: a&amp;amp;#58; Fragment - &#039;&#039;First fragment.&#039;&#039; &lt;br /&gt;
: b&amp;amp;#58; Fragment - &#039;&#039;Second fragment.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;ResidueSimilarity(Current(), Fragment(&amp;quot;1tqn_12&amp;quot;))&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the residue similarity between the current fragment and &#039;1tqn_12&#039;. This example can be used in SiteBinder to create a descriptor (assuming a structure with id &#039;1tqn_12&#039; is loaded).&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== ToFragment ===&lt;br /&gt;
&amp;lt;code&amp;gt;ToFragment(fragments&amp;amp;#58; FragmentSeq) -&amp;amp;gt; Fragment&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Converts a sequence of Fragments (FragmentSeq) to a single Fragment by merging all atoms into a single atom set. The Fragment type is required by some function such as AtomSimilarity.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;small&amp;gt;&#039;&#039;Note:&#039;&#039; This function cannot be used directly to query fragments from MotiveExplorer or MotiveQuery service.&amp;lt;/small&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: fragments&amp;amp;#58; FragmentSeq - &#039;&#039;Fragments to convert.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Residues(&amp;quot;HIS&amp;quot;).ToFragment()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Converts a sequence of HIS residue Fragments to a single Fragment.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;AtomSimilarity(Current().Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment(), Fragment(&amp;quot;model&amp;quot;).Find(NotAtoms(&amp;quot;N&amp;quot;)).ToFragment())&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Computes the atom similarity of the &#039;current&#039; and &#039;model&#039; fragments, but ignores N atoms.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
== Value Functions ==&lt;br /&gt;
&#039;&#039;Functions such as addition or comparison of numbers.&#039;&#039;&lt;br /&gt;
=== Abs ===&lt;br /&gt;
&amp;lt;code&amp;gt;Abs(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Abs&#039; function of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;Abs(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Divide (/) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Divide(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Divide&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x / y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Equal (==) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Equal(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Equal&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x == y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Greater (&amp;amp;gt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Greater(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Greater&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== GreaterEqual (&amp;amp;gt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;GreaterEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;GreaterEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;gt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Less (&amp;amp;lt;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Less(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;Less&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LessEqual (&amp;amp;lt;=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LessEqual(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;LessEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;lt;= y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalAnd (&amp;amp;) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalAnd(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalAnd&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x &amp;amp; y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalNot (Not) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalNot(x&amp;amp;#58; Bool) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalNot&#039; of the input value. This function can be called using the shorthand &#039;Not&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Bool - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalNot(x)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;x.Not()&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalOr (|) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalOr(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalOr&#039; of the input values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x | y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== LogicalXor (Xor) ===&lt;br /&gt;
&amp;lt;code&amp;gt;LogicalXor(xs&amp;amp;#58; Bool+) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes &#039;LogicalXor&#039; of the input values. This function can be called using the shorthand &#039;Xor&#039;.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: xs&amp;amp;#58; Bool+ - &#039;&#039;Arguments.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;LogicalXor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
: &amp;lt;code&amp;gt;Xor(x, y)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the values of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Minus (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Minus(x&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the arithmetic negation of the argument.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Arithmetic negation of x.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== NotEqual (!=) ===&lt;br /&gt;
&amp;lt;code&amp;gt;NotEqual(x&amp;amp;#58; Value, y&amp;amp;#58; Value) -&amp;amp;gt; Bool&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Determines the &#039;NotEqual&#039; relation between two values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Value - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Value - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x != y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates to True or False based on the value of x and y.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Plus (+) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Plus(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Plus&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x + y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Power (^) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Power(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Power&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x ^ y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Subtract (-) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Subtract(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Subtract&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x - y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
=== Times (*) ===&lt;br /&gt;
&amp;lt;code&amp;gt;Times(x&amp;amp;#58; Number, y&amp;amp;#58; Number) -&amp;amp;gt; Number&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;Computes the &#039;Times&#039; function of the values.&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
;Arguments&lt;br /&gt;
: x&amp;amp;#58; Number - &#039;&#039;Left argument.&#039;&#039; &lt;br /&gt;
: y&amp;amp;#58; Number - &#039;&#039;Right argument.&#039;&#039; &lt;br /&gt;
;Examples&lt;br /&gt;
: &amp;lt;code&amp;gt;x * y&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &#039;&#039;Evaluates the expression.&#039;&#039;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=ChargeCalculator:CMD_Version&amp;diff=859</id>
		<title>ChargeCalculator:CMD Version</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=ChargeCalculator:CMD_Version&amp;diff=859"/>
		<updated>2014-12-08T15:49:18Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is help for version 1.0.14.11.28 or newer. The help text for other versions can be viewed using the --help command when running the application.&lt;br /&gt;
== Running the Service ==&lt;br /&gt;
The service can be executed using the command (latest .NET Framework required): &lt;br /&gt;
&amp;lt;pre&amp;gt;WebChemistry.Charges.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
In Linux (where available) and MacOS, the latest version the Mono Framework (http://mono-project.com/) must be used to run the application:&lt;br /&gt;
&amp;lt;pre&amp;gt;mono WebChemistry.Charges.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, on Linux and MacOS, an official version of .NET Framework should become available during 2015.&lt;br /&gt;
In Linux and  MacOS, specific version of the Intel MKL library must be provided in order for the computation to run fast. See http://numerics.mathdotnet.com/ for more info.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The configuration is specified using the JSON format.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Example ===&lt;br /&gt;
This is the general shape of the JSON input configuration.&lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
  &amp;quot;InputFolder&amp;quot;: &amp;quot;c:\\Data\\Structures&amp;quot;,&lt;br /&gt;
  &amp;quot;SetsXmlFilename&amp;quot;: &amp;quot;c:\\Data\\DefaultSets.xml&amp;quot;,&lt;br /&gt;
  &amp;quot;ExportUncompressed&amp;quot;: false,&lt;br /&gt;
  &amp;quot;Sets&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Name&amp;quot;: &amp;quot;RS2-EX&amp;quot;,&lt;br /&gt;
      &amp;quot;Method&amp;quot;: &amp;quot;EemCutoffCover&amp;quot;,&lt;br /&gt;
      &amp;quot;Precision&amp;quot;: &amp;quot;Double&amp;quot;,&lt;br /&gt;
      &amp;quot;CutoffRadius&amp;quot;: 13.0,&lt;br /&gt;
      &amp;quot;CorrectCutoffTotalCharge&amp;quot;: true,&lt;br /&gt;
      &amp;quot;IgnoreWaters&amp;quot;: false&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Name&amp;quot;: &amp;quot;RS2-E&amp;quot;,&lt;br /&gt;
      &amp;quot;Method&amp;quot;: &amp;quot;Eem&amp;quot;,&lt;br /&gt;
      &amp;quot;Precision&amp;quot;: &amp;quot;Double&amp;quot;,&lt;br /&gt;
      &amp;quot;CutoffRadius&amp;quot;: 0.0,&lt;br /&gt;
      &amp;quot;CorrectCutoffTotalCharge&amp;quot;: true,&lt;br /&gt;
      &amp;quot;IgnoreWaters&amp;quot;: false&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;Jobs&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;1tqn&amp;quot;,&lt;br /&gt;
      &amp;quot;TotalCharges&amp;quot;: [&lt;br /&gt;
        -6.0&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;1e12&amp;quot;,&lt;br /&gt;
      &amp;quot;TotalCharges&amp;quot;: [&lt;br /&gt;
        60.0&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;MaxFullEemAtomCount&amp;quot;: 30000,&lt;br /&gt;
  &amp;quot;MaxDegreeOfParallelism&amp;quot;: 8&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There has to be exactly one configuration file for each validation run. Every value, as well as settings&#039; names, is surrounded in quotation marks (&amp;quot; &amp;quot; or &#039; &#039;). Backslashes (\) have to be escaped (\\). File system paths can be absolute as well as relative (/ works as well in paths).&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
* &#039;&#039;&#039;InputFolder&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Path to a folder containing the input data.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;SetsXmlFilename&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Path to a file containing the parameter sets.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ExportUncompressed&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;If true, the output will not be compressed in ZIP.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Sets&#039;&#039;&#039; [ [[#SetConfig_details|SetConfig]] ]&lt;br /&gt;
: &#039;&#039;A list of sets that will be computed.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Jobs&#039;&#039;&#039; [ [[#Job_details|Job]] ]&lt;br /&gt;
: &#039;&#039;A list of job that need to be computed.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxFullEemAtomCount&#039;&#039;&#039; [ Int32 ], Default value = 30000&lt;br /&gt;
: &#039;&#039;A maximum number of atoms a molecule can have to be eligible for the &#039;Eem&#039; method. 30000 atoms molecule consumes about 8GB of memory using the Double precision.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxDegreeOfParallelism&#039;&#039;&#039; [ Int32 ], Default value = 8&lt;br /&gt;
: &#039;&#039;Maximum number of parallel tasks that can be executed simultaneously. Recommended to be set to the number of cores your system has.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Descriptions ===&lt;br /&gt;
===== &amp;lt;span id=&#039;SetConfig_details&#039;&amp;gt;SetConfig&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Name&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;The name of the set.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Method&#039;&#039;&#039; [ ChargeComputationMethod ]&lt;br /&gt;
: &#039;&#039;Computation method.&#039;&#039;&lt;br /&gt;
: &#039;&#039;Available values are: Eem, EemCutoff, EemCutoffCoalesceH, EemCutoffCover, Reference.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Precision&#039;&#039;&#039; [ ChargeComputationPrecision ]&lt;br /&gt;
: &#039;&#039;Precision (Double is 64bit, Single is 32bit).&#039;&#039;&lt;br /&gt;
: &#039;&#039;Available values are: Double, Single.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CutoffRadius&#039;&#039;&#039; [ Double ]&lt;br /&gt;
: &#039;&#039;Cutoff radius parameter for methods that require it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CorrectCutoffTotalCharge&#039;&#039;&#039; [ Boolean ], Default value = true&lt;br /&gt;
: &#039;&#039;Determines whether to adjust the total charge during the cutoff computations.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;IgnoreWaters&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;Determines whether to ignore water atoms or not.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;span id=&#039;Job_details&#039;&amp;gt;Job&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Id&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Id of the job is the filename of the molecule without extension.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;TotalCharges&#039;&#039;&#039; [ Double[] ]&lt;br /&gt;
: &#039;&#039;A list of total charges that need to be computed.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Output Description ==&lt;br /&gt;
&lt;br /&gt;
=== General Structure ===&lt;br /&gt;
* &#039;&#039;&#039;[WorkingDirectory]&#039;&#039;&#039; - &#039;&#039;Working directory of the application.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Contains the result of the computation.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;log.txt&#039;&#039;&#039; - &#039;&#039;Contains the console output of the application.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;status.json&#039;&#039;&#039; - &#039;&#039;Contains general information of the computation (running time, version, etc.).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Charges Specific Structure ===&lt;br /&gt;
* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Folder with computation result.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;charges&#039;&#039;&#039; - &#039;&#039;Folder with computed charges&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;&amp;amp;lt;source&amp;amp;gt;&#039;&#039;&#039; - &#039;&#039;A folder for each charge source&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;mol2&#039;&#039;&#039; - &#039;&#039;Folder with structures in MOL2 format&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;pqr&#039;&#039;&#039; - &#039;&#039;Folder with structures in PQR format&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;wprop&#039;&#039;&#039; - &#039;&#039;Folder with results in WPROP format - a list of pairs of atom serial numbers and values of atomic charges &amp;amp;lt;Atom Id&amp;amp;gt; &amp;amp;lt;Charge&amp;amp;gt;&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;computation_setup.json&#039;&#039;&#039; - &#039;&#039;File describing the setup of the calculation&#039;&#039;&lt;br /&gt;
::: &#039;&#039;&#039;&amp;amp;lt;molecule&amp;amp;gt;_allcharges.csv&#039;&#039;&#039; - &#039;&#039;CSV file for each molecule with all computed charges&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;statistics&#039;&#039;&#039; - &#039;&#039;Folder with statistics about the computed charges&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;Atoms&#039;&#039;&#039; - &#039;&#039;Statistics data for each molecule, calculated at atomic level resolution&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;mol2&#039;&#039;&#039; - &#039;&#039;Folder with structures in MOL2 format&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;csv&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with all computed atomic charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;correlations&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with correlation statistics between all computed atomic charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;properties&#039;&#039;&#039; - &#039;&#039;Folder with statistics based on several specific properties of atoms&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;Residues&#039;&#039;&#039; - &#039;&#039;Statistics data for each molecule, calculated at the residue level resolution - only present if the input file contained relevant residue information&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;mol2&#039;&#039;&#039; - &#039;&#039;Folder with mock structures in MOL2 format, where each atom represents a single residue&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;csv&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with all computed residue charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;correlations&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with correlation statistics between all computed residue charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;properties&#039;&#039;&#039; - &#039;&#039;Folder with statistics based on several specific properties of residues&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;json&#039;&#039;&#039; - &#039;&#039;All data for each molecule in JSON format&#039;&#039;&lt;br /&gt;
::: &#039;&#039;&#039;&amp;amp;lt;molecule&amp;amp;gt;.json&#039;&#039;&#039; - &#039;&#039;Entry for each molecule&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;logs&#039;&#039;&#039; - &#039;&#039;Folder with computation logs&#039;&#039;&lt;br /&gt;
::: &#039;&#039;&#039;&amp;amp;lt;molecule&amp;amp;gt;_log.csv &#039;&#039;&#039; - &#039;&#039;A log entry for each molecule that includes execution time, warnings, etc.&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;Sets.xml&#039;&#039;&#039; - &#039;&#039;Parameter sets used for the computation&#039;&#039;&lt;br /&gt;
:: &#039;&#039;&#039;Summary_&amp;amp;lt;date:year-month-day&amp;amp;gt;_&amp;amp;lt;time:hour-minute&amp;amp;gt;.json&#039;&#039;&#039; - &#039;&#039;Summary information about the entire computation, date/time is in universal time&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Specific File Descriptions ===&lt;br /&gt;
This section contains detailed descriptions of selected specific files.&lt;br /&gt;
==== &amp;lt;span id=&#039;json folder_description&#039;&amp;gt;json folder&amp;lt;/span&amp;gt; ====&lt;br /&gt;
JSON files from this folder can be deserialized to the type `WebChemistry.Charges.Service.DataModel.ChargesServiceStructureData` available in the .NET library WebChemistry.Charges.Service.DataModel.dll included with the program.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=ChargeCalculator:CMD_Version&amp;diff=837</id>
		<title>ChargeCalculator:CMD Version</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=ChargeCalculator:CMD_Version&amp;diff=837"/>
		<updated>2014-12-05T14:18:23Z</updated>

		<summary type="html">&lt;p&gt;Dave: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is help for version 1.0.14.11.28 or newer. The help text for other versions be viewed using the --help command when running the application.&lt;br /&gt;
== Running the Service ==&lt;br /&gt;
The service can be executed using the command (latest .NET Framework required): &lt;br /&gt;
&amp;lt;pre&amp;gt;WebChemistry.Charges.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
In Linux (where available) and MacOS, the latest version the Mono Framework (http://mono-project.com/) must be used to run the application:&lt;br /&gt;
&amp;lt;pre&amp;gt;mono WebChemistry.Charges.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, on Linux and MacOS, an official version of .NET Framework should become available during 2015.&lt;br /&gt;
In Linux and  MacOS, specific version of the Intel MKL library must be provider in order for the computation to run fast. See http://numerics.mathdotnet.com/ for more info.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The configuration is specified using the JSON format.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Example ===&lt;br /&gt;
This is the general shape of the JSON input configuration.&lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
  &amp;quot;InputFolder&amp;quot;: &amp;quot;c:\\Data\\Structures&amp;quot;,&lt;br /&gt;
  &amp;quot;SetsXmlFilename&amp;quot;: &amp;quot;c:\\Data\\DefaultSets.xml&amp;quot;,&lt;br /&gt;
  &amp;quot;ExportUncompressed&amp;quot;: false,&lt;br /&gt;
  &amp;quot;Sets&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Name&amp;quot;: &amp;quot;RS2-EX&amp;quot;,&lt;br /&gt;
      &amp;quot;Method&amp;quot;: &amp;quot;EemCutoffCover&amp;quot;,&lt;br /&gt;
      &amp;quot;Precision&amp;quot;: &amp;quot;Double&amp;quot;,&lt;br /&gt;
      &amp;quot;CutoffRadius&amp;quot;: 13.0,&lt;br /&gt;
      &amp;quot;CorrectCutoffTotalCharge&amp;quot;: true,&lt;br /&gt;
      &amp;quot;IgnoreWaters&amp;quot;: false&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Name&amp;quot;: &amp;quot;RS2-E&amp;quot;,&lt;br /&gt;
      &amp;quot;Method&amp;quot;: &amp;quot;Eem&amp;quot;,&lt;br /&gt;
      &amp;quot;Precision&amp;quot;: &amp;quot;Double&amp;quot;,&lt;br /&gt;
      &amp;quot;CutoffRadius&amp;quot;: 0.0,&lt;br /&gt;
      &amp;quot;CorrectCutoffTotalCharge&amp;quot;: true,&lt;br /&gt;
      &amp;quot;IgnoreWaters&amp;quot;: false&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;Jobs&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;1tqn&amp;quot;,&lt;br /&gt;
      &amp;quot;TotalCharges&amp;quot;: [&lt;br /&gt;
        -6.0&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;1e12&amp;quot;,&lt;br /&gt;
      &amp;quot;TotalCharges&amp;quot;: [&lt;br /&gt;
        60.0&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;MaxFullEemAtomCount&amp;quot;: 30000,&lt;br /&gt;
  &amp;quot;MaxDegreeOfParallelism&amp;quot;: 8&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There has to be exactly one configuration file for each validation run. Every value, as well as settings&#039; names, is surrounded in quotation marks (&amp;quot; &amp;quot; or &#039; &#039;). Backslashes (\) have to be escaped (\\). File system paths can be absolute as well as relative (/ works as well in paths).&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
* &#039;&#039;&#039;InputFolder&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Path to a folder containing the input data.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;SetsXmlFilename&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Path to a file containing the parameter sets.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ExportUncompressed&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;If true, the output will not be compressed in ZIP.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Sets&#039;&#039;&#039; [ [[#SetConfig_details|SetConfig]] ]&lt;br /&gt;
: &#039;&#039;A list of sets that will be computed.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Jobs&#039;&#039;&#039; [ [[#Job_details|Job]] ]&lt;br /&gt;
: &#039;&#039;A list of job that need to be computed.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxFullEemAtomCount&#039;&#039;&#039; [ Int32 ], Default value = 30000&lt;br /&gt;
: &#039;&#039;A maximum number of atoms a molecule can have to be eligible for the &#039;Eem&#039; method. 30000 atoms molecule consumes about 8GB of memory using the Double precision.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxDegreeOfParallelism&#039;&#039;&#039; [ Int32 ], Default value = 8&lt;br /&gt;
: &#039;&#039;Maximum number of a parallel tasks that can be executed simultaneously. Recommended to be set to the number of cores your system has.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Descriptions ===&lt;br /&gt;
===== &amp;lt;span id=&#039;SetConfig_details&#039;&amp;gt;SetConfig&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Name&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;The name of the set.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Method&#039;&#039;&#039; [ ChargeComputationMethod ]&lt;br /&gt;
: &#039;&#039;Computation method.&#039;&#039;&lt;br /&gt;
: &#039;&#039;Available values are: Eem, EemCutoff, EemCutoffCoalesceH, EemCutoffCover, Reference.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Precision&#039;&#039;&#039; [ ChargeComputationPrecision ]&lt;br /&gt;
: &#039;&#039;Precision (Double is 64bit, Single is 32bit).&#039;&#039;&lt;br /&gt;
: &#039;&#039;Available values are: Double, Single.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CutoffRadius&#039;&#039;&#039; [ Double ]&lt;br /&gt;
: &#039;&#039;Cutoff radius parameter for methods that require it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CorrectCutoffTotalCharge&#039;&#039;&#039; [ Boolean ], Default value = true&lt;br /&gt;
: &#039;&#039;Determines whether to adjust the total charge during the cutoff computations.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;IgnoreWaters&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;Determines whether to ignore water atoms or not.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;span id=&#039;Job_details&#039;&amp;gt;Job&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Id&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Id of the job is the filename of the molecule without extension.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;TotalCharges&#039;&#039;&#039; [ Double[] ]&lt;br /&gt;
: &#039;&#039;A list of total charges that need to be computed.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Output Description ==&lt;br /&gt;
&lt;br /&gt;
=== General Structure ===&lt;br /&gt;
* &#039;&#039;&#039;[WorkingDirectory]&#039;&#039;&#039; - &#039;&#039;Working directory of the application.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Contains the result of the computation.&#039;&#039;&lt;br /&gt;
:: log.txt - &#039;&#039;Contains the console output of the application.&#039;&#039;&lt;br /&gt;
:: status.json - &#039;&#039;Contains general information of the computation (running time, version, etc.).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Charges Specific Structure ===&lt;br /&gt;
* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Folder with computation result.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;charges&#039;&#039;&#039; - &#039;&#039;Folder with computed charges&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;&amp;amp;lt;source&amp;amp;gt;&#039;&#039;&#039; - &#039;&#039;A folder for each charge source&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;mol2&#039;&#039;&#039; - &#039;&#039;Folder with structures in MOL2 format&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;pqr&#039;&#039;&#039; - &#039;&#039;Folder with structures in PQR format&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;wprop&#039;&#039;&#039; - &#039;&#039;Folder with results in WPROP format - a list of pairs of atom serial numbers and values of atomic charges &amp;amp;lt;Atom Id&amp;amp;gt; &amp;amp;lt;Charge&amp;amp;gt;&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;computation_setup.json&#039;&#039;&#039; - &#039;&#039;File describing the setup of the calculation&#039;&#039;&lt;br /&gt;
::: &amp;amp;lt;molecule&amp;amp;gt;_allcharges.csv - &#039;&#039;CSV file for each molecule with all computed charges&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;statistics&#039;&#039;&#039; - &#039;&#039;Folder with statistics about the computed charges&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;Atoms&#039;&#039;&#039; - &#039;&#039;Statistics data for each molecule, calculated at atomic level resolution]&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;mol2&#039;&#039;&#039; - &#039;&#039;Folder with structures in MOL2 format&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;csv&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with all computed atomic charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;correlations&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with correlation statistics between all computed atomic charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;properties&#039;&#039;&#039; - &#039;&#039;Folder with statistics based on several specific properties of atoms&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;Residues&#039;&#039;&#039; - &#039;&#039;Statistics data for each molecule, calculated at the residue level resolution - only present if the input file contained relevant residue information&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;mol2&#039;&#039;&#039; - &#039;&#039;Folder with mock structures in MOL2 format, where each atom represents a single residue&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;csv&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with all computed residue charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;correlations&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with correlation statistics between all computed residue charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;properties&#039;&#039;&#039; - &#039;&#039;Folder with statistics based on several specific properties of residues&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;json&#039;&#039;&#039; - &#039;&#039;All data for each molecule in JSON format&#039;&#039;&lt;br /&gt;
::: &amp;amp;lt;molecule&amp;amp;gt;.json - &#039;&#039;Entry for each molecule&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;logs/&#039;&#039;&#039; - &#039;&#039;Folder with computation logs&#039;&#039;&lt;br /&gt;
::: &amp;amp;lt;molecule&amp;amp;gt;_log.csv  - &#039;&#039;A log entry for each molecule that includes execution time, warnings, etc.&#039;&#039;&lt;br /&gt;
:: Sets.xml - &#039;&#039;Parameter sets used for the computation&#039;&#039;&lt;br /&gt;
:: Summary_&amp;amp;lt;date:year-month-day&amp;amp;gt;_&amp;amp;lt;time:hour-minute&amp;amp;gt;.json - &#039;&#039;Summary information about the entire computation, date/time is in universal time&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Specific File Descriptions ===&lt;br /&gt;
This section contains detailed descriptions of selected specific files.&lt;br /&gt;
==== &amp;lt;span id=&#039;json folder_description&#039;&amp;gt;json folder&amp;lt;/span&amp;gt; ====&lt;br /&gt;
JSON files from this folder can be deserialized to the type `WebChemistry.Charges.Service.DataModel.ChargesServiceStructureData` available in the .NET library WebChemistry.Charges.Service.DataModel.dll included with the program.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=ChargeCalculator:CMD_Version&amp;diff=836</id>
		<title>ChargeCalculator:CMD Version</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=ChargeCalculator:CMD_Version&amp;diff=836"/>
		<updated>2014-12-05T14:16:42Z</updated>

		<summary type="html">&lt;p&gt;Dave: Created page with &amp;quot;This is help for version 1.0.14.11.28 or newer. The help text for other versions be viewed using the --help command when running the application. == Running the Service == The...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is help for version 1.0.14.11.28 or newer. The help text for other versions be viewed using the --help command when running the application.&lt;br /&gt;
== Running the Service ==&lt;br /&gt;
The service can be executed using the command (latest .NET Framework required): &lt;br /&gt;
&amp;lt;pre&amp;gt;WebChemistry.Charges.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
In Linux (where available) and MacOS, the latest version the Mono Framework (http://mono-project.com/) must be used to run the application:&lt;br /&gt;
&amp;lt;pre&amp;gt;mono WebChemistry.Charges.Service.exe workingFolder configuration.json&amp;lt;/pre&amp;gt;&lt;br /&gt;
Alternatively, on Linux and MacOS, an official version of .NET Framework should become available during 2015.&lt;br /&gt;
In Linux and  MacOS, specific version of the Intel MKL library must be provider in order for the computation to run fast. See http://http://numerics.mathdotnet.com/ for more info.&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The configuration is specified using the JSON format.&lt;br /&gt;
&lt;br /&gt;
=== Configuration Example ===&lt;br /&gt;
This is the general shape of the JSON input configuration.&lt;br /&gt;
&amp;lt;pre&amp;gt;{&lt;br /&gt;
  &amp;quot;InputFolder&amp;quot;: &amp;quot;c:\\Data\\Structures&amp;quot;,&lt;br /&gt;
  &amp;quot;SetsXmlFilename&amp;quot;: &amp;quot;c:\\Data\\DefaultSets.xml&amp;quot;,&lt;br /&gt;
  &amp;quot;ExportUncompressed&amp;quot;: false,&lt;br /&gt;
  &amp;quot;Sets&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Name&amp;quot;: &amp;quot;RS2-EX&amp;quot;,&lt;br /&gt;
      &amp;quot;Method&amp;quot;: &amp;quot;EemCutoffCover&amp;quot;,&lt;br /&gt;
      &amp;quot;Precision&amp;quot;: &amp;quot;Double&amp;quot;,&lt;br /&gt;
      &amp;quot;CutoffRadius&amp;quot;: 13.0,&lt;br /&gt;
      &amp;quot;CorrectCutoffTotalCharge&amp;quot;: true,&lt;br /&gt;
      &amp;quot;IgnoreWaters&amp;quot;: false&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Name&amp;quot;: &amp;quot;RS2-E&amp;quot;,&lt;br /&gt;
      &amp;quot;Method&amp;quot;: &amp;quot;Eem&amp;quot;,&lt;br /&gt;
      &amp;quot;Precision&amp;quot;: &amp;quot;Double&amp;quot;,&lt;br /&gt;
      &amp;quot;CutoffRadius&amp;quot;: 0.0,&lt;br /&gt;
      &amp;quot;CorrectCutoffTotalCharge&amp;quot;: true,&lt;br /&gt;
      &amp;quot;IgnoreWaters&amp;quot;: false&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;Jobs&amp;quot;: [&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;1tqn&amp;quot;,&lt;br /&gt;
      &amp;quot;TotalCharges&amp;quot;: [&lt;br /&gt;
        -6.0&lt;br /&gt;
      ]&lt;br /&gt;
    },&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;Id&amp;quot;: &amp;quot;1e12&amp;quot;,&lt;br /&gt;
      &amp;quot;TotalCharges&amp;quot;: [&lt;br /&gt;
        60.0&lt;br /&gt;
      ]&lt;br /&gt;
    }&lt;br /&gt;
  ],&lt;br /&gt;
  &amp;quot;MaxFullEemAtomCount&amp;quot;: 30000,&lt;br /&gt;
  &amp;quot;MaxDegreeOfParallelism&amp;quot;: 8&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There has to be exactly one configuration file for each validation run. Every value, as well as settings&#039; names, is surrounded in quotation marks (&amp;quot; &amp;quot; or &#039; &#039;). Backslashes (\) have to be escaped (\\). File system paths can be absolute as well as relative (/ works as well in paths).&lt;br /&gt;
&lt;br /&gt;
=== Attributes ===&lt;br /&gt;
* &#039;&#039;&#039;InputFolder&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Path to a folder containing the input data.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;SetsXmlFilename&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Path to a file containing the parameter sets.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;ExportUncompressed&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;If true, the output will not be compressed in ZIP.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Sets&#039;&#039;&#039; [ [[#SetConfig_details|SetConfig]] ]&lt;br /&gt;
: &#039;&#039;A list of sets that will be computed.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Jobs&#039;&#039;&#039; [ [[#Job_details|Job]] ]&lt;br /&gt;
: &#039;&#039;A list of job that need to be computed.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxFullEemAtomCount&#039;&#039;&#039; [ Int32 ], Default value = 30000&lt;br /&gt;
: &#039;&#039;A maximum number of atoms a molecule can have to be eligible for the &#039;Eem&#039; method. 30000 atoms molecule consumes about 8GB of memory using the Double precision.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;MaxDegreeOfParallelism&#039;&#039;&#039; [ Int32 ], Default value = 8&lt;br /&gt;
: &#039;&#039;Maximum number of a parallel tasks that can be executed simultaneously. Recommended to be set to the number of cores your system has.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Descriptions ===&lt;br /&gt;
===== &amp;lt;span id=&#039;SetConfig_details&#039;&amp;gt;SetConfig&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Name&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;The name of the set.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Method&#039;&#039;&#039; [ ChargeComputationMethod ]&lt;br /&gt;
: &#039;&#039;Computation method.&#039;&#039;&lt;br /&gt;
: &#039;&#039;Available values are: Eem, EemCutoff, EemCutoffCoalesceH, EemCutoffCover, Reference.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Precision&#039;&#039;&#039; [ ChargeComputationPrecision ]&lt;br /&gt;
: &#039;&#039;Precision (Double is 64bit, Single is 32bit).&#039;&#039;&lt;br /&gt;
: &#039;&#039;Available values are: Double, Single.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CutoffRadius&#039;&#039;&#039; [ Double ]&lt;br /&gt;
: &#039;&#039;Cutoff radius parameter for methods that require it.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;CorrectCutoffTotalCharge&#039;&#039;&#039; [ Boolean ], Default value = true&lt;br /&gt;
: &#039;&#039;Determines whether to adjust the total charge during the cutoff computations.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;IgnoreWaters&#039;&#039;&#039; [ Boolean ]&lt;br /&gt;
: &#039;&#039;Determines whether to ignore water atoms or not.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== &amp;lt;span id=&#039;Job_details&#039;&amp;gt;Job&amp;lt;/span&amp;gt; =====&lt;br /&gt;
* &#039;&#039;&#039;Id&#039;&#039;&#039; [ String ]&lt;br /&gt;
: &#039;&#039;Id of the job is the filename of the molecule without extension.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;TotalCharges&#039;&#039;&#039; [ Double[] ]&lt;br /&gt;
: &#039;&#039;A list of total charges that need to be computed.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Output Description ==&lt;br /&gt;
&lt;br /&gt;
=== General Structure ===&lt;br /&gt;
* &#039;&#039;&#039;[WorkingDirectory]&#039;&#039;&#039; - &#039;&#039;Working directory of the application.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Contains the result of the computation.&#039;&#039;&lt;br /&gt;
:: log.txt - &#039;&#039;Contains the console output of the application.&#039;&#039;&lt;br /&gt;
:: status.json - &#039;&#039;Contains general information of the computation (running time, version, etc.).&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Charges Specific Structure ===&lt;br /&gt;
* &#039;&#039;&#039;result&#039;&#039;&#039; - &#039;&#039;Folder with computation result.&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;charges&#039;&#039;&#039; - &#039;&#039;Folder with computed charges&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;&amp;amp;lt;source&amp;amp;gt;&#039;&#039;&#039; - &#039;&#039;A folder for each charge source&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;mol2&#039;&#039;&#039; - &#039;&#039;Folder with structures in MOL2 format&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;pqr&#039;&#039;&#039; - &#039;&#039;Folder with structures in PQR format&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;wprop&#039;&#039;&#039; - &#039;&#039;Folder with results in WPROP format - a list of pairs of atom serial numbers and values of atomic charges &amp;amp;lt;Atom Id&amp;amp;gt; &amp;amp;lt;Charge&amp;amp;gt;&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;computation_setup.json&#039;&#039;&#039; - &#039;&#039;File describing the setup of the calculation&#039;&#039;&lt;br /&gt;
::: &amp;amp;lt;molecule&amp;amp;gt;_allcharges.csv - &#039;&#039;CSV file for each molecule with all computed charges&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;statistics&#039;&#039;&#039; - &#039;&#039;Folder with statistics about the computed charges&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;Atoms&#039;&#039;&#039; - &#039;&#039;Statistics data for each molecule, calculated at atomic level resolution]&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;mol2&#039;&#039;&#039; - &#039;&#039;Folder with structures in MOL2 format&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;csv&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with all computed atomic charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;correlations&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with correlation statistics between all computed atomic charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;properties&#039;&#039;&#039; - &#039;&#039;Folder with statistics based on several specific properties of atoms&#039;&#039;&lt;br /&gt;
::* &#039;&#039;&#039;Residues&#039;&#039;&#039; - &#039;&#039;Statistics data for each molecule, calculated at the residue level resolution - only present if the input file contained relevant residue information&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;mol2&#039;&#039;&#039; - &#039;&#039;Folder with mock structures in MOL2 format, where each atom represents a single residue&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;csv&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with all computed residue charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;correlations&#039;&#039;&#039; - &#039;&#039;Folder - for each molecule, a CSV file with correlation statistics between all computed residue charges&#039;&#039;&lt;br /&gt;
:::* &#039;&#039;&#039;properties&#039;&#039;&#039; - &#039;&#039;Folder with statistics based on several specific properties of residues&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;json&#039;&#039;&#039; - &#039;&#039;All data for each molecule in JSON format&#039;&#039;&lt;br /&gt;
::: &amp;amp;lt;molecule&amp;amp;gt;.json - &#039;&#039;Entry for each molecule&#039;&#039;&lt;br /&gt;
:* &#039;&#039;&#039;logs/&#039;&#039;&#039; - &#039;&#039;Folder with computation logs&#039;&#039;&lt;br /&gt;
::: &amp;amp;lt;molecule&amp;amp;gt;_log.csv  - &#039;&#039;A log entry for each molecule that includes execution time, warnings, etc.&#039;&#039;&lt;br /&gt;
:: Sets.xml - &#039;&#039;Parameter sets used for the computation&#039;&#039;&lt;br /&gt;
:: Summary_&amp;amp;lt;date:year-month-day&amp;amp;gt;_&amp;amp;lt;time:hour-minute&amp;amp;gt;.json - &#039;&#039;Summary information about the entire computation, date/time is in universal time&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Specific File Descriptions ===&lt;br /&gt;
This section contains detailed descriptions of selected specific files.&lt;br /&gt;
==== &amp;lt;span id=&#039;json folder_description&#039;&amp;gt;json folder&amp;lt;/span&amp;gt; ====&lt;br /&gt;
JSON files from this folder can be deserialized to the type `WebChemistry.Charges.Service.DataModel.ChargesServiceStructureData` available in the .NET library WebChemistry.Charges.Service.DataModel.dll included with the program.&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=MotiveValidator:Analysis_of_Results&amp;diff=450</id>
		<title>MotiveValidator:Analysis of Results</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=MotiveValidator:Analysis_of_Results&amp;diff=450"/>
		<updated>2014-08-17T01:31:31Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Complete structures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For each validated motif, a validation report contains several types of results. Since the evaluation of the validated motif relies on comparing all atoms and bonds in the validated motif to those in the model residue, the first results that can be encountered are errors. In the first level &#039;&#039;&#039;Complete&#039;&#039;&#039; and &#039;&#039;&#039;Incomplete&#039;&#039;&#039; structures are distinguished. &#039;&#039;&#039;If you are unsure about the Terminology used in this section, please see [[MotiveValidator:Terminology | this webpage]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Incomplete structures==&lt;br /&gt;
&lt;br /&gt;
Incomplete structures are validated residues, which were lacking atoms in their structure in comparison to the model residue, or the inter-atomic distances were way too big or too low. Namely:&lt;br /&gt;
* &#039;&#039;&#039;Missing atoms&#039;&#039;&#039;: An atom in the model residue has no corresponding atom in the validated motif.&lt;br /&gt;
* &#039;&#039;&#039;Missing rings&#039;&#039;&#039;: At least one missing atom originates from cycles (rings).&lt;br /&gt;
* &#039;&#039;&#039;Degenerate&#039;&#039;&#039;: Those motifs could not be properly analyzed due their degenerate structure, i.e. suspicious discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue prevented proper validation. &lt;br /&gt;
&lt;br /&gt;
Please note, &#039;&#039;chirality&#039;&#039; is only evaluated for those motifs which are complete. This is because the absence of some atoms can prevent the proper evaluation of chirality on the chiral centers present in the validated motif. Therefore, note that all motifs which are counted in the Wrong chirality category are in fact complete. At the same time, the motifs with no missing atoms and no chirality error are actually counted in a category called &#039;&#039;&#039;Correct chirality&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Complete structures==&lt;br /&gt;
Complete validated structures include all the atoms which are present in the model residue. However, there are still possible issues and warnings can be raised:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Wrong chirality&#039;&#039;&#039;: an atom from the validated motif has different chirality than the corresponding atom from the model residue.&lt;br /&gt;
** &#039;&#039;&#039;Planar atom&#039;&#039;&#039;: the chirality error was found on a planar chiral center. Because of their spacial distribution, planar chiral centers are very sensitive even to small perturbations in the position of the substituents. Therefore, some of the errors reported here might not be significant.&lt;br /&gt;
** &#039;&#039;&#039;Metal atom&#039;&#039;&#039;: the chirality error was found on a metal chiral center. @Crina: Add more info here?&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Uncertain chirality&#039;&#039;&#039;: the presence of unusual bonds may cause an improper evaluation of chirality.&lt;br /&gt;
* &#039;&#039;&#039;Substitution&#039;&#039;&#039;: An atom from the validated motif is of a different chemical element than the corresponding atom in the model residue (e.g. O mapped to N). This happens often at linkage sites.&lt;br /&gt;
* &#039;&#039;&#039;Different naming&#039;&#039;&#039;: An atom from the validated motif has a different PDB atom name than the corresponding atom from the model residue (e.g. the C1 atom mapped to the C7 atom). This happens often when the original PDB files were produced by different software.&lt;br /&gt;
* &#039;&#039;&#039;Foreign atom&#039;&#039;&#039;: An atom from the model residue was mapped to an atom from outside the validated residue (i.e. from its surroundings).&lt;br /&gt;
* &#039;&#039;&#039;Alternate conformations&#039;&#039;&#039;: In the original PDB file, the validated residue contains atoms which were given in alternate conformations (i.e., most probably different rotamers). Only the first rotamer was considered during validation.&lt;br /&gt;
* &#039;&#039;&#039;Zero model RMSD&#039;&#039;&#039;: The superimposition between the model residue and the validated motif has a root mean square deviation of zero, i.e., the validated motif is identical to the model residue used as reference.&lt;br /&gt;
&lt;br /&gt;
The last cathegory  &#039;&#039;&#039;Correct chirality&#039;&#039;&#039; includes all the validated residues, where all the atoms from the validated motif have a matching partner in the model structure and the chirality of the chiral atoms is correct.&lt;br /&gt;
&lt;br /&gt;
Additionally, for each validation run, there is &#039;&#039;&#039;Processing warnings&#039;&#039;&#039; tab available, where one can find warnings about the processed structures. Typically, there is an information about skipped &#039;&#039;alternate conformation residues&#039;&#039;, &#039;&#039;wrong CONNECT records&#039;&#039; from the parent PDB file, &#039;&#039;processed models&#039;&#039; (in case the parent PDB is composed of multiple models) etc. Finally, as a general rule, in the validation interface, errors are marked in &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt; (missing atoms) or &amp;lt;span style=&amp;quot;color:#DAA520&amp;quot;&amp;gt;dark yellow&amp;lt;/span&amp;gt; (wrong chirality), correct structures in &amp;lt;span style=&amp;quot;color:#228B22&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;, and warnings in &amp;lt;span style=&amp;quot;color:#008B8B&amp;quot;&amp;gt;cyan&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:MV_manual_figures7.png|thumb|center|1000px| &#039;&#039;&#039;MotiveValidator&#039;&#039;&#039; reports correct structures, as well as all potential issues found during validation, namely structures that are wrong either because they are incomplete (missing atoms or rings), or because the chirality of some atoms is incorrect. Additionally, &#039;&#039;&#039;MotiveValidator&#039;&#039;&#039; reports substitutions of native atoms due to chemical modifications of the residue, or atoms of neighboring residues found to replace native atoms at linkage sites, as well as unexpected PDB atom identifiers (not shown here).]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB:Specifics_page&amp;diff=449</id>
		<title>ValidatorDB:Specifics page</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB:Specifics_page&amp;diff=449"/>
		<updated>2014-08-17T01:30:54Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Processing Warnings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &#039;&#039;&#039;[[ValidatorDB]] specifics page&#039;&#039;&#039; is accessible from the [[ValidatorDB#Synopsis_page | synopsis page]], either via the &#039;&#039;&#039;LookUp bar&#039;&#039;&#039; on the &#039;&#039;&#039;Overview&#039;&#039;&#039; tab, or via the residue names and PDB IDs in the interactive tables on the tabs &#039;&#039;&#039;Details by Residue&#039;&#039;&#039; and &#039;&#039;&#039;Details by PDB Entry&#039;&#039;&#039;, respectively. Depending on how it was accessed, the &#039;&#039;&#039;specifics page&#039;&#039;&#039; might retrieve validation results for one or more residues, a fact mentioned at the very top of the page.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;[[ValidatorDB]]&#039;&#039;&#039; specifics page provides a straightforward report of the validation results, including a summary and detailed information in both tabular and graphical form, along with a 3D structure visualizer for closer inspection of the problematic structures. These reports are accessible via several tabs on the specifics page, namely &#039;&#039;&#039;Overview&#039;&#039;&#039;, &#039;&#039;&#039;Summary&#039;&#039;&#039;, &#039;&#039;&#039;Details&#039;&#039;&#039; and &#039;&#039;&#039;Processing Warnings&#039;&#039;&#039;. These are described in detail in the section below. Inspecting the tabular and graphical validation reports accessible on the specifics page is the most comfortable and effective way to evaluate the results. Additionally, you may use the JSON Data download button at the top right corner of the specifics page in order to download the complete validation reports and perform any additional analyses on your own.&lt;br /&gt;
&lt;br /&gt;
==Overview==&lt;br /&gt;
[[File:VDB_Model.png|thumb|right|500px|&#039;&#039;&#039;Overview&#039;&#039;&#039; tab]]&lt;br /&gt;
&lt;br /&gt;
To keep consistency with the synopsis page, the specifics page also allows visualization of general validation statistics for a selected number of residues via the Overview tab. This representation is entirely compatible with that of the &#039;&#039;&#039;Overview&#039;&#039;&#039; tab on the synopsis page, and in fact makes up a subset of that data set. All color coding conventions are kept, and tool tips provide descriptions of each graphical element.&lt;br /&gt;
&lt;br /&gt;
Note that this statistics can be downloaded in a *.csv format after clicking &#039;CSV&#039; in the bottom right corner of the infographics.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
[[File:VDB_Residue_summary.PNG|thumb|right|500px|&#039;&#039;&#039;Summary&#039;&#039;&#039; tab]]&lt;br /&gt;
&lt;br /&gt;
On the &#039;&#039;&#039;[[ValidatorDB]]&#039;&#039;&#039; specifics page, the first view of the results is available in the &#039;&#039;&#039;Summary&#039;&#039;&#039; tab. For each validated residue, the Summary tab provides an overview of potential issues encountered.&lt;br /&gt;
&lt;br /&gt;
If more than one residue were validated in one run, a list of these residues will be at the top of the page. In order to examine the validation summary for each residue, you will need to either click on that specific residue in the list, or just scroll down the page till you reach it. Each validated residue is identified by its 3-letter code, as well as its chemical formula and common name. Validation statistics are given as absolute numbers and percentages over all the motifs that were processed for each residue.&lt;br /&gt;
&lt;br /&gt;
The table with the validation report is organized into two main sections, referring to &#039;&#039;&#039;incomplete&#039;&#039;&#039; (&#039;&#039;Missing Atoms&#039;&#039; or &#039;&#039;Rings&#039;&#039;) and &#039;&#039;&#039;complete structures&#039;&#039;&#039; (&#039;&#039;With All Atoms&#039;&#039; and &#039;&#039;Rings&#039;&#039;) respectively. The formal distinction between ring atoms and non-ring atoms (simply denoted as atoms) is meant to allow a quick localization of potential issues in residues containing rings, especially where atom identifiers are not useful. &#039;&#039;&#039;Chirality&#039;&#039;&#039; is evaluated only for the complete structures, since the absence of some atoms makes it difficult to check the chirality of some of the remaining atoms. Further, the problematic atoms are highlighted, in order to better localize the problems in the structures.&lt;br /&gt;
&lt;br /&gt;
Last, a 2D representation of the model residue, and a pie chart with the validation results are provided for visual representation purposes. You can download them via the small icon at the top right corner of the chart, and later use them in your presentations.&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
[[File:VDB_Residue_details.PNG|thumb|right|500px|&#039;&#039;&#039;Details&#039;&#039;&#039; tab]]&lt;br /&gt;
&lt;br /&gt;
Whereas the Summary tab provides statistics of the issues over all validated motifs for each validated residue, the &#039;&#039;&#039;Details&#039;&#039;&#039; tab of the &#039;&#039;&#039;[[ValidatorDB]]&#039;&#039;&#039;  specifics page allows you to inspect the issues in select groups of motifs, and further in each individual motif. Note that you may also access the details of any particular group of motifs also by clicking on a specific issue in any &#039;&#039;&#039;Summary&#039;&#039;&#039; tab table.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Details&#039;&#039;&#039; tab is organized into a table where each row contains information regarding a single validated motif. The content of the table (i.e., which motifs are included, and what information is displayed) is dictated by the values of three selection fields at the top of the table. Click on the first field, and select the validated residue by its name (3-letter code) from the drop down menu. Only the motifs that were matched to that residue name will be displayed in the table. Click on the second field and select the type of issue (e.g., wrong chirality) from the drop down menu. Only the motifs which exhibit that type of issue will be displayed in the table. The number of motifs that fit each selection is given in brackets. If you want to make your selection even more specific, use the selection filed Id filter.&lt;br /&gt;
&lt;br /&gt;
Which table columns are filled depend mostly on the type of issue selected in the filter. The most important columns are &#039;&#039;Id&#039;&#039;, &#039;&#039;Issues/Warnings&#039;&#039;, &#039;&#039;Missing atoms/rings&#039;&#039;, &#039;&#039;Atoms&#039;&#039;, &#039;&#039;Processing warnings&#039;&#039;. The other columns give additional information, usually helpful in identifying the source of the error in the structure. Note that complete structures &#039;&#039;&#039;do not&#039;&#039;&#039; contain columns with the information about missing atoms. The column Id refers to a unique identifier assigned to each motif in order to keep a transparent trace of the motif&#039;s origin, as it contains the PDB ID, as well as the serial index of the first atom in the motif, as it appears in the original PDB entry. The column &#039;&#039;Issues/Warnings&#039;&#039; reports the number of issues or warnings found for each particular motif. The column &#039;&#039;Missing atoms/rings&#039;&#039; explains which atoms are missing in each validated motif, whereas &#039;&#039;Atoms&#039;&#039; shows the position of incorrect chirality. &#039;&#039;Missing atoms&#039;&#039; are  listed by their atom identifier in the model, whereas atoms with wrong chirality are listed by their identifier in the validated motif. Clicking on a column header allows to sort the motifs according to the property specified in the header.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==3D visualization==&lt;br /&gt;
[[File:VDB_Details_entry.PNG|thumb|right|500px|&#039;&#039;&#039;Details&#039;&#039;&#039; tab]]&lt;br /&gt;
&lt;br /&gt;
The 3D viewer implemented in the [[ValidatorDB]] interface offers one step further in the analysis of each individual validated motif, and is accessible via the &#039;&#039;&#039;Details&#039;&#039; tab on the specifics page. In the table, simply click on the Id of a motif of interest in order to open the 3D viewer, where you can inspect the structural inaccuracies more closely. Here you will be able to view and manipulate with the 3D representations of the validated motif and model residue, to help you better assess the position and relevance of the structural issues found during validation. Additionally, a 2D representation of the model is provided for clarity, which is especially helpful for larger motifs. Basic information about the validated motif is also given, along with a complete report of the validation results, where all the potential issues are listed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Processing Warnings==&lt;br /&gt;
[[File:VDB_Warnings.PNG|thumb|right|500px|&#039;&#039;&#039;Processing warnings&#039;&#039;&#039; tab]]&lt;br /&gt;
&lt;br /&gt;
The validation reports in ValidatorDB also mention various unusual aspects encountered during validation. Sometimes the processed PDB entries contain information that is ambiguous, conflicting or which deviates strongly from the expected reference. [[ValidatorDB]] reports such events as processing warnings. Such information can be found in the &#039;&#039;&#039;Processing Warnings&#039;&#039;&#039; tab on the specifics page. The selection field at the top of the page helps filter the warnings for different residues, in case more of them are in validation report. Simply click on the drop down menu and select the category of warnings that you would like to explore. Processing warnings are issues that may cause incorrect Validation, such as bad two residues being too close together (misused concept of alternate conformations) or unusual bond lengths given by the CONECT records.  Make sure that negative validation results (e.g., missing atoms) are not in fact caused by ignoring some atoms in an ill-formed structure.&lt;br /&gt;
&lt;br /&gt;
Overally a processing warning may simply lead to ignoring a faulty atom, but the motif is validated. &lt;br /&gt;
&amp;lt;br style=&amp;quot;clear:both&amp;quot; /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB:Analysis_of_Results&amp;diff=448</id>
		<title>ValidatorDB:Analysis of Results</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB:Analysis_of_Results&amp;diff=448"/>
		<updated>2014-08-17T01:30:16Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Complete structures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For each validated motif, a validation report contains several types of results. Since the evaluation of the validated motif relies on comparing all atoms and bonds in the validated motif to those in the model residue, the first results that can be encountered are errors. In the first level &#039;&#039;&#039;Complete&#039;&#039;&#039; and &#039;&#039;&#039;Incomplete&#039;&#039;&#039; structures are distinguished. &#039;&#039;&#039;If you are unsure about the Terminology used in this section, please see [[MotiveValidator:Terminology | this webpage]]&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Incomplete structures==&lt;br /&gt;
&lt;br /&gt;
Incomplete structures are validated residues, which were lacking atoms in their structure in comparison to the model residue, or the inter-atomic distances were way too big or too low. Namely:&lt;br /&gt;
* &#039;&#039;&#039;Missing atoms&#039;&#039;&#039;: An atom in the model residue has no corresponding atom in the validated motif.&lt;br /&gt;
* &#039;&#039;&#039;Missing rings&#039;&#039;&#039;: At least one missing atom originates from cycles (rings).&lt;br /&gt;
* &#039;&#039;&#039;Degenerate&#039;&#039;&#039;: Those motifs could not be properly analyzed due their degenerate structure, i.e. suspicious discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue prevented proper validation. &lt;br /&gt;
&lt;br /&gt;
Please note, &#039;&#039;chirality&#039;&#039; is only evaluated for those motifs which are complete. This is because the absence of some atoms can prevent the proper evaluation of chirality on the chiral centers present in the validated motif. Therefore, note that all motifs which are counted in the Wrong chirality category are in fact complete. At the same time, the motifs with no missing atoms and no chirality error are actually counted in a category called &#039;&#039;&#039;Correct chirality&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
[[File:VDB incomplete.png|thumb|center|1200px| &#039;&#039;&#039;ValidatorDB&#039;&#039;&#039; reports correct structures, as well as all potential issues found during validation, namely structures that are wrong either because they are incomplete (missing atoms or rings), or because the chirality of some atoms is incorrect. Here all the are potential issues of the incomplete structure are illustrated.]]&lt;br /&gt;
&lt;br /&gt;
==Complete structures==&lt;br /&gt;
[[File:VDB chirality.png|thumb|right|500px| Complete structures can contain chirality issues on a variety of different atom types, here all possible cases occuring in &#039;&#039;&#039;ValidatorDB&#039;&#039;&#039; are illustrated.]]&lt;br /&gt;
&lt;br /&gt;
Complete validated structures include all the atoms which are present in the model residue. However, there are still possible issues and warnings can be raised:&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Wrong chirality&#039;&#039;&#039;: an atom from the validated motif has different chirality than the corresponding atom from the model residue. This category can be further specified by identifying a source of the chirality issue.&lt;br /&gt;
** &#039;&#039;&#039;C atom&#039;&#039;&#039;: the chirality error was found on a single bonded carbon atom.&lt;br /&gt;
** &#039;&#039;&#039;Planar atom&#039;&#039;&#039;: the chirality error was found on a planar chiral center. Because of their spacial distribution, planar chiral centers are very sensitive even to small perturbations in the position of the substituents. Therefore, some of the errors reported here might not be significant.&lt;br /&gt;
** &#039;&#039;&#039;Metal atom&#039;&#039;&#039;: the chirality error was found on a metal chiral center. &lt;br /&gt;
** &#039;&#039;&#039;High order atom&#039;&#039;&#039;: the chirality error was detected on an atom, which is bonded with a bond of higher order than one. A typical example is phosphorus. &lt;br /&gt;
** &#039;&#039;&#039;Other&#039;&#039;&#039;: Additional chirality issue which could not be asserted to any of the above categories, for example chirality issues on Nitrogen.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that in case a validated residues belongs to more than one category, it can be found in all of them (i.e. Planar and Metal, which is often case of &#039;&#039;HEM&#039;&#039; residues)&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Uncertain chirality&#039;&#039;&#039;: the presence of unusual bonds may cause an improper evaluation of chirality.&lt;br /&gt;
* &#039;&#039;&#039;Substitution&#039;&#039;&#039;: An atom from the validated motif is of a different chemical element than the corresponding atom in the model residue (e.g. O mapped to N). This happens often at linkage sites.&lt;br /&gt;
* &#039;&#039;&#039;Different naming&#039;&#039;&#039;: An atom from the validated motif has a different PDB atom name than the corresponding atom from the model residue (e.g. the C1 atom mapped to the C7 atom). This happens often when the original PDB files were produced by different software.&lt;br /&gt;
* &#039;&#039;&#039;Foreign atom&#039;&#039;&#039;: An atom from the model residue was mapped to an atom from outside the validated residue (i.e. from its surroundings).&lt;br /&gt;
* &#039;&#039;&#039;Alternate conformations&#039;&#039;&#039;: In the original PDB file, the validated residue contains atoms which were given in conformations (i.e., most probably different rotamers). Only the first rotamer was considered during validation.&lt;br /&gt;
* &#039;&#039;&#039;Zero model RMSD&#039;&#039;&#039;: The superimposition between the model residue and the validated motif has a root mean square deviation of zero, i.e., the validated motif is identical to the model residue used as reference.&lt;br /&gt;
&lt;br /&gt;
The last category  &#039;&#039;&#039;Correct chirality&#039;&#039;&#039; includes all the validated residues, where all the atoms from the validated motif have a matching partner in the model structure and the chirality of the chiral atoms is correct. Last but not least, additional category &#039;&#039;&#039;Correct (Tolerant) chirality&#039;&#039;&#039; further includes motifs with identified chirality issues as &#039;&#039;&#039;Planar&#039;&#039;&#039; and &#039;&#039;&#039;High order&#039;&#039;&#039; since these might not be significant.&lt;br /&gt;
&lt;br /&gt;
Furthermore, for each validation run, there is &#039;&#039;&#039;Processing warnings&#039;&#039;&#039; tab available, where one can find warnings about the processed structures. Typically, there is an information about skipped &#039;&#039;alternate  conformation residues&#039;&#039;, &#039;&#039;wrong CONNECT records&#039;&#039; from the parent PDB file, &#039;&#039;processed models&#039;&#039; (in case the parent PDB is composed of multiple models) etc. Finally, as a general rule, in the validation interface, errors are marked in &amp;lt;span style=&amp;quot;color:#FF0000&amp;quot;&amp;gt;red&amp;lt;/span&amp;gt; (missing atoms) or &amp;lt;span style=&amp;quot;color:#DAA520&amp;quot;&amp;gt;dark yellow&amp;lt;/span&amp;gt; (wrong chirality), correct structures in &amp;lt;span style=&amp;quot;color:#228B22&amp;quot;&amp;gt;green&amp;lt;/span&amp;gt;, and warnings in &amp;lt;span style=&amp;quot;color:#008B8B&amp;quot;&amp;gt;cyan&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[[File:VDB warnings.png|thumb|left|1000px| &#039;&#039;&#039;ValidatorDB&#039;&#039;&#039; also reports warnings in the complete structures such as &#039;&#039;substitutions&#039;&#039;, &#039;&#039;different naming&#039;&#039; or &#039;&#039;foreign atoms&#039;&#039;.]]&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB&amp;diff=266</id>
		<title>ValidatorDB</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB&amp;diff=266"/>
		<updated>2014-06-26T00:20:05Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Validation results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The advancement of research in structural biology has provided a large body of structural data deposited in various databases. One great example is the Protein Data Bank (PDB), which has been growing exponentially, and which currently consists of more than 100,000 structures of biomolecules and their complexes. Such large bodies of data, especially accumulated over a short period of time using high throughput techniques, will inherently be plagued by various problems.&lt;br /&gt;
&lt;br /&gt;
Validation arose as a major issue in the structural biology community when it became apparent that some published structures contained serious errors, and only sometimes it is properly explained(e.g., due to insufficient electron density in a certain area). Structural databases generally require that the new submissions be checked prior to acceptance. The tools employed for presubmission validations work fairly well for residues like amino acids or nucleotides. However, an essential step in the validation process is checking the ligand structure, because ligands play a key role in protein function, and also because they are the main source of errors in structures. Ligand validation, as well as the validation of uncommon residues, are very challenging tasks, because of the high diversity and nontriviality of their structure, and the general lack of information about correct structures. Therefore, software tools focused on ligand validation were developed relatively recently,&amp;lt;ref&amp;gt;Lütteke T, von der Lieth C-W. {BMC Bioinformatics} (2004) 5, 69.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Kleywegt GJ, Harris MR. Acta Crystallographica D. Biological Crystallography (2007) 63: 935–8.&amp;lt;/ref&amp;gt;, and the topic is still under active development&amp;lt;ref&amp;gt;ftp://ftp.ebi.ac.uk/pub/databases/pdb/validation_reports/&amp;lt;/ref&amp;gt;. These tools are able to validate one or more structures (even thousands of structures), but they are not able to provide the broad scientific community with a more complex image of the quality of structures in dedicated and well established structural databases. For example, a general overview and corresponding statistical evaluation of validation results for residues and ligands in the entire PDB is not yet available, despite the exponential growth of the PDB and the development of structural validation tools in recent years.&lt;br /&gt;
&lt;br /&gt;
We had recently developed MotiveValidator&amp;lt;ref&amp;gt;Svobodová Vařeková R, Jaiswal D, Sehnal D, Ionescu CM, Geidl S, Pravda L, Horský V, Wimmerová M, Koca J, Nucleic Acids Research (2014) doi:10.1093/nar/gku426&amp;lt;/ref&amp;gt;, an interactive platform for the speedy validation of ligands, residues and fragments using a novel, straightforward approach based on the validation of residue annotation. MotiveValidator employs advanced algorithms for the detection and comparison of structural motifs&amp;lt;ref&amp;gt;Sehnal D, Svobodová Vařeková R, Huber HJ, Geidl S, Ionescu CM, Wimmerová M, Koca J, Journal of Chemical Information and Modeling 52(2), (2012): 343-359&amp;lt;/ref&amp;gt;, along with tools for chirality verification&amp;lt;ref&amp;gt;O&#039;Boyle NM, Banck M, James CA, Morley C, Vandermeersch T, Hutchison GR, Journal of Chemoinformatics 3, (2011): 33&amp;lt;/ref&amp;gt; and interactive visualization of 3D structures &amp;lt;ref&amp;gt;http://www.chemdoodle.com&amp;lt;/ref&amp;gt;. Using MotiveValidator, we further created ValidatorDB, a comprehensive resource of validation results for residues and ligands in the Protein Data Bank. Along with validation results for individual residues and ligands, ValidatorDB also provides a summary and statistical evaluation of the validation results at various levels of detail within the PDB. Thus, ValidatorDB offers a comprehensive overview of the quality of the ligand structures in the entire PDB. ValidatorDB contains precomputed validation results for ligands and residues in the Protein Data Bank. The database is updated on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
The residues deemed relevant for validation are all ligands and residues with reasonable size (more than six heavy atoms), with the exception of standard amino acids and nucleotides. The validation is performed using MotiveValidator, and the residue models from wwPDB Chemical Component Dictionary (wwPDB CCD) are used as reference structures for validation. &lt;br /&gt;
&lt;br /&gt;
==Availability and technical details==&lt;br /&gt;
&lt;br /&gt;
===Where to find ValidatorDB===&lt;br /&gt;
ValidatorDB is freely available online since May 2014 at http://ncbr.muni.cz/MotiveValidatorDB. There is no login requirement for accessing ValidatorDB.&lt;br /&gt;
&lt;br /&gt;
===What you need in order to access ValidatorDB===&lt;br /&gt;
ValidatorDB is basically a database, or rather a collection of validation results for ligands and residues in Protein Data Bank. The database is maintained at the National Centre for Biomolecular Research within Masaryk University, Czech Republic, and updated weekly. All you need in order to access ValidatorDB is an internet browser and has JavaScript enabled. The only functionality that relies on your system is the display of 3D models, for which your browser will need to support WebGL. If you experience trouble displaying the 3D models, please check http://get.webgl.org in order to find out how to enable WebGL on your system.&lt;br /&gt;
&lt;br /&gt;
===How to get around the web page===&lt;br /&gt;
&lt;br /&gt;
As soon as you type in the address http://ncbr.muni.cz/ValidatorDB, you will reach the ValidatorDB synopsis page, which contains a brief, general description of ValidatorDB, along with 3 tabs. The different tabs on the ValidatorDB synopsis page provide access to overviews and statistical evaluation of validation results for the entire PDB, for each residue across all PDB IDs containing that residue, and for all analyzed residues in each PDB ID, in graphical or tabular form. Click on each tab to discover what type of overview can be accessed. Further, the ValidatorDB specifics page, which is accessible by looking up specific residues or PDB IDs in the synopsis page, allows to view the results for selected residues in more detail. The specifics page is also organized into tabs that allow different levels of analysis of the results. Last but not least, remember to check the tool tips by hovering the mouse cursor over any graphical or textual element in the ValidatorDB interface.&lt;br /&gt;
&lt;br /&gt;
 Before moving on to more extensive descriptions of features, it is important to clearly establish the meaning of a few key terms and principles within the ValidatorDB environment. See [[MotiveValidator:Terminology|Terminology]].&lt;br /&gt;
&lt;br /&gt;
==Basic Principles==&lt;br /&gt;
&lt;br /&gt;
===Residues and ligands relevant for validation===&lt;br /&gt;
&lt;br /&gt;
As mentioned in section 1, well studied residues like amino acids and nucleotides are routinely validated upon submission of new structures to the PDB. Furthermore, reports of the quality of their structure are already accessible. The challenge addressed by&lt;br /&gt;
ValidatorDB lies in providing access to validation results for residues other than the well studied amino acids and nucleotides. This generally includes ligands and uncommon residues (e.g. substituted amino acids), which exhibit high diversity and nontriviality in their structure, and for which there is generally much less information regarding correct structures. Thus, within the ValidatorDB environment, we further refine the meaning of the terms residue and ligand to refer to residues and ligands relevant for validation. Specifically, these are all ligands and residues with reasonable size (more than six heavy atoms), with the exception of amino acids and nucleotides. All other features of the terms residue and ligand described in sections 2.1 and 2.2 are maintained. Henceforth, all references to residues and ligands in the ValidatorDB web pages (including Wiki and tutorial) have the meaning of residues and ligands relevant for validation. The PDB currently holds over 170,00 residues and ligands relevant for validation.&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
[[File:VDB_manual_figures2.png|thumb|right|Validation process: figure 1]]&lt;br /&gt;
As stated in section, the validation results stored in ValidatorDB are updated every week. Within the ValidatorDB environment, the term validation refers to the process of determining whether a residue or ligand is structurally complete and correctly annotated. This means checking if the topology and chirality of each motif of a validated residue (section 2.4) correspond to those of the model residue (section 2.5) with the same name as the validated residue.&lt;br /&gt;
The validation of residues and ligands in the entire PDB takes place in a few distinct steps. First, for each PDB entry, the residues which are relevant for validation are detected based on their name (3-letter code) and number of atoms (more than 6 heavy atoms). Amino acid residues and nucleotides are excluded based on their residue name. Then, for each validated residue, the corresponding model (same 3-letter code as the validated residue) is retrieved from wwPDB CCD, and each motif of this residue is validated against the model.&lt;br /&gt;
&lt;br /&gt;
ValidatorDB is then built as the collection of validation results for all motifs of all residues in all PDB entries(Figure 1A).&lt;br /&gt;
The validation of each motif against the model residue can be illustrated on a galactose (GAL)motif from the PDB entry 1bzw&lt;br /&gt;
(Figure 1B). The validated residue GAL is extracted form PDB entry 1bzw in the form of an input motif , which contains all the atoms of the validated residue, together with all atoms found within one or two bonds of any atom from the validated residue&lt;br /&gt;
(surroundings). Then, by superimposing the input motif and model residue, the validated motif is obtained as the subset of atoms in the input motif which have a correspondent atom in the model residue. Comparing each atom and bond in the validated motif to those in the model residue produces the validation results.&lt;br /&gt;
&lt;br /&gt;
==Validation results==&lt;br /&gt;
For each validated motif, ValidatorDB contains several types of results. Since the evaluation of the validated motif relies on comparing all atoms and bonds in the validated motif to those in the model residue, the first results that can be encountered are errors. Namely:&lt;br /&gt;
&lt;br /&gt;
*Missing atoms: an atom in the model residue has no corresponding  atom in the validated motif.&lt;br /&gt;
&lt;br /&gt;
*Missing rings: at least one missing atom originates from cycles (rings).&lt;br /&gt;
&lt;br /&gt;
*Wrong chirality: an atom from the validated motif has different chirality than the corresponding atom from the model residue.&lt;br /&gt;
&lt;br /&gt;
*Wrong chirality (planar): the chirality error was found on a planar chiral center. Because of their spacial distribution, planar chiral centers are very sensitive even to small perturbations in the position of the substituents. Therefore, some of the errors reported here might not be significant.&lt;br /&gt;
&lt;br /&gt;
*Uncertain chirality: the presence of unusual bonds may cause an improper evaluation of chirality.&lt;br /&gt;
&lt;br /&gt;
Chirality is only evaluated for those motifs which are complete. This is because the absence of some atoms can prevent the proper evaluation of chirality on the chiral centers present in the validated motif. Therefore, note that all motifs which are counted in the Wrong chirality category are in fact complete. At the same time, the motifs with no missing atoms and no chirality error are actually counted in a category called Correct chirality.&lt;br /&gt;
&lt;br /&gt;
===Warnings===&lt;br /&gt;
Suspicious discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue are reported as warnings. Namely:&lt;br /&gt;
&lt;br /&gt;
*Substitution: an atom from the validated motif is of a different chemical element than the corresponding atom in the model residue (e.g. O mapped to N). This happens often at linkage sites.&lt;br /&gt;
&lt;br /&gt;
*Different naming: an atom from the validated motif has a different PDB atom name than the corresponding atom from the model residue (e.g. the C1 atom mapped to the C7 atom). This happens often when the original PDB files were produced by different software.&lt;br /&gt;
&lt;br /&gt;
*Foreign atom: an atom from the model residue was mapped to an atom from outside the validated residue (i.e. from its surroundings).&lt;br /&gt;
&lt;br /&gt;
*Alternate locations: in the original PDB file, the validated residue contains atoms which were given in alternate locations (i.e., most probably different rotamers). Only the first rotamer was considered during validation.&lt;br /&gt;
&lt;br /&gt;
*Zero model RMSD: the superimposition between the model residue and the validated motif has a root mean square deviation of zero, i.e., the validated motif is identical to the model residue used as reference.&lt;br /&gt;
&lt;br /&gt;
Disabling discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue are reported as&lt;br /&gt;
processing errors, and such motifs are not validated.&lt;br /&gt;
&lt;br /&gt;
Typical validation results that can be found in ValidatorDB are illustrated on the galactose motif mentioned in section 2.6(Fig 1C). As a general rule, in the ValidatorDB interface, errors are marked in red (missing atoms) or dark yellow (wrong chirality), correct structures in green, and warnings in cyan.&lt;br /&gt;
&lt;br /&gt;
==Database contents==&lt;br /&gt;
ValidatorDB contains precomputed validation results for ligands and residues in the Protein Data Bank. The database is updated on a weekly basis. The validation is performed using Validator, and the residue models from wwPDB CCD are used as reference templates for validation. All residues of significant size (a minimum of 6 heavy atoms) have been included in ValidatorDB, with the exception of amino acids and nucleotides, which are checked thoroughly upon submission of the structure to the PDB, and thus do not require additional validation.&lt;br /&gt;
&lt;br /&gt;
The validation results available in ValidatorDB inform whether each motif (occurrence, instance) of a ligand or residue in the PDB exhibits the appropriate topology and stereochemistry expected from its annotation (3-letter code), or how it differs from this annotation. Additionally, all issues related to incorrect or suspicious topology and stereochemistry are explicitly described in a comprehensive and intuitive manner (e.g., location of missing atoms or chirality inversions).&lt;br /&gt;
&lt;br /&gt;
ValidatorDB is organized on two main levels, namely PDB-wide results (synopsis page), and results restricted to specific residues of interest (specifics page). The two levels present the same type of validation results (as described in section 2.7), although the available features differ to some extent (e.g., the specifics page allows 3D visualization of motifs). We shall describe each level of the database in detail below.&lt;br /&gt;
&lt;br /&gt;
==Synopsis page==&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB synopsis page(Figures1A, 3) contains a brief description of ValidatorDB, along with information about the last database update (date and number of structures that have been processed during the validation). Specifically, in May 2014, over 100,000 PDB entries had been processed, containing over 230,000 motifs of 17,000 residues relevant for validation.&lt;br /&gt;
Additionally, the synopsis page allows to access the validation results for specific residues of interest via the LookUp bar&lt;br /&gt;
(Figure 1A). Simply type a comma separated list of residue names (3-letter codes) into the LookUp bar, and you will be redirected to the specifics page containing validation results for the residues you requested. If you specify a list of PDB IDs (4-letter codes)instead, then the corresponding specifics page will contain validation results for all relevant residues and ligands in the PDB entries you specified. See section 3.2 for a description of the contents of the specifics page, and how to interpret these contents. The ValidatorDB synopsis page further provides access to various data sets of PDB-wide validations via 3 different tabs, namely Overview, Details by Residue, and Details by PDB entry. A full description of each of these tab is given below (sections 2.1.1-2.1.3). &lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
The Overview tab of the synopsis page provides a very general statistical evaluation of results across the entire PDB in graphical form (Figures 1A,3A). The elements of the graph represent percentages of the total number of motifs (over 200,000) of residues relevant for validation. A graphic element will be displayed in the Overview graph only if it represents at least 0.5% of the total number of motifs. Each element of the graph is described in a tool tip, but note that here the term residue actually refers to occurrence of residue(motif).&lt;br /&gt;
&lt;br /&gt;
The elements of the graph can be assigned to roughly 6 categories, depending on which kind of information they contain (e.g., incomplete residue, chirality issues, warnings, etc.). The categories are marked by different colors (Figure 3A). Most of the graph elements have been explained in section 3.7 of this manual. The additional elements are Analyzed, which refers to the total number of motifs that could be processed, Missing Atoms or Rings, which is the sum of Missing (Only) Atoms and Missing Rings, and Has All Atoms and Rings, which is the total number of complete residues. &lt;br /&gt;
&lt;br /&gt;
====Details tabs====&lt;br /&gt;
&lt;br /&gt;
Details of the validation are provided in a tabular form separately for Residues and Structures.&lt;br /&gt;
&lt;br /&gt;
* Each Details tab (Figures 3B and 3C) contains an interactive table summarizing the results for each residue validated across the entire PDB. &lt;br /&gt;
* Each row corresponds to a single residue (identified by its residue 3-letter code) or a PDB entry (using its 4-letter code). The information in the table is organized according to the validation results as presented in section about [[#Validation results|results]]. The color coding for the table header and the font inside the table is the same as in the categories defined in the Overview tab. Each element of the table header is described in a tool tip, but note that here the term residue actually refers to occurrence of residue (motif). &lt;br /&gt;
* The table is interactive. Clicking on any element in the table header allows to sort the table entries according to that element. Click on any residue name in order to access the ValidatorDB specifics page with detailed validation results for that residue (see section 3.2). &lt;br /&gt;
* The filter at the top right corner allows to retrieve the table row with a specific residue. Simply type the residue name into the filter. All results can be downloaded in .csv format using the download button at the top left corner.&lt;br /&gt;
&lt;br /&gt;
==Specifics page==&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB specifics page is accessible from the synopsis page, either via the LookUp bar on the Overview tab (Figure 1A), or via the residue names and PDB IDs in the interactive tables on the tabs Details by Residue(Figure 3B) and Details by PDB Entry (Figure 3C), respectively. Depending on how it was accessed, the specifics page might retrieve validation results for one or more residues, a fact mentioned at the very top of the page(Figure 1B).&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB specifics page (Figures 1B,4,5)provides a straightforward report of the validation results, including a summary and detailed information in both tabular and graphical form, along with a 3D structure visualizer for closer inspection of the problematic structures. These reports are accessible via several tabs on the specifics page, namely Summary, Details, Processing Errors/Warnings, and Overview. These tabs will be described in detail in sections 3.2.1 - 3.2.4.Inspecting the tabular and graphical validation reports accessible on the specifics page is the most comfortable and effective way to evaluate the results. Additionally, you may use the JSON Data download button at the top right corner of the specifics page in order to download the complete validation reports and perform any additional analyses on your own.&lt;br /&gt;
&lt;br /&gt;
====Summary====&lt;br /&gt;
&lt;br /&gt;
On the ValidatorDB specifics page, the first view of the results is available in the Summary tab (Figures 1 B,4A). For each validated residue, the Summary tab provides an overview of potential issues encountered, as described in section 2.7. &lt;br /&gt;
&lt;br /&gt;
If more than one residue were validated in one run, a list of these residues will be at the top of the page. In order to examine the validation summary for each residue, you will need to either click on that specific residue in the list, or just scroll down the page till you reach it. Each validated residue is identified by its 3-letter code, as well as its chemical formula and common name. Validation statistics are given as absolute numbers and percentages over all the motifs that were processed for each residue.&lt;br /&gt;
&lt;br /&gt;
The table with the validation report is organized into two main sections, referring to incomplete(Missing Atoms or Rings) and complete structures (With All Atoms and Rings) respectively. The formal distinction between ring atoms and non-ring atoms (simply denoted as atoms ) is meant to allow a quick localization of potential issues in residues containing rings, especially where atom identifiers are not useful. Chirality is evaluated only for the complete structures, since the absence of some atoms makes it difficult to check the chirality of some of the remaining atoms. Further, the problematic atoms are highlighted, in order to better localize the problems in the structures.&lt;br /&gt;
&lt;br /&gt;
Last, a 2D representation of the model residue, and a pie chart with the validation results are provided for visual representation purposes. You can download them via the small icon at the top right corner of the chart, and later use them in your presentations.&lt;br /&gt;
&lt;br /&gt;
====Details====&lt;br /&gt;
&lt;br /&gt;
Whereas the Summary tab provides statistics of the issues over all validated motifs for each validated residue, the Details tab of the ValidatorDB specifics page allows you to inspect the issues in select groups of motifs, and further in each individual motif(Figure 5A). Note that you may also access the details of any particular group of motifs also by clicking on a specific issue in any Summary tab table.&lt;br /&gt;
&lt;br /&gt;
The Details tab is organized into a table where each row contains information regarding a single validated motif. The content of the table (i.e., which motifs are included, and what information is displayed) is dictated by the values of three selection fields at the top of the table. Click on the first field, and select the validated residue by its name (3-letter code) from the drop down menu. Only the motifs that were matched to that residue name will be displayed in the table. Click on the second field and select the type of issue (e.g., wrong chirality) from the drop down menu. Only the motifs which exhibit that type of issue will be displayed in the table. The number of motifs that fit each selection is given in brackets. If you want to make your selection even more specific, use the selection filed Id filter.&lt;br /&gt;
&lt;br /&gt;
Which table columns are filled depend mostly on the type of issue selected in the filter. The most important columns are Id, Issues/Warnings, Missing atoms/rings, Atoms, Processing warnings. The other columns give additional information, usually helpful in identifying the source of the error in the structure. The column Id refers to a unique identifier assigned to each motif in order to keep a transparent trace of the motif&#039;s origin, as it contains the PDB ID, as well as the serial index of the first atom in the motif, as it appears in the original PDB entry. The column Issues/Warnings reports the number of issues or warnings found for each particular motif. The column Missing atoms/rings explains which atoms are missing in each validated motif, whereas Atoms shows the position of incorrect chirality. Missing atoms are  listed by their atom identifier in the model, whereas atoms with wrong chirality are listed by their identifier in the validated motif. Clicking on a column header allows to sort the motifs according to the property specified in the header.&lt;br /&gt;
&lt;br /&gt;
====3D visualization====&lt;br /&gt;
The 3D viewer implemented in the ValidatorDB interface offers one step further in the analysis of each individual validated motif, and is accessible via the Details tab on the specifics page(Figure 5B). In the table, simply click on the Id of a motif of interest in order to open the 3D viewer, where you can inspect the structural inaccuracies more closely. Here you will be able to view and manipulate with the 3D representations of the validated motif and model residue, to help you better assess the position and relevance of the structural issues found during validation. Additionally, a 2D representation of the model is provided for clarity, which is especially helpful for larger motifs. Basic information about the validated motif is also given, along with a complete report of the validation results, where all the potential issues are listed.&lt;br /&gt;
&lt;br /&gt;
====Processing warnings and processing errors====&lt;br /&gt;
&lt;br /&gt;
The validation reports in ValidatorDB also mention various unusual aspects encountered during validation. Sometimes the processed PDB entries contain information that is ambiguous, conflicting or which deviates strongly from the expected reference. ValidatorDB reports such events as processing warnings or processing errors, depending on the severity of the deviations. Such information can be found in the Processing Errors/Warnings tab on the specifics page. The selection field at the top of the page helps filter the warnings and errors. Simply click on the drop down menu and select the category of warnings or errors that you would like to explore. Processing warnings are issues that may cause incorrect Validation, such as atoms that are too close in the 3D space, or unusual bond lengths given by the CONECT records. ValidatorDB typically reports several kinds of warnings: substitutions, foreign atoms, different naming, alternate locations and zero model RMSD, planar chiral center, unusual bond lengths, etc. It is always good to check and make sure that negative validation results (e.g., missing atoms) are not in fact caused by ignoring some atoms in an ill-formed structure.&lt;br /&gt;
&lt;br /&gt;
Processing errors are major issues preventing the finalization of the validation, such as parts of the residue which are completely disconnected from the rest of the structure, probably due to missing atoms at multiple locations throughout the structure. Any major errors in the input file, such as atoms that are completely disconnected from the rest of the structure, are reported as processing errors, and these structures are not processed at all.&lt;br /&gt;
&lt;br /&gt;
It is important to note the difference between processing warnings and processing errors. A warning may simply lead to ignoring a faulty atom, but the motif is validated. On the other hand, a processing error prevents entire motifs from being validated, so you will not find these motifs in the statistics available on either the synopsis or specifics page. The number of motifs with processing errors can be easily calculated as the difference between total motifs of relevant residues in the PDB, and the number of analyzed motifs (currently around 2000 motifs, about 0.5% of relevant motifs in the PDB). Further, because ValidatorDB&lt;br /&gt;
automatically extracts all motifs of a relevant residue and assigns them a unique and informative motif Id, you will be able to easily find the motif in its original PDB entry, and explore it.&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
To keep consistency with the synopsis page, the specifics page also allows visualization of general validation statistics for a selected number of residues via the Overview tab. This representation is entirely compatible with that of the Overview tab on the synopsis page(Figure 5A), and in fact makes up a subset of that data set. All color coding conventions are kept, and tool tips provide descriptions of each graphical element.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB&amp;diff=265</id>
		<title>ValidatorDB</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB&amp;diff=265"/>
		<updated>2014-06-26T00:17:52Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Synopsis page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The advancement of research in structural biology has provided a large body of structural data deposited in various databases. One great example is the Protein Data Bank (PDB), which has been growing exponentially, and which currently consists of more than 100,000 structures of biomolecules and their complexes. Such large bodies of data, especially accumulated over a short period of time using high throughput techniques, will inherently be plagued by various problems.&lt;br /&gt;
&lt;br /&gt;
Validation arose as a major issue in the structural biology community when it became apparent that some published structures contained serious errors, and only sometimes it is properly explained(e.g., due to insufficient electron density in a certain area). Structural databases generally require that the new submissions be checked prior to acceptance. The tools employed for presubmission validations work fairly well for residues like amino acids or nucleotides. However, an essential step in the validation process is checking the ligand structure, because ligands play a key role in protein function, and also because they are the main source of errors in structures. Ligand validation, as well as the validation of uncommon residues, are very challenging tasks, because of the high diversity and nontriviality of their structure, and the general lack of information about correct structures. Therefore, software tools focused on ligand validation were developed relatively recently,&amp;lt;ref&amp;gt;Lütteke T, von der Lieth C-W. {BMC Bioinformatics} (2004) 5, 69.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Kleywegt GJ, Harris MR. Acta Crystallographica D. Biological Crystallography (2007) 63: 935–8.&amp;lt;/ref&amp;gt;, and the topic is still under active development&amp;lt;ref&amp;gt;ftp://ftp.ebi.ac.uk/pub/databases/pdb/validation_reports/&amp;lt;/ref&amp;gt;. These tools are able to validate one or more structures (even thousands of structures), but they are not able to provide the broad scientific community with a more complex image of the quality of structures in dedicated and well established structural databases. For example, a general overview and corresponding statistical evaluation of validation results for residues and ligands in the entire PDB is not yet available, despite the exponential growth of the PDB and the development of structural validation tools in recent years.&lt;br /&gt;
&lt;br /&gt;
We had recently developed MotiveValidator&amp;lt;ref&amp;gt;Svobodová Vařeková R, Jaiswal D, Sehnal D, Ionescu CM, Geidl S, Pravda L, Horský V, Wimmerová M, Koca J, Nucleic Acids Research (2014) doi:10.1093/nar/gku426&amp;lt;/ref&amp;gt;, an interactive platform for the speedy validation of ligands, residues and fragments using a novel, straightforward approach based on the validation of residue annotation. MotiveValidator employs advanced algorithms for the detection and comparison of structural motifs&amp;lt;ref&amp;gt;Sehnal D, Svobodová Vařeková R, Huber HJ, Geidl S, Ionescu CM, Wimmerová M, Koca J, Journal of Chemical Information and Modeling 52(2), (2012): 343-359&amp;lt;/ref&amp;gt;, along with tools for chirality verification&amp;lt;ref&amp;gt;O&#039;Boyle NM, Banck M, James CA, Morley C, Vandermeersch T, Hutchison GR, Journal of Chemoinformatics 3, (2011): 33&amp;lt;/ref&amp;gt; and interactive visualization of 3D structures &amp;lt;ref&amp;gt;http://www.chemdoodle.com&amp;lt;/ref&amp;gt;. Using MotiveValidator, we further created ValidatorDB, a comprehensive resource of validation results for residues and ligands in the Protein Data Bank. Along with validation results for individual residues and ligands, ValidatorDB also provides a summary and statistical evaluation of the validation results at various levels of detail within the PDB. Thus, ValidatorDB offers a comprehensive overview of the quality of the ligand structures in the entire PDB. ValidatorDB contains precomputed validation results for ligands and residues in the Protein Data Bank. The database is updated on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
The residues deemed relevant for validation are all ligands and residues with reasonable size (more than six heavy atoms), with the exception of standard amino acids and nucleotides. The validation is performed using MotiveValidator, and the residue models from wwPDB Chemical Component Dictionary (wwPDB CCD) are used as reference structures for validation. &lt;br /&gt;
&lt;br /&gt;
==Availability and technical details==&lt;br /&gt;
&lt;br /&gt;
===Where to find ValidatorDB===&lt;br /&gt;
ValidatorDB is freely available online since May 2014 at http://ncbr.muni.cz/MotiveValidatorDB. There is no login requirement for accessing ValidatorDB.&lt;br /&gt;
&lt;br /&gt;
===What you need in order to access ValidatorDB===&lt;br /&gt;
ValidatorDB is basically a database, or rather a collection of validation results for ligands and residues in Protein Data Bank. The database is maintained at the National Centre for Biomolecular Research within Masaryk University, Czech Republic, and updated weekly. All you need in order to access ValidatorDB is an internet browser and has JavaScript enabled. The only functionality that relies on your system is the display of 3D models, for which your browser will need to support WebGL. If you experience trouble displaying the 3D models, please check http://get.webgl.org in order to find out how to enable WebGL on your system.&lt;br /&gt;
&lt;br /&gt;
===How to get around the web page===&lt;br /&gt;
&lt;br /&gt;
As soon as you type in the address http://ncbr.muni.cz/ValidatorDB, you will reach the ValidatorDB synopsis page, which contains a brief, general description of ValidatorDB, along with 3 tabs. The different tabs on the ValidatorDB synopsis page provide access to overviews and statistical evaluation of validation results for the entire PDB, for each residue across all PDB IDs containing that residue, and for all analyzed residues in each PDB ID, in graphical or tabular form. Click on each tab to discover what type of overview can be accessed. Further, the ValidatorDB specifics page, which is accessible by looking up specific residues or PDB IDs in the synopsis page, allows to view the results for selected residues in more detail. The specifics page is also organized into tabs that allow different levels of analysis of the results. Last but not least, remember to check the tool tips by hovering the mouse cursor over any graphical or textual element in the ValidatorDB interface.&lt;br /&gt;
&lt;br /&gt;
 Before moving on to more extensive descriptions of features, it is important to clearly establish the meaning of a few key terms and principles within the ValidatorDB environment. See [[MotiveValidator:Terminology|Terminology]].&lt;br /&gt;
&lt;br /&gt;
==Basic Principles==&lt;br /&gt;
&lt;br /&gt;
===Residues and ligands relevant for validation===&lt;br /&gt;
&lt;br /&gt;
As mentioned in section 1, well studied residues like amino acids and nucleotides are routinely validated upon submission of new structures to the PDB. Furthermore, reports of the quality of their structure are already accessible. The challenge addressed by&lt;br /&gt;
ValidatorDB lies in providing access to validation results for residues other than the well studied amino acids and nucleotides. This generally includes ligands and uncommon residues (e.g. substituted amino acids), which exhibit high diversity and nontriviality in their structure, and for which there is generally much less information regarding correct structures. Thus, within the ValidatorDB environment, we further refine the meaning of the terms residue and ligand to refer to residues and ligands relevant for validation. Specifically, these are all ligands and residues with reasonable size (more than six heavy atoms), with the exception of amino acids and nucleotides. All other features of the terms residue and ligand described in sections 2.1 and 2.2 are maintained. Henceforth, all references to residues and ligands in the ValidatorDB web pages (including Wiki and tutorial) have the meaning of residues and ligands relevant for validation. The PDB currently holds over 170,00 residues and ligands relevant for validation.&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
[[File:VDB_manual_figures2.png|thumb|right|Validation process: figure 1]]&lt;br /&gt;
As stated in section, the validation results stored in ValidatorDB are updated every week. Within the ValidatorDB environment, the term validation refers to the process of determining whether a residue or ligand is structurally complete and correctly annotated. This means checking if the topology and chirality of each motif of a validated residue (section 2.4) correspond to those of the model residue (section 2.5) with the same name as the validated residue.&lt;br /&gt;
The validation of residues and ligands in the entire PDB takes place in a few distinct steps. First, for each PDB entry, the residues which are relevant for validation are detected based on their name (3-letter code) and number of atoms (more than 6 heavy atoms). Amino acid residues and nucleotides are excluded based on their residue name. Then, for each validated residue, the corresponding model (same 3-letter code as the validated residue) is retrieved from wwPDB CCD, and each motif of this residue is validated against the model.&lt;br /&gt;
&lt;br /&gt;
ValidatorDB is then built as the collection of validation results for all motifs of all residues in all PDB entries(Figure 1A).&lt;br /&gt;
The validation of each motif against the model residue can be illustrated on a galactose (GAL)motif from the PDB entry 1bzw&lt;br /&gt;
(Figure 1B). The validated residue GAL is extracted form PDB entry 1bzw in the form of an input motif , which contains all the atoms of the validated residue, together with all atoms found within one or two bonds of any atom from the validated residue&lt;br /&gt;
(surroundings). Then, by superimposing the input motif and model residue, the validated motif is obtained as the subset of atoms in the input motif which have a correspondent atom in the model residue. Comparing each atom and bond in the validated motif to those in the model residue produces the validation results.&lt;br /&gt;
&lt;br /&gt;
==Validation results==&lt;br /&gt;
For each validated motif, ValidatorDB contains several types of results. Since the evaluation of the validated motif relies on comparing all atoms and bonds in the validated motif to those in the model residue, the first results that can be encountered are errors. Namely:&lt;br /&gt;
&lt;br /&gt;
*Missing atoms: an atom in the model residue has no corresponding  atom in the validated motif.&lt;br /&gt;
&lt;br /&gt;
*Missing rings: at least one missing atom originates from cycles (rings).&lt;br /&gt;
&lt;br /&gt;
*Wrong chirality: an atom from the validated motif has different chirality than the corresponding atom from the model residue.&lt;br /&gt;
&lt;br /&gt;
*Wrong chirality (planar): the chirality error was found on a planar chiral center. Because of their spacial distribution, planar chiral centers are very sensitive even to small perturbations in the position of the substituents. Therefore, some of the errors reported here might not be significant.&lt;br /&gt;
&lt;br /&gt;
*Uncertain chirality: the presence of unusual bonds may cause an improper evaluation of chirality.&lt;br /&gt;
&lt;br /&gt;
Chirality is only evaluated for those motifs which are complete. This is because the absence of some atoms can prevent the proper evaluation of chirality on the chiral centers present in the validated motif. Therefore, note that all motifs which are counted in the Wrong chirality category are in fact complete. At the same time, the motifs with no missing atoms and no chirality error are actually counted in a category called Correct chirality.&lt;br /&gt;
&lt;br /&gt;
--------------------------&lt;br /&gt;
Suspicious discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue are reported as warnings. Namely:&lt;br /&gt;
&lt;br /&gt;
*Substitution: an atom from the validated motif is of a different chemical element than the corresponding atom in the model residue (e.g. O mapped to N). This happens often at linkage sites.&lt;br /&gt;
&lt;br /&gt;
*Different naming: an atom from the validated motif has a different PDB atom name than the corresponding atom from the model residue (e.g. the C1 atom mapped to the C7 atom). This happens often when the original PDB files were produced by different software.&lt;br /&gt;
&lt;br /&gt;
*Foreign atom: an atom from the model residue was mapped to an atom from outside the validated residue (i.e. from its surroundings).&lt;br /&gt;
&lt;br /&gt;
*Alternate locations: in the original PDB file, the validated residue contains atoms which were given in alternate locations (i.e., most probably different rotamers). Only the first rotamer was considered during validation.&lt;br /&gt;
&lt;br /&gt;
*Zero model RMSD: the superimposition between the model residue and the validated motif has a root mean square deviation of zero, i.e., the validated motif is identical to the model residue used as reference.&lt;br /&gt;
&lt;br /&gt;
Disabling discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue are reported as&lt;br /&gt;
processing errors, and such motifs are not validated.&lt;br /&gt;
&lt;br /&gt;
Typical validation results that can be found in ValidatorDB are illustrated on the galactose motif mentioned in section 2.6(Fig 1C). As a general rule, in the ValidatorDB interface, errors are marked in red (missing atoms) or dark yellow (wrong chirality), correct structures in green, and warnings in cyan.&lt;br /&gt;
&lt;br /&gt;
==Database contents==&lt;br /&gt;
ValidatorDB contains precomputed validation results for ligands and residues in the Protein Data Bank. The database is updated on a weekly basis. The validation is performed using Validator, and the residue models from wwPDB CCD are used as reference templates for validation. All residues of significant size (a minimum of 6 heavy atoms) have been included in ValidatorDB, with the exception of amino acids and nucleotides, which are checked thoroughly upon submission of the structure to the PDB, and thus do not require additional validation.&lt;br /&gt;
&lt;br /&gt;
The validation results available in ValidatorDB inform whether each motif (occurrence, instance) of a ligand or residue in the PDB exhibits the appropriate topology and stereochemistry expected from its annotation (3-letter code), or how it differs from this annotation. Additionally, all issues related to incorrect or suspicious topology and stereochemistry are explicitly described in a comprehensive and intuitive manner (e.g., location of missing atoms or chirality inversions).&lt;br /&gt;
&lt;br /&gt;
ValidatorDB is organized on two main levels, namely PDB-wide results (synopsis page), and results restricted to specific residues of interest (specifics page). The two levels present the same type of validation results (as described in section 2.7), although the available features differ to some extent (e.g., the specifics page allows 3D visualization of motifs). We shall describe each level of the database in detail below.&lt;br /&gt;
&lt;br /&gt;
==Synopsis page==&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB synopsis page(Figures1A, 3) contains a brief description of ValidatorDB, along with information about the last database update (date and number of structures that have been processed during the validation). Specifically, in May 2014, over 100,000 PDB entries had been processed, containing over 230,000 motifs of 17,000 residues relevant for validation.&lt;br /&gt;
Additionally, the synopsis page allows to access the validation results for specific residues of interest via the LookUp bar&lt;br /&gt;
(Figure 1A). Simply type a comma separated list of residue names (3-letter codes) into the LookUp bar, and you will be redirected to the specifics page containing validation results for the residues you requested. If you specify a list of PDB IDs (4-letter codes)instead, then the corresponding specifics page will contain validation results for all relevant residues and ligands in the PDB entries you specified. See section 3.2 for a description of the contents of the specifics page, and how to interpret these contents. The ValidatorDB synopsis page further provides access to various data sets of PDB-wide validations via 3 different tabs, namely Overview, Details by Residue, and Details by PDB entry. A full description of each of these tab is given below (sections 2.1.1-2.1.3). &lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
The Overview tab of the synopsis page provides a very general statistical evaluation of results across the entire PDB in graphical form (Figures 1A,3A). The elements of the graph represent percentages of the total number of motifs (over 200,000) of residues relevant for validation. A graphic element will be displayed in the Overview graph only if it represents at least 0.5% of the total number of motifs. Each element of the graph is described in a tool tip, but note that here the term residue actually refers to occurrence of residue(motif).&lt;br /&gt;
&lt;br /&gt;
The elements of the graph can be assigned to roughly 6 categories, depending on which kind of information they contain (e.g., incomplete residue, chirality issues, warnings, etc.). The categories are marked by different colors (Figure 3A). Most of the graph elements have been explained in section 3.7 of this manual. The additional elements are Analyzed, which refers to the total number of motifs that could be processed, Missing Atoms or Rings, which is the sum of Missing (Only) Atoms and Missing Rings, and Has All Atoms and Rings, which is the total number of complete residues. &lt;br /&gt;
&lt;br /&gt;
====Details tabs====&lt;br /&gt;
&lt;br /&gt;
Details of the validation are provided in a tabular form separately for Residues and Structures.&lt;br /&gt;
&lt;br /&gt;
* Each Details tab (Figures 3B and 3C) contains an interactive table summarizing the results for each residue validated across the entire PDB. &lt;br /&gt;
* Each row corresponds to a single residue (identified by its residue 3-letter code) or a PDB entry (using its 4-letter code). The information in the table is organized according to the validation results as presented in section about [[#Validation results|results]]. The color coding for the table header and the font inside the table is the same as in the categories defined in the Overview tab. Each element of the table header is described in a tool tip, but note that here the term residue actually refers to occurrence of residue (motif). &lt;br /&gt;
* The table is interactive. Clicking on any element in the table header allows to sort the table entries according to that element. Click on any residue name in order to access the ValidatorDB specifics page with detailed validation results for that residue (see section 3.2). &lt;br /&gt;
* The filter at the top right corner allows to retrieve the table row with a specific residue. Simply type the residue name into the filter. All results can be downloaded in .csv format using the download button at the top left corner.&lt;br /&gt;
&lt;br /&gt;
==Specifics page==&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB specifics page is accessible from the synopsis page, either via the LookUp bar on the Overview tab (Figure 1A), or via the residue names and PDB IDs in the interactive tables on the tabs Details by Residue(Figure 3B) and Details by PDB Entry (Figure 3C), respectively. Depending on how it was accessed, the specifics page might retrieve validation results for one or more residues, a fact mentioned at the very top of the page(Figure 1B).&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB specifics page (Figures 1B,4,5)provides a straightforward report of the validation results, including a summary and detailed information in both tabular and graphical form, along with a 3D structure visualizer for closer inspection of the problematic structures. These reports are accessible via several tabs on the specifics page, namely Summary, Details, Processing Errors/Warnings, and Overview. These tabs will be described in detail in sections 3.2.1 - 3.2.4.Inspecting the tabular and graphical validation reports accessible on the specifics page is the most comfortable and effective way to evaluate the results. Additionally, you may use the JSON Data download button at the top right corner of the specifics page in order to download the complete validation reports and perform any additional analyses on your own.&lt;br /&gt;
&lt;br /&gt;
====Summary====&lt;br /&gt;
&lt;br /&gt;
On the ValidatorDB specifics page, the first view of the results is available in the Summary tab (Figures 1 B,4A). For each validated residue, the Summary tab provides an overview of potential issues encountered, as described in section 2.7. &lt;br /&gt;
&lt;br /&gt;
If more than one residue were validated in one run, a list of these residues will be at the top of the page. In order to examine the validation summary for each residue, you will need to either click on that specific residue in the list, or just scroll down the page till you reach it. Each validated residue is identified by its 3-letter code, as well as its chemical formula and common name. Validation statistics are given as absolute numbers and percentages over all the motifs that were processed for each residue.&lt;br /&gt;
&lt;br /&gt;
The table with the validation report is organized into two main sections, referring to incomplete(Missing Atoms or Rings) and complete structures (With All Atoms and Rings) respectively. The formal distinction between ring atoms and non-ring atoms (simply denoted as atoms ) is meant to allow a quick localization of potential issues in residues containing rings, especially where atom identifiers are not useful. Chirality is evaluated only for the complete structures, since the absence of some atoms makes it difficult to check the chirality of some of the remaining atoms. Further, the problematic atoms are highlighted, in order to better localize the problems in the structures.&lt;br /&gt;
&lt;br /&gt;
Last, a 2D representation of the model residue, and a pie chart with the validation results are provided for visual representation purposes. You can download them via the small icon at the top right corner of the chart, and later use them in your presentations.&lt;br /&gt;
&lt;br /&gt;
====Details====&lt;br /&gt;
&lt;br /&gt;
Whereas the Summary tab provides statistics of the issues over all validated motifs for each validated residue, the Details tab of the ValidatorDB specifics page allows you to inspect the issues in select groups of motifs, and further in each individual motif(Figure 5A). Note that you may also access the details of any particular group of motifs also by clicking on a specific issue in any Summary tab table.&lt;br /&gt;
&lt;br /&gt;
The Details tab is organized into a table where each row contains information regarding a single validated motif. The content of the table (i.e., which motifs are included, and what information is displayed) is dictated by the values of three selection fields at the top of the table. Click on the first field, and select the validated residue by its name (3-letter code) from the drop down menu. Only the motifs that were matched to that residue name will be displayed in the table. Click on the second field and select the type of issue (e.g., wrong chirality) from the drop down menu. Only the motifs which exhibit that type of issue will be displayed in the table. The number of motifs that fit each selection is given in brackets. If you want to make your selection even more specific, use the selection filed Id filter.&lt;br /&gt;
&lt;br /&gt;
Which table columns are filled depend mostly on the type of issue selected in the filter. The most important columns are Id, Issues/Warnings, Missing atoms/rings, Atoms, Processing warnings. The other columns give additional information, usually helpful in identifying the source of the error in the structure. The column Id refers to a unique identifier assigned to each motif in order to keep a transparent trace of the motif&#039;s origin, as it contains the PDB ID, as well as the serial index of the first atom in the motif, as it appears in the original PDB entry. The column Issues/Warnings reports the number of issues or warnings found for each particular motif. The column Missing atoms/rings explains which atoms are missing in each validated motif, whereas Atoms shows the position of incorrect chirality. Missing atoms are  listed by their atom identifier in the model, whereas atoms with wrong chirality are listed by their identifier in the validated motif. Clicking on a column header allows to sort the motifs according to the property specified in the header.&lt;br /&gt;
&lt;br /&gt;
====3D visualization====&lt;br /&gt;
The 3D viewer implemented in the ValidatorDB interface offers one step further in the analysis of each individual validated motif, and is accessible via the Details tab on the specifics page(Figure 5B). In the table, simply click on the Id of a motif of interest in order to open the 3D viewer, where you can inspect the structural inaccuracies more closely. Here you will be able to view and manipulate with the 3D representations of the validated motif and model residue, to help you better assess the position and relevance of the structural issues found during validation. Additionally, a 2D representation of the model is provided for clarity, which is especially helpful for larger motifs. Basic information about the validated motif is also given, along with a complete report of the validation results, where all the potential issues are listed.&lt;br /&gt;
&lt;br /&gt;
====Processing warnings and processing errors====&lt;br /&gt;
&lt;br /&gt;
The validation reports in ValidatorDB also mention various unusual aspects encountered during validation. Sometimes the processed PDB entries contain information that is ambiguous, conflicting or which deviates strongly from the expected reference. ValidatorDB reports such events as processing warnings or processing errors, depending on the severity of the deviations. Such information can be found in the Processing Errors/Warnings tab on the specifics page. The selection field at the top of the page helps filter the warnings and errors. Simply click on the drop down menu and select the category of warnings or errors that you would like to explore. Processing warnings are issues that may cause incorrect Validation, such as atoms that are too close in the 3D space, or unusual bond lengths given by the CONECT records. ValidatorDB typically reports several kinds of warnings: substitutions, foreign atoms, different naming, alternate locations and zero model RMSD, planar chiral center, unusual bond lengths, etc. It is always good to check and make sure that negative validation results (e.g., missing atoms) are not in fact caused by ignoring some atoms in an ill-formed structure.&lt;br /&gt;
&lt;br /&gt;
Processing errors are major issues preventing the finalization of the validation, such as parts of the residue which are completely disconnected from the rest of the structure, probably due to missing atoms at multiple locations throughout the structure. Any major errors in the input file, such as atoms that are completely disconnected from the rest of the structure, are reported as processing errors, and these structures are not processed at all.&lt;br /&gt;
&lt;br /&gt;
It is important to note the difference between processing warnings and processing errors. A warning may simply lead to ignoring a faulty atom, but the motif is validated. On the other hand, a processing error prevents entire motifs from being validated, so you will not find these motifs in the statistics available on either the synopsis or specifics page. The number of motifs with processing errors can be easily calculated as the difference between total motifs of relevant residues in the PDB, and the number of analyzed motifs (currently around 2000 motifs, about 0.5% of relevant motifs in the PDB). Further, because ValidatorDB&lt;br /&gt;
automatically extracts all motifs of a relevant residue and assigns them a unique and informative motif Id, you will be able to easily find the motif in its original PDB entry, and explore it.&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
To keep consistency with the synopsis page, the specifics page also allows visualization of general validation statistics for a selected number of residues via the Overview tab. This representation is entirely compatible with that of the Overview tab on the synopsis page(Figure 5A), and in fact makes up a subset of that data set. All color coding conventions are kept, and tool tips provide descriptions of each graphical element.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB&amp;diff=264</id>
		<title>ValidatorDB</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB&amp;diff=264"/>
		<updated>2014-06-26T00:16:35Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* Details by Residue */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The advancement of research in structural biology has provided a large body of structural data deposited in various databases. One great example is the Protein Data Bank (PDB), which has been growing exponentially, and which currently consists of more than 100,000 structures of biomolecules and their complexes. Such large bodies of data, especially accumulated over a short period of time using high throughput techniques, will inherently be plagued by various problems.&lt;br /&gt;
&lt;br /&gt;
Validation arose as a major issue in the structural biology community when it became apparent that some published structures contained serious errors, and only sometimes it is properly explained(e.g., due to insufficient electron density in a certain area). Structural databases generally require that the new submissions be checked prior to acceptance. The tools employed for presubmission validations work fairly well for residues like amino acids or nucleotides. However, an essential step in the validation process is checking the ligand structure, because ligands play a key role in protein function, and also because they are the main source of errors in structures. Ligand validation, as well as the validation of uncommon residues, are very challenging tasks, because of the high diversity and nontriviality of their structure, and the general lack of information about correct structures. Therefore, software tools focused on ligand validation were developed relatively recently,&amp;lt;ref&amp;gt;Lütteke T, von der Lieth C-W. {BMC Bioinformatics} (2004) 5, 69.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Kleywegt GJ, Harris MR. Acta Crystallographica D. Biological Crystallography (2007) 63: 935–8.&amp;lt;/ref&amp;gt;, and the topic is still under active development&amp;lt;ref&amp;gt;ftp://ftp.ebi.ac.uk/pub/databases/pdb/validation_reports/&amp;lt;/ref&amp;gt;. These tools are able to validate one or more structures (even thousands of structures), but they are not able to provide the broad scientific community with a more complex image of the quality of structures in dedicated and well established structural databases. For example, a general overview and corresponding statistical evaluation of validation results for residues and ligands in the entire PDB is not yet available, despite the exponential growth of the PDB and the development of structural validation tools in recent years.&lt;br /&gt;
&lt;br /&gt;
We had recently developed MotiveValidator&amp;lt;ref&amp;gt;Svobodová Vařeková R, Jaiswal D, Sehnal D, Ionescu CM, Geidl S, Pravda L, Horský V, Wimmerová M, Koca J, Nucleic Acids Research (2014) doi:10.1093/nar/gku426&amp;lt;/ref&amp;gt;, an interactive platform for the speedy validation of ligands, residues and fragments using a novel, straightforward approach based on the validation of residue annotation. MotiveValidator employs advanced algorithms for the detection and comparison of structural motifs&amp;lt;ref&amp;gt;Sehnal D, Svobodová Vařeková R, Huber HJ, Geidl S, Ionescu CM, Wimmerová M, Koca J, Journal of Chemical Information and Modeling 52(2), (2012): 343-359&amp;lt;/ref&amp;gt;, along with tools for chirality verification&amp;lt;ref&amp;gt;O&#039;Boyle NM, Banck M, James CA, Morley C, Vandermeersch T, Hutchison GR, Journal of Chemoinformatics 3, (2011): 33&amp;lt;/ref&amp;gt; and interactive visualization of 3D structures &amp;lt;ref&amp;gt;http://www.chemdoodle.com&amp;lt;/ref&amp;gt;. Using MotiveValidator, we further created ValidatorDB, a comprehensive resource of validation results for residues and ligands in the Protein Data Bank. Along with validation results for individual residues and ligands, ValidatorDB also provides a summary and statistical evaluation of the validation results at various levels of detail within the PDB. Thus, ValidatorDB offers a comprehensive overview of the quality of the ligand structures in the entire PDB. ValidatorDB contains precomputed validation results for ligands and residues in the Protein Data Bank. The database is updated on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
The residues deemed relevant for validation are all ligands and residues with reasonable size (more than six heavy atoms), with the exception of standard amino acids and nucleotides. The validation is performed using MotiveValidator, and the residue models from wwPDB Chemical Component Dictionary (wwPDB CCD) are used as reference structures for validation. &lt;br /&gt;
&lt;br /&gt;
==Availability and technical details==&lt;br /&gt;
&lt;br /&gt;
===Where to find ValidatorDB===&lt;br /&gt;
ValidatorDB is freely available online since May 2014 at http://ncbr.muni.cz/MotiveValidatorDB. There is no login requirement for accessing ValidatorDB.&lt;br /&gt;
&lt;br /&gt;
===What you need in order to access ValidatorDB===&lt;br /&gt;
ValidatorDB is basically a database, or rather a collection of validation results for ligands and residues in Protein Data Bank. The database is maintained at the National Centre for Biomolecular Research within Masaryk University, Czech Republic, and updated weekly. All you need in order to access ValidatorDB is an internet browser and has JavaScript enabled. The only functionality that relies on your system is the display of 3D models, for which your browser will need to support WebGL. If you experience trouble displaying the 3D models, please check http://get.webgl.org in order to find out how to enable WebGL on your system.&lt;br /&gt;
&lt;br /&gt;
===How to get around the web page===&lt;br /&gt;
&lt;br /&gt;
As soon as you type in the address http://ncbr.muni.cz/ValidatorDB, you will reach the ValidatorDB synopsis page, which contains a brief, general description of ValidatorDB, along with 3 tabs. The different tabs on the ValidatorDB synopsis page provide access to overviews and statistical evaluation of validation results for the entire PDB, for each residue across all PDB IDs containing that residue, and for all analyzed residues in each PDB ID, in graphical or tabular form. Click on each tab to discover what type of overview can be accessed. Further, the ValidatorDB specifics page, which is accessible by looking up specific residues or PDB IDs in the synopsis page, allows to view the results for selected residues in more detail. The specifics page is also organized into tabs that allow different levels of analysis of the results. Last but not least, remember to check the tool tips by hovering the mouse cursor over any graphical or textual element in the ValidatorDB interface.&lt;br /&gt;
&lt;br /&gt;
 Before moving on to more extensive descriptions of features, it is important to clearly establish the meaning of a few key terms and principles within the ValidatorDB environment. See [[MotiveValidator:Terminology|Terminology]].&lt;br /&gt;
&lt;br /&gt;
==Basic Principles==&lt;br /&gt;
&lt;br /&gt;
===Residues and ligands relevant for validation===&lt;br /&gt;
&lt;br /&gt;
As mentioned in section 1, well studied residues like amino acids and nucleotides are routinely validated upon submission of new structures to the PDB. Furthermore, reports of the quality of their structure are already accessible. The challenge addressed by&lt;br /&gt;
ValidatorDB lies in providing access to validation results for residues other than the well studied amino acids and nucleotides. This generally includes ligands and uncommon residues (e.g. substituted amino acids), which exhibit high diversity and nontriviality in their structure, and for which there is generally much less information regarding correct structures. Thus, within the ValidatorDB environment, we further refine the meaning of the terms residue and ligand to refer to residues and ligands relevant for validation. Specifically, these are all ligands and residues with reasonable size (more than six heavy atoms), with the exception of amino acids and nucleotides. All other features of the terms residue and ligand described in sections 2.1 and 2.2 are maintained. Henceforth, all references to residues and ligands in the ValidatorDB web pages (including Wiki and tutorial) have the meaning of residues and ligands relevant for validation. The PDB currently holds over 170,00 residues and ligands relevant for validation.&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
[[File:VDB_manual_figures2.png|thumb|right|Validation process: figure 1]]&lt;br /&gt;
As stated in section, the validation results stored in ValidatorDB are updated every week. Within the ValidatorDB environment, the term validation refers to the process of determining whether a residue or ligand is structurally complete and correctly annotated. This means checking if the topology and chirality of each motif of a validated residue (section 2.4) correspond to those of the model residue (section 2.5) with the same name as the validated residue.&lt;br /&gt;
The validation of residues and ligands in the entire PDB takes place in a few distinct steps. First, for each PDB entry, the residues which are relevant for validation are detected based on their name (3-letter code) and number of atoms (more than 6 heavy atoms). Amino acid residues and nucleotides are excluded based on their residue name. Then, for each validated residue, the corresponding model (same 3-letter code as the validated residue) is retrieved from wwPDB CCD, and each motif of this residue is validated against the model.&lt;br /&gt;
&lt;br /&gt;
ValidatorDB is then built as the collection of validation results for all motifs of all residues in all PDB entries(Figure 1A).&lt;br /&gt;
The validation of each motif against the model residue can be illustrated on a galactose (GAL)motif from the PDB entry 1bzw&lt;br /&gt;
(Figure 1B). The validated residue GAL is extracted form PDB entry 1bzw in the form of an input motif , which contains all the atoms of the validated residue, together with all atoms found within one or two bonds of any atom from the validated residue&lt;br /&gt;
(surroundings). Then, by superimposing the input motif and model residue, the validated motif is obtained as the subset of atoms in the input motif which have a correspondent atom in the model residue. Comparing each atom and bond in the validated motif to those in the model residue produces the validation results.&lt;br /&gt;
&lt;br /&gt;
==Validation results==&lt;br /&gt;
For each validated motif, ValidatorDB contains several types of results. Since the evaluation of the validated motif relies on comparing all atoms and bonds in the validated motif to those in the model residue, the first results that can be encountered are errors. Namely:&lt;br /&gt;
&lt;br /&gt;
*Missing atoms: an atom in the model residue has no corresponding  atom in the validated motif.&lt;br /&gt;
&lt;br /&gt;
*Missing rings: at least one missing atom originates from cycles (rings).&lt;br /&gt;
&lt;br /&gt;
*Wrong chirality: an atom from the validated motif has different chirality than the corresponding atom from the model residue.&lt;br /&gt;
&lt;br /&gt;
*Wrong chirality (planar): the chirality error was found on a planar chiral center. Because of their spacial distribution, planar chiral centers are very sensitive even to small perturbations in the position of the substituents. Therefore, some of the errors reported here might not be significant.&lt;br /&gt;
&lt;br /&gt;
*Uncertain chirality: the presence of unusual bonds may cause an improper evaluation of chirality.&lt;br /&gt;
&lt;br /&gt;
Chirality is only evaluated for those motifs which are complete. This is because the absence of some atoms can prevent the proper evaluation of chirality on the chiral centers present in the validated motif. Therefore, note that all motifs which are counted in the Wrong chirality category are in fact complete. At the same time, the motifs with no missing atoms and no chirality error are actually counted in a category called Correct chirality.&lt;br /&gt;
&lt;br /&gt;
--------------------------&lt;br /&gt;
Suspicious discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue are reported as warnings. Namely:&lt;br /&gt;
&lt;br /&gt;
*Substitution: an atom from the validated motif is of a different chemical element than the corresponding atom in the model residue (e.g. O mapped to N). This happens often at linkage sites.&lt;br /&gt;
&lt;br /&gt;
*Different naming: an atom from the validated motif has a different PDB atom name than the corresponding atom from the model residue (e.g. the C1 atom mapped to the C7 atom). This happens often when the original PDB files were produced by different software.&lt;br /&gt;
&lt;br /&gt;
*Foreign atom: an atom from the model residue was mapped to an atom from outside the validated residue (i.e. from its surroundings).&lt;br /&gt;
&lt;br /&gt;
*Alternate locations: in the original PDB file, the validated residue contains atoms which were given in alternate locations (i.e., most probably different rotamers). Only the first rotamer was considered during validation.&lt;br /&gt;
&lt;br /&gt;
*Zero model RMSD: the superimposition between the model residue and the validated motif has a root mean square deviation of zero, i.e., the validated motif is identical to the model residue used as reference.&lt;br /&gt;
&lt;br /&gt;
Disabling discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue are reported as&lt;br /&gt;
processing errors, and such motifs are not validated.&lt;br /&gt;
&lt;br /&gt;
Typical validation results that can be found in ValidatorDB are illustrated on the galactose motif mentioned in section 2.6(Fig 1C). As a general rule, in the ValidatorDB interface, errors are marked in red (missing atoms) or dark yellow (wrong chirality), correct structures in green, and warnings in cyan.&lt;br /&gt;
&lt;br /&gt;
==Database contents==&lt;br /&gt;
ValidatorDB contains precomputed validation results for ligands and residues in the Protein Data Bank. The database is updated on a weekly basis. The validation is performed using Validator, and the residue models from wwPDB CCD are used as reference templates for validation. All residues of significant size (a minimum of 6 heavy atoms) have been included in ValidatorDB, with the exception of amino acids and nucleotides, which are checked thoroughly upon submission of the structure to the PDB, and thus do not require additional validation.&lt;br /&gt;
&lt;br /&gt;
The validation results available in ValidatorDB inform whether each motif (occurrence, instance) of a ligand or residue in the PDB exhibits the appropriate topology and stereochemistry expected from its annotation (3-letter code), or how it differs from this annotation. Additionally, all issues related to incorrect or suspicious topology and stereochemistry are explicitly described in a comprehensive and intuitive manner (e.g., location of missing atoms or chirality inversions).&lt;br /&gt;
&lt;br /&gt;
ValidatorDB is organized on two main levels, namely PDB-wide results (synopsis page), and results restricted to specific residues of interest (specifics page). The two levels present the same type of validation results (as described in section 2.7), although the available features differ to some extent (e.g., the specifics page allows 3D visualization of motifs). We shall describe each level of the database in detail below.&lt;br /&gt;
&lt;br /&gt;
==Synopsis page==&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB synopsis page(Figures1A, 3) contains a brief description of ValidatorDB, along with information about the last database update (date and number of structures that have been processed during the validation). Specifically, in May 2014, over 100,000 PDB entries had been processed, containing over 230,000 motifs of 17,000 residues relevant for validation.&lt;br /&gt;
Additionally, the synopsis page allows to access the validation results for specific residues of interest via the LookUp bar&lt;br /&gt;
(Figure 1A). Simply type a comma separated list of residue names (3-letter codes) into the LookUp bar, and you will be redirected to the specifics page containing validation results for the residues you requested. If you specify a list of PDB IDs (4-letter codes)instead, then the corresponding specifics page will contain validation results for all relevant residues and ligands in the PDB entries you specified. See section 3.2 for a description of the contents of the specifics page, and how to interpret these contents. The ValidatorDB synopsis page further provides access to various data sets of PDB-wide validations via 3 different tabs, namely Overview, Details by Residue, and Details by PDB entry. A full description of each of these tab is given below (sections 2.1.1-2.1.3). &lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
The Overview tab of the synopsis page provides a very general statistical evaluation of results across the entire PDB in graphical form (Figures 1A,3A). The elements of the graph represent percentages of the total number of motifs (over 200,000) of residues relevant for validation. A graphic element will be displayed in the Overview graph only if it represents at least 0.5% of the total number of motifs. Each element of the graph is described in a tool tip, but note that here the term residue actually refers to occurrence of residue(motif).&lt;br /&gt;
&lt;br /&gt;
The elements of the graph can be assigned to roughly 6 categories, depending on which kind of information they contain (e.g., incomplete residue, chirality issues, warnings, etc.). The categories are marked by different colors (Figure 3A). Most of the graph elements have been explained in section 3.7 of this manual. The additional elements are Analyzed, which refers to the total number of motifs that could be processed, Missing Atoms or Rings, which is the sum of Missing (Only) Atoms and Missing Rings, and Has All Atoms and Rings, which is the total number of complete residues. &lt;br /&gt;
&lt;br /&gt;
====Details tabs====&lt;br /&gt;
&lt;br /&gt;
Details of the validation are provided in a tabular form separately for Residues and Structures.&lt;br /&gt;
&lt;br /&gt;
* Each Details tab (Figures 3B and 3C) contains an interactive table summarizing the results for each residue validated across the entire PDB. &lt;br /&gt;
* Each row corresponds to a single residue (identified by its residue 3-letter code) or a PDB entry (using its 4-letter code). The information in the table is organized according to the validation results as presented in section about [[#Validation results|results]]. The color coding for the table header and the font inside the table is the same as in the categories defined in the Overview tab. Each element of the table header is described in a tool tip, but note that here the term residue actually refers to occurrence of residue (motif). &lt;br /&gt;
* The table is interactive. Clicking on any element in the table header allows to sort the table entries according to that element. Click on any residue name in order to access the ValidatorDB specifics page with detailed validation results for that residue (see section 3.2). &lt;br /&gt;
* The filter at the top right corner allows to retrieve the table row with a specific residue. Simply type the residue name into the filter. All results can be downloaded in .csv format using the download button at the top left corner.&lt;br /&gt;
&lt;br /&gt;
====Details by PDB entry====&lt;br /&gt;
&lt;br /&gt;
The Details by PDB Entry tab (Figure 3C) contains an interactive table summarizing the results for all residues validated in each PDB entry. Each row corresponds to one PDB entry, identified by its PDB ID (4-letter code). The information in the table is organized according to the validation results as presented in section 2.7 of this manual. The color coding for the table header and the font inside the table is the same as in the categories defined in the Overview tab. Each element of the table header is described in a tool tip, but note that here the term residue actually refers to occurrence of residue (motif).&lt;br /&gt;
&lt;br /&gt;
The table is interactive. Clicking on any element in the table header allows to sort the table entries according to that element. Click on any PDB in order to access the ValidatorDB specifics page with detailed validation results for all residues in that PDB entry (see section 3.2).&lt;br /&gt;
&lt;br /&gt;
The filter at the top right corner allows to retrieve the table rows with a specific residue, or the table rows with selected PDB IDs. Simply type the residue name or PDB ID into the filter. All results can be downloaded in .csv format using the download button at the top left corner.&lt;br /&gt;
&lt;br /&gt;
==Specifics page==&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB specifics page is accessible from the synopsis page, either via the LookUp bar on the Overview tab (Figure 1A), or via the residue names and PDB IDs in the interactive tables on the tabs Details by Residue(Figure 3B) and Details by PDB Entry (Figure 3C), respectively. Depending on how it was accessed, the specifics page might retrieve validation results for one or more residues, a fact mentioned at the very top of the page(Figure 1B).&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB specifics page (Figures 1B,4,5)provides a straightforward report of the validation results, including a summary and detailed information in both tabular and graphical form, along with a 3D structure visualizer for closer inspection of the problematic structures. These reports are accessible via several tabs on the specifics page, namely Summary, Details, Processing Errors/Warnings, and Overview. These tabs will be described in detail in sections 3.2.1 - 3.2.4.Inspecting the tabular and graphical validation reports accessible on the specifics page is the most comfortable and effective way to evaluate the results. Additionally, you may use the JSON Data download button at the top right corner of the specifics page in order to download the complete validation reports and perform any additional analyses on your own.&lt;br /&gt;
&lt;br /&gt;
====Summary====&lt;br /&gt;
&lt;br /&gt;
On the ValidatorDB specifics page, the first view of the results is available in the Summary tab (Figures 1 B,4A). For each validated residue, the Summary tab provides an overview of potential issues encountered, as described in section 2.7. &lt;br /&gt;
&lt;br /&gt;
If more than one residue were validated in one run, a list of these residues will be at the top of the page. In order to examine the validation summary for each residue, you will need to either click on that specific residue in the list, or just scroll down the page till you reach it. Each validated residue is identified by its 3-letter code, as well as its chemical formula and common name. Validation statistics are given as absolute numbers and percentages over all the motifs that were processed for each residue.&lt;br /&gt;
&lt;br /&gt;
The table with the validation report is organized into two main sections, referring to incomplete(Missing Atoms or Rings) and complete structures (With All Atoms and Rings) respectively. The formal distinction between ring atoms and non-ring atoms (simply denoted as atoms ) is meant to allow a quick localization of potential issues in residues containing rings, especially where atom identifiers are not useful. Chirality is evaluated only for the complete structures, since the absence of some atoms makes it difficult to check the chirality of some of the remaining atoms. Further, the problematic atoms are highlighted, in order to better localize the problems in the structures.&lt;br /&gt;
&lt;br /&gt;
Last, a 2D representation of the model residue, and a pie chart with the validation results are provided for visual representation purposes. You can download them via the small icon at the top right corner of the chart, and later use them in your presentations.&lt;br /&gt;
&lt;br /&gt;
====Details====&lt;br /&gt;
&lt;br /&gt;
Whereas the Summary tab provides statistics of the issues over all validated motifs for each validated residue, the Details tab of the ValidatorDB specifics page allows you to inspect the issues in select groups of motifs, and further in each individual motif(Figure 5A). Note that you may also access the details of any particular group of motifs also by clicking on a specific issue in any Summary tab table.&lt;br /&gt;
&lt;br /&gt;
The Details tab is organized into a table where each row contains information regarding a single validated motif. The content of the table (i.e., which motifs are included, and what information is displayed) is dictated by the values of three selection fields at the top of the table. Click on the first field, and select the validated residue by its name (3-letter code) from the drop down menu. Only the motifs that were matched to that residue name will be displayed in the table. Click on the second field and select the type of issue (e.g., wrong chirality) from the drop down menu. Only the motifs which exhibit that type of issue will be displayed in the table. The number of motifs that fit each selection is given in brackets. If you want to make your selection even more specific, use the selection filed Id filter.&lt;br /&gt;
&lt;br /&gt;
Which table columns are filled depend mostly on the type of issue selected in the filter. The most important columns are Id, Issues/Warnings, Missing atoms/rings, Atoms, Processing warnings. The other columns give additional information, usually helpful in identifying the source of the error in the structure. The column Id refers to a unique identifier assigned to each motif in order to keep a transparent trace of the motif&#039;s origin, as it contains the PDB ID, as well as the serial index of the first atom in the motif, as it appears in the original PDB entry. The column Issues/Warnings reports the number of issues or warnings found for each particular motif. The column Missing atoms/rings explains which atoms are missing in each validated motif, whereas Atoms shows the position of incorrect chirality. Missing atoms are  listed by their atom identifier in the model, whereas atoms with wrong chirality are listed by their identifier in the validated motif. Clicking on a column header allows to sort the motifs according to the property specified in the header.&lt;br /&gt;
&lt;br /&gt;
====3D visualization====&lt;br /&gt;
The 3D viewer implemented in the ValidatorDB interface offers one step further in the analysis of each individual validated motif, and is accessible via the Details tab on the specifics page(Figure 5B). In the table, simply click on the Id of a motif of interest in order to open the 3D viewer, where you can inspect the structural inaccuracies more closely. Here you will be able to view and manipulate with the 3D representations of the validated motif and model residue, to help you better assess the position and relevance of the structural issues found during validation. Additionally, a 2D representation of the model is provided for clarity, which is especially helpful for larger motifs. Basic information about the validated motif is also given, along with a complete report of the validation results, where all the potential issues are listed.&lt;br /&gt;
&lt;br /&gt;
====Processing warnings and processing errors====&lt;br /&gt;
&lt;br /&gt;
The validation reports in ValidatorDB also mention various unusual aspects encountered during validation. Sometimes the processed PDB entries contain information that is ambiguous, conflicting or which deviates strongly from the expected reference. ValidatorDB reports such events as processing warnings or processing errors, depending on the severity of the deviations. Such information can be found in the Processing Errors/Warnings tab on the specifics page. The selection field at the top of the page helps filter the warnings and errors. Simply click on the drop down menu and select the category of warnings or errors that you would like to explore. Processing warnings are issues that may cause incorrect Validation, such as atoms that are too close in the 3D space, or unusual bond lengths given by the CONECT records. ValidatorDB typically reports several kinds of warnings: substitutions, foreign atoms, different naming, alternate locations and zero model RMSD, planar chiral center, unusual bond lengths, etc. It is always good to check and make sure that negative validation results (e.g., missing atoms) are not in fact caused by ignoring some atoms in an ill-formed structure.&lt;br /&gt;
&lt;br /&gt;
Processing errors are major issues preventing the finalization of the validation, such as parts of the residue which are completely disconnected from the rest of the structure, probably due to missing atoms at multiple locations throughout the structure. Any major errors in the input file, such as atoms that are completely disconnected from the rest of the structure, are reported as processing errors, and these structures are not processed at all.&lt;br /&gt;
&lt;br /&gt;
It is important to note the difference between processing warnings and processing errors. A warning may simply lead to ignoring a faulty atom, but the motif is validated. On the other hand, a processing error prevents entire motifs from being validated, so you will not find these motifs in the statistics available on either the synopsis or specifics page. The number of motifs with processing errors can be easily calculated as the difference between total motifs of relevant residues in the PDB, and the number of analyzed motifs (currently around 2000 motifs, about 0.5% of relevant motifs in the PDB). Further, because ValidatorDB&lt;br /&gt;
automatically extracts all motifs of a relevant residue and assigns them a unique and informative motif Id, you will be able to easily find the motif in its original PDB entry, and explore it.&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
To keep consistency with the synopsis page, the specifics page also allows visualization of general validation statistics for a selected number of residues via the Overview tab. This representation is entirely compatible with that of the Overview tab on the synopsis page(Figure 5A), and in fact makes up a subset of that data set. All color coding conventions are kept, and tool tips provide descriptions of each graphical element.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB&amp;diff=263</id>
		<title>ValidatorDB</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB&amp;diff=263"/>
		<updated>2014-06-26T00:01:25Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* How to get around the web page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The advancement of research in structural biology has provided a large body of structural data deposited in various databases. One great example is the Protein Data Bank (PDB), which has been growing exponentially, and which currently consists of more than 100,000 structures of biomolecules and their complexes. Such large bodies of data, especially accumulated over a short period of time using high throughput techniques, will inherently be plagued by various problems.&lt;br /&gt;
&lt;br /&gt;
Validation arose as a major issue in the structural biology community when it became apparent that some published structures contained serious errors, and only sometimes it is properly explained(e.g., due to insufficient electron density in a certain area). Structural databases generally require that the new submissions be checked prior to acceptance. The tools employed for presubmission validations work fairly well for residues like amino acids or nucleotides. However, an essential step in the validation process is checking the ligand structure, because ligands play a key role in protein function, and also because they are the main source of errors in structures. Ligand validation, as well as the validation of uncommon residues, are very challenging tasks, because of the high diversity and nontriviality of their structure, and the general lack of information about correct structures. Therefore, software tools focused on ligand validation were developed relatively recently,&amp;lt;ref&amp;gt;Lütteke T, von der Lieth C-W. {BMC Bioinformatics} (2004) 5, 69.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Kleywegt GJ, Harris MR. Acta Crystallographica D. Biological Crystallography (2007) 63: 935–8.&amp;lt;/ref&amp;gt;, and the topic is still under active development&amp;lt;ref&amp;gt;ftp://ftp.ebi.ac.uk/pub/databases/pdb/validation_reports/&amp;lt;/ref&amp;gt;. These tools are able to validate one or more structures (even thousands of structures), but they are not able to provide the broad scientific community with a more complex image of the quality of structures in dedicated and well established structural databases. For example, a general overview and corresponding statistical evaluation of validation results for residues and ligands in the entire PDB is not yet available, despite the exponential growth of the PDB and the development of structural validation tools in recent years.&lt;br /&gt;
&lt;br /&gt;
We had recently developed MotiveValidator&amp;lt;ref&amp;gt;Svobodová Vařeková R, Jaiswal D, Sehnal D, Ionescu CM, Geidl S, Pravda L, Horský V, Wimmerová M, Koca J, Nucleic Acids Research (2014) doi:10.1093/nar/gku426&amp;lt;/ref&amp;gt;, an interactive platform for the speedy validation of ligands, residues and fragments using a novel, straightforward approach based on the validation of residue annotation. MotiveValidator employs advanced algorithms for the detection and comparison of structural motifs&amp;lt;ref&amp;gt;Sehnal D, Svobodová Vařeková R, Huber HJ, Geidl S, Ionescu CM, Wimmerová M, Koca J, Journal of Chemical Information and Modeling 52(2), (2012): 343-359&amp;lt;/ref&amp;gt;, along with tools for chirality verification&amp;lt;ref&amp;gt;O&#039;Boyle NM, Banck M, James CA, Morley C, Vandermeersch T, Hutchison GR, Journal of Chemoinformatics 3, (2011): 33&amp;lt;/ref&amp;gt; and interactive visualization of 3D structures &amp;lt;ref&amp;gt;http://www.chemdoodle.com&amp;lt;/ref&amp;gt;. Using MotiveValidator, we further created ValidatorDB, a comprehensive resource of validation results for residues and ligands in the Protein Data Bank. Along with validation results for individual residues and ligands, ValidatorDB also provides a summary and statistical evaluation of the validation results at various levels of detail within the PDB. Thus, ValidatorDB offers a comprehensive overview of the quality of the ligand structures in the entire PDB. ValidatorDB contains precomputed validation results for ligands and residues in the Protein Data Bank. The database is updated on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
The residues deemed relevant for validation are all ligands and residues with reasonable size (more than six heavy atoms), with the exception of standard amino acids and nucleotides. The validation is performed using MotiveValidator, and the residue models from wwPDB Chemical Component Dictionary (wwPDB CCD) are used as reference structures for validation. &lt;br /&gt;
&lt;br /&gt;
==Availability and technical details==&lt;br /&gt;
&lt;br /&gt;
===Where to find ValidatorDB===&lt;br /&gt;
ValidatorDB is freely available online since May 2014 at http://ncbr.muni.cz/MotiveValidatorDB. There is no login requirement for accessing ValidatorDB.&lt;br /&gt;
&lt;br /&gt;
===What you need in order to access ValidatorDB===&lt;br /&gt;
ValidatorDB is basically a database, or rather a collection of validation results for ligands and residues in Protein Data Bank. The database is maintained at the National Centre for Biomolecular Research within Masaryk University, Czech Republic, and updated weekly. All you need in order to access ValidatorDB is an internet browser and has JavaScript enabled. The only functionality that relies on your system is the display of 3D models, for which your browser will need to support WebGL. If you experience trouble displaying the 3D models, please check http://get.webgl.org in order to find out how to enable WebGL on your system.&lt;br /&gt;
&lt;br /&gt;
===How to get around the web page===&lt;br /&gt;
&lt;br /&gt;
As soon as you type in the address http://ncbr.muni.cz/ValidatorDB, you will reach the ValidatorDB synopsis page, which contains a brief, general description of ValidatorDB, along with 3 tabs. The different tabs on the ValidatorDB synopsis page provide access to overviews and statistical evaluation of validation results for the entire PDB, for each residue across all PDB IDs containing that residue, and for all analyzed residues in each PDB ID, in graphical or tabular form. Click on each tab to discover what type of overview can be accessed. Further, the ValidatorDB specifics page, which is accessible by looking up specific residues or PDB IDs in the synopsis page, allows to view the results for selected residues in more detail. The specifics page is also organized into tabs that allow different levels of analysis of the results. Last but not least, remember to check the tool tips by hovering the mouse cursor over any graphical or textual element in the ValidatorDB interface.&lt;br /&gt;
&lt;br /&gt;
 Before moving on to more extensive descriptions of features, it is important to clearly establish the meaning of a few key terms and principles within the ValidatorDB environment. See [[MotiveValidator:Terminology|Terminology]].&lt;br /&gt;
&lt;br /&gt;
==Basic Principles==&lt;br /&gt;
&lt;br /&gt;
===Residues and ligands relevant for validation===&lt;br /&gt;
&lt;br /&gt;
As mentioned in section 1, well studied residues like amino acids and nucleotides are routinely validated upon submission of new structures to the PDB. Furthermore, reports of the quality of their structure are already accessible. The challenge addressed by&lt;br /&gt;
ValidatorDB lies in providing access to validation results for residues other than the well studied amino acids and nucleotides. This generally includes ligands and uncommon residues (e.g. substituted amino acids), which exhibit high diversity and nontriviality in their structure, and for which there is generally much less information regarding correct structures. Thus, within the ValidatorDB environment, we further refine the meaning of the terms residue and ligand to refer to residues and ligands relevant for validation. Specifically, these are all ligands and residues with reasonable size (more than six heavy atoms), with the exception of amino acids and nucleotides. All other features of the terms residue and ligand described in sections 2.1 and 2.2 are maintained. Henceforth, all references to residues and ligands in the ValidatorDB web pages (including Wiki and tutorial) have the meaning of residues and ligands relevant for validation. The PDB currently holds over 170,00 residues and ligands relevant for validation.&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
[[File:VDB_manual_figures2.png|thumb|right|Validation process: figure 1]]&lt;br /&gt;
As stated in section, the validation results stored in ValidatorDB are updated every week. Within the ValidatorDB environment, the term validation refers to the process of determining whether a residue or ligand is structurally complete and correctly annotated. This means checking if the topology and chirality of each motif of a validated residue (section 2.4) correspond to those of the model residue (section 2.5) with the same name as the validated residue.&lt;br /&gt;
The validation of residues and ligands in the entire PDB takes place in a few distinct steps. First, for each PDB entry, the residues which are relevant for validation are detected based on their name (3-letter code) and number of atoms (more than 6 heavy atoms). Amino acid residues and nucleotides are excluded based on their residue name. Then, for each validated residue, the corresponding model (same 3-letter code as the validated residue) is retrieved from wwPDB CCD, and each motif of this residue is validated against the model.&lt;br /&gt;
&lt;br /&gt;
ValidatorDB is then built as the collection of validation results for all motifs of all residues in all PDB entries(Figure 1A).&lt;br /&gt;
The validation of each motif against the model residue can be illustrated on a galactose (GAL)motif from the PDB entry 1bzw&lt;br /&gt;
(Figure 1B). The validated residue GAL is extracted form PDB entry 1bzw in the form of an input motif , which contains all the atoms of the validated residue, together with all atoms found within one or two bonds of any atom from the validated residue&lt;br /&gt;
(surroundings). Then, by superimposing the input motif and model residue, the validated motif is obtained as the subset of atoms in the input motif which have a correspondent atom in the model residue. Comparing each atom and bond in the validated motif to those in the model residue produces the validation results.&lt;br /&gt;
&lt;br /&gt;
==Validation results==&lt;br /&gt;
For each validated motif, ValidatorDB contains several types of results. Since the evaluation of the validated motif relies on comparing all atoms and bonds in the validated motif to those in the model residue, the first results that can be encountered are errors. Namely:&lt;br /&gt;
&lt;br /&gt;
*Missing atoms: an atom in the model residue has no corresponding  atom in the validated motif.&lt;br /&gt;
&lt;br /&gt;
*Missing rings: at least one missing atom originates from cycles (rings).&lt;br /&gt;
&lt;br /&gt;
*Wrong chirality: an atom from the validated motif has different chirality than the corresponding atom from the model residue.&lt;br /&gt;
&lt;br /&gt;
*Wrong chirality (planar): the chirality error was found on a planar chiral center. Because of their spacial distribution, planar chiral centers are very sensitive even to small perturbations in the position of the substituents. Therefore, some of the errors reported here might not be significant.&lt;br /&gt;
&lt;br /&gt;
*Uncertain chirality: the presence of unusual bonds may cause an improper evaluation of chirality.&lt;br /&gt;
&lt;br /&gt;
Chirality is only evaluated for those motifs which are complete. This is because the absence of some atoms can prevent the proper evaluation of chirality on the chiral centers present in the validated motif. Therefore, note that all motifs which are counted in the Wrong chirality category are in fact complete. At the same time, the motifs with no missing atoms and no chirality error are actually counted in a category called Correct chirality.&lt;br /&gt;
&lt;br /&gt;
--------------------------&lt;br /&gt;
Suspicious discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue are reported as warnings. Namely:&lt;br /&gt;
&lt;br /&gt;
*Substitution: an atom from the validated motif is of a different chemical element than the corresponding atom in the model residue (e.g. O mapped to N). This happens often at linkage sites.&lt;br /&gt;
&lt;br /&gt;
*Different naming: an atom from the validated motif has a different PDB atom name than the corresponding atom from the model residue (e.g. the C1 atom mapped to the C7 atom). This happens often when the original PDB files were produced by different software.&lt;br /&gt;
&lt;br /&gt;
*Foreign atom: an atom from the model residue was mapped to an atom from outside the validated residue (i.e. from its surroundings).&lt;br /&gt;
&lt;br /&gt;
*Alternate locations: in the original PDB file, the validated residue contains atoms which were given in alternate locations (i.e., most probably different rotamers). Only the first rotamer was considered during validation.&lt;br /&gt;
&lt;br /&gt;
*Zero model RMSD: the superimposition between the model residue and the validated motif has a root mean square deviation of zero, i.e., the validated motif is identical to the model residue used as reference.&lt;br /&gt;
&lt;br /&gt;
Disabling discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue are reported as&lt;br /&gt;
processing errors, and such motifs are not validated.&lt;br /&gt;
&lt;br /&gt;
Typical validation results that can be found in ValidatorDB are illustrated on the galactose motif mentioned in section 2.6(Fig 1C). As a general rule, in the ValidatorDB interface, errors are marked in red (missing atoms) or dark yellow (wrong chirality), correct structures in green, and warnings in cyan.&lt;br /&gt;
&lt;br /&gt;
==Database contents==&lt;br /&gt;
ValidatorDB contains precomputed validation results for ligands and residues in the Protein Data Bank. The database is updated on a weekly basis. The validation is performed using Validator, and the residue models from wwPDB CCD are used as reference templates for validation. All residues of significant size (a minimum of 6 heavy atoms) have been included in ValidatorDB, with the exception of amino acids and nucleotides, which are checked thoroughly upon submission of the structure to the PDB, and thus do not require additional validation.&lt;br /&gt;
&lt;br /&gt;
The validation results available in ValidatorDB inform whether each motif (occurrence, instance) of a ligand or residue in the PDB exhibits the appropriate topology and stereochemistry expected from its annotation (3-letter code), or how it differs from this annotation. Additionally, all issues related to incorrect or suspicious topology and stereochemistry are explicitly described in a comprehensive and intuitive manner (e.g., location of missing atoms or chirality inversions).&lt;br /&gt;
&lt;br /&gt;
ValidatorDB is organized on two main levels, namely PDB-wide results (synopsis page), and results restricted to specific residues of interest (specifics page). The two levels present the same type of validation results (as described in section 2.7), although the available features differ to some extent (e.g., the specifics page allows 3D visualization of motifs). We shall describe each level of the database in detail below.&lt;br /&gt;
&lt;br /&gt;
==Synopsis page==&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB synopsis page(Figures1A, 3) contains a brief description of ValidatorDB, along with information about the last database update (date and number of structures that have been processed during the validation). Specifically, in May 2014, over 100,000 PDB entries had been processed, containing over 230,000 motifs of 17,000 residues relevant for validation.&lt;br /&gt;
Additionally, the synopsis page allows to access the validation results for specific residues of interest via the LookUp bar&lt;br /&gt;
(Figure 1A). Simply type a comma separated list of residue names (3-letter codes) into the LookUp bar, and you will be redirected to the specifics page containing validation results for the residues you requested. If you specify a list of PDB IDs (4-letter codes)instead, then the corresponding specifics page will contain validation results for all relevant residues and ligands in the PDB entries you specified. See section 3.2 for a description of the contents of the specifics page, and how to interpret these contents. The ValidatorDB synopsis page further provides access to various data sets of PDB-wide validations via 3 different tabs, namely Overview, Details by Residue, and Details by PDB entry. A full description of each of these tab is given below (sections 2.1.1-2.1.3). &lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
The Overview tab of the synopsis page provides a very general statistical evaluation of results across the entire PDB in graphical form (Figures 1A,3A). The elements of the graph represent percentages of the total number of motifs (over 200,000) of residues relevant for validation. A graphic element will be displayed in the Overview graph only if it represents at least 0.5% of the total number of motifs. Each element of the graph is described in a tool tip, but note that here the term residue actually refers to occurrence of residue(motif).&lt;br /&gt;
&lt;br /&gt;
The elements of the graph can be assigned to roughly 6 categories, depending on which kind of information they contain (e.g., incomplete residue, chirality issues, warnings, etc.). The categories are marked by different colors (Figure 3A). Most of the graph elements have been explained in section 3.7 of this manual. The additional elements are Analyzed, which refers to the total number of motifs that could be processed, Missing Atoms or Rings, which is the sum of Missing (Only) Atoms and Missing Rings, and Has All Atoms and Rings, which is the total number of complete residues. &lt;br /&gt;
&lt;br /&gt;
====Details by Residue====&lt;br /&gt;
&lt;br /&gt;
The Details by Residue tab (Figure 3B) contains an interactive table summarizing the results for each residue validated across the entire PDB. Each row corresponds to one residue, identified by its residue name (3-letter code). The information in the table is organized according to the validation results as presented in section 2.7 of this manual. The color coding for the table header and the font inside the table is the same as in the categories defined in the Overview tab. Each element of the table header is described in a tool tip, but note that here the term residue actually refers to occurrence of residue (motif).&lt;br /&gt;
&lt;br /&gt;
The table is interactive. Clicking on any element in the table header allows to sort the table entries according to that element. Click on any residue name in order to access the ValidatorDB specifics page with detailed validation results for that residue (see section 3.2).&lt;br /&gt;
&lt;br /&gt;
The filter at the top right corner allows to retrieve the table row with a specific residue. Simply type the residue name into the filter. All results can be downloaded in .csv format using the download button at the top left corner.&lt;br /&gt;
&lt;br /&gt;
====Details by PDB entry====&lt;br /&gt;
&lt;br /&gt;
The Details by PDB Entry tab (Figure 3C) contains an interactive table summarizing the results for all residues validated in each PDB entry. Each row corresponds to one PDB entry, identified by its PDB ID (4-letter code). The information in the table is organized according to the validation results as presented in section 2.7 of this manual. The color coding for the table header and the font inside the table is the same as in the categories defined in the Overview tab. Each element of the table header is described in a tool tip, but note that here the term residue actually refers to occurrence of residue (motif).&lt;br /&gt;
&lt;br /&gt;
The table is interactive. Clicking on any element in the table header allows to sort the table entries according to that element. Click on any PDB in order to access the ValidatorDB specifics page with detailed validation results for all residues in that PDB entry (see section 3.2).&lt;br /&gt;
&lt;br /&gt;
The filter at the top right corner allows to retrieve the table rows with a specific residue, or the table rows with selected PDB IDs. Simply type the residue name or PDB ID into the filter. All results can be downloaded in .csv format using the download button at the top left corner.&lt;br /&gt;
&lt;br /&gt;
==Specifics page==&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB specifics page is accessible from the synopsis page, either via the LookUp bar on the Overview tab (Figure 1A), or via the residue names and PDB IDs in the interactive tables on the tabs Details by Residue(Figure 3B) and Details by PDB Entry (Figure 3C), respectively. Depending on how it was accessed, the specifics page might retrieve validation results for one or more residues, a fact mentioned at the very top of the page(Figure 1B).&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB specifics page (Figures 1B,4,5)provides a straightforward report of the validation results, including a summary and detailed information in both tabular and graphical form, along with a 3D structure visualizer for closer inspection of the problematic structures. These reports are accessible via several tabs on the specifics page, namely Summary, Details, Processing Errors/Warnings, and Overview. These tabs will be described in detail in sections 3.2.1 - 3.2.4.Inspecting the tabular and graphical validation reports accessible on the specifics page is the most comfortable and effective way to evaluate the results. Additionally, you may use the JSON Data download button at the top right corner of the specifics page in order to download the complete validation reports and perform any additional analyses on your own.&lt;br /&gt;
&lt;br /&gt;
====Summary====&lt;br /&gt;
&lt;br /&gt;
On the ValidatorDB specifics page, the first view of the results is available in the Summary tab (Figures 1 B,4A). For each validated residue, the Summary tab provides an overview of potential issues encountered, as described in section 2.7. &lt;br /&gt;
&lt;br /&gt;
If more than one residue were validated in one run, a list of these residues will be at the top of the page. In order to examine the validation summary for each residue, you will need to either click on that specific residue in the list, or just scroll down the page till you reach it. Each validated residue is identified by its 3-letter code, as well as its chemical formula and common name. Validation statistics are given as absolute numbers and percentages over all the motifs that were processed for each residue.&lt;br /&gt;
&lt;br /&gt;
The table with the validation report is organized into two main sections, referring to incomplete(Missing Atoms or Rings) and complete structures (With All Atoms and Rings) respectively. The formal distinction between ring atoms and non-ring atoms (simply denoted as atoms ) is meant to allow a quick localization of potential issues in residues containing rings, especially where atom identifiers are not useful. Chirality is evaluated only for the complete structures, since the absence of some atoms makes it difficult to check the chirality of some of the remaining atoms. Further, the problematic atoms are highlighted, in order to better localize the problems in the structures.&lt;br /&gt;
&lt;br /&gt;
Last, a 2D representation of the model residue, and a pie chart with the validation results are provided for visual representation purposes. You can download them via the small icon at the top right corner of the chart, and later use them in your presentations.&lt;br /&gt;
&lt;br /&gt;
====Details====&lt;br /&gt;
&lt;br /&gt;
Whereas the Summary tab provides statistics of the issues over all validated motifs for each validated residue, the Details tab of the ValidatorDB specifics page allows you to inspect the issues in select groups of motifs, and further in each individual motif(Figure 5A). Note that you may also access the details of any particular group of motifs also by clicking on a specific issue in any Summary tab table.&lt;br /&gt;
&lt;br /&gt;
The Details tab is organized into a table where each row contains information regarding a single validated motif. The content of the table (i.e., which motifs are included, and what information is displayed) is dictated by the values of three selection fields at the top of the table. Click on the first field, and select the validated residue by its name (3-letter code) from the drop down menu. Only the motifs that were matched to that residue name will be displayed in the table. Click on the second field and select the type of issue (e.g., wrong chirality) from the drop down menu. Only the motifs which exhibit that type of issue will be displayed in the table. The number of motifs that fit each selection is given in brackets. If you want to make your selection even more specific, use the selection filed Id filter.&lt;br /&gt;
&lt;br /&gt;
Which table columns are filled depend mostly on the type of issue selected in the filter. The most important columns are Id, Issues/Warnings, Missing atoms/rings, Atoms, Processing warnings. The other columns give additional information, usually helpful in identifying the source of the error in the structure. The column Id refers to a unique identifier assigned to each motif in order to keep a transparent trace of the motif&#039;s origin, as it contains the PDB ID, as well as the serial index of the first atom in the motif, as it appears in the original PDB entry. The column Issues/Warnings reports the number of issues or warnings found for each particular motif. The column Missing atoms/rings explains which atoms are missing in each validated motif, whereas Atoms shows the position of incorrect chirality. Missing atoms are  listed by their atom identifier in the model, whereas atoms with wrong chirality are listed by their identifier in the validated motif. Clicking on a column header allows to sort the motifs according to the property specified in the header.&lt;br /&gt;
&lt;br /&gt;
====3D visualization====&lt;br /&gt;
The 3D viewer implemented in the ValidatorDB interface offers one step further in the analysis of each individual validated motif, and is accessible via the Details tab on the specifics page(Figure 5B). In the table, simply click on the Id of a motif of interest in order to open the 3D viewer, where you can inspect the structural inaccuracies more closely. Here you will be able to view and manipulate with the 3D representations of the validated motif and model residue, to help you better assess the position and relevance of the structural issues found during validation. Additionally, a 2D representation of the model is provided for clarity, which is especially helpful for larger motifs. Basic information about the validated motif is also given, along with a complete report of the validation results, where all the potential issues are listed.&lt;br /&gt;
&lt;br /&gt;
====Processing warnings and processing errors====&lt;br /&gt;
&lt;br /&gt;
The validation reports in ValidatorDB also mention various unusual aspects encountered during validation. Sometimes the processed PDB entries contain information that is ambiguous, conflicting or which deviates strongly from the expected reference. ValidatorDB reports such events as processing warnings or processing errors, depending on the severity of the deviations. Such information can be found in the Processing Errors/Warnings tab on the specifics page. The selection field at the top of the page helps filter the warnings and errors. Simply click on the drop down menu and select the category of warnings or errors that you would like to explore. Processing warnings are issues that may cause incorrect Validation, such as atoms that are too close in the 3D space, or unusual bond lengths given by the CONECT records. ValidatorDB typically reports several kinds of warnings: substitutions, foreign atoms, different naming, alternate locations and zero model RMSD, planar chiral center, unusual bond lengths, etc. It is always good to check and make sure that negative validation results (e.g., missing atoms) are not in fact caused by ignoring some atoms in an ill-formed structure.&lt;br /&gt;
&lt;br /&gt;
Processing errors are major issues preventing the finalization of the validation, such as parts of the residue which are completely disconnected from the rest of the structure, probably due to missing atoms at multiple locations throughout the structure. Any major errors in the input file, such as atoms that are completely disconnected from the rest of the structure, are reported as processing errors, and these structures are not processed at all.&lt;br /&gt;
&lt;br /&gt;
It is important to note the difference between processing warnings and processing errors. A warning may simply lead to ignoring a faulty atom, but the motif is validated. On the other hand, a processing error prevents entire motifs from being validated, so you will not find these motifs in the statistics available on either the synopsis or specifics page. The number of motifs with processing errors can be easily calculated as the difference between total motifs of relevant residues in the PDB, and the number of analyzed motifs (currently around 2000 motifs, about 0.5% of relevant motifs in the PDB). Further, because ValidatorDB&lt;br /&gt;
automatically extracts all motifs of a relevant residue and assigns them a unique and informative motif Id, you will be able to easily find the motif in its original PDB entry, and explore it.&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
To keep consistency with the synopsis page, the specifics page also allows visualization of general validation statistics for a selected number of residues via the Overview tab. This representation is entirely compatible with that of the Overview tab on the synopsis page(Figure 5A), and in fact makes up a subset of that data set. All color coding conventions are kept, and tool tips provide descriptions of each graphical element.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB&amp;diff=262</id>
		<title>ValidatorDB</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=ValidatorDB&amp;diff=262"/>
		<updated>2014-06-26T00:01:12Z</updated>

		<summary type="html">&lt;p&gt;Dave: /* How to get around the web page */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
The advancement of research in structural biology has provided a large body of structural data deposited in various databases. One great example is the Protein Data Bank (PDB), which has been growing exponentially, and which currently consists of more than 100,000 structures of biomolecules and their complexes. Such large bodies of data, especially accumulated over a short period of time using high throughput techniques, will inherently be plagued by various problems.&lt;br /&gt;
&lt;br /&gt;
Validation arose as a major issue in the structural biology community when it became apparent that some published structures contained serious errors, and only sometimes it is properly explained(e.g., due to insufficient electron density in a certain area). Structural databases generally require that the new submissions be checked prior to acceptance. The tools employed for presubmission validations work fairly well for residues like amino acids or nucleotides. However, an essential step in the validation process is checking the ligand structure, because ligands play a key role in protein function, and also because they are the main source of errors in structures. Ligand validation, as well as the validation of uncommon residues, are very challenging tasks, because of the high diversity and nontriviality of their structure, and the general lack of information about correct structures. Therefore, software tools focused on ligand validation were developed relatively recently,&amp;lt;ref&amp;gt;Lütteke T, von der Lieth C-W. {BMC Bioinformatics} (2004) 5, 69.&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;Kleywegt GJ, Harris MR. Acta Crystallographica D. Biological Crystallography (2007) 63: 935–8.&amp;lt;/ref&amp;gt;, and the topic is still under active development&amp;lt;ref&amp;gt;ftp://ftp.ebi.ac.uk/pub/databases/pdb/validation_reports/&amp;lt;/ref&amp;gt;. These tools are able to validate one or more structures (even thousands of structures), but they are not able to provide the broad scientific community with a more complex image of the quality of structures in dedicated and well established structural databases. For example, a general overview and corresponding statistical evaluation of validation results for residues and ligands in the entire PDB is not yet available, despite the exponential growth of the PDB and the development of structural validation tools in recent years.&lt;br /&gt;
&lt;br /&gt;
We had recently developed MotiveValidator&amp;lt;ref&amp;gt;Svobodová Vařeková R, Jaiswal D, Sehnal D, Ionescu CM, Geidl S, Pravda L, Horský V, Wimmerová M, Koca J, Nucleic Acids Research (2014) doi:10.1093/nar/gku426&amp;lt;/ref&amp;gt;, an interactive platform for the speedy validation of ligands, residues and fragments using a novel, straightforward approach based on the validation of residue annotation. MotiveValidator employs advanced algorithms for the detection and comparison of structural motifs&amp;lt;ref&amp;gt;Sehnal D, Svobodová Vařeková R, Huber HJ, Geidl S, Ionescu CM, Wimmerová M, Koca J, Journal of Chemical Information and Modeling 52(2), (2012): 343-359&amp;lt;/ref&amp;gt;, along with tools for chirality verification&amp;lt;ref&amp;gt;O&#039;Boyle NM, Banck M, James CA, Morley C, Vandermeersch T, Hutchison GR, Journal of Chemoinformatics 3, (2011): 33&amp;lt;/ref&amp;gt; and interactive visualization of 3D structures &amp;lt;ref&amp;gt;http://www.chemdoodle.com&amp;lt;/ref&amp;gt;. Using MotiveValidator, we further created ValidatorDB, a comprehensive resource of validation results for residues and ligands in the Protein Data Bank. Along with validation results for individual residues and ligands, ValidatorDB also provides a summary and statistical evaluation of the validation results at various levels of detail within the PDB. Thus, ValidatorDB offers a comprehensive overview of the quality of the ligand structures in the entire PDB. ValidatorDB contains precomputed validation results for ligands and residues in the Protein Data Bank. The database is updated on a weekly basis.&lt;br /&gt;
&lt;br /&gt;
The residues deemed relevant for validation are all ligands and residues with reasonable size (more than six heavy atoms), with the exception of standard amino acids and nucleotides. The validation is performed using MotiveValidator, and the residue models from wwPDB Chemical Component Dictionary (wwPDB CCD) are used as reference structures for validation. &lt;br /&gt;
&lt;br /&gt;
==Availability and technical details==&lt;br /&gt;
&lt;br /&gt;
===Where to find ValidatorDB===&lt;br /&gt;
ValidatorDB is freely available online since May 2014 at http://ncbr.muni.cz/MotiveValidatorDB. There is no login requirement for accessing ValidatorDB.&lt;br /&gt;
&lt;br /&gt;
===What you need in order to access ValidatorDB===&lt;br /&gt;
ValidatorDB is basically a database, or rather a collection of validation results for ligands and residues in Protein Data Bank. The database is maintained at the National Centre for Biomolecular Research within Masaryk University, Czech Republic, and updated weekly. All you need in order to access ValidatorDB is an internet browser and has JavaScript enabled. The only functionality that relies on your system is the display of 3D models, for which your browser will need to support WebGL. If you experience trouble displaying the 3D models, please check http://get.webgl.org in order to find out how to enable WebGL on your system.&lt;br /&gt;
&lt;br /&gt;
===How to get around the web page===&lt;br /&gt;
&lt;br /&gt;
As soon as you type in the address http://ncbr.muni.cz/ValidatorDB, you will reach the ValidatorDB synopsis page, which contains a brief, general description of ValidatorDB, along with 3 tabs. The different tabs on the ValidatorDB synopsis page provide access to overviews and statistical evaluation of validation results for the entire PDB, for each residue across all PDB IDs containing that residue, and for all analyzed residues in each PDB ID, in graphical or tabular form. Click on each tab to discover what type of overview can be accessed. Further, the ValidatorDB specifics page, which is accessible by looking up specific residues or PDB IDs in the synopsis page, allows to view the results for selected residues in more detail. The specifics page is also organized into tabs that allow different levels of analysis of the results. Last but not least, remember to check the tool tips by hovering the mouse cursor over any graphical or textual element in the ValidatorDB interface.&lt;br /&gt;
&lt;br /&gt;
 Before moving on to more extensive descriptions of features, it is important to clearly establish the meaning of a few key terms and principles within the ValidatorDB environment. See  [[MotiveValidator:Terminology|Terminology]]&lt;br /&gt;
&lt;br /&gt;
==Basic Principles==&lt;br /&gt;
&lt;br /&gt;
===Residues and ligands relevant for validation===&lt;br /&gt;
&lt;br /&gt;
As mentioned in section 1, well studied residues like amino acids and nucleotides are routinely validated upon submission of new structures to the PDB. Furthermore, reports of the quality of their structure are already accessible. The challenge addressed by&lt;br /&gt;
ValidatorDB lies in providing access to validation results for residues other than the well studied amino acids and nucleotides. This generally includes ligands and uncommon residues (e.g. substituted amino acids), which exhibit high diversity and nontriviality in their structure, and for which there is generally much less information regarding correct structures. Thus, within the ValidatorDB environment, we further refine the meaning of the terms residue and ligand to refer to residues and ligands relevant for validation. Specifically, these are all ligands and residues with reasonable size (more than six heavy atoms), with the exception of amino acids and nucleotides. All other features of the terms residue and ligand described in sections 2.1 and 2.2 are maintained. Henceforth, all references to residues and ligands in the ValidatorDB web pages (including Wiki and tutorial) have the meaning of residues and ligands relevant for validation. The PDB currently holds over 170,00 residues and ligands relevant for validation.&lt;br /&gt;
&lt;br /&gt;
===Validation===&lt;br /&gt;
[[File:VDB_manual_figures2.png|thumb|right|Validation process: figure 1]]&lt;br /&gt;
As stated in section, the validation results stored in ValidatorDB are updated every week. Within the ValidatorDB environment, the term validation refers to the process of determining whether a residue or ligand is structurally complete and correctly annotated. This means checking if the topology and chirality of each motif of a validated residue (section 2.4) correspond to those of the model residue (section 2.5) with the same name as the validated residue.&lt;br /&gt;
The validation of residues and ligands in the entire PDB takes place in a few distinct steps. First, for each PDB entry, the residues which are relevant for validation are detected based on their name (3-letter code) and number of atoms (more than 6 heavy atoms). Amino acid residues and nucleotides are excluded based on their residue name. Then, for each validated residue, the corresponding model (same 3-letter code as the validated residue) is retrieved from wwPDB CCD, and each motif of this residue is validated against the model.&lt;br /&gt;
&lt;br /&gt;
ValidatorDB is then built as the collection of validation results for all motifs of all residues in all PDB entries(Figure 1A).&lt;br /&gt;
The validation of each motif against the model residue can be illustrated on a galactose (GAL)motif from the PDB entry 1bzw&lt;br /&gt;
(Figure 1B). The validated residue GAL is extracted form PDB entry 1bzw in the form of an input motif , which contains all the atoms of the validated residue, together with all atoms found within one or two bonds of any atom from the validated residue&lt;br /&gt;
(surroundings). Then, by superimposing the input motif and model residue, the validated motif is obtained as the subset of atoms in the input motif which have a correspondent atom in the model residue. Comparing each atom and bond in the validated motif to those in the model residue produces the validation results.&lt;br /&gt;
&lt;br /&gt;
==Validation results==&lt;br /&gt;
For each validated motif, ValidatorDB contains several types of results. Since the evaluation of the validated motif relies on comparing all atoms and bonds in the validated motif to those in the model residue, the first results that can be encountered are errors. Namely:&lt;br /&gt;
&lt;br /&gt;
*Missing atoms: an atom in the model residue has no corresponding  atom in the validated motif.&lt;br /&gt;
&lt;br /&gt;
*Missing rings: at least one missing atom originates from cycles (rings).&lt;br /&gt;
&lt;br /&gt;
*Wrong chirality: an atom from the validated motif has different chirality than the corresponding atom from the model residue.&lt;br /&gt;
&lt;br /&gt;
*Wrong chirality (planar): the chirality error was found on a planar chiral center. Because of their spacial distribution, planar chiral centers are very sensitive even to small perturbations in the position of the substituents. Therefore, some of the errors reported here might not be significant.&lt;br /&gt;
&lt;br /&gt;
*Uncertain chirality: the presence of unusual bonds may cause an improper evaluation of chirality.&lt;br /&gt;
&lt;br /&gt;
Chirality is only evaluated for those motifs which are complete. This is because the absence of some atoms can prevent the proper evaluation of chirality on the chiral centers present in the validated motif. Therefore, note that all motifs which are counted in the Wrong chirality category are in fact complete. At the same time, the motifs with no missing atoms and no chirality error are actually counted in a category called Correct chirality.&lt;br /&gt;
&lt;br /&gt;
--------------------------&lt;br /&gt;
Suspicious discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue are reported as warnings. Namely:&lt;br /&gt;
&lt;br /&gt;
*Substitution: an atom from the validated motif is of a different chemical element than the corresponding atom in the model residue (e.g. O mapped to N). This happens often at linkage sites.&lt;br /&gt;
&lt;br /&gt;
*Different naming: an atom from the validated motif has a different PDB atom name than the corresponding atom from the model residue (e.g. the C1 atom mapped to the C7 atom). This happens often when the original PDB files were produced by different software.&lt;br /&gt;
&lt;br /&gt;
*Foreign atom: an atom from the model residue was mapped to an atom from outside the validated residue (i.e. from its surroundings).&lt;br /&gt;
&lt;br /&gt;
*Alternate locations: in the original PDB file, the validated residue contains atoms which were given in alternate locations (i.e., most probably different rotamers). Only the first rotamer was considered during validation.&lt;br /&gt;
&lt;br /&gt;
*Zero model RMSD: the superimposition between the model residue and the validated motif has a root mean square deviation of zero, i.e., the validated motif is identical to the model residue used as reference.&lt;br /&gt;
&lt;br /&gt;
Disabling discrepancies between the atoms and inter-atomic bonds in the validated motif and in the model residue are reported as&lt;br /&gt;
processing errors, and such motifs are not validated.&lt;br /&gt;
&lt;br /&gt;
Typical validation results that can be found in ValidatorDB are illustrated on the galactose motif mentioned in section 2.6(Fig 1C). As a general rule, in the ValidatorDB interface, errors are marked in red (missing atoms) or dark yellow (wrong chirality), correct structures in green, and warnings in cyan.&lt;br /&gt;
&lt;br /&gt;
==Database contents==&lt;br /&gt;
ValidatorDB contains precomputed validation results for ligands and residues in the Protein Data Bank. The database is updated on a weekly basis. The validation is performed using Validator, and the residue models from wwPDB CCD are used as reference templates for validation. All residues of significant size (a minimum of 6 heavy atoms) have been included in ValidatorDB, with the exception of amino acids and nucleotides, which are checked thoroughly upon submission of the structure to the PDB, and thus do not require additional validation.&lt;br /&gt;
&lt;br /&gt;
The validation results available in ValidatorDB inform whether each motif (occurrence, instance) of a ligand or residue in the PDB exhibits the appropriate topology and stereochemistry expected from its annotation (3-letter code), or how it differs from this annotation. Additionally, all issues related to incorrect or suspicious topology and stereochemistry are explicitly described in a comprehensive and intuitive manner (e.g., location of missing atoms or chirality inversions).&lt;br /&gt;
&lt;br /&gt;
ValidatorDB is organized on two main levels, namely PDB-wide results (synopsis page), and results restricted to specific residues of interest (specifics page). The two levels present the same type of validation results (as described in section 2.7), although the available features differ to some extent (e.g., the specifics page allows 3D visualization of motifs). We shall describe each level of the database in detail below.&lt;br /&gt;
&lt;br /&gt;
==Synopsis page==&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB synopsis page(Figures1A, 3) contains a brief description of ValidatorDB, along with information about the last database update (date and number of structures that have been processed during the validation). Specifically, in May 2014, over 100,000 PDB entries had been processed, containing over 230,000 motifs of 17,000 residues relevant for validation.&lt;br /&gt;
Additionally, the synopsis page allows to access the validation results for specific residues of interest via the LookUp bar&lt;br /&gt;
(Figure 1A). Simply type a comma separated list of residue names (3-letter codes) into the LookUp bar, and you will be redirected to the specifics page containing validation results for the residues you requested. If you specify a list of PDB IDs (4-letter codes)instead, then the corresponding specifics page will contain validation results for all relevant residues and ligands in the PDB entries you specified. See section 3.2 for a description of the contents of the specifics page, and how to interpret these contents. The ValidatorDB synopsis page further provides access to various data sets of PDB-wide validations via 3 different tabs, namely Overview, Details by Residue, and Details by PDB entry. A full description of each of these tab is given below (sections 2.1.1-2.1.3). &lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
The Overview tab of the synopsis page provides a very general statistical evaluation of results across the entire PDB in graphical form (Figures 1A,3A). The elements of the graph represent percentages of the total number of motifs (over 200,000) of residues relevant for validation. A graphic element will be displayed in the Overview graph only if it represents at least 0.5% of the total number of motifs. Each element of the graph is described in a tool tip, but note that here the term residue actually refers to occurrence of residue(motif).&lt;br /&gt;
&lt;br /&gt;
The elements of the graph can be assigned to roughly 6 categories, depending on which kind of information they contain (e.g., incomplete residue, chirality issues, warnings, etc.). The categories are marked by different colors (Figure 3A). Most of the graph elements have been explained in section 3.7 of this manual. The additional elements are Analyzed, which refers to the total number of motifs that could be processed, Missing Atoms or Rings, which is the sum of Missing (Only) Atoms and Missing Rings, and Has All Atoms and Rings, which is the total number of complete residues. &lt;br /&gt;
&lt;br /&gt;
====Details by Residue====&lt;br /&gt;
&lt;br /&gt;
The Details by Residue tab (Figure 3B) contains an interactive table summarizing the results for each residue validated across the entire PDB. Each row corresponds to one residue, identified by its residue name (3-letter code). The information in the table is organized according to the validation results as presented in section 2.7 of this manual. The color coding for the table header and the font inside the table is the same as in the categories defined in the Overview tab. Each element of the table header is described in a tool tip, but note that here the term residue actually refers to occurrence of residue (motif).&lt;br /&gt;
&lt;br /&gt;
The table is interactive. Clicking on any element in the table header allows to sort the table entries according to that element. Click on any residue name in order to access the ValidatorDB specifics page with detailed validation results for that residue (see section 3.2).&lt;br /&gt;
&lt;br /&gt;
The filter at the top right corner allows to retrieve the table row with a specific residue. Simply type the residue name into the filter. All results can be downloaded in .csv format using the download button at the top left corner.&lt;br /&gt;
&lt;br /&gt;
====Details by PDB entry====&lt;br /&gt;
&lt;br /&gt;
The Details by PDB Entry tab (Figure 3C) contains an interactive table summarizing the results for all residues validated in each PDB entry. Each row corresponds to one PDB entry, identified by its PDB ID (4-letter code). The information in the table is organized according to the validation results as presented in section 2.7 of this manual. The color coding for the table header and the font inside the table is the same as in the categories defined in the Overview tab. Each element of the table header is described in a tool tip, but note that here the term residue actually refers to occurrence of residue (motif).&lt;br /&gt;
&lt;br /&gt;
The table is interactive. Clicking on any element in the table header allows to sort the table entries according to that element. Click on any PDB in order to access the ValidatorDB specifics page with detailed validation results for all residues in that PDB entry (see section 3.2).&lt;br /&gt;
&lt;br /&gt;
The filter at the top right corner allows to retrieve the table rows with a specific residue, or the table rows with selected PDB IDs. Simply type the residue name or PDB ID into the filter. All results can be downloaded in .csv format using the download button at the top left corner.&lt;br /&gt;
&lt;br /&gt;
==Specifics page==&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB specifics page is accessible from the synopsis page, either via the LookUp bar on the Overview tab (Figure 1A), or via the residue names and PDB IDs in the interactive tables on the tabs Details by Residue(Figure 3B) and Details by PDB Entry (Figure 3C), respectively. Depending on how it was accessed, the specifics page might retrieve validation results for one or more residues, a fact mentioned at the very top of the page(Figure 1B).&lt;br /&gt;
&lt;br /&gt;
The ValidatorDB specifics page (Figures 1B,4,5)provides a straightforward report of the validation results, including a summary and detailed information in both tabular and graphical form, along with a 3D structure visualizer for closer inspection of the problematic structures. These reports are accessible via several tabs on the specifics page, namely Summary, Details, Processing Errors/Warnings, and Overview. These tabs will be described in detail in sections 3.2.1 - 3.2.4.Inspecting the tabular and graphical validation reports accessible on the specifics page is the most comfortable and effective way to evaluate the results. Additionally, you may use the JSON Data download button at the top right corner of the specifics page in order to download the complete validation reports and perform any additional analyses on your own.&lt;br /&gt;
&lt;br /&gt;
====Summary====&lt;br /&gt;
&lt;br /&gt;
On the ValidatorDB specifics page, the first view of the results is available in the Summary tab (Figures 1 B,4A). For each validated residue, the Summary tab provides an overview of potential issues encountered, as described in section 2.7. &lt;br /&gt;
&lt;br /&gt;
If more than one residue were validated in one run, a list of these residues will be at the top of the page. In order to examine the validation summary for each residue, you will need to either click on that specific residue in the list, or just scroll down the page till you reach it. Each validated residue is identified by its 3-letter code, as well as its chemical formula and common name. Validation statistics are given as absolute numbers and percentages over all the motifs that were processed for each residue.&lt;br /&gt;
&lt;br /&gt;
The table with the validation report is organized into two main sections, referring to incomplete(Missing Atoms or Rings) and complete structures (With All Atoms and Rings) respectively. The formal distinction between ring atoms and non-ring atoms (simply denoted as atoms ) is meant to allow a quick localization of potential issues in residues containing rings, especially where atom identifiers are not useful. Chirality is evaluated only for the complete structures, since the absence of some atoms makes it difficult to check the chirality of some of the remaining atoms. Further, the problematic atoms are highlighted, in order to better localize the problems in the structures.&lt;br /&gt;
&lt;br /&gt;
Last, a 2D representation of the model residue, and a pie chart with the validation results are provided for visual representation purposes. You can download them via the small icon at the top right corner of the chart, and later use them in your presentations.&lt;br /&gt;
&lt;br /&gt;
====Details====&lt;br /&gt;
&lt;br /&gt;
Whereas the Summary tab provides statistics of the issues over all validated motifs for each validated residue, the Details tab of the ValidatorDB specifics page allows you to inspect the issues in select groups of motifs, and further in each individual motif(Figure 5A). Note that you may also access the details of any particular group of motifs also by clicking on a specific issue in any Summary tab table.&lt;br /&gt;
&lt;br /&gt;
The Details tab is organized into a table where each row contains information regarding a single validated motif. The content of the table (i.e., which motifs are included, and what information is displayed) is dictated by the values of three selection fields at the top of the table. Click on the first field, and select the validated residue by its name (3-letter code) from the drop down menu. Only the motifs that were matched to that residue name will be displayed in the table. Click on the second field and select the type of issue (e.g., wrong chirality) from the drop down menu. Only the motifs which exhibit that type of issue will be displayed in the table. The number of motifs that fit each selection is given in brackets. If you want to make your selection even more specific, use the selection filed Id filter.&lt;br /&gt;
&lt;br /&gt;
Which table columns are filled depend mostly on the type of issue selected in the filter. The most important columns are Id, Issues/Warnings, Missing atoms/rings, Atoms, Processing warnings. The other columns give additional information, usually helpful in identifying the source of the error in the structure. The column Id refers to a unique identifier assigned to each motif in order to keep a transparent trace of the motif&#039;s origin, as it contains the PDB ID, as well as the serial index of the first atom in the motif, as it appears in the original PDB entry. The column Issues/Warnings reports the number of issues or warnings found for each particular motif. The column Missing atoms/rings explains which atoms are missing in each validated motif, whereas Atoms shows the position of incorrect chirality. Missing atoms are  listed by their atom identifier in the model, whereas atoms with wrong chirality are listed by their identifier in the validated motif. Clicking on a column header allows to sort the motifs according to the property specified in the header.&lt;br /&gt;
&lt;br /&gt;
====3D visualization====&lt;br /&gt;
The 3D viewer implemented in the ValidatorDB interface offers one step further in the analysis of each individual validated motif, and is accessible via the Details tab on the specifics page(Figure 5B). In the table, simply click on the Id of a motif of interest in order to open the 3D viewer, where you can inspect the structural inaccuracies more closely. Here you will be able to view and manipulate with the 3D representations of the validated motif and model residue, to help you better assess the position and relevance of the structural issues found during validation. Additionally, a 2D representation of the model is provided for clarity, which is especially helpful for larger motifs. Basic information about the validated motif is also given, along with a complete report of the validation results, where all the potential issues are listed.&lt;br /&gt;
&lt;br /&gt;
====Processing warnings and processing errors====&lt;br /&gt;
&lt;br /&gt;
The validation reports in ValidatorDB also mention various unusual aspects encountered during validation. Sometimes the processed PDB entries contain information that is ambiguous, conflicting or which deviates strongly from the expected reference. ValidatorDB reports such events as processing warnings or processing errors, depending on the severity of the deviations. Such information can be found in the Processing Errors/Warnings tab on the specifics page. The selection field at the top of the page helps filter the warnings and errors. Simply click on the drop down menu and select the category of warnings or errors that you would like to explore. Processing warnings are issues that may cause incorrect Validation, such as atoms that are too close in the 3D space, or unusual bond lengths given by the CONECT records. ValidatorDB typically reports several kinds of warnings: substitutions, foreign atoms, different naming, alternate locations and zero model RMSD, planar chiral center, unusual bond lengths, etc. It is always good to check and make sure that negative validation results (e.g., missing atoms) are not in fact caused by ignoring some atoms in an ill-formed structure.&lt;br /&gt;
&lt;br /&gt;
Processing errors are major issues preventing the finalization of the validation, such as parts of the residue which are completely disconnected from the rest of the structure, probably due to missing atoms at multiple locations throughout the structure. Any major errors in the input file, such as atoms that are completely disconnected from the rest of the structure, are reported as processing errors, and these structures are not processed at all.&lt;br /&gt;
&lt;br /&gt;
It is important to note the difference between processing warnings and processing errors. A warning may simply lead to ignoring a faulty atom, but the motif is validated. On the other hand, a processing error prevents entire motifs from being validated, so you will not find these motifs in the statistics available on either the synopsis or specifics page. The number of motifs with processing errors can be easily calculated as the difference between total motifs of relevant residues in the PDB, and the number of analyzed motifs (currently around 2000 motifs, about 0.5% of relevant motifs in the PDB). Further, because ValidatorDB&lt;br /&gt;
automatically extracts all motifs of a relevant residue and assigns them a unique and informative motif Id, you will be able to easily find the motif in its original PDB entry, and explore it.&lt;br /&gt;
&lt;br /&gt;
====Overview====&lt;br /&gt;
&lt;br /&gt;
To keep consistency with the synopsis page, the specifics page also allows visualization of general validation statistics for a selected number of residues via the Overview tab. This representation is entirely compatible with that of the Overview tab on the synopsis page(Figure 5A), and in fact makes up a subset of that data set. All color coding conventions are kept, and tool tips provide descriptions of each graphical element.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
	<entry>
		<id>https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Use_Cases&amp;diff=138</id>
		<title>PatternQuery:Use Cases</title>
		<link rel="alternate" type="text/html" href="https://webchemwiki.biodata.ceitec.cz/index.php?title=PatternQuery:Use_Cases&amp;diff=138"/>
		<updated>2014-06-11T15:27:02Z</updated>

		<summary type="html">&lt;p&gt;Dave: Dave moved page MotiveQuery: Use Cases to MotiveQuery:Use Cases without leaving a redirect&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;toclimit-4&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Statement of purpose==&lt;br /&gt;
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 [[MotiveQuery_Language_Reference | wiki pages]].  &#039;&#039;&#039;This is not the exhaustive list of queries there are new features to come in the next version.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
In order to tune up your queries or just to try an interactive work with the language, feel free to use [http://webchem.ncbr.muni.cz/Platform/App/MotiveExplorer 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 [http://www.microsoft.com/silverlight/ Silverlight] framework installed. It has been tested under Windows and Mac OS operating systems.&lt;br /&gt;
&lt;br /&gt;
==How to read following text==&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
Each query looks like this:&lt;br /&gt;
===Name of the query()===&lt;br /&gt;
*&#039;&#039;&#039;[PDB ID]&#039;&#039;&#039; Here you find an example PDB ID where you can try out the query with MotiveExplorer and a rough description of the query function.&lt;br /&gt;
* This is followed by examples of this query with with the explanation such as &amp;lt;code&amp;gt;Residues(&amp;quot;HEM&amp;quot;)&amp;lt;/code&amp;gt;. Copy this query to the command text box in Motive Explorer application and immediately see the results.&lt;br /&gt;
* Type of data query operate on and the expected returned value.&lt;br /&gt;
* e.g. &#039;&#039;Type: Atoms(symbols: String*) -&amp;gt; Atoms&#039;&#039;. query Atoms() take 0..n strings in parenthesis (&amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, etc.) and based on the input returns a list of individual atoms.&lt;br /&gt;
&lt;br /&gt;
==Terminology==&lt;br /&gt;
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.   &lt;br /&gt;
&lt;br /&gt;
=Queries=&lt;br /&gt;
&lt;br /&gt;
==Atoms==&lt;br /&gt;
=== Basic queries ===&lt;br /&gt;
====Atoms()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence 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.&lt;br /&gt;
*&amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;)&amp;lt;/code&amp;gt; - Returns all iron atoms in the given structure.&lt;br /&gt;
*&amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;, &amp;quot;N&amp;quot;)&amp;lt;/code&amp;gt; - Returns all iron and nitrogen atoms in the given structure.&lt;br /&gt;
* &#039;&#039;Type: Atoms(symbols: String*) -&amp;gt; Atoms.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====AtomNames()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of atoms with defined name or names.&lt;br /&gt;
* &amp;lt;code&amp;gt;AtomNames(&amp;quot;CA&amp;quot;)&amp;lt;/code&amp;gt; – Returns all CA atoms.&lt;br /&gt;
* &amp;lt;code&amp;gt;AtomNames(&amp;quot;CA&amp;quot;, &amp;quot;N&amp;quot;)&amp;lt;/code&amp;gt; –Returns atoms with names CA (Cα carbon) or N (terminal part of amino acids).&lt;br /&gt;
* &#039;&#039;Type: AtomNames(names: String+) -&amp;gt; Atoms.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====AtomIds()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of atoms with given id or ids&lt;br /&gt;
* &amp;lt;code&amp;gt;AtomIds(1)&amp;lt;/code&amp;gt; – Returns atom with id=1 from the given structures.&lt;br /&gt;
* &amp;lt;code&amp;gt;AtomIds(1,2,5) &amp;lt;/code&amp;gt;- Returns atoms with id=1, 2 and 5 from the given structures.&lt;br /&gt;
* &#039;&#039;Type: AtomIds(ids: Integer+) -&amp;gt; Atoms.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====AtomIdRange()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of atoms with ids from a given range (inclusive specified indices).&lt;br /&gt;
* &amp;lt;code&amp;gt;AtomIdRange(1, 10)&amp;lt;/code&amp;gt; – returns 10 atoms with IDs from the interval &amp;lt;1, 10&amp;gt;, as specified in the input file.&lt;br /&gt;
* &#039;&#039;Type: AtomIdRange(minId: Integer, maxId: ?Integer) -&amp;gt; Atoms&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====NotAtomNames()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of atoms which are not defined by an argument.&lt;br /&gt;
* &amp;lt;code&amp;gt;NotAtomNames(&amp;quot;C&amp;quot;, &amp;quot;N&amp;quot;, &amp;quot;CA&amp;quot;, &amp;quot;O&amp;quot;)&amp;lt;/code&amp;gt; – returns all the atoms with names other than C, CA, N and O.  i.e. only the side chain atoms of the protein .&lt;br /&gt;
* &#039;&#039;Type: NotAtomNames(names: String+) -&amp;gt; Atom.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====NotAtomIds()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of atoms which does not have a defined id&lt;br /&gt;
* &amp;lt;code&amp;gt;NotAtomIds(1)&amp;lt;/code&amp;gt; - Returns atom with id other but 1 from the given structures.&lt;br /&gt;
* &amp;lt;code&amp;gt;NotAtomIds(1,2,5)&amp;lt;/code&amp;gt; - Returns atoms with id other but 1,2 and 5 from the given structures.&lt;br /&gt;
* &#039;&#039;Type: NotAtomIds(ids: Integer+) -&amp;gt; Atoms.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====NotAtoms()====&lt;br /&gt;
* &#039;&#039;[2hhb]&#039;&#039; Returns all the atoms not specified in the argument. More elements can be specified, if separated by a comma.&lt;br /&gt;
* &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;)&amp;lt;/code&amp;gt; – returns all the atoms of the structure, but iron.&lt;br /&gt;
* &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;, &amp;quot;N&amp;quot;)&amp;lt;/code&amp;gt; returns all the atoms of the structure, but iron and nitrogen. &lt;br /&gt;
* &#039;&#039;Type: NotAtoms(symbols: String+) -&amp;gt; Atoms.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====RingAtoms()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns specified atoms found on detected rings .&lt;br /&gt;
* &amp;lt;code&amp;gt;RingAtoms(Atoms(&amp;quot;N&amp;quot;), Rings(2 * [&amp;quot;C&amp;quot;] + [&amp;quot;N&amp;quot;] + [&amp;quot;C&amp;quot;] + [&amp;quot;N&amp;quot;]))&amp;lt;/code&amp;gt; – Returns all the nitrogen atoms on the histidine sidechain.&lt;br /&gt;
* &#039;&#039;Type: RingAtoms(atom: Atoms, ring: ?Rings) -&amp;gt; Atoms.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Residues==&lt;br /&gt;
=== Basic queries===&lt;br /&gt;
====Residues()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of individual residues specified by a function argument. More residues can be specified, if separated by a comma.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;HEM&amp;quot;)&amp;lt;/code&amp;gt; – Returns a list of HEM residues.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues (&amp;quot;HEM&amp;quot;, &amp;quot;ALA&amp;quot;)&amp;lt;/code&amp;gt; – Returns a set of HEM and ALA residues.&lt;br /&gt;
* &#039;&#039;Type: Residues(names: Value*) -&amp;gt; Residues.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====NotResidues()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of residues which are not defined by the argument.&lt;br /&gt;
* &amp;lt;code&amp;gt;NotResidues(&amp;quot;HEM&amp;quot;)&amp;lt;/code&amp;gt; – returns a set of residues, which does not have a HEM in their name.&lt;br /&gt;
* &#039;&#039;Type: NotResidues(names: Value+) -&amp;gt; Residues.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====ResidueIds()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of specified residues in case the structure contains them. Each residue is represented by its PDB ID and chain such as “A 8”.&lt;br /&gt;
* &amp;lt;code&amp;gt;ResidueIds (&amp;quot;14 A&amp;quot;,  &amp;quot;15 A&amp;quot;)&amp;lt;/code&amp;gt; – Returns 14th  and 15th residue of chain A.&lt;br /&gt;
* &#039;&#039;Type: ResidueIds(ids: String+) -&amp;gt; Residues&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====ResidueIdRange()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a set of residues on a given chain from the lower to the upper index. In case a residue is not provided in the structure, it is skipped. &lt;br /&gt;
* &amp;lt;code&amp;gt;ResidueIdRange(&amp;quot;A&amp;quot;, 50,  100)&amp;lt;/code&amp;gt; – returns a set of residues on chain A from the ID 50 to 100. &lt;br /&gt;
* &#039;&#039;Type: ResidueIdRange(chain: String, min: Integer, max: Integer) -&amp;gt; Residues&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====NotAminoAcids()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of residues that are not among the 20 standard amino acids. Allowed values for an optional parameter NoWaters: True, False.&lt;br /&gt;
* &amp;lt;code&amp;gt;NotAminoAcids()&amp;lt;/code&amp;gt; – Returns all the nonstandard residues incorporated in the protein structure with the exception of HOH and WAT residues, which stands for solvent.&lt;br /&gt;
* &amp;lt;code&amp;gt;NotAminoAcids(NoWaters=False)&amp;lt;/code&amp;gt; – Returns all the nonstandard residues incorporated in the protein structure inclusive solvent (HOH and WAT residues).&lt;br /&gt;
* &#039;&#039;Type: NotAminoAcids() -&amp;gt; Residues&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====AminoAcids()====&lt;br /&gt;
*  &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of residues that are among the 20 standard amino acids.&lt;br /&gt;
* Allowed values: &amp;lt;code&amp;gt;Positive, Negative, Aromatic, Polar, NonPolar&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;AminoAcids()&amp;lt;/code&amp;gt; – Returns all standard amino acids.&lt;br /&gt;
* &amp;lt;code&amp;gt;AminoAcids(ChargeType=”Polar”)&amp;lt;/code&amp;gt; – Returns all polar amino acids based on the type of their side chain.&lt;br /&gt;
* &#039;&#039;Type: AminoAcids() -&amp;gt; Residues.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====HetResidues()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Returns a sequence of heteroatom residues as specified in input PDB files, excluding residues.&lt;br /&gt;
* &amp;lt;code&amp;gt;HetResidues()&amp;lt;/code&amp;gt; – A set of hetatom residues.&lt;br /&gt;
* &#039;&#039;Type: HetResidues() -&amp;gt; Residues&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Motives==&lt;br /&gt;
===Structure specification===&lt;br /&gt;
MQ can select residues or their parts based on their name or Id, however, the true power of MQ lies in its ability to utilize the chemical nature of the input structures and select motives purely based on elements and the connectivity among them.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Rings()====&lt;br /&gt;
* &#039;&#039;&#039;[3d12]&#039;&#039;&#039; Returns all the rings in the protein structure specified by a user.  Any structural ring can be identified by concatenating individual elements the string is composed from.&lt;br /&gt;
* &amp;lt;code&amp;gt;Rings(2 * [&amp;quot;C&amp;quot;] + [&amp;quot;N&amp;quot;] + [&amp;quot;C&amp;quot;] + [&amp;quot;N&amp;quot;])&amp;lt;/code&amp;gt; – Returns the histidine aromatic ring. &lt;br /&gt;
* &amp;lt;code&amp;gt;Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])&amp;lt;/code&amp;gt; – Returns pentose ring. &lt;br /&gt;
* &#039;&#039;Type: Rings(atoms: Value*) -&amp;gt; Ring&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====ToAtoms()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Converts the input motive into a sequence of individual atoms, i.e. each motive contains a single atom.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;HEM&amp;quot;).ToAtoms()&amp;lt;/code&amp;gt; – Returns all the atoms of HEM residues as a sequence of individual atoms.&lt;br /&gt;
* &#039;&#039;Type: ToAtoms(motives: Motives) -&amp;gt; Motives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====ToResidues()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Converts the input motive into a sequence of individual residues, i.e. It can either decompose a motif with multiple residues to a sequence of motives each containing a single residue, or if applied to a sequence of atoms merge atoms to a single motif per residue.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;HEM&amp;quot;).AmbientResidues(2).ToResidues()&amp;lt;/code&amp;gt; – Returns the sequence of individual residues from the 2Å surrounding of the HEM residue, inclusive HEM.&lt;br /&gt;
* &amp;lt;code&amp;gt;Atoms(&amp;quot;C&amp;quot;).ToResidues()&amp;lt;/code&amp;gt; – Returns a sequence of motifs. Each motif contains only carbon atoms grouped together according to their parent residue.&lt;br /&gt;
* &#039;&#039;Type: ToResidues(motives: Motives) -&amp;gt; Motives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Union()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Merges the sequence of input motives to a single motiv. &lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;HEM&amp;quot;).ConnectedResidues(1).Union()&amp;lt;/code&amp;gt; –  Takes two HEM residues of the 1hho protein with covalently bonded residues (2 motives) and merges them into a single motiv.&lt;br /&gt;
* &#039;&#039;Type: Union(motives: Motives) -&amp;gt; Motives&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====RegularMotives()====&lt;br /&gt;
* From the primary sequence extracts motives based on the input regular expression. Please note, that MQ does not check whether there is a gap in the chain e.g. if HIS 28 is followed by the residue 30 ALA query ‘HA’ returns positive match for such example.&lt;br /&gt;
* &amp;lt;code&amp;gt; RegularMotives(&amp;quot;HH&amp;quot;)&amp;lt;/code&amp;gt; – Finds two consecutive histidine residues.&lt;br /&gt;
* &amp;lt;code&amp;gt; RegularMotives(&amp;quot;G.{1,2}G&amp;quot;)&amp;lt;/code&amp;gt; – Finds two glycine residues separated by one or two other residues.&lt;br /&gt;
* &amp;lt;code&amp;gt; RegularMotives(&amp;quot;G.{1,2}G&amp;quot;).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt; – Finds two glycine residues separated by one or two residues and verifies that all of them are bonded.&lt;br /&gt;
* &#039;&#039;Type: RegularMotives(regex: Value) -&amp;gt; Motives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Cluster()====&lt;br /&gt;
* Clusters identified results to a single motive based on their distance in angstroms. On contrary to the &amp;lt;code&amp;gt;Near()&amp;lt;/code&amp;gt; query &amp;lt;code&amp;gt;Cluster()&amp;lt;/code&amp;gt; does not provide a count check. See example below.&lt;br /&gt;
* &amp;lt;code&amp;gt;Cluster(5, Residues(&amp;quot;Ala&amp;quot;))&amp;lt;/code&amp;gt;  – Returns all the alanine residues which are at most 5Å distant to each other.&lt;br /&gt;
* &amp;lt;code&amp;gt;Cluster(3, RingAtoms(Atoms(&amp;quot;N&amp;quot;), Rings(2 * [&amp;quot;C&amp;quot;] + [&amp;quot;N&amp;quot;] + [&amp;quot;C&amp;quot;] + [&amp;quot;N&amp;quot;])))&amp;lt;/code&amp;gt; – Returns all the nitrogen atoms from particular rings to a single motif in case the atoms are at most 3Å distant to each other. &lt;br /&gt;
* &amp;lt;code&amp;gt;Cluster(2 , Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;C&amp;quot;))&amp;lt;/code&amp;gt; – Returns all the carbon atoms which are pairwise closer than 2Å. In case any other carbon atom would be inside this 2Å sphere, it is also included in the result. Therefore, if you insist on exactly 2 carbon atoms to be returned, use &amp;lt;code&amp;gt;Near()&amp;lt;/code&amp;gt; query instead.&lt;br /&gt;
* &#039;&#039;Type: Cluster(r: Number, motives: Motives+) -&amp;gt; Motives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Boolean operations===&lt;br /&gt;
====Or()====&lt;br /&gt;
* &#039;&#039;&#039;[2hhb]&#039;&#039;&#039; Merges up to n different motives together.&lt;br /&gt;
* &amp;lt;code&amp;gt;Or(AminoAcids(ChargeType=&amp;quot;Negative&amp;quot;),AminoAcids(ChargeType= &amp;quot;Positive&amp;quot;))&amp;lt;/code&amp;gt; – returns all charged amino acids both positively charged and negatively charged.&lt;br /&gt;
* &#039;&#039;Type: Or(motives: Motives+) -&amp;gt; Motives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Topology function===&lt;br /&gt;
====AmbientAtoms()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Returns all the atoms, which are within n Å from the geometrical center of a given motif.&lt;br /&gt;
* &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;).AmbientAtoms(4)&amp;lt;/code&amp;gt; – returns all the atoms, which are closer than 4Å from the center of mass of iron atom.&lt;br /&gt;
* &#039;&#039;Type: AmbientAtoms(motive: Motives, r: Number) -&amp;gt; Motives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====AmbientResidues()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Returns all the residues, which are within n Å from the geometrical center of a given motif.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;HEM&amp;quot;).AmbientResidues(4)&amp;lt;/code&amp;gt; – returns all the residues, which are closer than 4Å from the center of mass of HEM residues.&lt;br /&gt;
* &#039;&#039;Type: AmbientResidues(motive: Motives, r: Number) -&amp;gt; Motives&#039;&lt;br /&gt;
&lt;br /&gt;
====Near()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Clusters all the specified motives, which are pairwise closer in Ångströms than a specified argument. Additionally, it checks if the motive contains exactly specified motives. On the contrary to the Cluster() query this does the ‘count check’.&lt;br /&gt;
* &amp;lt;code&amp;gt;Near(0, Rings(6*[&#039;C&#039;]), Rings(4*[&#039;C&#039;] + [&#039;N&#039;]))&amp;lt;/code&amp;gt; – Returns motives containing only purine. In this example the purine part of tryptophan side chain will be returned.&lt;br /&gt;
* &amp;lt;code&amp;gt;Near(2 , Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;C&amp;quot;), Atoms(&amp;quot;C&amp;quot;))&amp;lt;/code&amp;gt; – Returns motives which contain exactly 4 carbon atoms within a sphere of 2Å.&lt;br /&gt;
* &#039;&#039;Type: Near(r: Number, motives: Motives+) -&amp;gt; Motives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Filtering===&lt;br /&gt;
====Filter()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Basically, an argument of the function is a Boolean condition, which is evaluated of each and every motive of input sequence of motives. Referred to as ‘m’ in the following text. Only results satisfying the condition are returned, others are filtered out. Technically it uses lambda abstraction for filtering a collection of input motives, the usage is the same as in the Python programming language, and therefore, your previous Python experiences are beneficial. &lt;br /&gt;
* &amp;lt;code&amp;gt;Residues().Filter(lambda m: m.IsConnectedTo(Atoms(&amp;quot;Fe&amp;quot;))) &amp;lt;/code&amp;gt;– returns a set of motives from all residues which are covalently bonded to the iron atom (excluded the HEM residue).&lt;br /&gt;
* &amp;lt;code&amp;gt; Residues().Filter(lambda m: m.Count(Atoms(&amp;quot;O&amp;quot;)) == 2)&amp;lt;/code&amp;gt; returns all the residues containing exactly two oxygen atoms.&lt;br /&gt;
* &#039;&#039;Type: Filter(motives: Motives, filter: Motive-&amp;gt;Bool) -&amp;gt; Motives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====Count()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Usually it is convenient to utilize this function inside a filtering query. The Count() query counts the number of occurrences of a motive inside a different motive.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;HEM&amp;quot;).ConnectedResidues(2).Filter(lambda m: m.Count(Atoms(&amp;quot;S&amp;quot;)) == 1)&amp;lt;/code&amp;gt; – Returns motives composed of a HEM residue surrounded by two layers of bonded residues in case that the whole motive contains exactly one sulphur atom.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;CYS&amp;quot;).ConnectedResidues(1).Filter(lambda m: m.Count(Residues(&amp;quot;VAL&amp;quot;)) == 2)&amp;lt;/code&amp;gt; – Returns a cysteine residue which is surrounded from both sides by valine residues.&lt;br /&gt;
* &#039;&#039;Type: Count(where: Motive, what: Motives) -&amp;gt; Integer&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Contains()====&lt;br /&gt;
* &#039;&#039;&#039;[4hhb]&#039;&#039;&#039; &amp;lt;code&amp;gt;Contains()&amp;lt;/code&amp;gt; query checks if the input motive contains a specified motive of interest. In other words Contains() query is similar to a query, where the number of occurrences is higher than zero &amp;lt;code&amp;gt;(Count() &amp;gt; 0)&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;HEM&amp;quot;).AmbientResidues(2).Filter(lambda m: m.Contains(Residues(&amp;quot;HIS&amp;quot;)))&amp;lt;/code&amp;gt; – Returns motives, where any atom of HEM residue is at most 2Å distant from the histidine.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues().Filter(lambda m: m.Contains(Atoms(&amp;quot;S&amp;quot;)))&amp;lt;/code&amp;gt; – Returns all the residue which has a sulphur incorporated in their structure. For this particular example it is similar to the query &amp;lt;code&amp;gt;Residues(&amp;quot;CYS&amp;quot;, &amp;quot;MET&amp;quot;)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &#039;&#039;Type: Contains(where: Motive, what: Motives) -&amp;gt; Bool&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Connectivity===&lt;br /&gt;
====IsConnected()====&lt;br /&gt;
* &#039;&#039;&#039;[4m9e, 4m9v]&#039;&#039;&#039; Checks, whether a particular motif is composed of a single component&lt;br /&gt;
* &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientAtoms(4).Filter(lambda m: m.IsConnected())&amp;lt;/code&amp;gt; – Atoms which are at most 4 Å distant from the zinc atom and are all binded together, i.e. there is no outlier.&lt;br /&gt;
* For comparison please compare with the results of the query &amp;lt;code&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).AmbientAtoms(4)&amp;lt;/code&amp;gt;&lt;br /&gt;
* &#039;&#039;Type: IsConnected(motive: Motive) -&amp;gt; Bool.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====IsConnectedTo()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Checks if the two provided motives are connected one to another. &lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;ALA&amp;quot;).Filter(lambda m: m.IsConnectedTo(Residues(&amp;quot;GLY&amp;quot;)))&amp;lt;/code&amp;gt; – Returns all the alanine residues which are directly connected to the glycine residues.&lt;br /&gt;
* &#039;&#039;Type: IsConnectedTo(current: Motive, motive: Motives) -&amp;gt; Bool&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====IsNotConnectedTo()====&lt;br /&gt;
* &#039;&#039;[1hho]&#039;&#039; Checks if the two provided motives are NOT connected one to another.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;ALA&amp;quot;).Filter(lambda m: m.IsNotConnectedTo(Residues(&amp;quot;GLY&amp;quot;)))&amp;lt;/code&amp;gt; – Returns all the alanine residues which are not directly connected to the glycine residues.&lt;br /&gt;
* &#039;&#039;Type: IsNotConnectedTo(current: Motive, motive: Motives) -&amp;gt; Bool&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====ConnectedAtoms()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Returns n directly bonded layer of atoms to a given motive.&lt;br /&gt;
* &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;).ConnectedAtoms(1)&amp;lt;/code&amp;gt; – The iron atom and all the atoms which are covalently bonded to it over a single bond.&lt;br /&gt;
* &amp;lt;code&amp;gt;Atoms(&amp;quot;Fe&amp;quot;). ConnectedAtoms (2)&amp;lt;/code&amp;gt; – Previous selection and all the atoms which are covalently bonded to them (i.e. additional layer of bonded atom). In other words the output composes of all the atoms which are 2 bonds away from the iron atom.&lt;br /&gt;
* &#039;&#039;Type: ConnectedAtoms(motive: Motives, n: Integer) -&amp;gt; Motives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====ConnectedResidues()====&lt;br /&gt;
* &#039;&#039;&#039;[1hho]&#039;&#039;&#039; Returns n directly bonded layer of residues to a given motive.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;HEM&amp;quot;).ConnectedResidues(1)&amp;lt;/code&amp;gt; – The HEM residue and all the residues which are covalently bonded to any atom of the HEM residue.&lt;br /&gt;
* &amp;lt;code&amp;gt;Residues(&amp;quot;HEM&amp;quot;).ConnectedResidues(2)&amp;lt;/code&amp;gt; – previous selection and all the residues which are covalently bonded to them (i.e. additional layer of bonded residues).&lt;br /&gt;
* &#039;&#039;Type: ConnectedResidues(motive: Motives, n: Integer) -&amp;gt; Motives&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Selected Use Cases==&lt;br /&gt;
==== Find all post-translational modified aminoacids ====&lt;br /&gt;
*i.e. Those incodporated in the protein backbone and not hetero atoms&lt;br /&gt;
 &amp;lt;pre&amp;gt;NotAminoAcids().Filter(lambda m: m.Count(HetResidues()) == 0) &amp;lt;/pre&amp;gt;&lt;br /&gt;
This query queries all the non-standard amino acids for their presence among Hetatom entries. Equivalently:**&amp;lt;pre&amp;gt;NotAminoAcids().Filter(lambda m: m.Contains(HetResidues()).Not())&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Find all heteroatoms, which are not covalently bonded to the protein structure====&lt;br /&gt;
* Takes all the heteroatoms and queries them for being connected to any amino acid of a given protein&lt;br /&gt;
&amp;lt;pre&amp;gt;HetResidues().Filter(lambda m: m.IsNotConnectedTo(AminoAcids()))&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Identify Zinc fingers====&lt;br /&gt;
*There is a variety of different zinc fingers based on the surrounding residues, in our example we will focus on those comprising two zinc and two his residues (Cys2His2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Atoms(&amp;quot;Zn&amp;quot;).ConnectedResidues(1).Filter(lambda m: (m.Count(Residues(&amp;quot;His&amp;quot;)) == 2) &amp;amp; (m.Count(Residues(&amp;quot;Cys&amp;quot;)) == 2)) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At first the zinc atoms are selected together with their bonded residues. Additionally, these motives are filtered according to the content of their amino acids.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Identify all the residues, which contain a sugar ring====&lt;br /&gt;
* This task can be decomposed to two individual subtasks, since sugars contain either pentose or furanose ring. Pentose ring contains 4 carbon and an oxygen atom. Similarly, furanose ring is composed of 5 carbon atoms and an oxygen atom.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Or(Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]) .ConnectedResidues(0), Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]) .ConnectedResidues(0)) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
By specifying the &amp;lt;code&amp;gt;Ring()&amp;lt;/code&amp;gt; queries, we select only the ring part of the molecule. By extending the &amp;lt;code&amp;gt;Ring()&amp;lt;/code&amp;gt; query with &amp;lt;code&amp;gt;ConnectedResidues(0)&amp;lt;/code&amp;gt; only the residue which includes this ring is selected. Last but not least we can join both queries with &amp;lt;code&amp;gt;Or()&amp;lt;/code&amp;gt; in order to merge results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Identify all binding sites of PA-IIL lectine in different organisms====&lt;br /&gt;
*Binding sites of this type of lectine comprise of two calcium atoms close to each other and a binded sugar residue.  &lt;br /&gt;
&amp;lt;pre&amp;gt;Cluster(4, Atoms(&amp;quot;Ca&amp;quot;)).Filter(lambda m: m.Count(Atoms(&amp;quot;Ca&amp;quot;)) == 2).ConnectedResidues(1).Filter(lambda m: (m.Count(Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])) &amp;gt; 0) | (m.Count(Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])) &amp;gt; 0)) &amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At first we select all the calcium atoms and clusters them, if they are in a vicinity of 4Å and less. Additionally, we check if there are exactly 2 such atoms. Subsequently all the binded residues are found and finally, only the motives containing either pentose &amp;lt;code&amp;gt;(Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt; or furanose &amp;lt;code&amp;gt;(Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))&amp;lt;/code&amp;gt; are returned. &lt;br /&gt;
&lt;br /&gt;
Equivalently:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Cluster(4, Atoms(&amp;quot;Ca&amp;quot;)).Filter(lambda m: m.Count(Atoms(&amp;quot;Ca&amp;quot;)) == 2).ConnectedResidues(1).Filter(lambda m: m.Contains(Or((Rings(5 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;])), Rings(4 * [&amp;quot;C&amp;quot;] + [&amp;quot;O&amp;quot;]))))&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Dave</name></author>
	</entry>
</feed>