Author: bugman
Date: Mon Jan 19 11:11:16 2009
New Revision: 8505
URL: http://svn.gna.org/viewcvs/relax?rev=8505&view=rev
Log:
Modified the bond_vectors() method for the new structural object design.
Modified:
branches/multi_structure/generic_fns/structure/scientific.py
Modified: branches/multi_structure/generic_fns/structure/scientific.py
URL:
http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/scientific.py?rev=8505&r1=8504&r2=8505&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/structure/scientific.py (original)
+++ branches/multi_structure/generic_fns/structure/scientific.py Mon Jan 19
11:11:16 2009
@@ -387,7 +387,7 @@
return pos
- def bond_vectors(self, atom_id=None, attached_atom=None,
struct_index=None, return_name=False, return_warnings=False):
+ def bond_vectors(self, atom_id=None, attached_atom=None, model_num=None,
return_name=False, return_warnings=False):
"""Find the bond vectors between the atoms of 'attached_atom' and
'atom_id'.
@keyword atom_id: The molecule, residue, and atom identifier
string. This must
@@ -395,10 +395,10 @@
@type atom_id: str
@keyword attached_atom: The name of the bonded atom.
@type attached_atom: str
- @keyword struct_index: The index of the structure to return the
vectors from. If not
- supplied and multiple structures/models
exist, then vectors from
- all structures will be returned.
- @type struct_index: None or int
+ @keyword model_num: The model of which to return the vectors
from. If not supplied
+ and multiple models exist, then vectors
from all models will be
+ returned.
+ @type model_num: None or int
@keyword return_name: A flag which if True will cause the name
of the attached atom to
be returned together with the bond vectors.
@type return_name: bool
@@ -416,17 +416,17 @@
attached_name = None
warnings = None
- # Loop over the structures.
- for i in xrange(len(self.structural_data)):
- # Single structure.
- if struct_index and struct_index != i:
+ # Loop over the models.
+ for model in self.structural_data:
+ # Single model.
+ if model_num and model_num != model.num:
continue
# Init.
atom_found = False
# Loop over each individual molecule.
- for mol, mol_name, mol_type in
self.__molecule_loop(self.structural_data[i], sel_obj):
+ for mol, mol_name, mol_type in self.__molecule_loop(model,
sel_obj):
# Loop over the residues of the protein in the PDB file.
for res, res_num, res_name in self.__residue_loop(mol,
mol_name, mol_type, sel_obj):
# Loop over the atoms of the residue.
_______________________________________________
relax (http://nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits