Author: bugman Date: Thu Aug 14 16:47:29 2008 New Revision: 7195 URL: http://svn.gna.org/viewcvs/relax?rev=7195&view=rev Log: Added the pipe arg to the pcs.centre() user function. Modified: branches/rdc_analysis/prompt/pcs.py Modified: branches/rdc_analysis/prompt/pcs.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/prompt/pcs.py?rev=7195&r1=7194&r2=7195&view=diff ============================================================================== --- branches/rdc_analysis/prompt/pcs.py (original) +++ branches/rdc_analysis/prompt/pcs.py Thu Aug 14 16:47:29 2008 @@ -68,20 +68,27 @@ pcs.back_calc(id=id) - def centre(self, atom_id=None): + def centre(self, atom_id=None, pipe=None): """Specify which atom is the paramagnetic centre. Keyword Arguments ~~~~~~~~~~~~~~~~~ atom_id: The atom identification string. + + pipe: The data pipe containing the structures to extract the centre from. Description ~~~~~~~~~~~ This function is required for specifying where the paramagnetic centre is located in the - loaded structure file. + loaded structure file. If no structure number is given, then the average atom position will + be calculated if multiple structures are loaded. + + A different set of structures than those loaded into the current data pipe can also be used + to determine the position, or its average. This can be achieved by loading the alternative + structures into another data pipe, and then specifying that pipe through the pipe argument. Examples @@ -102,15 +109,20 @@ # Function intro text. if self.__relax__.interpreter.intro: text = sys.ps3 + "pcs.centre(" - text = text + "atom_id=" + `atom_id` + ")" + text = text + "atom_id=" + `atom_id` + text = text + ", pipe=" + `pipe` + ")" print text # The atom identifier argument. if type(atom_id) != str: raise RelaxStrError, ('atom identification string', atom_id) - # Execute the functional code. - pcs.centre(atom_id=atom_id) + # The data pipe argument. + if pipe != None and type(pipe) != str: + raise RelaxNoneStrError, ('data pipe', pipe) + + # Execute the functional code. + pcs.centre(atom_id=atom_id, pipe=pipe) def copy(self, pipe_from=None, pipe_to=None, id=None):