Menu

SVN archive Commit Log


Commit Date  
[r2801] by bugman

Two functions for converting a string bit pattern to a float and a number of IEEE-754 constants.

The fucntions 'bitpatternToFloat()' and 'bitpatternToInt()' have been added to 'float.py'. The
first converts a 64 bit IEEE-754 bit pattern in the form of a string into a 64 bit Python float.
The second converts an arbitrary bit pattern into its integer representation. By looping over each
8 characters of the string (1 byte), 'bitpatternToFloat()' calls 'bitpatternToInt()' to create an
array of integers. Then 'packBytesAsPyFloat()' is called to convert the byte array into the float.
These two functions convert between big and little endian when necessary.

By passing big-endian 64 bit patterns to the 'bitpatternToFloat()' function, the following IEEE-754
constants are defined:
PosZero: 0000000000000000000000000000000000000000000000000000000000000000
NegZero: 1000000000000000000000000000000000000000000000000000000000000000
PosEpsilonDenorm: 0000000000000000000000000000000000000000000000000000000000000001
NegEpsilonDenorm: 1000000000000000000000000000000000000000000000000000000000000001
PosEpsilonNorm: 0000000000010000000000000000000000000000000000000000000000000001
NegEpsilonNorm: 1000000000010000000000000000000000000000000000000000000000000001
PosMax: 0111111111101111111111111111111111111111111111111111111111111111
NegMin: 1111111111101111111111111111111111111111111111111111111111111111
PosInf: 0111111111110000000000000000000000000000000000000000000000000000
NegInf: 1111111111110000000000000000000000000000000000000000000000000000
PosNaN_A: 0111111111110000000000000000000000000000001000000000000000000000
NegNaN_A: 1111111111110000000000000000000000000000001000000000000000000000
PosNaN_B: 0111111111110000000000000000011111111111111111111110000000000000
NegNaN_B: 1111111111110000000000000000011111111111111111111110000000000000
PosNaN_C: 0111111111110101010101010101010101010101010101010101010101010101
NegNaN_C: 1111111111110101010101010101010101010101010101010101010101010101
PosNaN = PosNaN_C
NegNaN = NegNaN_C

2006-11-11 09:57:35 Tree
[r2800] by bugman

