Author: bugman Date: Tue Jun 30 11:21:49 2009 New Revision: 9164 URL: http://svn.gna.org/viewcvs/relax?rev=9164&view=rev Log: Added checks for the presence of the data structures necessary for frame_order.cone_pdb(). Modified: branches/frame_order/specific_fns/frame_order.py Modified: branches/frame_order/specific_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order/specific_fns/frame_order.py?rev=9164&r1=9163&r2=9164&view=diff ============================================================================== --- branches/frame_order/specific_fns/frame_order.py (original) +++ branches/frame_order/specific_fns/frame_order.py Tue Jun 30 11:21:49 2009 @@ -37,7 +37,7 @@ from maths_fns import frame_order_models from maths_fns.frame_order_matrix_ops import generate_vector from maths_fns.rotation_matrix import R_2vect -from relax_errors import RelaxInfError, RelaxNaNError, RelaxNoModelError +from relax_errors import RelaxError, RelaxInfError, RelaxNaNError, RelaxNoModelError from relax_io import open_write_file from specific_fns.base_class import Common_functions @@ -316,6 +316,16 @@ # Alias the current data pipe. cdp = pipes.get_pipe() + + # Test for the data structures. + if not hasattr(cdp, 'theta_cone'): + raise RelaxError, "The cone angle theta_cone does not exist." + if not hasattr(cdp, 'theta_axis'): + raise RelaxError, "The cone polar angle theta_axis does not exist." + if not hasattr(cdp, 'phi_axis'): + raise RelaxError, "The cone azimuthal angle phi_axis does not exist." + if not hasattr(cdp, 'pivot'): + raise RelaxError, "The pivot point for the cone motion has not been set." # The cone axis. cone_axis = zeros(3, float64)