mailr18088 - /trunk/generic_fns/interatomic.py


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

Header


Content

Posted by edward on December 10, 2012 - 15:12:
Author: bugman
Date: Mon Dec 10 15:12:10 2012
New Revision: 18088

URL: http://svn.gna.org/viewcvs/relax?rev=18088&view=rev
Log:
The generic_fns.interatomic.copy() function now accepts spin IDs as arguments 
to partially copy the data.


Modified:
    trunk/generic_fns/interatomic.py

Modified: trunk/generic_fns/interatomic.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/interatomic.py?rev=18088&r1=18087&r2=18088&view=diff
==============================================================================
--- trunk/generic_fns/interatomic.py (original)
+++ trunk/generic_fns/interatomic.py Mon Dec 10 15:12:10 2012
@@ -35,13 +35,17 @@
 from relax_warnings import RelaxNoSpinWarning
 
 
-def copy(pipe_from=None, pipe_to=None, verbose=True):
+def copy(pipe_from=None, pipe_to=None, spin_id1=None, spin_id2=None, 
verbose=True):
     """Copy the interatomic data from one data pipe to another.
 
     @keyword pipe_from:         The data pipe to copy the interatomic data 
from.  This defaults to the current data pipe.
     @type pipe_from:            str
     @keyword pipe_to:           The data pipe to copy the interatomic data 
to.  This defaults to the current data pipe.
     @type pipe_to:              str
+    @keyword spin_id1:          The spin ID string of the first atom.
+    @type spin_id1:             str
+    @keyword spin_id2:          The spin ID string of the second atom.
+    @type spin_id2:             str
     @keyword verbose:           A flag which if True will cause info about 
each spin pair to be printed out.
     @type verbose:              bool
     """
@@ -68,7 +72,7 @@
 
     # Loop over the interatomic data of the pipe_from data pipe.
     ids = []
-    for interatom in interatomic_loop(pipe=pipe_from):
+    for interatom in interatomic_loop(selection1=spin_id1, 
selection2=spin_id2, pipe=pipe_from):
         # Create a new container.
         new_interatom = create_interatom(spin_id1=interatom.spin_id1, 
spin_id2=interatom.spin_id2, pipe=pipe_to)
 
@@ -103,7 +107,7 @@
 
     @keyword spin_id1:  The spin ID string of the first atom.
     @type spin_id1:     str
-    @keyword spin_id2:  The spin ID string of the first atom.
+    @keyword spin_id2:  The spin ID string of the second atom.
     @type spin_id2:     str
     @keyword pipe:      The data pipe to create the interatomic data 
container for.  This defaults to the current data pipe if not supplied.
     @type pipe:         str or None




Related Messages


Powered by MHonArc, Updated Mon Dec 10 17:40:02 2012