Package prompt :: Module dx :: Class OpenDX
[hide private]
[frames] | no frames]

Class OpenDX

source code


Class for interfacing with OpenDX.

Instance Methods [hide private]
 
execute(self, file='map', dir='dx', dx_exe='dx', vp_exec=True)
Execution of OpenDX.
source code
 
map(self, params=None, map_type='Iso3D', spin_id=None, inc=20, lower=None, upper=None, axis_incs=5, file_prefix='map', dir='dx', point=None, point_file='point', remap=None)
Create a map of the given space in OpenDX format.
source code

Inherited from base_class.User_fn_class: __init__

Method Details [hide private]

execute(self, file='map', dir='dx', dx_exe='dx', vp_exec=True)

source code 
Execution of OpenDX.

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

file:  The file name prefix.  For example if file is set to 'temp', then the OpenDX program temp.net
will be loaded.

dir:  The directory to change to for running OpenDX.  If this is set to None, OpenDX will be run in
the current directory.

dx_exe:  The OpenDX executable file.

vp_exec:  A flag specifying whether to execute the visual program automatically at start-up.  The
default of True causes the program to be executed.

map(self, params=None, map_type='Iso3D', spin_id=None, inc=20, lower=None, upper=None, axis_incs=5, file_prefix='map', dir='dx', point=None, point_file='point', remap=None)

source code 
Create a map of the given space in OpenDX format.

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

params:  The parameters to be mapped.  This argument should be an array of strings, the meanings of
which are described below.

map_type:  The type of map to create.  For example the default, a 3D isosurface, the type is
'Iso3D'.  See below for more details.

spin_id:  The spin identification numbe.

inc:  The number of increments to map in each dimension.  This value controls the resolution of the
map.

lower:  The lower bounds of the space.  If you wish to change the lower bounds of the map then
supply an array of length equal to the number of parameters in the model.  A lower bound for each
parameter must be supplied.  If nothing is supplied then the defaults will be used.

upper:  The upper bounds of the space.  If you wish to change the upper bounds of the map then
supply an array of length equal to the number of parameters in the model.  A upper bound for each
parameter must be supplied.  If nothing is supplied then the defaults will be used.

axis_incs:  The number of increments or ticks displaying parameter values along the axes of the
OpenDX plot.

file_prefix:  The file name.  All the output files are prefixed with this name.  The main file
containing the data points will be called the value of 'file'.  The OpenDX program will be called
'file.net' and the OpenDX import file will be called 'file.general'.

dir:  The directory to output files to.  Set this to 'None' if you do not want the files to be
placed in subdirectory.  If the directory does not exist, it will be created.

point:  An array of parameter values where a point in the map, shown as a red sphere, will be
placed.  The length must be equal to the number of parameters.

point_file:  The name of that the point output files will be prefixed with.

remap:  A user supplied remapping function.  This function will receive the parameter array and must
return an array of equal length.


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

The map type can be changed to one of the following supported map types:
_____________________________________________________________________________
|                                           |                               |
| Surface type                              | Name                          |
|___________________________________________|_______________________________|
|                                           |                               |
| 3D isosurface                             | 'Iso3D'                       |
|___________________________________________|_______________________________|


Examples
~~~~~~~~

The following commands will generate a map of the extended model-free space for model 'm5'
consisting of the parameters {S2, S2f, ts}.  Files will be output into the
directory 'dx' and will be prefixed by 'map'.  In this case, the system is a protein and
residue number 6 will be mapped.

relax> dx.map(['s2', 's2f', 'ts'], spin_id=':6')
relax> dx.map(['s2', 's2f', 'ts'], spin_id=':6', file_prefix='map', dir='dx')
relax> dx.map(params=['s2', 's2f', 'ts'], spin_id=':6', inc=20, file_prefix='map', dir='dx')
relax> dx.map(params=['s2', 's2f', 'ts'], spin_id=':6', map_type='Iso3D', inc=20,
              file_prefix='map', dir='dx')


To map the model-free space 'm4' for residue 2, spin N6 defined by the parameters {S2, te,
Rex}, name the results 'test', and to place the files in the current directory, use one of
the following commands:

