Author: bugman Date: Sun Nov 11 10:56:15 2007 New Revision: 3462 URL: http://svn.gna.org/viewcvs/relax?rev=3462&view=rev Log: Removed the useless read(), sort(), and write() spin user functions. These were remnants of the copy from the original sequence user function module. Modified: 1.3/prompt/spin.py Modified: 1.3/prompt/spin.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/spin.py?rev=3462&r1=3461&r2=3462&view=diff ============================================================================== --- 1.3/prompt/spin.py (original) +++ 1.3/prompt/spin.py Sun Nov 11 10:56:15 2007 @@ -189,168 +189,3 @@ # Execute the functional code. self.__relax__.generic.sequence.display(run=run) - - - def read(self, run=None, file=None, dir=None, num_col=0, name_col=1, sep=None): - """Function for reading sequence data. - - Keyword Arguments - ~~~~~~~~~~~~~~~~~ - - run: The name of the run. - - file: The name of the file containing the sequence data. - - dir: The directory where the file is located. - - num_col: The residue number column (the default is 0, ie the first column). - - name_col: The residue name column (the default is 1). - - sep: The column separator (the default is white space). - - - Description - ~~~~~~~~~~~ - - If no directory is given, the file will be assumed to be in the current working directory. - - - Examples - ~~~~~~~~ - - The following commands will read the sequence data out of a file called 'seq' where the - residue numbers and names are in the first and second columns respectively and assign it to - the run 'm1'. - - relax> sequence.read('m1', 'seq') - relax> sequence.read('m1', 'seq', num_col=0, name_col=1) - relax> sequence.read(run='m1', file='seq', num_col=0, name_col=1, sep=None) - - - The following commands will read the sequence out of the file 'noe.out' which also contains - the NOE values. - - relax> sequence.read('m1', 'noe.out') - relax> sequence.read('m1', 'noe.out', num_col=0, name_col=1) - relax> sequence.read(run='m1', file='noe.out', num_col=0, name_col=1) - - - The following commands will read the sequence out of the file 'noe.600.out' where the - residue numbers are in the second column, the names are in the sixth column and the columns - are separated by commas and assign it to the run 'm5'. - - relax> sequence.read('m5', 'noe.600.out', num_col=1, name_col=5, sep=',') - relax> sequence.read(run='m5', file='noe.600.out', num_col=1, name_col=5, sep=',') - """ - - # Function intro text. - if self.__relax__.interpreter.intro: - text = sys.ps3 + "sequence.read(" - text = text + "run=" + `run` - text = text + ", file=" + `file` - text = text + ", dir=" + `dir` - text = text + ", num_col=" + `num_col` - text = text + ", name_col=" + `name_col` - text = text + ", sep=" + `sep` + ")" - print text - - # The run argument. - if type(run) != str: - raise RelaxStrError, ('run', run) - - # The file name. - if type(file) != str: - raise RelaxStrError, ('file name', file) - - # Directory. - if dir != None and type(dir) != str: - raise RelaxNoneStrError, ('directory name', dir) - - # Number column. - if type(num_col) != int: - raise RelaxIntError, ('residue number column', num_col) - - # Name column. - if type(name_col) != int: - raise RelaxIntError, ('residue name column', name_col) - - # Column separator. - if sep != None and type(sep) != str: - raise RelaxNoneStrError, ('column separator', sep) - - # Execute the functional code. - self.__relax__.generic.sequence.read(run=run, file=file, dir=dir, num_col=num_col, name_col=name_col, sep=sep) - - - def sort(self, run=None): - """Function for numerically sorting the sequence by residue number. - - Keyword Arguments - ~~~~~~~~~~~~~~~~~ - - run: The name of the run. - """ - - # Function intro text. - if self.__relax__.interpreter.intro: - text = sys.ps3 + "sequence.sort(" - text = text + "run=" + `run` + ")" - print text - - # The run argument. - if type(run) != str: - raise RelaxStrError, ('run', run) - - # Execute the functional code. - self.__relax__.generic.sequence.sort(run=run) - - - def write(self, run=None, file=None, dir=None, force=0): - """Function for writing the sequence to a file. - - Keyword Arguments - ~~~~~~~~~~~~~~~~~ - - run: The name of the run. - - file: The name of the file. - - dir: The directory name. - - force: A flag which, if set to 1, will cause the file to be overwritten. - - - Description - ~~~~~~~~~~~ - - If no directory name is given, the file will be placed in the current working directory. - """ - - # Function intro text. - if self.__relax__.interpreter.intro: - text = sys.ps3 + "sequence.write(" - text = text + "run=" + `run` - text = text + ", file=" + `file` - text = text + ", dir=" + `dir` - text = text + ", force=" + `force` + ")" - print text - - # The run argument. - if type(run) != str: - raise RelaxStrError, ('run', run) - - # File. - if type(file) != str: - raise RelaxStrError, ('file name', file) - - # Directory. - if dir != None and type(dir) != str: - raise RelaxNoneStrError, ('directory name', dir) - - # The force flag. - if type(force) != int or (force != 0 and force != 1): - raise RelaxBinError, ('force flag', force) - - # Execute the functional code. - self.__relax__.generic.sequence.write(run=run, file=file, dir=dir, force=force)