Navigation: Documentation / Control file / Mask format


In most cases, collective variables depend on positions of certain atoms. For their specification, PMFLib uses ASL masks. The mask usage usually simplifies sometimes tedious work during atom enumeration. Other benefit is that input entries are more readable. The ASL format is similar to the AMBER mask specification with several extensions.

Important NOTE: Distance operators are aplied only once at the PMFLib startup. They are not aplied in the course of molecular dynamics simulations!


Typical example of atom specification

# specification of collective variables 
{CVS}
[DIS]
name            d1
group_a         :102,200,476,477,480 & @N,CA,C        ! use all backbone atoms of residues 102,200,476,477,480
group_b         :543                                  ! use all atom of residue 543

ASL mask syntax

rule = * | string | substring= | number | number1-number2

The rule specifies either all strings (*), given string, given substring, specific index of number or indexes within number1 to number2 range. The string can be most four character long. Indexes are counted from 1. Indexes, which are out of legal range, are silently ignored.


rules = rule[,rule[,...]]

The rules are composed from individual rules separated by comma. It has to contain at least one rule.


unary_selection = @rules | @%rules | :rules

The unary selection can be either selection of atoms (@), atoms of given type (@%) or atoms of residues (:).


composed_selection = :rules@rules | :rules@%rules

The composed selection is composed of residue selection followed by either atom or type selections. This is equivalent to combination of unary selections by "&" operator.


object = origin | cbox | com(selection) | list(selection)

The object can be used as left hand argument for distance operator. It can be either position of coordinate system origin (origin), position of centre of box (cbox), centre of mass of atoms from selection (com), or any atom from the list of atoms of selection (list).


distance_selection = selection DISTOPERATOR distance | object DISTOPERATOR distance

The distance selection allows select either atoms or atoms of residues that are within distance or farther than distance from any atom of selection or object. Distance operators are following: "<:", ">:" for atoms of residues and "<@", ">@" for atoms. Distance is in Angstroms.


selection = unary_selection | composed_selection | distance_selection
selection OPERATOR selection
! selection
( selection )

The final selection can be composed from unary, composed or distance selections. The selections can be combined by AND logical operator (&) or OR logical operator (|). The selection can also be negated by exclamation mark (!). Individual selections can be grouped by round brackets.


Processing priorities

This section summarizes priority of individual parts of ASL mask. The priority in descending order is following:

  • brackets
  • distance operators
  • !, &, | operators
  • :, @, @% selectors

It is wise to use parentheses whenever you are not sure about operator priority.


Examples

:1,2,3 Select residues with index 1, 2 and 3. This can be rewrite using index range as :1-3
:ASN Select all aspargines.
:ASN,1-10,GLY Select all aspargines, glycines and residues from 1 to 10.
@CA,C,N,O Select all CA, C, N, and O atoms (in proteins these atoms form the backbone).
:5-10@CA,C,N,O Select CA, C, N, and O atoms of residues from 5 to 10.