Author: han87 Date: Thu Jun 23 11:26:46 2011 New Revision: 13179 URL: http://svn.gna.org/viewcvs/relax?rev=13179&view=rev Log: Reverted r13165 as this change could break other part of the relax. The command used was: svn merge -r 13165:13164 The changing of the user functions "load_spins" and "add_item" could break other part of relax. This was pointed out by Edward in the email: https://mail.gna.org/public/relax-devel/2011-06/msg00226.html. Modified: branches/xyz/data/mol_res_spin.py branches/xyz/generic_fns/structure/main.py branches/xyz/test_suite/system_tests/structure.py Modified: branches/xyz/data/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/branches/xyz/data/mol_res_spin.py?rev=13179&r1=13178&r2=13179&view=diff ============================================================================== --- branches/xyz/data/mol_res_spin.py (original) +++ branches/xyz/data/mol_res_spin.py Thu Jun 23 11:26:46 2011 @@ -458,7 +458,7 @@ return text - def add_item(self, res_name=None, res_num=None, res_num_exist=None): + def add_item(self, res_name=None, res_num=None): """Append an empty ResidueContainer to the ResidueList.""" # If no residue data exists, replace the empty first residue with this residue. @@ -478,8 +478,7 @@ # No residue numbers. else: if self[i].name == res_name: - if res_num_exist==False: - raise RelaxError("The unnumbered residue name '" + repr(res_name) + "' already exists.") + raise RelaxError("The unnumbered residue name '" + repr(res_name) + "' already exists.") # Append a new ResidueContainer. self.append(ResidueContainer(res_name, res_num)) Modified: branches/xyz/generic_fns/structure/main.py URL: http://svn.gna.org/viewcvs/relax/branches/xyz/generic_fns/structure/main.py?rev=13179&r1=13178&r2=13179&view=diff ============================================================================== --- branches/xyz/generic_fns/structure/main.py (original) +++ branches/xyz/generic_fns/structure/main.py Thu Jun 23 11:26:46 2011 @@ -175,7 +175,6 @@ res_names = [] spin_nums = [] spin_names = [] - res_num_exist = False # Loop over all atoms of the spin_id selection. model_index = -1 @@ -186,10 +185,6 @@ model_index = model_index + 1 last_model = model_num - # Check whether the res_num exists - if not res_num: - res_num_exist = True - # Remove the '+' regular expression character from the mol, res, and spin names! if mol_name and search('\+', mol_name): mol_name = replace(mol_name, '+', '') @@ -242,7 +237,7 @@ # Add the residue if it doesn't exist. if res_cont == None: # Add the residue. - mol_cont.res.add_item(res_name=res_name, res_num=res_num, res_num_exist=res_num_exist) + mol_cont.res.add_item(res_name=res_name, res_num=res_num) # Get the container. res_cont = mol_cont.res[-1] Modified: branches/xyz/test_suite/system_tests/structure.py URL: http://svn.gna.org/viewcvs/relax/branches/xyz/test_suite/system_tests/structure.py?rev=13179&r1=13178&r2=13179&view=diff ============================================================================== --- branches/xyz/test_suite/system_tests/structure.py (original) +++ branches/xyz/test_suite/system_tests/structure.py Thu Jun 23 11:26:46 2011 @@ -656,7 +656,7 @@ path = status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'structures' # Read the xyz. - self.interpreter.structure.read_xyz(file='SSS-cluster4-new-test.xyz', dir=path) + self.interpreter.structure.read_xyz(file='SSS-cluster4-new-test.xyz', dir=path, read_model=[1,3]) # Test the molecule name. self.assertEqual(cdp.structure.structural_data[0].mol[0].mol_name, 'SSS-cluster4-new-test_mol1')