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

Class OpenDX

source code

Instance Methods [hide private]
 
__init__(self, relax) source code
 
execute(self, file='map', dir='dx', dx_exe='dx', vp_exec=1)
Function for running OpenDX.
source code
 
map(self, run=None, res_num=None, map_type='Iso3D', inc=20, lower=None, upper=None, swap=None, file='map', dir='dx', point=None, point_file='point', remap=None, labels=None)
Function for creating a map of the given space in OpenDX format.
source code
Method Details [hide private]

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

source code 
Function for running 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 is 1 which turns execution on.  Setting the value to zero turns
execution off.

map(self, run=None, res_num=None, map_type='Iso3D', inc=20, lower=None, upper=None, swap=None, file='map', dir='dx', point=None, point_file='point', remap=None, labels=None)

source code 
Function for creating a map of the given space in OpenDX format.

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

run:  The name of the run.

res_num:  The residue number.

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

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.

swap:  An array used to swap the position of the axes.  The length of the array should be
the same as the number of parameters in the model.  The values should be integers specifying
which elements to interchange.  For example if swap equals [0, 1, 2] for a three parameter
model then the axes are not interchanged whereas if swap equals [1, 0, 2] then the first and
second dimensions are interchanged.

file:  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.

labels:  The axis labels.  If supplied this argument should be an array of strings of length
equal to the number of parameters.


Map type
~~~~~~~~

The map type can be changed by supplying the 'map_type' keyword argument.  Here is a list of
currently supported map types:
_____________________________________________________________________________
|                                           |                               |
| Surface type                              | Pattern                       |
|___________________________________________|_______________________________|
|                                           |                               |
| 3D isosurface                             | '^[Ii]so3[Dd]'                |
|___________________________________________|_______________________________|

Pattern syntax is simply regular expression syntax where square brackets [] means any
character within the brackets, ^ means the start of the string, etc.


Examples
~~~~~~~~

The following commands will generate a map of the extended model-free space defined as run
'm5' which consists of the parameters {S2f, S2s, ts}.  Files will be output into the
directory 'dx' and will be prefixed by 'map'.  The residue, in this case, is number 6.

relax> map('m5', 6)
relax> map('m5', 6, 20, "map", "dx")
relax> map('m5', res_num=6, file="map", dir="dx")
relax> map(run='m5', res_num=6, inc=20, file="map", dir="dx")
relax> map(run='m5', res_num=6, type="Iso3D", inc=20, swap=[0, 1, 2], file="map", dir="dx")


The following commands will swap the S2s and ts axes of this map.

relax> map('m5', res_num=6, swap=[0, 2, 1])
relax> map(run='m5', res_num=6, type="Iso3D", inc=20, swap=[0, 2, 1], file="map", dir="dx")


To map the model-free space 'm4' defined by the parameters {S2, te, Rex}, name the results
'test', and not place the files in a subdirectory, use the following commands (assuming
residue 2).

relax> map('m4', res_num=2, file='test', dir=None)
relax> map(run='m4', res_num=2, inc=100, file='test', dir=None)