Author: bugman Date: Fri Jul 4 16:06:02 2008 New Revision: 6669 URL: http://svn.gna.org/viewcvs/relax?rev=6669&view=rev Log: Added the ave arg to all atom_loop() methods to allow just the average properties to be returned. Modified: branches/rdc_analysis/generic_fns/structure/api_base.py branches/rdc_analysis/generic_fns/structure/internal.py branches/rdc_analysis/generic_fns/structure/scientific.py Modified: branches/rdc_analysis/generic_fns/structure/api_base.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/structure/api_base.py?rev=6669&r1=6668&r2=6669&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/structure/api_base.py (original) +++ branches/rdc_analysis/generic_fns/structure/api_base.py Fri Jul 4 16:06:02 2008 @@ -104,7 +104,7 @@ raise RelaxImplementError - def atom_loop(self, atom_id=None, str_id=None, model_num_flag=False, mol_name_flag=False, res_num_flag=False, res_name_flag=False, atom_num_flag=False, atom_name_flag=False, element_flag=False, pos_flag=False): + def atom_loop(self, atom_id=None, str_id=None, model_num_flag=False, mol_name_flag=False, res_num_flag=False, res_name_flag=False, atom_num_flag=False, atom_name_flag=False, element_flag=False, pos_flag=False, ave=False): """Prototype generator method stub for looping over all atoms in the structural data object. This method should be designed as a generator (http://www.python.org/dev/peps/pep-0255/). @@ -147,6 +147,9 @@ @keyword pos_flag: A flag which if True will cause the atomic position to be yielded. @type pos_flag: bool + @keyword ave: A flag which if True will result in this method returning the + average atom properties across all loaded structures. + @type ave: bool @return: A tuple of atomic information, as described in the docstring. @rtype: tuple consisting of optional molecule name (str), residue number (int), residue name (str), atom number (int), atom name(str), Modified: branches/rdc_analysis/generic_fns/structure/internal.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/structure/internal.py?rev=6669&r1=6668&r2=6669&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/structure/internal.py (original) +++ branches/rdc_analysis/generic_fns/structure/internal.py Fri Jul 4 16:06:02 2008 @@ -374,7 +374,7 @@ struct.bonded[index2].append(index1) - def atom_loop(self, atom_id=None, str_id=None, model_num_flag=False, mol_name_flag=False, res_num_flag=False, res_name_flag=False, atom_num_flag=False, atom_name_flag=False, element_flag=False, pos_flag=False): + def atom_loop(self, atom_id=None, str_id=None, model_num_flag=False, mol_name_flag=False, res_num_flag=False, res_name_flag=False, atom_num_flag=False, atom_name_flag=False, element_flag=False, pos_flag=False, ave=False): """Generator function for looping over all atoms in the internal relax structural object. @keyword atom_id: The molecule, residue, and atom identifier string. Only atoms @@ -402,6 +402,9 @@ @keyword pos_flag: A flag which if True will cause the atomic position to be yielded. @type pos_flag: bool + @keyword ave: A flag which if True will result in this method returning the + average atom properties across all loaded structures. + @type ave: bool @return: A tuple of atomic information, as described in the docstring. @rtype: tuple consisting of optional molecule name (str), residue number (int), residue name (str), atom number (int), atom name(str), Modified: branches/rdc_analysis/generic_fns/structure/scientific.py URL: http://svn.gna.org/viewcvs/relax/branches/rdc_analysis/generic_fns/structure/scientific.py?rev=6669&r1=6668&r2=6669&view=diff ============================================================================== --- branches/rdc_analysis/generic_fns/structure/scientific.py (original) +++ branches/rdc_analysis/generic_fns/structure/scientific.py Fri Jul 4 16:06:02 2008 @@ -199,7 +199,7 @@ yield res, res.number, res.name - def atom_loop(self, atom_id=None, model_num_flag=False, mol_name_flag=False, res_num_flag=False, res_name_flag=False, atom_num_flag=False, atom_name_flag=False, element_flag=False, pos_flag=False): + def atom_loop(self, atom_id=None, model_num_flag=False, mol_name_flag=False, res_num_flag=False, res_name_flag=False, atom_num_flag=False, atom_name_flag=False, element_flag=False, pos_flag=False, ave=False): """Generator function for looping over all atoms in the Scientific Python data objects. @keyword atom_id: The molecule, residue, and atom identifier string. Only atoms @@ -223,6 +223,9 @@ @keyword pos_flag: A flag which if True will cause the atomic position to be yielded. @type pos_flag: bool + average atom properties across all loaded structures. + @type ave: bool + @return: A tuple of atomic information, as described in the docstring. @return: A tuple of atomic information, as described in the docstring. @rtype: tuple consisting of optional molecule name (str), residue number (int), residue name (str), atom number (int), atom name(str),