Package prompt :: Module unselect :: Class Unselect
[hide private]
[frames] | no frames]

Class Unselect

source code

Instance Methods [hide private]
 
__init__(self, relax) source code
 
all(self, run=None)
Function for unselecting all residues.
source code
 
read(self, run=None, file=None, dir=None, change_all=0, column=0)
Function for unselecting the residues contained in a file.
source code
 
res(self, run=None, num=None, name=None, change_all=0)
Function for unselecting 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 unselecting 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 unselect all residues type:

relax> unselect.all()


To unselect 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, column=0)

source code 
Function for unselecting 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 unselect.

dir:  The directory where the file is located.

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

column:  The column containing the residue numbers (defaulting to 0, the first column).


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

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 selected.


Examples
~~~~~~~~

To unselect all overlapped residues in the file 'unresolved', type:

relax> unselect.read('noe', 'unresolved')
relax> unselect.read(run='noe', file='unresolved')

To unselect the residues in the second column of the relaxation data file 'r1.600' while
selecting all other residues, type one of: 

relax> unselect.read('test', 'r1.600', change_all=1, column=1)
relax> unselect.read(run='test', file='r1.600', change_all=1, column=1)

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

source code 
Function for unselecting 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 unselecting a single residue or a python
regular expression, in string form, for unselecting 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 selected.


Examples
~~~~~~~~

To unselect all glycines for the run 'm5', type:

relax> unselect.res(run='m5', name='GLY|ALA')
relax> unselect.res(run='m5', name='[GA]L[YA]')

To unselect residue 12 MET type:

relax> unselect.res('m5', 12)
relax> unselect.res('m5', 12, 'MET')
relax> unselect.res('m5', '12')
relax> unselect.res('m5', '12', 'MET')
relax> unselect.res(run='m5', num='12', name='MET')

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> unselect.reverse()