Author: bugman Date: Thu Feb 7 11:34:37 2008 New Revision: 4925 URL: http://svn.gna.org/viewcvs/relax?rev=4925&view=rev Log: Converted the Molmol write() function to the new relax design. Modified: 1.3/generic_fns/molmol.py Modified: 1.3/generic_fns/molmol.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/molmol.py?rev=4925&r1=4924&r2=4925&view=diff ============================================================================== --- 1.3/generic_fns/molmol.py (original) +++ 1.3/generic_fns/molmol.py Thu Feb 7 11:34:37 2008 @@ -259,24 +259,32 @@ pipe_open() -def write(run=None, data_type=None, style="classic", colour_start=None, colour_end=None, colour_list=None, file=None, dir=None, force=0): - """Function for creating a Molmol macro.""" - - # Arguments. - run = run - data_type = data_type - style = style - colour_start = colour_start - colour_end = colour_end - colour_list = colour_list - - # Test if the run exists. - if not run in relax_data_store.run_names: - raise RelaxNoPipeError, run +def write(data_type=None, style="classic", colour_start=None, colour_end=None, colour_list=None, file=None, dir=None, force=False): + """Function for creating a Molmol macro. + + @param data_type: The data type or parameter name of which to map its values onto the + structure. + @type data_type: str + @param style: The style for the Molmol macro. + @type style: str + @param colour_start: The starting colour. + @type colour_start: str or list of 3 floats + @param colour_end: The terminating colour. + @type colour_end: str or list of 3 floats + @param colour_list: The type of colour being specified (either 'molmol' or 'x11'). + @type colour_list: str + @param file: The name of the Molmol macro file to be created. + @type file: str + @param dir: The dirctory for placing the file into. + @type dir: str + @param force: A flag which, if True, will cause the file to be overwritten if it + already exists. + @type force: bool + """ # Test if the sequence data is loaded. - if not relax_data_store.res.has_key(run): - raise RelaxNoSequenceError, run + if not exists_mol_res_spin_data(): + raise RelaxNoSequenceError # Create the macro. commands = create_macro()