Author: bugman Date: Fri May 11 20:29:02 2012 New Revision: 16246 URL: http://svn.gna.org/viewcvs/relax?rev=16246&view=rev Log: Fixes for most of the structure user functions - the pipe check is now performed at the start. Modified: 1.3/generic_fns/structure/main.py Modified: 1.3/generic_fns/structure/main.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/main.py?rev=16246&r1=16245&r2=16246&view=diff ============================================================================== --- 1.3/generic_fns/structure/main.py (original) +++ 1.3/generic_fns/structure/main.py Fri May 11 20:29:02 2012 @@ -103,6 +103,9 @@ def delete(): """Simple function for deleting all structural data.""" + # Test if the current data pipe exists. + pipes.test() + # Run the object method. cdp.structure.delete() @@ -132,6 +135,9 @@ @type centroid: list of float or numpy rank-1, 3D array """ + # Test if the current data pipe exists. + pipes.test() + # Convert the model_from and model_to args to lists, is supplied. if model_from != None: model_from = [model_from] @@ -181,6 +187,9 @@ @keyword init_pos: The starting pivot position for the pivot point optimisation. @type init_pos: list of float or numpy rank-1, 3D array """ + + # Test if the current data pipe exists. + pipes.test() # Initialised the starting position if needed. if init_pos == None: @@ -218,8 +227,6 @@ # Print out. print("Motional pivot found at: %s" % results) - - def get_pos(spin_id=None, str_id=None, ave_pos=False): @@ -615,6 +622,9 @@ if method not in allowed: raise RelaxError("The superimposition method '%s' is unknown. It must be one of %s." % (method, allowed)) + # Test if the current data pipe exists. + pipes.test() + # Validate the models. cdp.structure.validate_models() @@ -690,6 +700,9 @@ @type unit: bool """ + # Test if the current data pipe exists. + pipes.test() + # Test if the PDB file has been loaded. if not hasattr(cdp, 'structure'): raise RelaxNoPdbError