Jump to content

LiteMol:SelectionAlgebra: Difference between revisions

From WebChemistry Wiki
No edit summary
Matthew (talk | contribs)
edited by MJC
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
LiteMol has an atom selection language available, similarly to the other structure visualization tools such as VMD or PyMOL. The '''LiteMol selection algebra''' is inspired by our other service - [[PatternQuery:UserManual | PatternQuery]], although in the present version the amount of integrated queries is somewhat limited. Additionally, as a feature LiteMol will contain a parser of syntax enabling the use of [[LiteMol:SelectionAlgebra#PyMOL | PyMOL ]] and possibly [[LiteMol:SelectionAlgebra#VMD| VMD]] selection algebra.
LiteMol has an atom selection language available, similar to other structure visualization tools such as VMD or PyMOL. The '''LiteMol selection algebra''' is inspired by our other service - [[PatternQuery:UserManual | PatternQuery]]. While in the present version the selection syntax will be mainly used by method developers, syntax enabling the use of [[LiteMol:SelectionAlgebra#PyMOL | PyMOL ]] and possibly [[LiteMol:SelectionAlgebra#VMD| VMD]] selection algebra will be introduced in the near future.




=LiteMol selection algebra=
=LiteMol selection algebra=


Molecular selections can be created in two different active contexts - [[LiteMol:Hierarchy#Molecule_Model_.28MM.29 | model of molecule]] or [[LiteMol:Hierarchy#Molecule_Visual_.28VM.29 | molecule visual]]. If either of the contexts is active in the entity tree, the right panel is populated with the '''Selection''' action. Next, you can create named selection using dedicated query language and further modify the visual part of your selection.  
Molecular selections can be created in two different active contexts - [[LiteMol:Hierarchy#Molecule_Model_.28MM.29 | model of molecule]] or [[LiteMol:Hierarchy#Molecule_Visual_.28VM.29 | molecule visual]]. If either of the contexts is active in the entity tree, the right panel is populated with the '''Selection''' action. Next, you can create a named selection using the dedicated query language and further modify the visual part of your selection.  




  {{large| '''Notice:'''}} Arguments of LiteMol selection queries are '''case sensitive'''!
  {{large| '''Notice:'''}} Arguments of LiteMol selection queries are '''case sensitive'''!


Meaning: GLY is a common non-polar residue found in the PDB entries, whereas Gly, or gly does not exist.  
Meaning: '''GLY''' is a common non-polar residue found in PDB entries, whereas '''Gly''', '''gly''', or '''G''' do not exist.  
 
==Basic queries==
==Basic queries==
{| class="wikitable"
{| class="wikitable"
! colspan="3" | List of selection queries
! colspan="3" | List of selection queries
|-
|-
!
!Query definition
Query
!Example
!
!Selection description
Examples
!
Selection description
|-
|-
| <code>  atomsByElement() </code >
| <code>  atomsByElement(elements: string[]) </code >
| <code>  atomsByElement('C'), atomsByElement('C','O') </code>
| <code>  atomsByElement('C'), atomsByElement('C','O') </code>
| Atoms based on their element symbol (field ''_atom_site.type_symbol'').
| Atoms based on their element symbol (field ''_atom_site.type_symbol'').
|-
|-
| <code>  atomsByName() </code>
| <code>  atomsByName(elements: string[]) </code>
| <code>  atomsByName('C'), atomsByName('N','CA','C','O') </code>
| <code>  atomsByName('C'), atomsByName('N','CA','C','O') </code>
| Atoms based on their atom name (field ''_atom_site.label_atom_id'').
| Atoms based on their atom name (field ''_atom_site.label_atom_id'').
|-
|-
| <code>  atomsById() </code>
| <code>  atomsById(numbers: number[]) </code>
| <code>  atomsById(1), atomsById(1,2,3) </code>
| <code>  atomsById(1), atomsById(1,2,3) </code>
| Atoms based on their integer identifier (field ''_atom_site.id '').
| Atoms based on their integer identifier (field ''_atom_site.id '').
|-
|-
| <code>  residuesByName() </code>
| <code>  residuesByName(elements: string[]) </code>
| <code>  residuesByName('GLY'), residuesByName('ALA', 'HEM', 'PO4') </code>
| <code>  residuesByName('GLY'), residuesByName('ALA', 'PO4') </code>
| Residues based on their residue name (field ''_atom_site.label_comp_id'').
| Residues based on their residue name (field ''_atom_site.label_comp_id'').
|-
|-
| <code>  residuesById() </code>
| <code>  residuesById(numbers: number[]) </code>
| <code>  residuesById(100), residuesById(42,157,238) </code>
| <code>  residuesById(100), residuesById(42,157,238) </code>
| Residues based on integer identified (field ''_atom_site.auth_seq_id'').
| Residues based on integer identified (field ''_atom_site.auth_seq_id'').
|-
|-
| <code>  chainsById() </code>
| <code>  chainsById(elements: string[]) </code>
| <code>  chainsById('A'), chainsById('A', 'B') </code>
| <code>  chainsById('A'), chainsById('A', 'B') </code>
| Polymer chains based on their id (field ''_atom_site.auth_asym_id'').
| Polymer chains based on their id (field ''_atom_site.auth_asym_id'').
Line 47: Line 45:
| <code> backbone() </code>
| <code> backbone() </code>
| <code> backbone() </code>
| <code> backbone() </code>
| Extracts structure backbone defined by certain atom names. '''Protein:''' ''N'', ''CA'', ''C'', ''O''. '''Nucleotide:''' ''P'', ''OP1'', ''OP2'', ''O3' '', ''O5' '', ''C3' '', ''C5' ''
| Extracts structure backbone defined by certain atom names. '''Protein:''' ''N'', ''CA'', ''C'', ''O''. '''Nucleotide:''' ''P'', ''OP1'', ''OP2'', ''O3' '', ''O5' '', ''C3' '', ''C5' ''.
|-
|-
| <code> sidechain() </code>
| <code> sidechain() </code>
Line 63: Line 61:
|<code> cartoon() </code>
|<code> cartoon() </code>
|<code> cartoon() </code>
|<code> cartoon() </code>
| Extracts atoms vital for ''polymer'' cartoon visualization based on their names: ''CA'', ''O'', ''O5' '', ''C3' '', ''N3''
| Extracts atoms vital for ''polymer'' cartoon visualization based on their names: ''CA'', ''O'', ''O5' '', ''C3' '', ''N3''.
|-
|-
| <code> everything() </code>
| <code> everything() </code>
Line 82: Line 80:
Selection description
Selection description
|-
|-
| <code>  inside() </code>
| <code>  inside(where: Selection, sel: Selection) </code>
| <code>  residuesByName('GLY').inside(chainsById('A')) </code>
| <code>  residuesByName('GLY').inside(chainsById('A')) </code>
| All ''Gly'' residues on the ''A'' chain
| Finds selection within another selection.
|-
|-
| <code>  ambientResidues() </code>
| <code>  ambientResidues(where: Selection, nmb: number ) </code>
| <code>  residuesByName('HEM').ambientResidues(5) </code>
| <code>  residuesByName('HEM').ambientResidues(5) </code>
| Blabla
| Surrounds the inner selection by residues that have at least one atom within the given radius
|-
|-
| <code>  wholeResidues() </code>
| <code>  wholeResidues(where: Selection) </code>
| <code>  atomsByElement('Pt').wholeResidues() </code>
| <code>  atomsByElement('Pt').wholeResidues() </code>
| Blabla
| Surrounds the inner selection by all atoms of residue's origin.
|-
|-
|}
|}
Line 100: Line 98:
! colspan="3" | List of selection queries
! colspan="3" | List of selection queries
|-
|-
!
!Query
Query
!Examples
!
!Selection description
Examples
!
Selection description
|-
|-
| <code>  or() </code>
| <code>  or(selections: Selection[]) </code>
| <code>  or() </code>
| <code>  or(residuesByName('HEM').ambientResidues(5), chainsById('A')) </code>
| blabla
| Merges several selections.
|-
|-
| <code>  intersectWith() </code>
| <code>  intersectWith(where: Selection, sel: Selection) </code>
| <code>  residuesByName('HEM').ambientResidues(5).intersectWith(chainsById('A')) </code>
| <code>  residuesByName('HEM').ambientResidues(5).intersectWith(chainsById('A')) </code>
| All the ...
| Finds intersection between two selections.
|-
|-
| <code>  wholeResidues() </code>
| <code>  complement(where: Selection) </code>
| <code>  atomsByElement('Pt').wholeResidues() </code>
| <code>  chainsById('A').complement() </code>
| Blabla
| Finds the complement of the inner selection to the active context.
|-
|-
|}
|}
==PyMOL==
In preparation...
==VMD==
In preparation...

Latest revision as of 12:23, 5 May 2017

LiteMol has an atom selection language available, similar to other structure visualization tools such as VMD or PyMOL. The LiteMol selection algebra is inspired by our other service - PatternQuery. While in the present version the selection syntax will be mainly used by method developers, syntax enabling the use of PyMOL and possibly VMD selection algebra will be introduced in the near future.


LiteMol selection algebra

[edit]

Molecular selections can be created in two different active contexts - model of molecule or molecule visual. If either of the contexts is active in the entity tree, the right panel is populated with the Selection action. Next, you can create a named selection using the dedicated query language and further modify the visual part of your selection.


{{#if: Notice:

| Notice: |large }} Arguments of LiteMol selection queries are case sensitive!

Meaning: GLY is a common non-polar residue found in PDB entries, whereas Gly, gly, or G do not exist.

Basic queries

[edit]
List of selection queries
Query definition Example Selection description
atomsByElement(elements: string[]) atomsByElement('C'), atomsByElement('C','O') Atoms based on their element symbol (field _atom_site.type_symbol).
atomsByName(elements: string[]) atomsByName('C'), atomsByName('N','CA','C','O') Atoms based on their atom name (field _atom_site.label_atom_id).
atomsById(numbers: number[]) atomsById(1), atomsById(1,2,3) Atoms based on their integer identifier (field _atom_site.id ).
residuesByName(elements: string[]) residuesByName('GLY'), residuesByName('ALA', 'PO4') Residues based on their residue name (field _atom_site.label_comp_id).
residuesById(numbers: number[]) residuesById(100), residuesById(42,157,238) Residues based on integer identified (field _atom_site.auth_seq_id).
chainsById(elements: string[]) chainsById('A'), chainsById('A', 'B') Polymer chains based on their id (field _atom_site.auth_asym_id).
backbone() backbone() Extracts structure backbone defined by certain atom names. Protein: N, CA, C, O. Nucleotide: P, OP1, OP2, O3' , O5' , C3' , C5' .
sidechain() sidechain() Complement to the previous query, i.e. all polymer atoms without such name are reported.
hetGroups() hetGroups() HETATM atoms defined by the field _atom_site.group_PDB.
nonHetPolymer() nonHetPolymer() ATOM atoms defined by the field _atom_site.group_PDB.
cartoon() cartoon() Extracts atoms vital for polymer cartoon visualization based on their names: CA, O, O5' , C3' , N3.
everything() everything() All atoms in the active context.

Advanced queries

[edit]
List of selection queries

Query

Examples

Selection description

inside(where: Selection, sel: Selection) residuesByName('GLY').inside(chainsById('A')) Finds selection within another selection.
ambientResidues(where: Selection, nmb: number ) residuesByName('HEM').ambientResidues(5) Surrounds the inner selection by residues that have at least one atom within the given radius
wholeResidues(where: Selection) atomsByElement('Pt').wholeResidues() Surrounds the inner selection by all atoms of residue's origin.

Logical queries

[edit]
List of selection queries
Query Examples Selection description
or(selections: Selection[]) or(residuesByName('HEM').ambientResidues(5), chainsById('A')) Merges several selections.
intersectWith(where: Selection, sel: Selection) residuesByName('HEM').ambientResidues(5).intersectWith(chainsById('A')) Finds intersection between two selections.
complement(where: Selection) chainsById('A').complement() Finds the complement of the inner selection to the active context.