svn+ssh://bugman@.../svn/relax/branches/frame_order_cleanup
........
r23935 | bugman | 2014-06-13 14:03:44 +0200 (Fri, 13 Jun 2014) | 12 lines
Added a script for timing different ways to calculate PCSs and RDCs for multiple vectors.
This uses the timeit module rather than profile to demonstrate the speed of 7 different ways to
calculate the RDCs or PCSs for an array of vectors using numpy. In the frame order analysis, this
is the bottleneck for the quasi-random numerical integration of the PCS.
The log file shows a potential 1 order of magnitude speed up between the 1st technique, which is
currently used in the frame order analysis, and the 7th and last technique. The first technique
loops over each vector, calculating the PCS. The last expands the PCS/RDC equation of the
projection of the vector into the alignment tensor, and calculates all PCSs simultaneously.
........
r23936 | bugman | 2014-06-13 15:25:28 +0200 (Fri, 13 Jun 2014) | 8 lines
Added another timing script for RDC and PCS calculation timings.
This time, the calculation for multiple alignments is now being timed. An addition set of methods
for calculating the values via tensor projections have been added. For 5 alignments and 200
vectors, this demonstrates a potential 20x speed up for this part of the RDC/PCS calculation. Most
of this speed up should be obtainable for the numerical PCS integration in the frame order models.
........
r23943 | bugman | 2014-06-13 17:43:50 +0200 (Fri, 13 Jun 2014) | 8 lines
Small speed up for all of the frame order models.
The PCS averaging in the quasi-random numerical integration functions now uses the multiply() and
divide() numpy methods to eliminate a loop over the alignments. For this, a new dimension over the
spins was added to the PCS constant calculated in the target function __init__() method. In one
test of the pseudo-ellipse, the time dropped from 191 seconds to 172.
........
r23947 | bugman | 2014-06-13 19:51:26 +0200 (Fri, 13 Jun 2014) | 6 lines
Added another timing script for helping with speeding up the frame order analysis.
This is for the part where the rotation matrix for each Sobol' integration point is shifted into the
eigenframe.
........
r23948 | bugman | 2014-06-13 19:54:40 +0200 (Fri, 13 Jun 2014) | 3 lines
Python 3 fix for the CaM frame order system test base script.
........
r23969 | bugman | 2014-06-16 09:02:19 +0200 (Mon, 16 Jun 2014) | 5 lines
Added the full optimisation results for the torsionless isotropic cone frame order model.
This is for the CaM test data using the new frame_order.py optimisation script.
........
r23970 | bugman | 2014-06-16 11:05:28 +0200 (Mon, 16 Jun 2014) | 12 lines
Small speed ups for all of the frame order models in the quasi-random numerical PCS integration.
These changes result in an ~10% speed up. Testing via the func_pseudo_ellipse() target function
using the relax profiling flag, the time for one optimisation decreased from 158 to 146 seconds.
The changes consist of pre-calculating all rotations of the rotation matrix into the motional
eigenframe in one mathematical operation rather than one operation per Sobol' point rotation,
unpacking the Sobol' points into the respective angles prior to looping over the points, and taking
the absolute value of the torsion angle and testing if it is out of the bounds rather than checking
both the negative and positive values.
........
r23971 | bugman | 2014-06-16 11:07:44 +0200 (Mon, 16 Jun 2014) | 8 lines
Attempt at speeding up the torsionless pseudo-ellipse frame order model.
The check if the Sobol' point is outside of an isotropic cone defined by the largest angle theta_y
is now performed to avoid many unnecessary calls to the tmax_pseudo_ellipse() function.
This however reveals a problem with the test suite data for this model.
........
r23972 | bugman | 2014-06-16 11:11:13 +0200 (Mon, 16 Jun 2014) | 7 lines
Updated all of the CaM frame order system tests for the recent speed up (r23970).
The speed up switched to the use of numpy.tensordot() for shifting each Sobol' rotation into the
eigenframe rather than the previous numpy.dot(). Strangely this affects the precision and hence the
chi-squared value calculated for each system test - both increasing and decreasing it randomly.
........
r23973 | bugman | 2014-06-16 11:40:37 +0200 (Mon, 16 Jun 2014) | 5 lines
The frame order target function calc_vectors() method arguments have all been converted to keywords.
This is in preparation for handling a second pivot argument for the double rotor model.
........
r23974 | bugman | 2014-06-16 11:49:10 +0200 (Mon, 16 Jun 2014) | 7 lines
Updated the double rotor frame order model to be in a pseudo-functional state.
Bugs in the target function method have been removed, the calc_vectors() target function now accepts
the pivot2 argument (but does nothing with it yet), and the lib.frame_order.double_rotor module has
been updated to match the logic used in all other lib.frame_order modules.
........
r23975 | bugman | 2014-06-16 12:05:39 +0200 (Mon, 16 Jun 2014) | 3 lines
The frame_order.pdb_model user function no longer tries to create a cone object for the double rotor.
........
r23976 | bugman | 2014-06-16 16:03:55 +0200 (Mon, 16 Jun 2014) | 3 lines
Added a timeit script and log file for different ways of checking a binary numpy array.
........
r23977 | bugman | 2014-06-16 17:08:10 +0200 (Mon, 16 Jun 2014) | 8 lines
Modified the rigid_test.py system test script to really be the rigid case.
This is used in all of the Frame_order.test_rigid_data_to_*_model system tests. Previously the
parameters of the dynamics were set to being close to zero, to catch the cases were a few Sobol'
PCS integration points were accepted. But now the case were no Sobol' points can be used is being
tested. This checks a code path currently untested in the test suite, demonstrating many failures.
........
r23978 | bugman | 2014-06-16 17:30:30 +0200 (Mon, 16 Jun 2014) | 7 lines
Fix for the frame order matrix calculation for a pseudo-elliptic cone with angles of zero degrees.
The lib.frame_order.pseudo_ellipse_torsionless.compile_2nd_matrix_pseudo_ellipse_torsionless()
function has been changed to prevent a divide by zero failure. The surface area normalisation
factor now defaults to 0.0.
........
r23979 | bugman | 2014-06-16 17:39:25 +0200 (Mon, 16 Jun 2014) | 7 lines
Fixes for all PCS numeric integration for all frame order models in the rigid case.
The exact PCS values for the rigid state are now correctly calculated when no Sobol' points lie
within the motional model. The identity matrix is used to set the rotation to zero, and the PCS
values are now multiplied by the constant.
........
r23980 | bugman | 2014-06-16 17:40:42 +0200 (Mon, 16 Jun 2014) | 5 lines
Updates for the chi-squared value in all the Frame_order.test_rigid_data_to_*_model system tests.
This is now much reduced as the true rigid state is now being tested for.
........
r23981 | bugman | 2014-06-16 17:53:11 +0200 (Mon, 16 Jun 2014) | 3 lines
Fix for the fix of r23978, the theta_x angle should be checked for zero as it is the smallest.
........
r23982 | bugman | 2014-06-16 18:10:07 +0200 (Mon, 16 Jun 2014) | 10 lines
The rigid frame order matrix for the pseudo-ellipse models is now correctly handled.
This allows the rigid case RDCs to be correctly calculated for both the pseudo-ellipse and
torsionless pseudo-ellipse models. The previous catch of the theta_x cone angle of zero was
incorrectly recreating the frame order matrix, which really should be the identity matrix. However
truncation artifacts due to the quadratic SciPy integration still cause the model to be
ill-conditioned near the rigid case. The rigid case is correctly handled, but a tiny shift of the
parameters off zero cause a discontinuity.
........
r23983 | bugman | 2014-06-16 18:28:49 +0200 (Mon, 16 Jun 2014) | 3 lines
Fix for the rigid frame order model broken at r23973.
........