mailr18826 - /trunk/generic_fns/structure/internal.py


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

Header


Content

Posted by edward on March 15, 2013 - 10:32:
Author: bugman
Date: Fri Mar 15 10:32:04 2013
New Revision: 18826

URL: http://svn.gna.org/viewcvs/relax?rev=18826&view=rev
Log:
The internal structural object MolContainer.add_atom() method now returns the 
index of the new atom.


Modified:
    trunk/generic_fns/structure/internal.py

Modified: trunk/generic_fns/structure/internal.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/internal.py?rev=18826&r1=18825&r2=18826&view=diff
==============================================================================
--- trunk/generic_fns/structure/internal.py (original)
+++ trunk/generic_fns/structure/internal.py Fri Mar 15 10:32:04 2013
@@ -2141,6 +2141,8 @@
         @type segment_id:       str or None
         @keyword pdb_record:    The optional PDB record name, e.g. 'ATOM' or 
'HETATM'.
         @type pdb_record:       str or None
+        @return:                The index of the added atom.
+        @rtype:                 int
         """
 
         # Append to all the arrays.
@@ -2157,6 +2159,9 @@
         self.y.append(pos[1])
         self.z.append(pos[2])
 
+        # Return the index.
+        return len(self.atom_num) - 1
+
 
     def atom_connect(self, index1=None, index2=None):
         """Method for connecting two atoms within the data structure object.




Related Messages


Powered by MHonArc, Updated Fri Mar 15 11:00:01 2013