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
(section)
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!
== 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/>
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
(section)
Add topic