mailRe: r7592 - in /1.3: generic_fns/ prompt/ specific_fns/ test_suite/system_tests/


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

Header


Content

Posted by Edward d'Auvergne on October 11, 2008 - 18:04:
Great!  I'll get to work on Modelfree4 and Dasha then.

Cheers,

Edward


On Sat, Oct 11, 2008 at 5:46 PM, Sébastien Morin
<sebastien.morin.1@xxxxxxxxx> wrote:
Hi Ed,

I can try to implement the NMRView peak list support...

Regards,


Séb


Edward d'Auvergne wrote:
Thanks for picking this up.  If you'd like to implement the NMRView
peak list support, that would free up more time for me to get Gary's
multi-processor code ported and the BMRB support implemented (as well
as getting Modelfree4 and Dasha running again, and cleaning up and
destroying all of the remaining 1.2 line code).

Cheers,

Edward


On Thu, Oct 9, 2008 at 7:37 PM,  <sebastien.morin.1@xxxxxxxxx> wrote:

Author: semor
Date: Thu Oct  9 19:37:20 2008
New Revision: 7592

URL: http://svn.gna.org/viewcvs/relax?rev=7592&view=rev
Log:
Continued the implementation for the reading of a Nmrview peak list.


Modified:
   1.3/generic_fns/intensity.py
   1.3/prompt/noe.py
   1.3/prompt/relax_fit.py
   1.3/specific_fns/noe.py
   1.3/specific_fns/relax_fit.py
   1.3/test_suite/system_tests/nmrview.py

Modified: 1.3/generic_fns/intensity.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/intensity.py?rev=7592&r1=7591&r2=7592&view=diff
==============================================================================
--- 1.3/generic_fns/intensity.py (original)
+++ 1.3/generic_fns/intensity.py Thu Oct  9 19:37:20 2008
@@ -27,6 +27,7 @@
 # Python module imports.
 from re import split
 from warnings import warn
+import sys

 # relax module imports.
 from generic_fns.mol_res_spin import exists_mol_res_spin_data, 
generate_spin_id, return_spin
@@ -158,13 +159,32 @@
    return res_num, h_name, x_name, intensity


+def intensity_nmrview(line, int_col=None):
+    """Function for returning relevant data from the Nmrview peak 
intensity line.
+
+    The residue number, heteronucleus and proton names, and peak 
intensity will be returned.
+
+
+    @param line:        The single line of information from the 
intensity file.
+    @type line:         list of str
+    @keyword int_col:   The column containing the peak intensity data 
(for a non-standard formatted
+                        file).
+    @type int_col:      int
+    @raises RelaxError: When the expected peak intensity is not a float.
+    """
+
+    # Print some texte indicating the unavailability of this function...
+    print "This function is still unavailable.\n"
+    sys.exit()
+
+
 def number_of_header_lines(file_data, format, int_col, intensity):
    """Function for determining how many header lines are in the 
intensity file.

    @param file_data:   The processed results file data.
    @type file_data:    list of lists of str
    @param format:      The type of file containing peak intensities.  
This can currently be one of
-                        'sparky' or 'xeasy'.
+                        'sparky', 'xeasy' or 'nmrview'.
    @type format:       str
    @param int_col:     The column containing the peak intensity data 
(for a non-standard
                        formatted file).
@@ -214,7 +234,7 @@
    @keyword dir:           The directory where the file is located.
    @type dir:              str
    @keyword format:        The type of file containing peak intensities. 
 This can currently be
-                            one of 'sparky' or 'xeasy'.
+                            one of 'sparky', 'xeasy' or 'nmrview'.
    @type format:           str
    @keyword heteronuc:     The name of the heteronucleus as specified in 
the peak intensity
                            file.
@@ -231,7 +251,7 @@
    """

    # Format argument.
-    format_list = ['sparky', 'xeasy']
+    format_list = ['sparky', 'xeasy', 'nmrview']
    if format not in format_list:
        raise RelaxArgNotInListError, ('format', format, format_list)

@@ -253,6 +273,14 @@

        # Set the default proton dimension.
        H_dim = 'w1'
+
+    # Nmrview.
+    elif format == 'nmrview':
+        # Print out.
+        print "Nmrview formatted data file.\n"
+
+        # Set the intensity reading function.
+        intensity_fn = intensity_nmrview

    # Test if the current data pipe exists.
    pipes.test()

