Author: bugman Date: Fri Jun 22 16:13:24 2012 New Revision: 17031 URL: http://svn.gna.org/viewcvs/relax?rev=17031&view=rev Log: Merged revisions 17030 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r17030 | bugman | 2012-06-22 16:12:48 +0200 (Fri, 22 Jun 2012) | 7 lines Fix for the sequence.read user function for a problem with r17028. The sequence.generate() function was not returning the correct result as it didn't take into account the renaming and renumbering of empty spin containers. Now sequence.read will always print out the generated sequence and not result in a RelaxError for most of the system tests. ........ Modified: branches/interatomic/ (props changed) branches/interatomic/generic_fns/sequence.py Propchange: branches/interatomic/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Fri Jun 22 16:13:24 2012 @@ -1,1 +1,1 @@ -/trunk:1-17028 +/trunk:1-17030 Modified: branches/interatomic/generic_fns/sequence.py URL: http://svn.gna.org/viewcvs/relax/branches/interatomic/generic_fns/sequence.py?rev=17031&r1=17030&r2=17031&view=diff ============================================================================== --- branches/interatomic/generic_fns/sequence.py (original) +++ branches/interatomic/generic_fns/sequence.py Fri Jun 22 16:13:24 2012 @@ -215,8 +215,6 @@ @type select: bool @keyword verbose: A flag which if True will cause info about each spin to be printed out as the sequence is generated. @type verbose: bool - @return: True if a new spin was created, False otherwise. - @rtype: bool """ # The current data pipe. @@ -232,20 +230,13 @@ create_residue(mol_name=mol_name, res_num=res_num, res_name=res_name, pipe=pipe) # A new spin. - new_data = False curr_spin = return_spin(generate_spin_id(mol_name=mol_name, res_num=res_num, res_name=res_name, spin_num=spin_num, spin_name=spin_name), pipe=pipe) if not curr_spin: # Add the spin. curr_spin = create_spin(mol_name=mol_name, res_num=res_num, res_name=res_name, spin_num=spin_num, spin_name=spin_name, pipe=pipe) - # New data. - new_data = True - # Set the selection flag. curr_spin.select = select - - # Return the creation status. - return new_data def read(file=None, dir=None, file_data=None, spin_id_col=None, mol_name_col=None, res_num_col=None, res_name_col=None, spin_num_col=None, spin_name_col=None, sep=None, spin_id=None): @@ -303,15 +294,14 @@ # Generate the sequence. for mol_name, res_num, res_name, spin_num, spin_name in read_spin_data(file=file, dir=dir, file_data=file_data, spin_id_col=spin_id_col, mol_name_col=mol_name_col, res_num_col=res_num_col, res_name_col=res_name_col, spin_num_col=spin_num_col, spin_name_col=spin_name_col, sep=sep, spin_id=spin_id): # Add the spin. - new_spin = generate(mol_name=mol_name, res_num=res_num, res_name=res_name, spin_num=spin_num, spin_name=spin_name) + generate(mol_name=mol_name, res_num=res_num, res_name=res_name, spin_num=spin_num, spin_name=spin_name) # Append the new spin. - if new_spin: - mol_names.append(mol_name) - res_nums.append(res_num) - res_names.append(res_name) - spin_nums.append(spin_num) - spin_names.append(spin_name) + mol_names.append(mol_name) + res_nums.append(res_num) + res_names.append(res_name) + spin_nums.append(spin_num) + spin_names.append(spin_name) # No data, so fail. if not len(spin_names):