mailRe: r2531 - /branches/nan_catch_test/generic_fns/pdb.py


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

Header


Content

Posted by Edward d'Auvergne on August 09, 2006 - 16:47:
Author: macraild
Date: Wed Aug  9 13:24:57 2006
New Revision: 2531

URL: http://svn.gna.org/viewcvs/relax?rev=2531&view=rev
Log:
Modification of proposed fix to bug #6503

Based on discussion on relax-devel at gna dot org:
https://mail.gna.org/public/relax-devel/2006-08/msg00033.html

This modification does not raise RelaxError if the amide bond length
is 0, but rather sets the bond vector to None

Modified:
    branches/nan_catch_test/generic_fns/pdb.py

Modified: branches/nan_catch_test/generic_fns/pdb.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/nan_catch_test/generic_fns/pdb.py?rev=2531&r1=2530&r2=2531&view=diff
==============================================================================
--- branches/nan_catch_test/generic_fns/pdb.py (original)
+++ branches/nan_catch_test/generic_fns/pdb.py Wed Aug  9 13:24:57 2006
@@ -268,10 +268,13 @@

                     # Test for zero length.
                     if norm_factor == 0.0:
-                        raise RelaxError, "The XH bond vector for residue " + 
`self.relax.data.res[self.run][j].num` + " is of zero length."
+                        if self.print_flag:
+                            print "The XH bond vector for residue " + 
`self.relax.data.res[self.run][j].num` + " is of zero length."
+                        self.relax.data.res[self.run][j].xh_vect.append(None)

                     # Calculate the normalised vector.
-                    self.relax.data.res[self.run][j].xh_vect.append(vector / 
norm_factor)
+                    else:
+                        
self.relax.data.res[self.run][j].xh_vect.append(vector / norm_factor)

         # Print out.
         if self.print_flag:


_______________________________________________ relax (http://nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

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



That change works well.  Do you think that the warning should only
occur when the print_flag is set or would it be better to print the
warning in all situations?  Although I can't check at the moment, the
code in 'specific_fns/model_free.py' in the function minimise may need
to be modified to handle a unit vector set to None.

Edward



Related Messages


Powered by MHonArc, Updated Wed Aug 09 18:00:36 2006