Author: bugman Date: Fri Jul 4 14:45:23 2008 New Revision: 6659 URL: http://svn.gna.org/viewcvs/relax?rev=6659&view=rev Log: Converted the file_name structural object variable into a list. This will allow multiple files to be opened within one data pipe. Modified: branches/rdc_analysis/generic_fns/structure/api_base.py branches/rdc_analysis/generic_fns/structure/internal.py Modified: branches/rdc_analysis/generic_fns/structure/api_base.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/structure/api_base.py?rev=6659&r1=6658&r2=6659&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/structure/api_base.py (original) +++ branches/rdc_analysis/generic_fns/structure/api_base.py Fri Jul 4 14:45:23 2008 @@ -47,6 +47,9 @@ # The parser specific data object. self.structural_data = [] + + # Initialise the file name list. + self.file_name = [] def atom_add(self, pdb_record=None, atom_num=None, atom_name=None, res_name=None, chain_id=None, res_num=None, pos=[None, None, None], segment_id=None, element=None, model=None): 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=6659&r1=6658&r2=6659&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/structure/internal.py (original) +++ branches/rdc_analysis/generic_fns/structure/internal.py Fri Jul 4 14:45:23 2008 @@ -454,25 +454,25 @@ print "Internal relax PDB parser.\n" # Store the file name (with full path). - self.file_name = file_path - - # Store the model number. - self.model = model + self.file_name.append(file_path) # Use pointers (references) if the PDB data exists in another pipe. for data_pipe in ds: - if hasattr(data_pipe, 'structure') and data_pipe.structure.file_name == file_path and data_pipe.structure.model == model and data_pipe.structure.id == 'internal': - # Make a pointer to the data. - self.structural_data = data_pipe.structure.structural_data - - # Print out. - if verbosity: - print "Using the structures from the data pipe " + `data_pipe.pipe_name` + "." - for i in xrange(len(self.structural_data)): - print self.structural_data[i] - - # Exit this function. - return + if hasattr(data_pipe, 'structure'): + # Loop over the structures. + for i in xrange(len(data_pipe.structure)): + if data_pipe.structure.file_name[i] == file_path and data_pipe.structure[i].model == model and data_pipe.structure.id == 'internal': + # Make a pointer to the data. + self.structural_data = data_pipe.structure.structural_data[i] + + # Print out. + if verbosity: + print "Using the structures from the data pipe " + `data_pipe.pipe_name` + "." + for i in xrange(len(self.structural_data)): + print self.structural_data[i] + + # Exit this function. + return # Print out. if verbosity: