Author: bugman Date: Tue Jun 3 18:12:00 2014 New Revision: 23625 URL: http://svn.gna.org/viewcvs/relax?rev=23625&view=rev Log: Changed the creation of Sobol' points for numerical integration in the frame order target functions. The points are now all created at once using the i4_sobol_generate() rather than i4_sobol() function from the extern.sobol.sobol_lib module. Modified: branches/frame_order_cleanup/target_functions/frame_order.py Modified: branches/frame_order_cleanup/target_functions/frame_order.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/target_functions/frame_order.py?rev=23625&r1=23624&r2=23625&view=diff ============================================================================== --- branches/frame_order_cleanup/target_functions/frame_order.py (original) +++ branches/frame_order_cleanup/target_functions/frame_order.py Tue Jun 3 18:12:00 2014 @@ -29,7 +29,7 @@ from numpy.linalg import norm # relax module imports. -from extern.sobol.sobol_lib import i4_sobol +from extern.sobol.sobol_lib import i4_sobol_generate from lib.alignment.alignment_tensor import to_5D, to_tensor from lib.alignment.pcs import pcs_tensor from lib.alignment.rdc import rdc_tensor @@ -1173,11 +1173,11 @@ self.sobol_angles = zeros((n, m), float32) self.Ri_prime = zeros((n, 3, 3), float64) + # The Sobol' points. + points = i4_sobol_generate(m, n, 0) + # Loop over the points. for i in range(n): - # The raw point. - point, seed = i4_sobol(m, i) - # Loop over the dimensions, converting the points to angles. theta = None phi = None @@ -1185,17 +1185,17 @@ for j in range(m): # The tilt angle - the angle of rotation about the x-y plane rotation axis. if dims[j] in ['theta']: - theta = acos(2.0*point[j] - 1.0) + theta = acos(2.0*points[j, i] - 1.0) self.sobol_angles[i, j] = theta # The angle defining the x-y plane rotation axis. if dims[j] in ['phi']: - phi = 2.0 * pi * point[j] + phi = 2.0 * pi * points[j, i] self.sobol_angles[i, j] = phi # The torsion angle - the angle of rotation about the z' axis. if dims[j] in ['sigma', 'sigma2']: - sigma = 2.0 * pi * (point[j] - 0.5) + sigma = 2.0 * pi * (points[j, i] - 0.5) self.sobol_angles[i, j] = sigma # Pre-calculate the rotation matrix for the full tilt-torsion.