Author: bugman Date: Thu Nov 20 14:46:04 2014 New Revision: 26658 URL: http://svn.gna.org/viewcvs/relax?rev=26658&view=rev Log: Modified the frame_order.pdb_model user function backend to handle missing structural data. The create_ave_pos() function of the specific_analyses.frame_order.geometric module now checks that cdp.structure exists, and if not a warning is given and the PDB file creating is skipped. Modified: branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py Modified: branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py?rev=26658&r1=26657&r2=26658&view=diff ============================================================================== --- branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py (original) +++ branches/frame_order_cleanup/specific_analyses/frame_order/geometric.py Thu Nov 20 14:46:04 2014 @@ -27,6 +27,7 @@ from math import pi from numpy import array, dot, eye, float64, zeros import sys +from warnings import warn # relax module imports. from lib.errors import RelaxFault @@ -41,6 +42,7 @@ from lib.structure.represent.cone import cone from lib.structure.represent.rotor import rotor from lib.text.sectioning import subsection, subsubsection +from lib.warnings import RelaxWarning from pipe_control.structure.mass import pipe_centre_of_mass from specific_analyses.frame_order.data import domain_moving, generate_pivot @@ -544,6 +546,11 @@ # Printout. subsection(file=sys.stdout, text="Creating a PDB file with the moving domains shifted to the average position.") + + # Checks. + if not hasattr(cdp, 'structure'): + warn(RelaxWarning("No structural data is present, cannot create the average position representation.")) + return # Initialise. titles = []