Author: bugman Date: Wed Apr 3 14:38:37 2013 New Revision: 19327 URL: http://svn.gna.org/viewcvs/relax?rev=19327&view=rev Log: Merged revisions 19326 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r19326 | bugman | 2013-04-03 14:37:50 +0200 (Wed, 03 Apr 2013) | 3 lines Added printouts for the select.read and deselect.read user functions to identify the spins affected. ........ Modified: branches/relax_disp/ (props changed) branches/relax_disp/pipe_control/selection.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Wed Apr 3 14:38:37 2013 @@ -1,1 +1,1 @@ -/trunk:1-19320 +/trunk:1-19326 Modified: branches/relax_disp/pipe_control/selection.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/pipe_control/selection.py?rev=19327&r1=19326&r2=19327&view=diff ============================================================================== --- branches/relax_disp/pipe_control/selection.py (original) +++ branches/relax_disp/pipe_control/selection.py Wed Apr 3 14:38:37 2013 @@ -233,6 +233,7 @@ spin.select = True # Then deselect the spins in the file. + ids = [] 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): # Get the corresponding spin container. id = generate_spin_id_unique(mol_name=mol_name, res_num=res_num, res_name=res_name, spin_num=spin_num, spin_name=spin_name) @@ -250,6 +251,18 @@ # Boolean selections. else: spin.select = boolean_deselect(current=spin.select, boolean=boolean) + + # Store the spin ID for printouts. + if not spin.select: + ids.append(id) + + # Printout. + if not len(ids): + print("No spins deselected.") + else: + print("The following spins were deselected:") + for id in ids: + print(id) def desel_spin(spin_id=None, boolean='AND', change_all=False): @@ -533,6 +546,7 @@ spin.select = False # Then deselect the spins in the file. + ids = [] for id 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): # Get the corresponding spin container. spin = return_spin(id) @@ -549,6 +563,18 @@ # Boolean selections. else: spin.select = boolean_select(current=spin.select, boolean=boolean) + + # Store the spin ID for printouts. + if spin.select: + ids.append(id) + + # Printout. + if not len(ids): + print("No spins selected.") + else: + print("The following spins were selected:") + for id in ids: + print(id) def sel_spin(spin_id=None, boolean='OR', change_all=False):