view(self,
run=None,
data_type=None,
file=None,
dir=' grace ' ,
grace_exe=' xmgrace ' ,
force=0)
| source code
|
Function for running Grace.
Keyword Arguments
~~~~~~~~~~~~~~~~~
run: The name of the run.
data_type: The data type.
file: The name of the file.
dir: The directory name.
grace_exe: The Grace executable file.
force: A flag which, if set to 1, will cause the file to be overwritten.
Description
~~~~~~~~~~~
This function can be used either to execute grace, opening the specified file, or to create
the grace '.agr' file and the execute grace. If the run and data_type arguments are
supplied, the second of these two options is pursued. To simply execute grace, leave the
run and data_type arguments as None.
If the directory name is set to None, the file will be placed in the current working
directory.
The force flag will only have an effect if the run argument is not None.
Examples
~~~~~~~~
To view the file 's2.agr' in the directory 'grace', type:
relax> grace.view(file='s2.agr')
relax> grace.view(file='s2.agr', dir='grace')
To write the NOE values from the run 'noe' to the grace file 'noe.agr' and then view the
file, type:
relax> grace.view('noe', 'noe', 'noe.agr')
relax> grace.view('noe', data_type='noe', file='noe.agr')
relax> grace.view(run='noe', data_type='noe', file='noe.agr', dir='grace')
Regular expression
~~~~~~~~~~~~~~~~~~
The python function 'match', which uses regular expression, is used to determine which data
type to set values to, therefore various data_type strings can be used to select the same
data type. Patterns used for matching for specific data types are listed below. Regular
expression is also used in residue name and number selections, except this time the user
supplies the regular expression string.
This is a short description of python regular expression, for more information, see the
regular expression syntax section of the Python Library Reference. Some of the regular
expression syntax used in this function is:
[] - A sequence or set of characters to match to a single character. For example,
'[Ss]2' will match both 'S2' and 's2'.
^ - Match the start of the string.
$ - Match the end of the string. For example, '^[Ss]2$' will match 's2' but not 'S2f'
or 's2s'.
Model-free data type string matching patterns
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
____________________________________________________________________________________________
| | | |
| Data type | Object name | Patterns |
|________________________|______________|__________________________________________________|
| | | |
| Bond length | r | '^r$' or '[Bb]ond[ -_][Ll]ength' |
|________________________|______________|__________________________________________________|
| | | |
| CSA | csa | '^[Cc][Ss][Aa]$' |
|________________________|______________|__________________________________________________|
| | | |
| Chemical exchange | rex | '^[Rr]ex$' or '[Cc]emical[ -_][Ee]xchange' |
|________________________|______________|__________________________________________________|
| | | |
| Order parameter S2 | s2 | '^[Ss]2$' |
|________________________|______________|__________________________________________________|
| | | |
| Order parameter S2f | s2f | '^[Ss]2f$' |
|________________________|______________|__________________________________________________|
| | | |
| Order parameter S2s | s2s | '^[Ss]2s$' |
|________________________|______________|__________________________________________________|
| | | |
| Correlation time te | te | '^te$' |
|________________________|______________|__________________________________________________|
| | | |
| Correlation time tf | tf | '^tf$' |
|________________________|______________|__________________________________________________|
| | | |
| Correlation time ts | ts | '^ts$' |
|________________________|______________|__________________________________________________|
| | | |
| Local tm | tm | '^tm$' |
|________________________|______________|__________________________________________________|
Reduced spectral density mapping data type string matching patterns
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
____________________________________________________________________________________________
| | | |
| Data type | Object name | Patterns |
|________________________|______________|__________________________________________________|
| | | |
| Bond length | r | '^r$' or '[Bb]ond[ -_][Ll]ength' |
|________________________|______________|__________________________________________________|
| | | |
| CSA | csa | '^[Cc][Ss][Aa]$' |
|________________________|______________|__________________________________________________|
NOE calculation data type string matching patterns
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
____________________________________________________________________________________________
| | | |
| Data type | Object name | Patterns |
|________________________|______________|__________________________________________________|
| | | |
| Reference intensity | ref | '^[Rr]ef$' or '[Rr]ef[ -_][Ii]nt' |
|________________________|______________|__________________________________________________|
| | | |
| Saturated intensity | sat | '^[Ss]at$' or '[Ss]at[ -_][Ii]nt' |
|________________________|______________|__________________________________________________|
| | | |
| NOE | noe | '^[Nn][Oo][Ee]$' |
|________________________|______________|__________________________________________________|
|