Author: bugman Date: Sun Oct 5 14:54:33 2008 New Revision: 7514 URL: http://svn.gna.org/viewcvs/relax?rev=7514&view=rev Log: Fix for bug #12409 (https://gna.org/bugs/index.php?12409). This bug is the failure of the final stage of the 'full_analysis.py' script. If no models exist in the PDB file, a model number is no longer passed into add_struct(). Modified: 1.3/generic_fns/structure/scientific.py Modified: 1.3/generic_fns/structure/scientific.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/scientific.py?rev=7514&r1=7513&r2=7514&view=diff ============================================================================== --- 1.3/generic_fns/structure/scientific.py (original) +++ 1.3/generic_fns/structure/scientific.py Sun Oct 5 14:54:33 2008 @@ -613,9 +613,19 @@ # No model 1. if len(str) == 0 and i == 1: + # Load the PDB without a model number. str = Scientific.IO.PDB.Structure(file_path) + + # Ok, nothing is loadable from this file. if len(str) == 0: raise RelaxPdbLoadError, file_path + + # Set the model number. + model = None + + # Set the model number. + else: + model = i # Test if the last structure has been reached. if len(str) == 0: @@ -627,7 +637,7 @@ print str # Place the structure in 'self.structural_data'. - self.add_struct(name=name, model=i, file=file, path=path, str=str, struct_index=struct_index) + self.add_struct(name=name, model=model, file=file, path=path, str=str, struct_index=struct_index) # Increment i. i = i + 1