mailr16131 - in /branches/uf_redesign: ./ data/ generic_fns/ sample_scripts/ specific_fns/model_free/


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

Header


Content

Posted by edward on May 09, 2012 - 09:55:
Author: bugman
Date: Wed May  9 09:55:11 2012
New Revision: 16131

URL: http://svn.gna.org/viewcvs/relax?rev=16131&view=rev
Log:
Merged revisions 16041,16126-16130 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r16041 | bugman | 2012-05-07 12:26:56 +0200 (Mon, 07 May 2012) | 3 lines
  
  Missing import.
........
  r16126 | bugman | 2012-05-09 09:14:08 +0200 (Wed, 09 May 2012) | 6 lines
  
  Improved the error message system for the spin ID matching multiple spins
  
  This is a partial response to bug #19717 (http://gna.org/bugs/?19717) 
reported by Martin Ballaschk
  (http://gna.org/users/mab).
........
  r16127 | bugman | 2012-05-09 09:16:59 +0200 (Wed, 09 May 2012) | 6 lines
  
  The relax_fit.py sample script deselect.read user function now has all 
columns specified.
  
  This is a partial response to bug #19717 (http://gna.org/bugs/?19717) 
reported by Martin Ballaschk
  (http://gna.org/users/mab).
........
  r16128 | bugman | 2012-05-09 09:20:42 +0200 (Wed, 09 May 2012) | 3 lines
  
  Updated the copyright statement.
........
  r16129 | bugman | 2012-05-09 09:22:17 +0200 (Wed, 09 May 2012) | 5 lines
  
  Updated the deselect.read user function call in the noe.py sample script to 
match relax_fit.py.
  
  All the column args are now specified.
........
  r16130 | bugman | 2012-05-09 09:45:24 +0200 (Wed, 09 May 2012) | 8 lines
  
  Improved error reporting for multiple vectors in a model-free analysis.
  
  This was reported by Vitaly Vostrikov (vvostri att uark.edu) at
  http://www.mail-archive.com/relax-users@xxxxxxx/msg00991.html (Message-ID:
  <CAO2iSXE1ycB4KX1vxqk15CxbW1rpWczZAyR_bX1g6j+yA2PCTQ@xxxxxxxxxxxxxx>) and 
reported at bug #18807
  (https://gna.org/bugs/?18807).
........

Modified:
    branches/uf_redesign/   (props changed)
    branches/uf_redesign/data/exp_info.py
    branches/uf_redesign/generic_fns/mol_res_spin.py
    branches/uf_redesign/relax_errors.py
    branches/uf_redesign/sample_scripts/noe.py
    branches/uf_redesign/sample_scripts/relax_fit.py
    branches/uf_redesign/specific_fns/model_free/mf_minimise.py

Propchange: branches/uf_redesign/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed May  9 09:55:11 2012
@@ -1,1 +1,1 @@
-/1.3:1-15908
+/1.3:1-16130

Modified: branches/uf_redesign/data/exp_info.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/data/exp_info.py?rev=16131&r1=16130&r2=16131&view=diff
==============================================================================
--- branches/uf_redesign/data/exp_info.py (original)
+++ branches/uf_redesign/data/exp_info.py Wed May  9 09:55:11 2012
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2009 Edward d'Auvergne                                       
 #
+# Copyright (C) 2009-2012 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -25,6 +25,7 @@
 
 # relax module imports.
 from data_classes import RelaxListType, Element
+from relax_errors import RelaxError
 
 
 class ExpInfo(Element):

Modified: branches/uf_redesign/generic_fns/mol_res_spin.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/mol_res_spin.py?rev=16131&r1=16130&r2=16131&view=diff
==============================================================================
--- branches/uf_redesign/generic_fns/mol_res_spin.py (original)
+++ branches/uf_redesign/generic_fns/mol_res_spin.py Wed May  9 09:55:11 2012
@@ -47,7 +47,7 @@
 from data.mol_res_spin import MoleculeContainer, ResidueContainer, 
SpinContainer
 from generic_fns import pipes
 from generic_fns import relax_re
-from relax_errors import RelaxError, RelaxNoSpinError, 
RelaxResSelectDisallowError, RelaxSpinSelectDisallowError
+from relax_errors import RelaxError, RelaxNoSpinError, RelaxMultiMolIDError, 
RelaxMultiResIDError, RelaxMultiSpinIDError, RelaxResSelectDisallowError, 
RelaxSpinSelectDisallowError
 from relax_warnings import RelaxWarning
 from status import Status; status = Status()
 
@@ -2205,7 +2205,7 @@
 
     # No unique identifier.
     if mol_num > 1:
-        raise RelaxError("The identifier " + repr(selection) + " corresponds 
to more than a single molecule in the " + repr(pipe) + " data pipe.")
+        raise RelaxMultiMolIDError(selection)
 
     # Return the molecule container.
     return mol_container
@@ -2258,7 +2258,7 @@
 
     # No unique identifier.
     if res_num > 1:
-        raise RelaxError("The identifier " + repr(selection) + " corresponds 
to more than a single residue in the " + repr(pipe) + " data pipe.")
+        raise RelaxMultiResIDError(selection)
 
     # Return the residue container.
     return res_container
@@ -2324,7 +2324,7 @@
 
     # No unique identifier.
     if spin_num > 1:
-        raise RelaxError("The identifier " + repr(selection) + " corresponds 
to more than a single spin in the " + repr(pipe) + " data pipe.")
+        raise RelaxMultiSpinIDError(selection)
 
     # Return the spin container.
     if full_info:

Modified: branches/uf_redesign/relax_errors.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/relax_errors.py?rev=16131&r1=16130&r2=16131&view=diff
==============================================================================
--- branches/uf_redesign/relax_errors.py (original)
+++ branches/uf_redesign/relax_errors.py Wed May  9 09:55:11 2012
@@ -258,6 +258,11 @@
     def __init__(self, name):
         self.text = "The PDB file " + repr(name) + " could not be loaded 
properly, no molecular chains could be extracted."
 
+# Multiple unit vectors.
+class RelaxMultiVectorError(BaseError):
+    def __init__(self):
+        self.text = "The multiple unit XH bond vectors per spin - this is 
not supported by the current data pipe type."
+
 # No unit vectors.
 class RelaxNoVectorsError(BaseError):
     def __init__(self, pipe):
@@ -578,6 +583,30 @@
     def __init__(self, pipe1, pipe2):
         self.text = "The number of spins do not match between pipes '%s' and 
'%s'." % (pipe1, pipe2)
 
+# Multiple spins matching the ID.
+class RelaxMultiMolIDError(BaseError):
+    def __init__(self, id):
+        if id == '':
+            self.text = "The empty molecule ID corresponds to more than a 
single molecule in the current data pipe."
+        else:
+            self.text = "The molecule ID '%s' corresponds to more than a 
single molecule in the current data pipe." % id
+
+# Multiple spins matching the ID.
+class RelaxMultiResIDError(BaseError):
+    def __init__(self, id):
+        if id == '':
+            self.text = "The empty residue ID corresponds to more than a 
single residue in the current data pipe."
+        else:
+            self.text = "The residue ID '%s' corresponds to more than a 
single residue in the current data pipe." % id
+
+# Multiple spins matching the ID.
+class RelaxMultiSpinIDError(BaseError):
+    def __init__(self, id):
+        if id == '':
+            self.text = "The empty spin ID corresponds to more than a single 
spin in the current data pipe."
+        else:
+            self.text = "The spin ID '%s' corresponds to more than a single 
spin in the current data pipe." % id
+
 # Cannot find the residue in the sequence.
 class RelaxNoResError(BaseError):
     def __init__(self, number, name=None):

Modified: branches/uf_redesign/sample_scripts/noe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/sample_scripts/noe.py?rev=16131&r1=16130&r2=16131&view=diff
==============================================================================
--- branches/uf_redesign/sample_scripts/noe.py (original)
+++ branches/uf_redesign/sample_scripts/noe.py Wed May  9 09:55:11 2012
@@ -50,7 +50,7 @@
 spectrum.error_analysis()
 
 # Deselect unresolved residues.
-deselect.read(file='unresolved')
+deselect.read(file='unresolved', mol_name_col=1, res_num_col=2, 
res_name_col=3, spin_num_col=4, spin_name_col=5)
 
 # Calculate the NOEs.
 calc()

Modified: branches/uf_redesign/sample_scripts/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/sample_scripts/relax_fit.py?rev=16131&r1=16130&r2=16131&view=diff
==============================================================================
--- branches/uf_redesign/sample_scripts/relax_fit.py (original)
+++ branches/uf_redesign/sample_scripts/relax_fit.py Wed May  9 09:55:11 2012
@@ -1,6 +1,6 @@
 
###############################################################################
 #                                                                            
 #
-# Copyright (C) 2004-2008 Edward d'Auvergne                                  
 #
+# Copyright (C) 2004-2012 Edward d'Auvergne                                  
 #
 #                                                                            
 #
 # This file is part of the program relax.                                    
 #
 #                                                                            
 #
@@ -76,7 +76,7 @@
 spectrum.error_analysis()
 
 # Deselect unresolved spins.
-deselect.read(file='unresolved')
+deselect.read(file='unresolved', mol_name_col=1, res_num_col=2, 
res_name_col=3, spin_num_col=4, spin_name_col=5)
 
 # Set the relaxation curve type.
 relax_fit.select_model('exp')

Modified: branches/uf_redesign/specific_fns/model_free/mf_minimise.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/specific_fns/model_free/mf_minimise.py?rev=16131&r1=16130&r2=16131&view=diff
==============================================================================
--- branches/uf_redesign/specific_fns/model_free/mf_minimise.py (original)
+++ branches/uf_redesign/specific_fns/model_free/mf_minimise.py Wed May  9 
09:55:11 2012
@@ -31,6 +31,7 @@
 from warnings import warn
 
 # relax module imports.
+import arg_check
 from float import isNaN, isInf
 from generic_fns import diffusion_tensor, pipes
 from generic_fns.diffusion_tensor import diff_data_exists
@@ -39,7 +40,7 @@
 from multi import Processor_box
 from multi_processor_commands import MF_grid_command, MF_memo, 
MF_minimise_command
 from physical_constants import h_bar, mu0, return_gyromagnetic_ratio
-from relax_errors import RelaxError, RelaxInfError, RelaxLenError, 
RelaxNaNError, RelaxNoModelError, RelaxNoPdbError, RelaxNoResError, 
RelaxNoSequenceError, RelaxNoTensorError, RelaxNoValueError, 
RelaxNoVectorsError, RelaxNucleusError, RelaxProtonTypeError, 
RelaxSpinTypeError
+from relax_errors import RelaxError, RelaxInfError, RelaxLenError, 
RelaxMultiVectorError, RelaxNaNError, RelaxNoModelError, RelaxNoPdbError, 
RelaxNoResError, RelaxNoSequenceError, RelaxNoTensorError, RelaxNoValueError, 
RelaxNoVectorsError, RelaxNucleusError, RelaxProtonTypeError, 
RelaxSpinTypeError
 from relax_warnings import RelaxWarning
 
 
@@ -1273,6 +1274,10 @@
             # Test if unit vectors exist.
             if model_type != 'local_tm' and cdp.diff_tensor.type != 'sphere' 
and not hasattr(spin, 'xh_vect'):
                 raise RelaxNoVectorsError
+
+            # Test if multiple unit vectors exist.
+            if model_type != 'local_tm' and cdp.diff_tensor.type != 'sphere' 
and hasattr(spin, 'xh_vect') and arg_check.is_num_list(spin.xh_vect[0]):
+                raise RelaxMultiVectorError
 
             # Test if the spin type has been set.
             if not hasattr(spin, 'heteronuc_type'):




Related Messages


Powered by MHonArc, Updated Wed May 09 10:20:02 2012