Author: bugman Date: Wed Apr 29 11:10:20 2009 New Revision: 9034 URL: http://svn.gna.org/viewcvs/relax?rev=9034&view=rev Log: Added the ave_pos flag to the pcs.centre() user function. Modified: 1.3/prompt/pcs.py Modified: 1.3/prompt/pcs.py URL: http://svn.gna.org/viewcvs/relax/1.3/prompt/pcs.py?rev=9034&r1=9033&r2=9034&view=diff ============================================================================== --- 1.3/prompt/pcs.py (original) +++ 1.3/prompt/pcs.py Wed Apr 29 11:10:20 2009 @@ -69,7 +69,7 @@ pcs.back_calc(id=id) - def centre(self, atom_id=None, pipe=None): + def centre(self, atom_id=None, pipe=None, ave_pos=True): """Specify which atom is the paramagnetic centre. Keyword Arguments @@ -78,6 +78,8 @@ atom_id: The atom identification string. pipe: The data pipe containing the structures to extract the centre from. + + ave_pos: A flag specifying if the position of the atom is to be averaged across all models. Description @@ -91,6 +93,12 @@ 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. + If the ave_pos flag is set to True, the average position from all models will be used as the + position of the paramagnetic centre. If False, then the positions from all structures will + be used. If multiple positions are used, then a fast PCS centre motion will be assumed so + that PCSs for a single tensor will be calculated for each position, and the PCS values + linearly averaged. + Examples ~~~~~~~~ @@ -111,7 +119,8 @@ if self.__relax__.interpreter.intro: text = sys.ps3 + "pcs.centre(" text = text + "atom_id=" + `atom_id` - text = text + ", pipe=" + `pipe` + ")" + text = text + ", pipe=" + `pipe` + text = text + ", ave_pos=" + `ave_pos` + ")" print text # The atom identifier argument. @@ -122,8 +131,12 @@ if pipe != None and type(pipe) != str: raise RelaxNoneStrError, ('data pipe', pipe) - # Execute the functional code. - pcs.centre(atom_id=atom_id, pipe=pipe) + # The average position flag. + if type(ave_pos) != bool: + raise RelaxBoolError, ('average position flag', ave_pos) + + # Execute the functional code. + pcs.centre(atom_id=atom_id, pipe=pipe, ave_pos=ave_pos) def copy(self, pipe_from=None, pipe_to=None, id=None):