Author: bugman Date: Fri Nov 21 10:29:34 2014 New Revision: 26681 URL: http://svn.gna.org/viewcvs/relax?rev=26681&view=rev Log: Bug fix for the lib.structure.angles.angles_*() functions for odd increments. This affects the PDB representations of the diffusion tensor and frame order when the number of increments in the respective user functions is set to an odd number. It really only affects the frame_order.pdb_model user functions, as the number of increments cannot be set in any of the other user functions (structure.create_diff_tensor_pdb, structure.create_rotor_pdb, structure.create_vector_dist, n_state_model.cone_pdb). Modified: trunk/lib/structure/angles.py Modified: trunk/lib/structure/angles.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/structure/angles.py?rev=26681&r1=26680&r2=26681&view=diff ============================================================================== --- trunk/lib/structure/angles.py (original) +++ trunk/lib/structure/angles.py Fri Nov 21 10:29:34 2014 @@ -40,9 +40,9 @@ u[i] = float(i) * val # Generate the increment values of v. - v = zeros(inc/2+1, float64) - val = 1.0 / float(inc/2) - for i in range(int(inc/2+1)): + v = zeros(int(inc/2.0+1.0), float64) + val = 1.0 / float(inc/2.0) + for i in range(int(inc/2.0+1.0)): v[i] = float(i) * val # Generate the distribution of spherical angles theta. @@ -73,9 +73,9 @@ u[i] = float(i) * val # Generate the increment values of v. - v = zeros(inc/2+2, float64) - val = 1.0 / float(inc/2) - for i in range(1, int(inc/2)+1): + v = zeros(int(inc/2.0+2.0), float64) + val = 1.0 / float(inc/2.0) + for i in range(1, int(inc/2.0)+1): v[i] = float(i-1) * val + val/2.0 v[-1] = 1.0