Package prompt :: Module select :: Class Select
[hide private]
[frames] | no frames]

Class Select

source code

Instance Methods [hide private]
 
__init__(self, relax) source code
 
all(self, run=None)
Function for selecting all residues.
source code
 
read(self, run=None, file=None, dir=None, change_all=0)
Function for selecting the residues contained in a file.
source code
 
res(self, run=None, num=None, name=None, change_all=0)
Function for selecting specific residues.
source code
 
reverse(self, run=None)
Function for the reversal of the residue selection.
source code
Method Details [hide private]

all(self, run=None)

source code 
Function for selecting all residues.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run(s).  By supplying a single string, array of strings, or None, a
single run, multiple runs, or all runs will be selected respectively.


Examples
~~~~~~~~

To select all residues for all runs type:

relax> select.all()


To select all residues for the run 'srls_m1', type:

relax> select.all('srls_m1')
relax> select.all(run='srls_m1')

read(self, run=None, file=None, dir=None, change_all=0)

source code 
Function for selecting the residues contained in a file.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run(s).  By supplying a single string, array of strings, or None, a
single run, multiple runs, or all runs will be selected respectively.

file:  The name of the file containing the list of residues to select.

dir:  The directory where the file is located.

change_all:  A flag specifying if all other residues should be changed.


Description
~~~~~~~~~~~

The file must contain one residue number per line.  The number is taken as the first column
of the file and all other columns are ignored.  Empty lines and lines beginning with a hash
are ignored.

The 'change_all' flag argument default is zero meaning that all residues currently either
selected or unselected will remain that way.  Setting the argument to 1 will cause all
residues not specified in the file to be unselected.


Examples
~~~~~~~~

To select all residues in the file 'isolated_peaks', type:

relax> select.read('noe', 'isolated_peaks')
relax> select.read(run='noe', file='isolated_peaks')

res(self, run=None, num=None, name=None, change_all=0)

source code 
Function for selecting specific residues.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run(s).  By supplying a single string, array of strings, or None, a
single run, multiple runs, or all runs will be selected respectively.

num:  The residue number.

name:  The residue name.

change_all:  A flag specifying if all other residues should be changed.


Description
~~~~~~~~~~~

The residue number can be either an integer for selecting a single residue or a python
regular expression, in string form, for selecting multiple residues.  For details about
using regular expression, see the python documentation for the module 're'.

The residue name argument must be a string.  Regular expression is also allowed.

The 'change_all' flag argument default is zero meaning that all residues currently either
selected or unselected will remain that way.  Setting the argument to 1 will cause all
residues not specified by 'num' or 'name' to become unselected.


Examples
~~~~~~~~

To select only glycines and alanines for the run 'm3', assuming they have been loaded with
the names GLY and ALA, type:

relax> select.res(run='m3', name='GLY|ALA', change_all=1)
relax> select.res(run='m3', name='[GA]L[YA]', change_all=1)

To select residue 5 CYS in addition to the currently selected residues, type:

relax> select.res('m3', 5)
relax> select.res('m3', 5, 'CYS')
relax> select.res('m3', '5')
relax> select.res('m3', '5', 'CYS')
relax> select.res(run='m3', num='5', name='CYS')

reverse(self, run=None)

source code 
Function for the reversal of the residue selection.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run(s).  By supplying a single string, array of strings, or None, a
single run, multiple runs, or all runs will be selected respectively.


Examples
~~~~~~~~

To unselect all currently selected residues and select those which are unselected type:

relax> select.reverse()