Author: bugman Date: Wed Oct 26 16:54:59 2011 New Revision: 14935 URL: http://svn.gna.org/viewcvs/relax?rev=14935&view=rev Log: Synchronised the atom_loop() method args in the structural API. Modified: 1.3/generic_fns/structure/api_base.py 1.3/generic_fns/structure/scientific.py Modified: 1.3/generic_fns/structure/api_base.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/api_base.py?rev=14935&r1=14934&r2=14935&view=diff ============================================================================== --- 1.3/generic_fns/structure/api_base.py (original) +++ 1.3/generic_fns/structure/api_base.py Wed Oct 26 16:54:59 2011 @@ -74,7 +74,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, ave=False): + def atom_loop(self, atom_id=None, str_id=None, model_num=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/). @@ -92,19 +92,17 @@ 8. The position of the atom in Euclidean space. - @keyword atom_id: The molecule, residue, and atom identifier string. Only atoms - matching this selection will be yielded. + @keyword atom_id: The molecule, residue, and atom identifier string. Only atoms matching this selection will be yielded. @type atom_id: str - @keyword str_id: The structure identifier. This can be the file name, model - number, or structure number. If None, then all structures will - be looped over. + @keyword str_id: The structure identifier. This can be the file name, model number, or structure number. If None, then all structures will be looped over. @type str_id: str, int, or None + @keyword model_num: Only loop over a specific model. + @type model_num: int or None @keyword model_num_flag: A flag which if True will cause the model number to be yielded. @type model_num_flag: bool @keyword mol_name_flag: A flag which if True will cause the molecule name to be yielded. @type mol_name_flag: bool - @keyword res_num_flag: A flag which if True will cause the residue number to be - yielded. + @keyword res_num_flag: A flag which if True will cause the residue number to be yielded. @type res_num_flag: bool @keyword res_name_flag: A flag which if True will cause the residue name to be yielded. @type res_name_flag: bool @@ -114,16 +112,12 @@ @type atom_name_flag: bool @keyword element_flag: A flag which if True will cause the element name to be yielded. @type element_flag: bool - @keyword pos_flag: A flag which if True will cause the atomic position to be - yielded. + @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. + @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), - element name (str), and atomic position (array of len 3). + @rtype: tuple consisting of optional molecule name (str), residue number (int), residue name (str), atom number (int), atom name(str), element name (str), and atomic position (array of len 3). """ # Raise the error. Modified: 1.3/generic_fns/structure/scientific.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/scientific.py?rev=14935&r1=14934&r2=14935&view=diff ============================================================================== --- 1.3/generic_fns/structure/scientific.py (original) +++ 1.3/generic_fns/structure/scientific.py Wed Oct 26 16:54:59 2011 @@ -154,7 +154,7 @@ yield res, res.number, res.name, res_index - 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): + def atom_loop(self, atom_id=None, str_id=None, model_num=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 @@ -164,6 +164,8 @@ number, or structure number. If None, then all structures will be looped over. @type str_id: str, int, or None + @keyword model_num: Only loop over a specific model. + @type model_num: int or None @keyword model_num_flag: A flag which if True will cause the model number to be yielded. @type model_num_flag: bool @keyword mol_name_flag: A flag which if True will cause the molecule name to be yielded.