Author: bugman Date: Thu Apr 10 12:20:07 2008 New Revision: 5537 URL: http://svn.gna.org/viewcvs/relax?rev=5537&view=rev Log: Updated the write() function. Modified: 1.3/generic_fns/sequence.py Modified: 1.3/generic_fns/sequence.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/sequence.py?rev=5537&r1=5536&r2=5537&view=diff ============================================================================== --- 1.3/generic_fns/sequence.py (original) +++ 1.3/generic_fns/sequence.py Thu Apr 10 12:20:07 2008 @@ -235,31 +235,34 @@ raise RelaxInvalidSeqError, data[i] -def write(file=None, dir=None, mol_name_col=None, res_num_col=None, res_name_col=None, spin_num_col=None, spin_name_col=None, sep=None, force=0): +def write(file, dir=None, sep=None, mol_name_flag=None, res_num_flag=None, res_name_flag=None, spin_num_flag=None, spin_name_flag=None, force=False): """Function for writing molecule, residue, and/or sequence data. This calls the write_body() function to do most of the work. - @param file: The name of the file to write the data to. - @type file: str - @param dir: The directory to contain the file (defaults to the current directory if - None). - @type dir: str or None - @param mol_name_col: The column to contain the molecule name information. - @type mol_name_col: int or None - @param res_name_col: The column to contain the residue name information. - @type res_name_col: int or None - @param res_num_col: The column to contain the residue number information. - @type res_num_col: int or None - @param spin_name_col: The column to contain the spin name information. - @type spin_name_col: int or None - @param spin_num_col: The column to contain the spin number information. - @type spin_num_col: int or None - @param sep: The column seperator which, if None, defaults to whitespace. - @type sep: str or None - @param force: A flag which if set to 1 will cause an existing file to be overwritten. - @type force: bin + @param file: The name of the file to write the data to. + @type file: str + @keyword dir: The directory to contain the file (defaults to the current directory + if None). + @type dir: str or None + @keyword sep: The column seperator which, if None, defaults to whitespace. + @type sep: str or None + @keyword mol_name_flag: A flag which if True will cause the molecule name column to be + written. + @type mol_name_flag: bool + @keyword res_num_flag: A flag which if True will cause the residue number column to be + written. + @type res_num_flag: bool + @keyword res_name_flag: A flag which if True will cause the residue name column to be + written. + @type res_name_flag: bool + @keyword spin_name_flag: A flag which if True will cause the spin name column to be written. + @type spin_name_flag: bool + @keyword spin_num_flag: A flag which if True will cause the spin number column to be + written. + @keyword force: A flag which if True will cause an existing file to be overwritten. + @type force: bin """ # Test if the sequence data is loaded. @@ -270,7 +273,7 @@ seq_file = open_write_file(file, dir, force) # Write the data. - write_body(file=seq_file, 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) + write_body(file=seq_file, sep=sep, mol_name_flag=mol_name_flag, res_num_flag=res_num_flag, res_name_flag=res_name_flag, spin_num_flag=spin_num_flag, spin_name_flag=spin_name_flag) # Close the results file. seq_file.close()