Author: bugman Date: Wed May 7 15:21:33 2008 New Revision: 6119 URL: http://svn.gna.org/viewcvs/relax?rev=6119&view=rev Log: Added the spin_id arg to the deselect.reverse() user function. Modified: 1.3/prompt/deselect.py Modified: 1.3/prompt/deselect.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/deselect.py?rev=6119&r1=6118&r2=6119&view=diff ============================================================================== --- 1.3/prompt/deselect.py (original) +++ 1.3/prompt/deselect.py Wed May 7 15:21:33 2008 @@ -167,9 +167,22 @@ selection.desel_read(file=file, dir=dir, 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, change_all=change_all) - def reverse(self): + def reverse(self, spin_id=None): """Function for the reversal of the spin selection. + Keyword Arguments + ~~~~~~~~~~~~~~~~~ + + spin_id: The spin identification string. + + + Description + ~~~~~~~~~~~ + + By supplying the spin_id argument, a subset of spin can have their selection status + reversed. + + Examples ~~~~~~~~ @@ -180,11 +193,16 @@ # Function intro test. if self.__relax__.interpreter.intro: - text = sys.ps3 + "deselect.reverse()" - print text - - # Execute the functional code. - selection.reverse() + text = sys.ps3 + "deselect.reverse(" + text = text + "spin_id=" + `spin_id` + ")" + print text + + # Spin identification string. + if spin_id != None and type(spin_id) != str: + raise RelaxNoneStrError, ('Spin identification string', spin_id) + + # Execute the functional code. + selection.reverse(spin_id=spin_id) def spin(self, spin_id=None, change_all=False):