Ported r2798 and r2799 from the 1.3 line (fix for bug #7676).

The command used was:
svn merge -r2797:2799 svn+ssh://bugman@.../svn/relax/1.3

These changes fix bug #7676 (https://gna.org/bugs/?7676) reported by Stephen Headey <s dot j dot
headey at massey dot ac dot nz>.

2006-11-10 07:21:56 Tree
[r2799] by bugman

Fix for bug #7676 (https://gna.org/bugs/?7676).

This bug was reported by Stephen Headey <s dot j dot headey at massey dot ac dot nz>. The issue was
originally reported at https://mail.gna.org/public/relax-users/2006-11/msg00003.html (Message-id:
<59ADAF5CA6A8FC4C889BD4097D912BB1072D330D@...>). Together with r2798
(https://mail.gna.org/public/relax-commits/2006-11/msg00096.html) which fixed the issue of not
having 2 header lines, this gives more flexibility in reading XEasy text files.

The function 'self.det_dimensions()' has been added to determine which of w1 or w2 is the proton
dimension. The intensity reading function 'self.intensity_xeasy()' then uses this info to return
the correct proton and heteronucleus names for the given data line.

2006-11-10 07:18:32 Tree
[r2798] by bugman

The intensity reading function now counts the number of header lines in the Sparky or XEasy file.

The function 'self.number_of_header_lines()' has been added. This attempts to execute the intensity
reading functions 'self.intensity_sparky()' or 'self.intensity_xeasy()' and if these fail with
either a RelaxError or an IndexError, then the line is considered a header line. The function will
then return the number of header lines.

2006-11-10 06:48:15 Tree
[r2797] by bugman

Ported r2790 and r2791 from the 1.3 line.

The command used was:
svn merge -r2789:2791 svn+ssh://bugman@.../svn/relax/1.3

These changes enable relax's C modules to be compiled using gcc on Mac OS X.

2006-11-10 06:30:21 Tree
[r2796] by bugman

Complete redesign of 'self.relax.data.diff': auto-calculated objects updated when params are set.

The previous commits redesigned the 'self.relax.data.diff' code so that when a diffusion tensor
object (e.g. Diso, tensor, rotation, etc.) which is not one of the standard internal parameters is
accessed, they would be calculated on the fly. Therefore if you asked for
'self.relax.data.diff[run].tensor', it would first be calculated and then returned. Most of these
automatically created objects were setup when the program was initialised, although a few were
returned by the 'self.__getattr__()' function.

However this approach is incredibly slow. This is especially apparent when each vector of the
spherical vector distribution for creating the geometric representation of the Brownian rotational
diffusion tensor is rotated and then extended to the correct length. The chain of auto-object
creation by other auto-objects dependant on them together with the large number of accesses to
'self.relax.data.diff' caused the implementation to take minutes to create the vector distribution.

Therefore I have completely redesigned the code. Rather than being calculated on the fly, the
objects are created when parameters are set. This uses the 'self.__setattr__()' function. All the
auto-object functions of the file 'data/diff_tensor_auto_objects.py' have been shifted back into the
diffusion tensor class DiffTensorElement. They have been renamed to 'self._calc_'+obj where obj is
the calculated object name. The underscored first character is used by the 'Element' base class
method 'self.__repr__()' to hide the object when printing the contents of 'self.relax.data.diff'.

The 'self.__setattr__()' function consists of two parts. Firstly the 'self.relax.data.diff' object
attribute is set and then the data structures are updated. Before the attribute is set, it is
checked to see if it belongs to a list of modifiable attributes. If it doesn't, a RelaxError is
thrown saying that the object is not modifiable. If it is modifiable, it is set using the
statement:
self.__dict__[name] = value

The objects which are currently updated include:
Diso (the isotropic diffusion rate),
Dpar (the diffusion rate parallel to the unique axis, spheroid only),
Dper (the diffusion rate perpendicular to the unique axis, spheroid only),
Dx (the diffusion rate parallel to the x-axis, ellipsoid only),
Dy (the diffusion rate parallel to the y-axis, ellipsoid only),
Dz (the diffusion rate parallel to the z-axis, ellipsoid only),
Dratio (the ratio of Dpar and Dper, spheroid only),
Dpar_unit (the unit vector parallel to the unique axis, spheroid only),
Dx_unit (the unit vector parallel to the x-axis, ellipsoid only),
Dy_unit (the unit vector parallel to the y-axis, ellipsoid only),
Dz_unit (the unit vector parallel to the z-axis, ellipsoid only),
tensor_diag (the diagonalised diffusion tensor),
rotation (the rotation matrix),
tensor (the diffusion tensor in the PDB frame).

These are all updated using the function 'self._update_object()'. Dependant on the category (val,
err, sim) of the object being set by 'self.__setattr__()', this function updates solely the
value, error, or Monte Carlo simulation objects affected by it. For efficiency it returns without
doing anything if the object being set is not within the 'update_if_set' list. This is a list of
parameter names that, if modified, the 'target' object would then change. The
'self._update_object()' function automatically determines which 'self._calc_xxx()' function to use.
Then to update the 'target', the objects corresponding to the names in the 'depends' list are sent
to the 'self._calc_xxx()' function which then returns the calculated object. If the object being
set belongs to the Monte Carlo simulation category, then the 'self._update_object()' will create an
array by looping over each simulation calling 'self._calc_xxx()' for each sim. The updated object
is then set using the statement:

self.__dict__[target] = value

In the case of MC simulations, 'value' is replaced with 'sim_values'.

2006-11-10 05:39:55 Tree
[r2795] by bugman

More synthetic NMR relaxation data for the model-free system tests of the test suite.

The data was back calculated from the model-free parameters:
S2f = 0.952,
S2s = 0.582,
ts = 32 ns.

The synthetic relaxation data is noise free and consists of the R1, R2, and NOE at both 500 and
600 MHz.

2006-11-10 04:38:05 Tree
[r2794] by varioustoxins

added #! declarations for testing under linux etc

2006-11-09 16:27:17 Tree
[r2793] by macraild

Fix for bug #7675. Removes unneccessary lookup of pdb.load_seq

https://gna.org/bugs/index.php?7675

2006-11-09 11:27:13 Tree
[r2792] by bugman

Modified 'self.vectors()' to place the proton and heteronucleus name in 'self.relax.data.res[run]'.

Previously the names were being placed into 'self.relax.data.pdb[run]' which is problematic for
task #3838 (https://gna.org/task/?3838). This is also preventing the resolution of bug #7544
(https://gna.org/bugs/?7544).

2006-11-09 09:12:19 Tree
Older >
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.