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:Principles
(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!
==Example, Revised== Now that we know the basic building blocks of the language, let’s go back to our original example and analyze it: <syntaxhighlight lang="python"> HetResidues() .AmbientAtoms(3.0) .Filter(lambda m: m.Count(Atoms('Ca')) >= 1) </syntaxhighlight> This corresponds to the following process. # A generator query <code>[[PatternQuery:Language_Reference#HetResidues | HetResidues()]]</code> is executed that produces a sequence of patterns that are composed of atoms corresponding to HET residues. # Next, the original sequence is modified by adding atoms within 3 angstrom from any original atom to each pattern. # Finally, each pattern in the modified sequence is examined: all “calcium atom patterns” are identified and counted. Only these patterns that contain at least 1 Ca atom are kept. Graphically: <code>[[PatternQuery:Language_Reference#HetResidues | HetResidues()]]</code> [[Image:PatternQuery-Principles-HetResidues.png|none|500px]] <code>[[PatternQuery:Language_Reference#AmbientAtoms | .AmbientAtoms(3)]]</code> [[Image:PatternQuery-Principles-AmbientAtoms.png|none|500px]] <code>[[PatternQuery:Language_Reference#Filter | .Filter(lambda l: l.Count(Atoms('Ca')) > 0)]]</code> [[Image:PatternQuery-Principles-AmbientAtoms-filter.png|none|500px]]
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:Principles
(section)
Add topic