Author: bugman Date: Tue Nov 20 16:51:39 2007 New Revision: 3687 URL: http://svn.gna.org/viewcvs/relax?rev=3687&view=rev Log: Bug fix for the residue.create() user function. Added the missing 'mol_id' argument to the residue.create() user function. Modified: 1.3/prompt/residue.py Modified: 1.3/prompt/residue.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/residue.py?rev=3687&r1=3686&r2=3687&view=diff ============================================================================== --- 1.3/prompt/residue.py (original) +++ 1.3/prompt/residue.py Tue Nov 20 16:51:39 2007 @@ -115,7 +115,7 @@ residue.copy(pipe_from=pipe_from, res_from=res_from, pipe_to=pipe_to, res_to=res_to) - def create(self, res_num=None, res_name=None): + def create(self, res_num=None, res_name=None, mol_id=None): """Function for creating a new residue. Keyword Arguments @@ -124,6 +124,8 @@ res_num: The residue number. res_name: The name of the residue. + + mol_id: The ID string for selecting the molecule to add the residue to. Description @@ -151,7 +153,8 @@ if self.__relax__.interpreter.intro: text = sys.ps3 + "residue.create(" text = text + ", res_num=" + `res_num` - text = text + ", res_name=" + `res_name` + ")" + text = text + ", res_name=" + `res_name` + text = text + ", mol_id=" + `mol_id` + ")" print text # Residue number. @@ -162,8 +165,12 @@ if type(res_name) != str: raise RelaxStrError, ('residue name', res_name) - # Execute the functional code. - residue.create(res_num=res_num, res_name=res_name) + # The molecule ID. + if mol_id != None and type(mol_id) != str: + raise RelaxNoneStrError, ('molecule identification string', mol_id) + + # Execute the functional code. + residue.create(res_num=res_num, res_name=res_name, mol_id=mol_id) def delete(self, res_id=None):