Author: bugman Date: Mon Jul 18 20:28:09 2011 New Revision: 13707 URL: http://svn.gna.org/viewcvs/relax?rev=13707&view=rev Log: Merged revisions 13706 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3 ........ r13706 | bugman | 2011-07-18 20:13:04 +0200 (Mon, 18 Jul 2011) | 6 lines Fix for the PCS back-calculation function - divide by zero is now avoided. The PCS back-calculation function was calculating the normalised bond vector between the lanthanide atom and itself. The normalisation in this case is now avoided. ........ Modified: branches/gui_testing/ (props changed) branches/gui_testing/generic_fns/pcs.py Propchange: branches/gui_testing/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Mon Jul 18 20:28:09 2011 @@ -1,1 +1,1 @@ -/1.3:1-13688 +/1.3:1-13706 Modified: branches/gui_testing/generic_fns/pcs.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/generic_fns/pcs.py?rev=13707&r1=13706&r2=13707&view=diff ============================================================================== --- branches/gui_testing/generic_fns/pcs.py (original) +++ branches/gui_testing/generic_fns/pcs.py Mon Jul 18 20:28:09 2011 @@ -98,8 +98,9 @@ # The length. r[c] = norm(vect[c]) - # Normalise. - vect[c] = vect[c] / r[c] + # Normalise (only if the vector has length). + if r[c]: + vect[c] = vect[c] / r[c] # Calculate the PCS constant. dj[c] = pcs_constant(cdp.temperature[id], cdp.frq[id] * 2.0 * pi / g1H, r[c]/1e10)