Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
WebChemistry Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
PatternQuery:Language Reference
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Introduction == 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. 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. * The language is case sensitive - "filter" is NOT the same as "FiLtEr". Some of the functions return '''<code>PatternSeq</code>''' while other return '''<code>Pattern</code>'''. * '''<code>Pattern</code>''' is a set of atoms. * '''<code>PatternSeq</code>''' is a sequence of '''<code>Pattern</code>''' (the sets of atoms). When a molecule is queried, say using the expression <code>Rings(5 * ["C"] + ["O"])</code> a sequences of patterns each containing 6 atoms (5 C and 1 O) is returned. However, some functions such as <code>Filter</code> need to operate on a single pattern (the set of atoms) - not the whole sequences. The query <code>Residues().Filter(lambda r: r.Count(Atoms()) > 10)</code> first finds all residue patterns ('''<code>PatternSeq</code>''') and then passes every single '''<code>Pattern</code>''' (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 == ''Basic building blocks of the language - i.e. atoms, residues, and the like.'' === AminoAcids === <code>AminoAcids() -> Residues</code><br/> ''Sequence of all residues with the 20 basic amino acid names.''<br/> ;Options : ChargeType: String = "" - ''Specify type of the charge. Allowed values: Positive, Negative, Aromatic, Polar, NonPolar.'' ;Examples : <code>AminoAcids()</code> :: ''All amino acids.'' : <code>AminoAcids(ChargeType = "Polar")</code> :: ''Amino acids with polar charge.'' ---- === AtomIdRange === <code>AtomIdRange(minId: Integer, maxId: ?Integer) -> Atoms</code><br/> ''Sequence of atoms with minId <= atomId <= maxId.''<br/> ;Arguments : minId: Integer - ''Minimum id.'' : maxId: ?Integer - ''Maximum id. If not specified, maxId = minId.'' ;Examples : <code>AtomIdRange(152, 161)</code> :: ''Returns all atoms with id between 152 and 161 inclusive.'' ---- === AtomIds === <code>AtomIds(ids: Integer+) -> Atoms</code><br/> ''Sequence of atoms with specified identifiers.''<br/> ;Arguments : ids: Integer+ - ''Identifiers.'' ;Examples : <code>AtomIds(1, 2, 3)</code> :: ''Returns atoms with ids 1, 2, 3.'' ---- === AtomNames === <code>AtomNames(names: String+) -> Atoms</code><br/> ''Sequence of atoms with specified names.''<br/> ;Arguments : names: String+ - ''Allowed names.'' ;Examples : <code>AtomNames("O1","NH1")</code> :: ''Returns all atoms with names O1 or NH1.'' ---- === Atoms === <code>Atoms(symbols: String*) -> Atoms</code><br/> ''Sequence of atoms with specified element symbols. If no symbols are specified, yields all atoms one by one.''<br/> ;Arguments : symbols: String* - ''Allowed element symbols.'' ;Examples : <code>Atoms("Zn","Ca")</code> :: ''Returns all atoms with element symbol Zn or Ca'' ---- === Chains === <code>Chains(identifiers: Value*) -> PatternSeq</code><br/> ''Splits the structures into chains. If no identifiers are specified, all chains are returned.''<br/> ;Arguments : identifiers: Value* - ''Chain identifiers.'' ;Examples : <code>Chains()</code> :: ''Returns all chains.'' : <code>Chains("")</code> :: ''Returns chains without specific identifier.'' : <code>Chains("A", "B")</code> :: ''Returns chains A and B.'' ---- === Helices === <code>Helices() -> PatternSeq</code><br/> ''Returns all helices. This assumes the information about helices was present in the input structure.''<br/> ;Examples : <code>Helices()</code> :: ''Returns all helices.'' ---- === HetResidues === <code>HetResidues() -> Residues</code><br/> ''Sequence of all residues that contain HET atoms.''<br/> ;Options : NoWaters: Bool = True - ''Ignore water residues such as HOH.'' ;Examples : <code>HetResidues()</code> :: ''Returns all residues that contain HET atoms (ignores water).'' : <code>HetResidues(NoWaters=False)</code> :: ''Returns all residues that contain HET atoms (includes water).'' ---- === ModifiedResidues === <code>ModifiedResidues(parentNames: String*) -> Residues</code><br/> ''Sequence of modified residues that originate from the specified name. If no names are specified, yields all modified residues one by one.''<br/> ;Arguments : parentNames: String* - ''Parent residue names.'' ;Examples : <code>ModifiedResidues("MET")</code> :: ''Returns all residues modified from MET (for example MSE).'' ---- === Named === <code>Named(patterns: PatternSeq) -> PatternSeq</code><br/> '''Names' the pattern by its lowest atom id.''<br/> ;Arguments : patterns: PatternSeq - ''Patterns to name.'' ;Examples : <code>Atoms("Zn").Named().AmbientAtoms(7)</code> :: ''When exported, the result files will have names in the format '[parent id]_[pseudorandom number]_[zn atomid]'. If the Named function was not used, the name would be just '[parent id]_[pseudorandom number]'.'' ---- === NotAminoAcids === <code>NotAminoAcids() -> Residues</code><br/> ''Sequence of all residues that are not any of the 20 basic amino acids.''<br/> ;Options : NoWaters: Bool = True - ''Ignore water residues such as HOH.'' ;Examples : <code>NotAminoAcids()</code> :: ''Returns all residues that are not amino acids.'' ---- === NotAtomIds === <code>NotAtomIds(ids: Integer+) -> Atoms</code><br/> ''Sequence of atoms that do not have specified identifiers.''<br/> ;Arguments : ids: Integer+ - ''Identifiers.'' ;Examples : <code>NotAtomIds(1, 2, 3)</code> :: ''Returns atoms that do not have id 1, 2, nor 3.'' ---- === NotAtomNames === <code>NotAtomNames(names: String+) -> Atoms</code><br/> ''Sequence of atoms that do not have a specified name.''<br/> ;Arguments : names: String+ - ''Forbidden names.'' ;Examples : <code>NotAtomNames("O4")</code> :: ''Returns all atoms that are not called O4.'' ---- === NotAtoms === <code>NotAtoms(symbols: String+) -> Atoms</code><br/> ''Sequence of atoms that are not particular elements.''<br/> ;Arguments : symbols: String+ - ''Forbidden element symbols.'' ;Examples : <code>NotAtoms("O")</code> :: ''Returns all atoms that are not O.'' ---- === NotResidues === <code>NotResidues(names: Value+) -> Residues</code><br/> ''Sequence of residues that are not called by the specified names.''<br/> ;Arguments : names: Value+ - ''Forbidden residue names.'' ;Examples : <code>NotResidues("THR","CYS")</code> :: ''Returns all residues that are not THR or CYS.'' ---- === RegularMotifs === <code>RegularMotifs(regex: Value) -> PatternSeq</code><br/> ''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 'Amino'''<br/> ;Arguments : regex: Value - ''Regular expression on one letter abbreviations of amino acids.'' ;Options : Type: String = "Amino" - ''Determines the type of the query. Allowed values: Amino, Nucleotide.'' ;Examples : <code>RegularMotifs("RGD")</code> :: ''Finds all RGD motifs.'' : <code>RegularMotifs("ACGTU", Type = 'Nucleotide')</code> :: ''Finds all consecutive occurrences of the ACGTU nucleotides.'' : <code>RegularMotifs(".HC.").Filter(lambda m: m.IsConnected())</code> :: ''Finds all 4 residue motifs with ?-HIS-CYS-? that are connected.'' ---- === ResidueIdRange === <code>ResidueIdRange(chain: String, min: Integer, max: ?Integer) -> Residues</code><br/> ''Sequence of residues with specific chain and min <= sequence number <= max.''<br/> ;Arguments : chain: String - ''Chain identifier. Case sensitive (a != A).'' : min: Integer - ''Minimum sequence number.'' : max: ?Integer - ''Maximum sequence number. If not specified, max = min.'' ;Examples : <code>ResidueIdRange("A", 161, 165)</code> :: ''Returns all residues on chain A with seq. number between 161 and 165 inclusive.'' ---- === ResidueIds === <code>ResidueIds(ids: String+) -> Residues</code><br/> ''Sequence of residues with specific identifiers. If the structure does not contain a residue with the given identifier, it is skipped.''<br/> ;Arguments : ids: String+ - ''One or more identifiers in the format 'NUMBER [CHAIN] [i:INSERTIONCODE]' (parameters in [] are optional, for example '175 i:12' or '143 B'). Case sensitive (a != A).'' ;Examples : <code>ResidueIds("132 A", "178 A")</code> :: ''Returns residues A 123 and A 178 (provided the input structure contains them).'' ---- === Residues === <code>Residues(names: String*) -> Residues</code><br/> ''Sequence of residues with specified names. If no names are specified, yields all residues one by one.''<br/> ;Arguments : names: String* - ''Allowed residue names.'' ;Examples : <code>Residues("HIS", "CYS")</code> :: ''Returns all HIS or CYS residues.'' ---- === RingAtoms === <code>RingAtoms(atom: Atoms, ring: ?Rings) -> Atoms</code><br/> ''Returns all rings atoms.''<br/> ;Arguments : atom: Atoms - ''Atom types.'' : ring: ?Rings - ''Specific ring.'' ;Examples : <code>RingAtoms(Atoms("C"), Rings(4 * ["C"] + ["O"]))</code> :: ''Returns all C atoms on a ring with 4C and O.'' ---- === Rings === <code>Rings(atoms: Value*) -> Rings</code><br/> ''Sequence of rings with particular atoms. If no atoms are specified, yields all rings (cycles) one by one. The order of atoms matters.''<br/> ;Arguments : atoms: Value* - ''Ring atoms.'' ;Examples : <code>Rings()</code> :: ''Returns all rings.'' : <code>Rings(5 * ["C"] + ["O"])</code> :: ''Returns all rings with 5C and 1O atoms.'' : <code>Rings(["C", "C", "N", "C", "N"])</code> :: ''Returns all rings with C-C-N-C-N atoms.'' : <code>Or(Rings(["C", "C", "N", "C", "N"]), Rings(["C", "C", "C", "N", "N"]))</code> :: ''Returns all rings with C-C-N-C-N or C-C-C-N-N atoms.'' ---- === Sheets === <code>Sheets() -> PatternSeq</code><br/> ''Returns all sheets. This assumes the information about sheets was present in the input structure.''<br/> ;Examples : <code>Sheets()</code> :: ''Returns all sheets.'' <br/> == Advanced Query Functions == ''Advanced building blocks of the language.'' === Flatten === <code>Flatten(patterns: PatternSeq, selector: Pattern->PatternSeq) -> PatternSeq</code><br/> ''Converts a sequence of sequence of patterns into a single 'flat' sequence.''<br/> ;Arguments : patterns: PatternSeq - ''Patterns to project.'' : selector: Pattern->PatternSeq - ''The selector.'' ;Examples : <code>Residues("HIS").Flatten(lambda m: m.Find(Atoms("C")))</code> :: ''Returns all C atoms on HIS residues.'' ---- === Inside === <code>Inside(patterns: PatternSeq, where: PatternSeq) -> PatternSeq</code><br/> ''Finds patterns within another pattern. Equivalent to where.Flatten(lambda m: m.Find(patterns))''<br/> ;Arguments : patterns: PatternSeq - ''Patterns to find.'' : where: PatternSeq - ''Where to find them.'' ;Examples : <code>Atoms("C").Inside(Residues("HIS"))</code> :: ''Returns all C atoms on HIS residues.'' ---- === Or === <code>Or(patterns: PatternSeq+) -> PatternSeq</code><br/> ''Merges several pattern sequences into one.''<br/> ;Arguments : patterns: PatternSeq+ - ''Patterns to merge.'' ;Examples : <code>Or(Atoms("Zn").ConnectedResidues(1), Rings())</code> :: ''Finds all zincs and their connected residues or rings.'' ---- === ToAtoms === <code>ToAtoms(patterns: PatternSeq) -> PatternSeq</code><br/> ''Collects all 'inner' patterns and yields all unique atoms one by one.''<br/> ;Arguments : patterns: PatternSeq - ''Patterns to split.'' ;Examples : <code>Residues("HIS").ToAtoms()</code> :: ''Returns all atoms on HIS residues one by one.'' ---- === ToResidues === <code>ToResidues(patterns: PatternSeq) -> PatternSeq</code><br/> ''Collects all 'inner' patterns and yields all unique residues one by one. The residues contain only the atoms that have been yielded by the inner query.''<br/> ;Arguments : patterns: PatternSeq - ''Patterns to split.'' ;Examples : <code>Atoms("C").ToResidues()</code> :: ''Returns all C atoms grouped by residues.'' ---- === Union === <code>Union(patterns: PatternSeq) -> PatternSeq</code><br/> ''Collects all 'inner' patterns and yields one created from their unique atoms.''<br/> ;Arguments : patterns: PatternSeq - ''Patterns to merge.'' ;Examples : <code>Rings().Union()</code> :: ''Creates a single pattern that contains all rings.'' <br/> == Filter Functions == ''Functions useful for filtering patterns.'' === Contains === <code>Contains(where: Pattern, what: PatternSeq) -> Bool</code><br/> ''Checks if a pattern is contained within another one. Equivalent to where.Count(what) > 0.''<br/> ;Arguments : where: Pattern - ''Where to look.'' : what: PatternSeq - ''What to find.'' ;Examples : <code>HetResidues().Filter(lambda m: m.Contains(Rings(5*['C']+['O'])).Not())</code> :: ''Returns all HET residues that do not contain a 5CO ring.'' ---- === Count === <code>Count(where: Pattern, what: PatternSeq) -> Integer</code><br/> ''Counts all occurrences of pattern 'what' in pattern 'where'.''<br/> ;Arguments : where: Pattern - ''Where to count it.'' : what: PatternSeq - ''What pattern to count.'' ;Examples : <code>m.Count(Residues("HIS"))</code> :: ''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.'' : <code>Atoms("Zn").ConnectedResidues(1).Filter(lambda m: m.Count(Residues("HIS")) == 2)</code> :: ''Patterns with Zn atoms and its connected residues with exactly 2 HIS residues.'' ---- === ExecuteIf === <code>ExecuteIf(query: PatternSeq, condition: Pattern->Bool) -> PatternSeq</code><br/> ''Executes a query only if the condition is met. Otherwise, return an empty sequence of patterns.''<br/> ;Arguments : query: PatternSeq - ''Query to execute.'' : condition: Pattern->Bool - ''Condition that must be satisfied for the parent structure/pattern.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.Resolution() <= 2.4)</code> :: ''Returns residues in structures that have resolution lower than 2.4ang.'' : <code>AminoAcids().ExecuteIf(lambda p: p.Count(Atoms('Fe')) > 3)</code> :: ''Returns all amino acids in structures that have at least 3 Fe atoms.'' ---- === Filter === <code>Filter(patterns: PatternSeq, filter: Pattern->Bool) -> PatternSeq</code><br/> ''Filters a sequence of patterns with a given predicate.''<br/> ;Arguments : patterns: PatternSeq - ''Patterns to filter.'' : filter: Pattern->Bool - ''Filter predicate.'' ;Examples : <code>Residues().Filter(lambda m: m.Count(Atoms("C")) >= 3)</code> :: ''Returns all residues that contain at least 3 C atoms.'' ---- === IsConnected === <code>IsConnected(pattern: Pattern) -> Bool</code><br/> ''Checks if a particular pattern is a connected graph.''<br/> ;Arguments : pattern: Pattern - ''A pattern to test.'' ;Examples : <code>Atoms("Zn").AmbientResidues(3).Filter(lambda m: m.IsConnected())</code> :: ''Finds all patterns with a Zn and residues within 3 ang, where all the ambient residues are connected to the central atom.'' ---- === IsConnectedTo === <code>IsConnectedTo(where: Pattern, patterns: PatternSeq) -> Bool</code><br/> ''Checks if a particular pattern is connected to any other specified pattern. The patterns must have empty intersection for this function to return true.''<br/> ;Arguments : where: Pattern - ''A pattern to test.'' : patterns: PatternSeq - ''Pattern sequence to test against.'' ;Examples : <code>Atoms().Filter(lambda a: a.IsConnectedTo(Rings()))</code> :: ''Finds all atoms that are connected to a ring they do not belong to.'' ---- === IsNotConnectedTo === <code>IsNotConnectedTo(what: Pattern, patterns: PatternSeq) -> Bool</code><br/> ''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.''<br/> ;Arguments : what: Pattern - ''A pattern to test.'' : patterns: PatternSeq - ''Pattern sequence to test against.'' ;Examples : <code>Residues().Filter(lambda r: r.IsNotConnectedTo(Atoms("Ca")))</code> :: ''Finds all residues that are not connected to Ca atoms. The residue itself can still contain Ca atoms.'' ---- === NearestDistanceTo === <code>NearestDistanceTo(where: Pattern, patterns: PatternSeq) -> Real</code><br/> ''Finds the distance to a particular pattern.''<br/> ;Arguments : where: Pattern - ''A pattern to test.'' : patterns: PatternSeq - ''Pattern sequence to test against.'' ;Examples : <code>Atoms().Filter(lambda m: m.NearestDistanceTo(Residues("ASP")) >= 5)</code> :: ''Finds all atoms that are at least 5 (angstroms) away from any ASP residue.'' ---- === SeqCount === <code>SeqCount(what: PatternSeq) -> Integer</code><br/> ''Counts the length of a sequence of motifs.''<br/> ;Arguments : what: PatternSeq - ''What pattern sequence to count.'' ;Examples : <code>Atoms("Zn").AmbientResidues(3).Filter(lambda m: m.Find(Residues("HIS")).SeqCount() > 1)</code> :: ''Returns a sequence of patterns with Zn atom and residues within 3ang if the pattern contains at least 2 HIS residues.'' <br/> == Topology Functions == ''Functions that rely on the topology of patterns.'' === ConnectedAtoms === <code>ConnectedAtoms(pattern: PatternSeq, n: Integer) -> PatternSeq</code><br/> ''Surrounds the inner pattern by n layers of atoms.''<br/> ;Arguments : pattern: PatternSeq - ''Basic pattern.'' : n: Integer - ''Number of atom layers to connect.'' ;Options : YieldNamedDuplicates: Bool = False - ''Yield duplicate patterns if they have a different name.'' ;Examples : <code>Residues("MAN").ConnectedAtoms(2)</code> :: ''Finds all MAN residues and then adds two connected levels of atoms to them.'' ---- === ConnectedResidues === <code>ConnectedResidues(pattern: PatternSeq, n: Integer) -> PatternSeq</code><br/> ''Surrounds the inner pattern by n layers of residues.''<br/> ;Arguments : pattern: PatternSeq - ''Basic pattern.'' : n: Integer - ''Number of residue layers to connect.'' ;Options : YieldNamedDuplicates: Bool = False - ''Yield duplicate patterns if they have a different name.'' ;Examples : <code>Atoms("Zn").ConnectedResidues(1)</code> :: ''Finds all Zn atoms and adds all residues that are connected to them.'' ---- === Path === <code>Path(patterns: PatternSeq+) -> PatternSeq</code><br/> ''Creates a new pattern from 'connected' parts.''<br/> ;Arguments : patterns: PatternSeq+ - ''Patterns to path.'' ;Examples : <code>Path(Atoms("O"), Atoms("C"), Atoms("O"))</code> :: ''Finds patterns with two O and one C atoms where the C atoms is connected to the O ones.'' ---- === Star === <code>Star(center: PatternSeq, patterns: PatternSeq+) -> PatternSeq</code><br/> ''Creates a new pattern from a central one and connected parts.''<br/> ;Arguments : center: PatternSeq - ''Center pattern.'' : patterns: PatternSeq+ - ''Patterns to chain.'' ;Examples : <code>Star(Atoms("C"), Atoms("O"), Atoms("O"))</code> :: ''Finds patterns with two O atoms and one C atom in the center.'' : <code>Atoms("C").Star(Atoms("O"), Atoms("O"))</code> :: ''Finds patterns with two O atoms and one C atom in the center.'' <br/> == Geometry Functions == ''Functions that rely on the geometry of patterns.'' === AmbientAtoms === <code>AmbientAtoms(pattern: PatternSeq, r: Number) -> PatternSeq</code><br/> ''Surrounds the inner pattern by atoms that within the given radius from the inner pattern.''<br/> ;Arguments : pattern: PatternSeq - ''Basic pattern.'' : r: Number - ''Radius.'' ;Options : ExcludeBase: Bool = False - ''Exclude the central original pattern.'' : NoWaters: Bool = True - ''Ignore water residues such as HOH.'' : YieldNamedDuplicates: Bool = False - ''Yield duplicate patterns if they have a different name.'' ;Examples : <code>Atoms("Fe").AmbientAtoms(4)</code> :: ''Finds Fe atoms and all atoms within 4 (angstroms) from each of them.'' ---- === AmbientResidues === <code>AmbientResidues(pattern: PatternSeq, r: Number) -> PatternSeq</code><br/> ''Surrounds the inner pattern by residues that have at least one atom within the given radius from the inner pattern.''<br/> ;Arguments : pattern: PatternSeq - ''Basic pattern.'' : r: Number - ''Radius.'' ;Options : ExcludeBase: Bool = False - ''Exclude the central original pattern.'' : NoWaters: Bool = True - ''Ignore water residues such as HOH.'' : YieldNamedDuplicates: Bool = False - ''Yield duplicate patterns if they have a different name.'' ;Examples : <code>Rings(6 * ["C"]).AmbientResidues(4)</code> :: ''Finds rings with 6C atoms and all residues within 4 (angstroms) from each of them.'' ---- === Cluster === <code>Cluster(r: Number, patterns: PatternSeq+) -> PatternSeq</code><br/> ''Clusters all patterns that are pairwise closer than r (angstroms).''<br/> ;Arguments : r: Number - ''Maximum distance between two patterns in the cluster.'' : patterns: PatternSeq+ - ''Patterns to cluster.'' ;Examples : <code>Cluster(4, Atoms("Ca"), Rings(5 * ["C"] + ["O"]))</code> :: ''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).'' ---- === Filled === <code>Filled(pattern: PatternSeq) -> PatternSeq</code><br/> ''Adds all atoms that fall within the circumsphere (with radius multiplied by the factor) of the basic pattern.''<br/> ;Arguments : pattern: PatternSeq - ''Basic pattern.'' ;Options : NoWaters: Bool = True - ''Ignore water residues such as HOH.'' : RadiusFactor: Number = 0.75 - ''Circumsphere radius factor.'' ;Examples : <code>Cluster(4, Residues("HIS")).Filled(RadiusFactor = 0.75)</code> :: ''Finds clusters of HIS residues and all atoms within the circumsphere.'' ---- === Near === <code>Near(r: Number, patterns: PatternSeq+) -> PatternSeq</code><br/> ''Clusters all patterns that are pairwise closer than r (angstroms) and checks if the "counts" match.''<br/> ;Arguments : r: Number - ''Maximum distance between two sub-patterns in the pattern.'' : patterns: PatternSeq+ - ''Patterns to 'cluster'.'' ;Examples : <code>Near(4, Atoms("Ca"), Atoms("Ca"), Rings(5 * ["C"] + ["O"]))</code> :: ''Finds all instance of a single ring with 5C and O atoms and two Ca atoms that are closer than 4 (angstroms).'' ---- === Spherify === <code>Spherify(pattern: PatternSeq, r: Number) -> PatternSeq</code><br/> ''Identifies the geometrical center of the base pattern and then includes all atoms within the specified radius.'' ;Arguments : pattern: PatternSeq - ''Basic pattern.'' : r: Number - ''Radius.'' ;Options : ExcludeBase: Bool = False - ''Exclude the central original pattern.'' : NoWaters: Bool = True - ''Ignore water residues such as HOH.'' : YieldNamedDuplicates: Bool = False - ''Yield duplicate patterns if they have a different name.'' ;Examples <code>Rings(6 * ["C"]).Spherify(5)</code><br/> ''Finds benzene moiety, computes centroid of each pattern, and includes all atoms within 5 angstroms from it. <br/> == Meta-data Functions == ''Functions dealing with meta-data about structures such as release date or authors.'' === Authors === <code>Authors(pattern: Pattern) -> String</code><br/> ''Returns authors of the parent structure separated by a semicolon. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === ECNumbers === <code>ECNumbers(pattern: Pattern) -> String</code><br/> ''Returns Enzymatic Commission numbers assigned to enzymes in the parent structure separated by a semicolon. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === EntitySources === <code>EntitySources(pattern: Pattern) -> String</code><br/> ''Returns entity sources of the parent structure separated by a semicolon. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === ExperimentMethod === <code>ExperimentMethod(pattern: Pattern) -> String</code><br/> ''Get the experiment method. The value is always an upper-case string. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.ExperimentMethod() == "INFRARED SPECTROSCOPY")</code> :: ''Returns residues in structures that satisfy the property.'' ---- === HasAllAuthors === <code>HasAllAuthors(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains all given authors. The comparison is case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAllAuthors("Holmes", "Watson"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAllECNumbers === <code>HasAllECNumbers(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains all given Enzymatic Commission numbers. It is possible to enter just a number prefix without the '.'. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAllECNumbers("3.2.1.18", "3.3"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAllEntitySources === <code>HasAllEntitySources(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains all given entity sources. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAllEntitySources("GMO", "Natural", "Synthetic"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAllHostOrganismGenus === <code>HasAllHostOrganismGenus(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAllHostOrganismGenus("X", "Y"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAllHostOrganismIds === <code>HasAllHostOrganismIds(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains all given host organism identifiers. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAllHostOrganismIds("7108", "11244"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAllHostOrganisms === <code>HasAllHostOrganisms(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains all given host organism names. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAllHostOrganisms("Spodoptera frugiperda", "Mus musculus"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAllKeywords === <code>HasAllKeywords(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains all given keywords. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAllKeywords("membrane", "glycoprotein"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAllOriginOrganismGenus === <code>HasAllOriginOrganismGenus(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismGenus("X", "Y"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAllOriginOrganismIds === <code>HasAllOriginOrganismIds(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains all given origin organism identifiers. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAllOriginOrganismIds("121791", "10090"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAllOriginOrganisms === <code>HasAllOriginOrganisms(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains all given origin organism names. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAllOriginOrganisms("Nipah virus", "Mus musculus"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAnyAuthor === <code>HasAnyAuthor(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains any of the given authors. The comparison is case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAnyAuthor("Holmes", "Watson"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAnyECNumber === <code>HasAnyECNumber(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains any of the given Enzymatic Commission number. It is possible to enter just a number prefix without the '.'s. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAnyECNumber("3.2.1.19", "3.3"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAnyEntitySources === <code>HasAnyEntitySources(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains any of the given entity sources. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAnyEntitySources("GMO", "Natural", "Synthetic"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAnyHostOrganism === <code>HasAnyHostOrganism(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains any of the given host organism names. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAnyHostOrganism("Spodoptera frugiperda", "Mus musculus"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAnyHostOrganismGenus === <code>HasAnyHostOrganismGenus(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismGenus("X", "Y"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAnyHostOrganismId === <code>HasAnyHostOrganismId(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains any of the given host organism identifierss. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAnyHostOrganismId("7108", "11244"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAnyKeyword === <code>HasAnyKeyword(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains any of the given keywords. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAnyKeyword("membrane", "glycoprotein"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAnyOriginOrganism === <code>HasAnyOriginOrganism(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains any of the given origin organism names. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganism("Nipah virus", "Mus musculus"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAnyOriginOrganismGenus === <code>HasAnyOriginOrganismGenus(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismGenus("X", "Y"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HasAnyOriginOrganismId === <code>HasAnyOriginOrganismId(pattern: Pattern, properties: String+) -> Bool</code><br/> ''Determines if the parent structure contains any of the given origin organism identifierss. The comparison is not case sensitive.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' : properties: String+ - ''Properties.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.HasAnyOriginOrganismId("121791", "10090"))</code> :: ''Returns residues in structures that contain all given properties.'' ---- === HostOrganismGenus === <code>HostOrganismGenus(pattern: Pattern) -> String</code><br/> ''Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === HostOrganismIds === <code>HostOrganismIds(pattern: Pattern) -> String</code><br/> ''Returns host organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === HostOrganisms === <code>HostOrganisms(pattern: Pattern) -> String</code><br/> ''Returns host organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === Keywords === <code>Keywords(pattern: Pattern) -> String</code><br/> ''Returns keywords of the parent structure separated by a semicolon. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === LatestRevisionDate === <code>LatestRevisionDate(pattern: Pattern) -> Value</code><br/> ''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.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.LatestRevisionDate() >= DateTime(2008, 1, 1))</code> :: ''Returns residues in structures that satisfy the property.'' ---- === LatestRevisionYear === <code>LatestRevisionYear(pattern: Pattern) -> Integer</code><br/> ''Get the latest revision year of the parent structure. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.LatestRevisionYear() == 2006)</code> :: ''Returns residues in structures that satisfy the property.'' ---- === OriginOrganismGenus === <code>OriginOrganismGenus(pattern: Pattern) -> String</code><br/> ''Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === OriginOrganismIds === <code>OriginOrganismIds(pattern: Pattern) -> String</code><br/> ''Returns origin organism identifiers of the parent structure separated by a semicolon. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === OriginOrganisms === <code>OriginOrganisms(pattern: Pattern) -> String</code><br/> ''Returns origin organism names of the parent structure separated by a semicolon. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === PolymerType === <code>PolymerType(pattern: Pattern) -> String</code><br/> ''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.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.PolymerType() == "ProteinDNA")</code> :: ''Returns residues in structures that satisfy the property.'' ---- === ProteinStoichiometry === <code>ProteinStoichiometry(pattern: Pattern) -> String</code><br/> ''Get the protein stoichiometry of the parent structure. Possible values are: NotAssigned, Monomer, Homomer, Heteromer. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.ProteinStoichiometry() == "Heteromer")</code> :: ''Returns residues in structures that satisfy the property.'' ---- === ProteinStoichiometryString === <code>ProteinStoichiometryString(pattern: Pattern) -> String</code><br/> ''Get the protein stoichiometry string of the parent structure. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ---- === ReleaseDate === <code>ReleaseDate(pattern: Pattern) -> Value</code><br/> ''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.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.ReleaseDate() >= DateTime(2008, 1, 1))</code> :: ''Returns residues in structures that satisfy the property.'' ---- === ReleaseYear === <code>ReleaseYear(pattern: Pattern) -> Integer</code><br/> ''Get the release year of the parent structure. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.ReleaseYear() == 2006)</code> :: ''Returns residues in structures that satisfy the property.'' ---- === Resolution === <code>Resolution(pattern: Pattern) -> Real</code><br/> ''Get the resolution in angstroms of the parent structure. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.Resolution() <= 2.4)</code> :: ''Returns residues in structures that satisfy the property.'' ---- === Weight === <code>Weight(pattern: Pattern) -> Real</code><br/> ''Get the weight of the molecule in kDa. If the value is not available, null is returned.''<br/> ;Arguments : pattern: Pattern - ''Pattern.'' ;Examples : <code>Residues().ExecuteIf(lambda p: p.Weight() > 100000.0)</code> :: ''Returns residues in structures that satisfy the property.'' <br/> == Miscellaneous Functions == ''Various useful functions. These function often require a special setup (i.e. only useful in Scripting window or in specific applications).'' === AminoSequenceString === <code>AminoSequenceString(pattern: Pattern) -> String</code><br/> ''Returns a string of single-letter amino acids contained in the pattern.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : pattern: Pattern - ''Pattern to convert.'' ;Examples : <code>Pattern("1tqn_12").AminoSequenceString()</code> :: ''Returns a string representing amino acids in the pattern '1tqn_12'.'' : <code>RegularMotifs(Pattern("1tqn_12").AminoSequenceString())</code> :: ''Returns all regular patterns that correspond to the AMK sequence in 1tqn_12.'' ---- === AtomProperty === <code>AtomProperty(atomPattern: Pattern, name: String) -> ?</code><br/> ''If the property exists and the pattern consists of a single atom, returns the property. Otherwise, returns Nothing.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : atomPattern: Pattern - ''Single atom pattern.'' : name: String - ''Property name.'' ;Examples : <code>a.AtomProperty("charge")</code> :: ''Gets the 'charge' property of the atom a. Where a is a single atom Pattern. This example will not work directly.'' : <code>Atoms().Filter(lambda a: a.AtomProperty("charge") >= 2)</code> :: ''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.'' ---- === AtomSimilarity === <code>AtomSimilarity(a: Pattern, b: Pattern) -> Real</code><br/> ''Computes Jaccard/Tanimoto coefficient on atoms (element symbols) of both structures.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : a: Pattern - ''First pattern.'' : b: Pattern - ''Second pattern.'' ;Examples : <code>AtomSimilarity(Current(),Pattern("1tqn_12"))</code> :: ''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 '1tqn_12' is loaded).'' ---- === CommonAtoms === <code>CommonAtoms(modelId: String) -> PatternSeq</code><br/> ''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.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : modelId: String - ''Id of the model.'' ;Examples : <code>CommonAtoms("1tqn_12")</code> :: ''Returns a pattern formed by atoms common with the '1tqn_12' structure.'' ---- === CSA === <code>CSA() -> PatternSeq</code><br/> ''Entries from Catalytic Site Atlas represented as patterns. Works only if used from the command line version of Queries and property configured.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Examples : <code>CSA()</code> :: ''All CSA sites for the given structure. This example will only work if used from the command line version of Queries and property configured.'' ---- === Current === <code>Current() -> Pattern</code><br/> ''A variable that is assigned by the application environment.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Examples : <code>AtomSimilarity(Current(), Pattern("model"))</code> :: ''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 'model' loaded.'' ---- === Descriptor === <code>Descriptor(pattern: Pattern, name: String) -> ?</code><br/> ''Returns the descriptor. If the descriptor does not exist, 'null' is returned.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : pattern: Pattern - ''Pattern that represents entire structure.'' : name: String - ''Descriptor name.'' ;Examples : <code>Current().Descriptor("similarity") >= 0.75</code> :: ''Returns True if 'similarity' descriptor of the current pattern is at least 0.75. This example will work for example in SiteBinder's structure selection if the 'similarity' descriptor has been previously defined.'' ---- === DynamicInvoke === <code>DynamicInvoke(value: Value, name: String, isProperty: Bool, args: Value) -> Value</code><br/> ''Dynamically invoke a member. (internal)''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : value: Value - ''InnerQuery.'' : name: String - ''Member name.'' : isProperty: Bool - ''Is this a property.'' : args: Value - ''Array of arguments.'' ---- === Find === <code>Find(source: Pattern, patterns: PatternSeq) -> PatternSeq</code><br/> ''Converts the source pattern to a structure and finds patterns within it.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : source: Pattern - ''Where to look.'' : patterns: PatternSeq - ''Patterns to find.'' ;Examples : <code>AtomSimilarity(Current().Find(NotAtoms("N")).ToPattern(), Pattern("model").Find(NotAtoms("N")).ToPattern())</code> :: ''Computes the atom similarity of the 'current' and 'model' patterns, but ignores N atoms. This example can be used in SiteBinder to create a descriptor (assuming a structure with id 'model' is loaded).'' ---- === GroupedAtoms === <code>GroupedAtoms(symbols: String*) -> PatternSeq</code><br/> ''Groups atoms using the element symbol and then returns each group as a single pattern.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : symbols: String* - ''Allowed element symbols.'' ;Examples : <code>GroupedAtoms()</code> :: ''Returns groups of all atom types. For example if the input has atoms 5xC-1xO, patterns with 5xC and 1xO atoms are returned.'' : <code>GroupedAtoms('C', 'O')</code> :: ''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).'' ---- === Pattern === <code>Pattern(structureName: String) -> Pattern</code><br/> ''Returns a structure represented as a pattern.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : structureName: String - ''Name of a structure.'' ;Examples : <code>Pattern("1tqn_12")</code> :: ''Returns the structure '1tqn_12' represented as a pattern. Usable in defining descriptors or in Scripting window (using MQ.Execute).'' ---- === ResidueSimilarity === <code>ResidueSimilarity(a: Pattern, b: Pattern) -> Real</code><br/> ''Computes Jaccard/Tanimoto coefficient on residue names of both structures.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : a: Pattern - ''First pattern.'' : b: Pattern - ''Second pattern.'' ;Examples : <code>ResidueSimilarity(Current(), Pattern("1tqn_12"))</code> :: ''Computes the residue similarity between the current pattern and '1tqn_12'. This example can be used in SiteBinder to create a descriptor (assuming a structure with id '1tqn_12' is loaded).'' ---- === ToPattern === <code>ToPattern(patterns: PatternSeq) -> Pattern</code><br/> ''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.''<br/> <small>''Note:'' This function cannot be used directly to query patterns from MotiveExplorer or Queries service.</small><br/> ;Arguments : patterns: PatternSeq - ''Patterns to convert.'' ;Examples : <code>Residues("HIS").ToPattern()</code> :: ''Converts a sequence of HIS residue Patterns to a single Pattern.'' : <code>AtomSimilarity(Current().Find(NotAtoms("N")).ToPattern(), Pattern("model").Find(NotAtoms("N")).ToPattern())</code> :: ''Computes the atom similarity of the 'current' and 'model' patterns, but ignores N atoms.'' <br/> == Value Functions == ''Functions such as addition or comparison of numbers.'' === Abs === <code>Abs(x: Number) -> Number</code><br/> ''Computes the 'Abs' function of the argument.''<br/> ;Arguments : x: Number - ''Argument.'' ;Examples : <code>Abs(x)</code> :: ''Evaluates the expression.'' ---- === Divide (/) === <code>Divide(x: Number, y: Number) -> Number</code><br/> ''Computes the 'Divide' function of the values.''<br/> ;Arguments : x: Number - ''Left argument.'' : y: Number - ''Right argument.'' ;Examples : <code>x / y</code> :: ''Evaluates the expression.'' ---- === Equal (==) === <code>Equal(x: Value, y: Value) -> Bool</code><br/> ''Determines the 'Equal' relation between two values.''<br/> ;Arguments : x: Value - ''Left argument.'' : y: Value - ''Right argument.'' ;Examples : <code>x == y</code> :: ''Evaluates to True or False based on the value of x and y.'' ---- === Greater (>) === <code>Greater(x: Number, y: Number) -> Bool</code><br/> ''Determines the 'Greater' relation between two values.''<br/> ;Arguments : x: Number - ''Left argument.'' : y: Number - ''Right argument.'' ;Examples : <code>x > y</code> :: ''Evaluates to True or False based on the value of x and y.'' ---- === GreaterEqual (>=) === <code>GreaterEqual(x: Number, y: Number) -> Bool</code><br/> ''Determines the 'GreaterEqual' relation between two values.''<br/> ;Arguments : x: Number - ''Left argument.'' : y: Number - ''Right argument.'' ;Examples : <code>x >= y</code> :: ''Evaluates to True or False based on the value of x and y.'' ---- === Less (<) === <code>Less(x: Number, y: Number) -> Bool</code><br/> ''Determines the 'Less' relation between two values.''<br/> ;Arguments : x: Number - ''Left argument.'' : y: Number - ''Right argument.'' ;Examples : <code>x < y</code> :: ''Evaluates to True or False based on the value of x and y.'' ---- === LessEqual (<=) === <code>LessEqual(x: Number, y: Number) -> Bool</code><br/> ''Determines the 'LessEqual' relation between two values.''<br/> ;Arguments : x: Number - ''Left argument.'' : y: Number - ''Right argument.'' ;Examples : <code>x <= y</code> :: ''Evaluates to True or False based on the value of x and y.'' ---- === LogicalAnd (&) === <code>LogicalAnd(xs: Bool+) -> Bool</code><br/> ''Computes 'LogicalAnd' of the input values.''<br/> ;Arguments : xs: Bool+ - ''Arguments.'' ;Examples : <code>x & y</code> :: ''Evaluates to True or False based on the values of x and y.'' ---- === LogicalNot (Not) === <code>LogicalNot(x: Bool) -> Bool</code><br/> ''Computes 'LogicalNot' of the input value. This function can be called using the shorthand 'Not'.''<br/> ;Arguments : x: Bool - ''Argument.'' ;Examples : <code>LogicalNot(x)</code> :: ''Evaluates to True or False based on the value of x.'' : <code>x.Not()</code> :: ''Evaluates to True or False based on the value of x.'' ---- === LogicalOr (|) === <code>LogicalOr(xs: Bool+) -> Bool</code><br/> ''Computes 'LogicalOr' of the input values.''<br/> ;Arguments : xs: Bool+ - ''Arguments.'' ;Examples : <code>x | y</code> :: ''Evaluates to True or False based on the values of x and y.'' ---- === LogicalXor (Xor) === <code>LogicalXor(xs: Bool+) -> Bool</code><br/> ''Computes 'LogicalXor' of the input values. This function can be called using the shorthand 'Xor'.''<br/> ;Arguments : xs: Bool+ - ''Arguments.'' ;Examples : <code>LogicalXor(x, y)</code> :: ''Evaluates to True or False based on the values of x and y.'' : <code>Xor(x, y)</code> :: ''Evaluates to True or False based on the values of x and y.'' ---- === Minus (-) === <code>Minus(x: Number) -> Number</code><br/> ''Computes the arithmetic negation of the argument.''<br/> ;Arguments : x: Number - ''Argument.'' ;Examples : <code>-x</code> :: ''Arithmetic negation of x.'' ---- === NotEqual (!=) === <code>NotEqual(x: Value, y: Value) -> Bool</code><br/> ''Determines the 'NotEqual' relation between two values.''<br/> ;Arguments : x: Value - ''Left argument.'' : y: Value - ''Right argument.'' ;Examples : <code>x != y</code> :: ''Evaluates to True or False based on the value of x and y.'' ---- === Plus (+) === <code>Plus(x: Number, y: Number) -> Number</code><br/> ''Computes the 'Plus' function of the values.''<br/> ;Arguments : x: Number - ''Left argument.'' : y: Number - ''Right argument.'' ;Examples : <code>x + y</code> :: ''Evaluates the expression.'' ---- === Power (^) === <code>Power(x: Number, y: Number) -> Number</code><br/> ''Computes the 'Power' function of the values.''<br/> ;Arguments : x: Number - ''Left argument.'' : y: Number - ''Right argument.'' ;Examples : <code>x ^ y</code> :: ''Evaluates the expression.'' ---- === Subtract (-) === <code>Subtract(x: Number, y: Number) -> Number</code><br/> ''Computes the 'Subtract' function of the values.''<br/> ;Arguments : x: Number - ''Left argument.'' : y: Number - ''Right argument.'' ;Examples : <code>x - y</code> :: ''Evaluates the expression.'' ---- === Times (*) === <code>Times(x: Number, y: Number) -> Number</code><br/> ''Computes the 'Times' function of the values.''<br/> ;Arguments : x: Number - ''Left argument.'' : y: Number - ''Right argument.'' ;Examples : <code>x * y</code> :: ''Evaluates the expression.'' <br/>
Summary:
Please note that all contributions to WebChemistry Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
WebChemistry Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
PatternQuery:Language Reference
Add topic