Author: bugman Date: Mon Aug 11 18:45:14 2008 New Revision: 7152 URL: http://svn.gna.org/viewcvs/relax?rev=7152&view=rev Log: Added the ave arg to the structure.load_spins() user function. Modified: branches/rdc_analysis/prompt/structure.py Modified: branches/rdc_analysis/prompt/structure.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/prompt/structure.py?rev=7152&r1=7151&r2=7152&view=diff ============================================================================== --- branches/rdc_analysis/prompt/structure.py (original) +++ branches/rdc_analysis/prompt/structure.py Mon Aug 11 18:45:14 2008 @@ -233,13 +233,15 @@ generic_fns.structure.geometric.create_vector_dist(length=length, symmetry=symmetry, file=file, dir=dir, force=force) - def load_spins(self, spin_id=None): + def load_spins(self, spin_id=None, ave=True): """Load spins from the structure into the relax data store. Keyword Arguments ~~~~~~~~~~~~~~~~~ spin_id: The spin identification string. + + ave: A flag specifying if the position of the atom is to be averaged. Description @@ -248,8 +250,11 @@ This function allows a sequence to be generated within the relax data store using the atomic information from the structure already associated with this data pipe. The spin_id string is used to select which molecules, which residues, and which atoms will be recognised as - spin systems within relax. If spin_id is left as None, then all molcules, residues, and + spin systems within relax. If spin_id is left as None, then all molecules, residues, and atoms will be placed within the data store. + + If the ave flag is True, the average position of all structures will be loaded into the spin + container. If False, then the positions from all structures will be loaded. Example @@ -276,15 +281,20 @@ # Function intro text. if self.__relax__.interpreter.intro: text = sys.ps3 + "structure.load_spins(" - text = text + "spin_id=" + `spin_id` + ")" + text = text + "spin_id=" + `spin_id` + text = text + ", ave=" + `ave` + ")" print text # Spin identifier. if spin_id != None and type(spin_id) != str: raise RelaxNoneStrError, ('spin identifier', spin_id) + # The average vector flag. + if type(ave) != bool: + raise RelaxBoolError, ('average vector flag', ave) + # Execute the functional code. - generic_fns.structure.main.load_spins(spin_id=spin_id) + generic_fns.structure.main.load_spins(spin_id=spin_id, ave=ave) def read_pdb(self, file=None, dir=None, model=None, parser='scientific'):