Author: bugman Date: Sat Jul 5 00:33:37 2008 New Revision: 6703 URL: http://svn.gna.org/viewcvs/relax?rev=6703&view=rev Log: Updated the __validate_data_arrays() method to handle multiple structures. The structure_container instance is now passed into the method. Modified: branches/rdc_analysis/generic_fns/structure/internal.py Modified: branches/rdc_analysis/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/structure/internal.py?rev=6703&r1=6702&r2=6703&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/structure/internal.py (original) +++ branches/rdc_analysis/generic_fns/structure/internal.py Sat Jul 5 00:33:37 2008 @@ -366,14 +366,18 @@ return fields - def __validate_data_arrays(self): - """Check the validity of the data arrays in the structure object.""" + def __validate_data_arrays(self, struct): + """Check the validity of the data arrays in the given structure object. + + @param struct: The structural object. + @type struct: Structure_container instance + """ # The number of atoms. - num = len(self.structural_data.atom_name) + num = len(struct.atom_name) # Check the other lengths. - if len(bonded) != num and len(chain_id) != num and len(element) != num and len(pdb_record) != num and len(res_name) != num and len(res_num) != num and len(seg_id) != num and len(x) != num and len(y) != num and len(z) != num: + if len(struct.bonded) != num and len(struct.chain_id) != num and len(struct.element) != num and len(struct.pdb_record) != num and len(struct.res_name) != num and len(struct.res_num) != num and len(struct.seg_id) != num and len(struct.x) != num and len(struct.y) != num and len(struct.z) != num: raise RelaxError, "The structural data is invalid."