Author: bugman Date: Thu Feb 26 14:50:09 2009 New Revision: 8874 URL: http://svn.gna.org/viewcvs/relax?rev=8874&view=rev Log: Shifted the non-function entity saveframe creation into the generic_fns.mol_res_spin module. Modified: branches/bmrb/generic_fns/mol_res_spin.py branches/bmrb/specific_fns/model_free/bmrb.py Modified: branches/bmrb/generic_fns/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/branches/bmrb/generic_fns/mol_res_spin.py?rev=8874&r1=8873&r2=8874&view=diff ============================================================================== --- branches/bmrb/generic_fns/mol_res_spin.py (original) +++ branches/bmrb/generic_fns/mol_res_spin.py Thu Feb 26 14:50:09 2009 @@ -488,6 +488,18 @@ # Create the union. self._union = (select_obj0, select_obj1) + + +def bmrb_write_entity(star): + """Generate the entity saveframe records for the NMR-STAR dictionary object. + + @param star: The NMR-STAR dictionary object. + @type star: NMR_STAR instance + """ + + # Can't handle multiple molecules yet. + if count_molecules() > 1: + raise RelaxError, "Support for multiple molecules is not yet supported." def copy_molecule(pipe_from=None, mol_from=None, pipe_to=None, mol_to=None): Modified: branches/bmrb/specific_fns/model_free/bmrb.py URL: http://svn.gna.org/viewcvs/relax/branches/bmrb/specific_fns/model_free/bmrb.py?rev=8874&r1=8873&r2=8874&view=diff ============================================================================== --- branches/bmrb/specific_fns/model_free/bmrb.py (original) +++ branches/bmrb/specific_fns/model_free/bmrb.py Thu Feb 26 14:50:09 2009 @@ -22,7 +22,8 @@ # relax module imports. from bmrblib.nmr_star_dict_v3_1 import NMR_STAR_v3_1 -from generic_fns.mol_res_spin import count_molecules, spin_loop +from generic_fns import mol_res_spin +from generic_fns.mol_res_spin import spin_loop from generic_fns.pipes import get_pipe @@ -56,12 +57,10 @@ # Get the current data pipe. cdp = get_pipe() - # Can't handle multiple molecules yet. - if count_molecules() > 1: - raise RelaxError, "Support for multiple molecules is not yet supported." + # Generate the entity saveframe. + mol_res_spin.bmrb_write_entity(star) # Initialise the spin specific data lists. - mol_name_list = [] res_num_list = [] res_name_list = [] atom_name_list = []