Modified: 1.3/prompt/noe.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/noe.py?rev=7592&r1=7591&r2=7592&view=diff
==============================================================================
--- 1.3/prompt/noe.py (original)
+++ 1.3/prompt/noe.py Thu Oct  9 19:37:20 2008
@@ -128,6 +128,7 @@
        The 'format' argument can currently be set to:
            'sparky'
            'xeasy'
+            'nmrview'

        If the 'format' argument is set to 'sparky', the file should be a 
Sparky peak list saved
        after typing the command 'lt'.  The default is to assume that 
columns 0, 1, 2, and 3 (1st,
@@ -142,6 +143,8 @@
        the peak intensity column is hardwired to number 10 (the 11th 
column) which contains either
        the peak height or peak volume data.  Because the columns are 
fixed, the 'int_col' argument
        will be ignored.
+
+        If the format argument is set to 'nmrview', the file should be a 
Nmrview peak list.


        The 'heteronuc' and 'proton' arguments should be set respectively 
to the name of the

Modified: 1.3/prompt/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/relax_fit.py?rev=7592&r1=7591&r2=7592&view=diff
==============================================================================
--- 1.3/prompt/relax_fit.py (original)
+++ 1.3/prompt/relax_fit.py Thu Oct  9 19:37:20 2008
@@ -126,6 +126,7 @@
        The format argument can currently be set to:
            'sparky'
            'xeasy'
+            'nmrview'

        If the format argument is set to 'sparky', the file should be a 
Sparky peak list saved after
        typing the command 'lt'.  The default is to assume that columns 
0, 1, 2, and 3 (1st, 2nd,
@@ -140,6 +141,8 @@
        the peak intensity column is hardwired to number 10 (the 11th 
column) which contains either
        the peak height or peak volume data.  Because the columns are 
fixed, the int_col argument
        will be ignored.
+
+        If the format argument is set to 'nmrview', the file should be a 
Nmrview peak list.


        The heteronuc and proton arguments should be set respectively to 
the name of the

Modified: 1.3/specific_fns/noe.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/noe.py?rev=7592&r1=7591&r2=7592&view=diff
==============================================================================
--- 1.3/specific_fns/noe.py (original)
+++ 1.3/specific_fns/noe.py Thu Oct  9 19:37:20 2008
@@ -113,7 +113,7 @@
        @keyword spectrum_type: The type of spectrum, one of 'ref' or 
'sat'.
        @type spectrum_type:    str
        @keyword format:        The type of file containing peak 
intensities.  This can currently be
-                                one of 'sparky' or 'xeasy'.
+                                one of 'sparky', 'xeasy' or 'nmrview'.
        @type format:           str
        @keyword heteronuc:     The name of the heteronucleus as 
specified in the peak intensity
                                file.

Modified: 1.3/specific_fns/relax_fit.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/relax_fit.py?rev=7592&r1=7591&r2=7592&view=diff
==============================================================================
--- 1.3/specific_fns/relax_fit.py (original)
+++ 1.3/specific_fns/relax_fit.py Thu Oct  9 19:37:20 2008
@@ -986,7 +986,7 @@
        @keyword relax_time:    The time, in seconds, of the relaxation 
period.
        @type relax_time:       float
        @keyword format:        The type of file containing peak 
intensities.  This can currently be
-                                one of 'sparky' or 'xeasy'.
+                                one of 'sparky', 'xeasy' or 'nmrview'.
        @type format:           str
        @keyword heteronuc:     The name of the heteronucleus as 
specified in the peak intensity
                                file.

Modified: 1.3/test_suite/system_tests/nmrview.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/nmrview.py?rev=7592&r1=7591&r2=7592&view=diff
==============================================================================
--- 1.3/test_suite/system_tests/nmrview.py (original)
+++ 1.3/test_suite/system_tests/nmrview.py Thu Oct  9 19:37:20 2008
@@ -57,7 +57,7 @@
        self.relax.interpreter._Spin.name(name='N')

        # Read the peak list.
-        self.relax.interpreter._Relax_fit.read(file="cNTnC.xpk", 
dir=sys.path[-1] + "/test_suite/shared_data/peak_lists", 
relax_time=0.0176)
+        self.relax.interpreter._Relax_fit.read(file="cNTnC.xpk", 
dir=sys.path[-1] + "/test_suite/shared_data/peak_lists", 
relax_time=0.0176, format='nmrview')

        # Test the data.
        self.assertEqual(cdp.mol[0].res[0].spin[0].intensities[0], 
-6.88333129883)


_______________________________________________
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



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

This is the relax-devel mailing list
relax-devel@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-devel







Related Messages


Powered by MHonArc, Updated Sun Oct 12 12:20:45 2008