Author: bugman Date: Wed Jul 27 16:01:22 2011 New Revision: 13926 URL: http://svn.gna.org/viewcvs/relax?rev=13926&view=rev Log: The create_molecule, create_residue, and create_spin functions now returned the created container. This should not affect any of the current code using these, as normally None would be returned. Modified: 1.3/generic_fns/mol_res_spin.py Modified: 1.3/generic_fns/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/mol_res_spin.py?rev=13926&r1=13925&r2=13926&view=diff ============================================================================== --- 1.3/generic_fns/mol_res_spin.py (original) +++ 1.3/generic_fns/mol_res_spin.py Wed Jul 27 16:01:22 2011 @@ -897,6 +897,8 @@ @type mol_name: str @keyword mol_type: The type of molecule. @type mol_type: str + @return: The newly created molecule. + @rtype: MoleculeContainer instance """ # Test if the current data pipe exists. @@ -913,6 +915,9 @@ # Append the molecule. cdp.mol.add_item(mol_name=mol_name, mol_type=mol_type) + + # Return the molecule. + return cdp.mol[-1] def create_residue(res_num=None, res_name=None, mol_name=None): @@ -924,6 +929,8 @@ @type res_name: str @keyword mol_name: The name of the molecule to add the residue to. @type mol_name: str + @return: The newly created residue. + @rtype: ResidueContainer instance """ # Test if the current data pipe exists. @@ -940,6 +947,9 @@ # Add the residue. mol_cont.res.add_item(res_num=res_num, res_name=res_name) + + # Return the residue. + return mol_cont.res[-1] def create_pseudo_spin(spin_name=None, spin_num=None, res_id=None, members=None, averaging=None): @@ -1046,6 +1056,8 @@ @type res_name: str @keyword mol_name: The name of the molecule to add the spin to. @type mol_name: str + @return: The newly created spin. + @rtype: SpinContainer instance """ # Test if the current data pipe exists. @@ -1064,6 +1076,9 @@ # Add the spin. res_cont.spin.add_item(spin_num=spin_num, spin_name=spin_name) + + # Return the spin. + return res_cont.spin[-1] def convert_from_global_index(global_index=None, pipe=None):