relax> dx.map(['s2', 'te', 'rex'], spin_id=':2@N6', file_prefix='test', dir=None)
relax> dx.map(params=['s2', 'te', 'rex'], spin_id=':2@N6', inc=100, file_prefix='test', dir=None)


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.

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

    '.':  Match any character.

    'x*':  Match the character 'x' any number of times, for example 'x' will match, as will 'xxxxx'.

    '.*':  Match any sequence of characters of any length.

Importantly, do not supply a string for the data type containing regular expression.  The regular
expression is implemented so that various strings can be supplied which all match the same data
type.


Diffusion tensor parameter string matching patterns
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

____________________________________________________________________________________________
|                                                        |              |                  |
| Data type                                              | Object name  | Patterns         |
|________________________________________________________|______________|__________________|
|                                                        |              |                  |
| Global correlation time - tm                           | 'tm'         | '^tm$'           |
|                                                        |              |                  |
| Isotropic component of the diffusion tensor - Diso     | 'Diso'       | '[Dd]iso'        |
|                                                        |              |                  |
| Anisotropic component of the diffusion tensor - Da     | 'Da'         | '[Dd]a'          |
|                                                        |              |                  |
| Rhombic component of the diffusion tensor - Dr         | 'Dr'         | '[Dd]r$'         |
|                                                        |              |                  |
| Eigenvalue associated with the x-axis of the diffusion | 'Dx'         | '[Dd]x'          |
| diffusion tensor - Dx                                  |              |                  |
|                                                        |              |                  |
| Eigenvalue associated with the y-axis of the diffusion | 'Dy'         | '[Dd]y'          |
| diffusion tensor - Dy                                  |              |                  |
|                                                        |              |                  |
| Eigenvalue associated with the z-axis of the diffusion | 'Dz'         | '[Dd]z'          |
| diffusion tensor - Dz                                  |              |                  |
|                                                        |              |                  |
| Diffusion coefficient parallel to the major axis of    | 'Dpar'       | '[Dd]par'        |
| the spheroid diffusion tensor - Dpar                   |              |                  |
|                                                        |              |                  |
| Diffusion coefficient perpendicular to the major axis  | 'Dper'       | '[Dd]per'        |
| of the spheroid diffusion tensor - Dper                |              |                  |
|                                                        |              |                  |
| Ratio of the parallel and perpendicular components of  | 'Dratio'     | '[Dd]ratio'      |
| the spheroid diffusion tensor - Dratio                 |              |                  |
|                                                        |              |                  |
| The first Euler angle of the ellipsoid diffusion       | 'alpha'      | '^a$' or 'alpha' |
| tensor - alpha                                         |              |                  |
|                                                        |              |                  |
| The second Euler angle of the ellipsoid diffusion      | 'beta'       | '^b$' or 'beta'  |
| tensor - beta                                          |              |                  |
|                                                        |              |                  |
| The third Euler angle of the ellipsoid diffusion       | 'gamma'      | '^g$' or 'gamma' |
| tensor - gamma                                         |              |                  |
|                                                        |              |                  |
| The polar angle defining the major axis of the         | 'theta'      | 'theta'          |
| spheroid diffusion tensor - theta                      |              |                  |
|                                                        |              |                  |
| The azimuthal angle defining the major axis of the     | 'phi'        | 'phi'            |
| spheroid diffusion tensor - phi                        |              |                  |
|________________________________________________________|______________|__________________|


Model-free data type string matching patterns
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

_____________________________________________
|                        |                  |
| Data type              | Object name      |
|________________________|__________________|
|                        |                  |
| Local tm               | 'local_tm'       |
|                        |                  |
| Order parameter S2     | 's2'             |
|                        |                  |
| Order parameter S2f    | 's2f'            |
|                        |                  |
| Order parameter S2s    | 's2s'            |
|                        |                  |
| Correlation time te    | 'te'             |
|                        |                  |
| Correlation time tf    | 'tf'             |
|                        |                  |
| Correlation time ts    | 'ts'             |
|                        |                  |
| Chemical exchange      | 'rex'            |
|                        |                  |
| Bond length            | 'r'              |
|                        |                  |
| CSA                    | 'csa'            |
|                        |                  |
| Heteronucleus type     | 'heteronuc_type' |
|                        |                  |
| Proton type            | 'proton_type'    |
|________________________|__________________|