mailr8744 - /1.3/generic_fns/structure/scientific.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on February 05, 2009 - 14:54:
Author: bugman
Date: Thu Feb  5 14:54:50 2009
New Revision: 8744

URL: http://svn.gna.org/viewcvs/relax?rev=8744&view=rev
Log:
Fixes for the bond_vectors() method.

The atom_id string is now generated as it is no longer passed in.  This is a 
temporary fix and this
function is very inefficient, just as the internal object bond_vectors() 
method was (which was fixed
in r8741).



Modified:
    1.3/generic_fns/structure/scientific.py

Modified: 1.3/generic_fns/structure/scientific.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/scientific.py?rev=8744&r1=8743&r2=8744&view=diff
==============================================================================
--- 1.3/generic_fns/structure/scientific.py (original)
+++ 1.3/generic_fns/structure/scientific.py Thu Feb  5 14:54:50 2009
@@ -39,7 +39,7 @@
 from api_base import Base_struct_API
 from data.relax_xml import fill_object_contents, xml_to_object
 from generic_fns import pipes, relax_re
-from generic_fns.mol_res_spin import Selection, parse_token, tokenise
+from generic_fns.mol_res_spin import Selection, generate_spin_id, 
parse_token, tokenise
 from relax_errors import RelaxError, RelaxPdbLoadError
 from relax_io import file_root
 from relax_warnings import RelaxWarning, RelaxNoAtomWarning, 
RelaxNoPDBFileWarning, RelaxZeroVectorWarning
@@ -389,18 +389,25 @@
         return pos
 
 
-    def bond_vectors(self, atom_id=None, attached_atom=None, model_num=None, 
return_name=False, return_warnings=False):
+    def bond_vectors(self, attached_atom=None, model_num=None, 
mol_name=None, res_num=None, res_name=None, spin_num=None, spin_name=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
-                                    correspond to a single atom in the 
system.
-        @type atom_id:              str
         @keyword attached_atom:     The name of the bonded atom.
         @type attached_atom:        str
         @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 mol_name:          The name of the molecule that 
attached_atom belongs to.
+        @type mol_name:             str
+        @keyword res_num:           The number of the residue that 
attached_atom belongs to.
+        @type res_num:              str
+        @keyword res_name:          The name of the residue that 
attached_atom belongs to.
+        @type res_name:             str
+        @keyword spin_num:          The number of the spin that 
attached_atom is attached to.
+        @type spin_num:             str
+        @keyword spin_name:         The name of the spin that attached_atom 
is attached to.
+        @type spin_name:            str
         @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
@@ -411,7 +418,7 @@
         """
 
         # Generate the selection object.
-        sel_obj = Selection(atom_id)
+        sel_obj = Selection(generate_spin_id(mol_name, res_num, res_name, 
spin_num, spin_name))
 
         # Initialise some objects.
         vectors = []




Related Messages


Powered by MHonArc, Updated Thu Feb 05 15:20:04 2009