Author: bugman Date: Fri Oct 24 13:44:28 2008 New Revision: 7961 URL: http://svn.gna.org/viewcvs/relax?rev=7961&view=rev Log: Added a check to the atom_loop() to make sure structural data is loaded. Modified: 1.3/generic_fns/structure/internal.py Modified: 1.3/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/internal.py?rev=7961&r1=7960&r2=7961&view=diff ============================================================================== --- 1.3/generic_fns/structure/internal.py (original) +++ 1.3/generic_fns/structure/internal.py Fri Oct 24 13:44:28 2008 @@ -35,7 +35,7 @@ from api_base import Base_struct_API from generic_fns import pipes, relax_re from generic_fns.mol_res_spin import Selection -from relax_errors import RelaxError +from relax_errors import RelaxError, RelaxNoPdbError from relax_io import open_read_file from relax_warnings import RelaxWarning @@ -645,6 +645,10 @@ element name (str), and atomic position (array of len 3). """ + # Check that the structure is loaded. + if not len(self.structural_data): + raise RelaxNoPdbError + # Generate the selection object. sel_obj = Selection(atom_id)