mailr6831 - /1.3/generic_fns/structure/main.py


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

Header


Content

Posted by edward on July 08, 2008 - 02:47:
Author: bugman
Date: Tue Jul  8 02:47:15 2008
New Revision: 6831

URL: http://svn.gna.org/viewcvs/relax?rev=6831&view=rev
Log:
Fix for the check of pre-existing bond vectors.


Modified:
    1.3/generic_fns/structure/main.py

Modified: 1.3/generic_fns/structure/main.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/main.py?rev=6831&r1=6830&r2=6831&view=diff
==============================================================================
--- 1.3/generic_fns/structure/main.py (original)
+++ 1.3/generic_fns/structure/main.py Tue Jul  8 02:47:15 2008
@@ -298,8 +298,10 @@
 
         # The bond vector already exists.
         if hasattr(spin, object_name):
-            warn(RelaxWarning("The bond vector for the spin " + `id` + " 
already exists."))
-            continue
+            obj = getattr(spin, object_name)
+            if obj:
+                warn(RelaxWarning("The bond vector for the spin " + `id` + " 
already exists."))
+                continue
 
         # Get the bond info.
         bond_vectors, attached_name, warnings = 
cdp.structure.bond_vectors(atom_id=id, attached_atom=attached, 
struct_index=struct_index, return_name=True, return_warnings=True)




Related Messages


Powered by MHonArc, Updated Tue Jul 08 03:00:05 2008