r21803 - /trunk/specific_analyses/relax_disp/disp_data.py

2013-12-06 Thread edward
Author: bugman
Date: Fri Dec  6 09:07:56 2013
New Revision: 21803

URL: http://svn.gna.org/viewcvs/relax?rev=21803view=rev
Log:
Neutralised the negative sign of the 15N gyromagnetic ratio in the 
return_offset_data() method.

This is to match the behaviour of Dmitry Korzhnev's cpmg_fit software.


Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=21803r1=21802r2=21803view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Fri Dec  6 09:07:56 2013
@@ -2581,6 +2581,11 @@
 spin = spins[si]
 spin_id = spin_ids[si]
 
+# The sign to multiply shifts and offsets by.
+sign = 1.0
+if spin.isotope == '15N':
+sign = -1.0
+
 # No data.
 shift = 0.0
 if hasattr(spin, 'chemical_shift'):
@@ -2613,7 +2618,7 @@
 fields = return_spin_lock_nu1_single(exp_type=exp_type, 
frq=frq, ref_flag=False)
 
 # Convert the shift from ppm to rad/s and store it.
-shifts[ei][si][mi] = frequency_to_rad_per_s(frq=shift, B0=frq, 
isotope=spin.isotope)
+shifts[ei][si][mi] = sign * frequency_to_rad_per_s(frq=shift, 
B0=frq, isotope=spin.isotope)
 
 # Find a matching experiment ID.
 found = False
@@ -2641,7 +2646,7 @@
 # Store the offset in rad/s.  Only once and using the first key.
 if offsets[ei][si][mi][oi] == None:
 if r1rho_flag and hasattr(cdp, 'spin_lock_offset'):
-offsets[ei][si][mi][oi] = 
frequency_to_rad_per_s(frq=cdp.spin_lock_offset[id], B0=frq, 
isotope=spin.isotope)
+offsets[ei][si][mi][oi] = sign * 
frequency_to_rad_per_s(frq=cdp.spin_lock_offset[id], B0=frq, 
isotope=spin.isotope)
 else:
 offsets[ei][si][mi][oi] = 0.0
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21805 - /trunk/user_functions/spectrum.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:16:21 2013
New Revision: 21805

URL: http://svn.gna.org/viewcvs/relax?rev=21805view=rev
Log:
Added keyword dim to frontend function for spectrum.read_spins().

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

This is associate data with the spins of up to two dimensions.

Modified:
trunk/user_functions/spectrum.py

Modified: trunk/user_functions/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/spectrum.py?rev=21805r1=21804r2=21805view=diff
==
--- trunk/user_functions/spectrum.py (original)
+++ trunk/user_functions/spectrum.py Fri Dec  6 09:16:21 2013
@@ -384,6 +384,14 @@
 can_be_none = True
 )
 uf.add_keyarg(
+name = dim,
+default = 1,
+py_type = int,
+min = 1,
+desc_short = spectral dimension to read,
+desc = Associate the data with the spins of any dimension in the peak 
list.  This defaults to w1, the heteronucleus in HSQC type experiments.
+)
+uf.add_keyarg(
 name = spin_id_col,
 py_type = int,
 arg_type = free format,
@@ -446,6 +454,9 @@
 desc = The spin ID string used to restrict the loading of data to certain 
spin subsets.,
 can_be_none = True
 )
+# Description.
+uf.desc.append(Desc_container())
+uf.desc[-1].add_paragraph(The spectral dimension is used to specify if the 
intensity data should be loaded into the spins identified by the first 
dimension w1, second dimension w2, etc.)
 # File formats.
 uf.desc.append(Desc_container(File formats))
 uf.desc[-1].add_paragraph(The peak list or intensity file will be 
automatically determined.)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21809 - /trunk/pipe_control/spectrum.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:16:36 2013
New Revision: 21809

URL: http://svn.gna.org/viewcvs/relax?rev=21809view=rev
Log:
Insert check if spin already exist, before creating it.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/pipe_control/spectrum.py

Modified: trunk/pipe_control/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/spectrum.py?rev=21809r1=21808r2=21809view=diff
==
--- trunk/pipe_control/spectrum.py (original)
+++ trunk/pipe_control/spectrum.py Fri Dec  6 09:16:36 2013
@@ -37,7 +37,7 @@
 from lib.statistics import std
 from lib.warnings import RelaxWarning, RelaxNoSpinWarning
 from pipe_control import pipes
-from pipe_control.mol_res_spin import check_mol_res_spin_data, create_spin, 
generate_spin_id_unique, return_spin, spin_loop
+from pipe_control.mol_res_spin import are_spins_named, 
check_mol_res_spin_data, create_spin, generate_spin_id_unique, return_spin, 
spin_loop
 
 
 def __errors_height_no_repl():
@@ -649,14 +649,21 @@
 peak_list = read_peak_list(file=file, dir=dir, spin_id_col=spin_id_col, 
mol_name_col=mol_name_col, res_num_col=res_num_col, res_name_col=res_name_col, 
spin_num_col=spin_num_col, spin_name_col=spin_name_col, sep=sep, 
spin_id=spin_id)
 
 # Loop over the peak_list.
+created_spins = []
 for assign in peak_list:
 mol_name = assign.mol_names[dim-1]
 res_num = assign.res_nums[dim-1]
 res_name = assign.res_names[dim-1]
 spin_num = assign.spin_nums[dim-1]
 spin_name = assign.spin_names[dim-1]
-# Create the spin
-create_spin(spin_num=spin_num, spin_name=spin_name, res_num=res_num, 
res_name=res_name, mol_name=mol_name)
+
+# Generate the spin_id.
+spin_id = generate_spin_id_unique(mol_name=mol_name, res_num=res_num, 
res_name=res_name, spin_name=spin_name)
+
+# Check if the spin already exist.
+if not are_spins_named(spin_id=spin_id):
+# Create the spin if not exist.
+create_spin(spin_num=spin_num, spin_name=spin_name, 
res_num=res_num, res_name=res_name, mol_name=mol_name)
 
 # Test that data exists.
 check_mol_res_spin_data()


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21807 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:16:34 2013
New Revision: 21807

URL: http://svn.gna.org/viewcvs/relax?rev=21807view=rev
Log:
Extended reading of spin residue names from NMRPipe SeriesTab formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21807r1=21806r2=21807view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 09:16:34 2013
@@ -111,7 +111,13 @@
 try:
 res_num = int(row1[-3])
 except:
-raise RelaxError(Improperly formatted NMRPipe SeriesTab file., 
cannot process the assignment '%s'. % line[0])
+raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s'. % line[0])
+
+# The residue name.
+try:
+res_name = row1[-4]
+except:
+raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name. % line[0])
 
 # Get the intensities.
 try:
@@ -126,4 +132,4 @@
 raise RelaxError(The peak intensity value %s from the line %s is 
invalid. % (intensity, line))
 
 # Add the assignment to the peak list object.
-peak_list.add(res_nums=[res_num, res_num], spin_names=[name1, name2], 
intensity=intensities, intensity_name=spectra)
+peak_list.add(res_nums=[res_num, res_num], res_names=[res_name, 
res_name], spin_names=[name1, name2], intensity=intensities, 
intensity_name=spectra)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21808 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:16:35 2013
New Revision: 21808

URL: http://svn.gna.org/viewcvs/relax?rev=21808view=rev
Log:
Modified NMRPipe SeriesTab to read residue numbers and name for two-dimensional 
list.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21808r1=21807r2=21808view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 09:16:35 2013
@@ -109,13 +109,15 @@
 
 # Get the residue number.
 try:
-res_num = int(row1[-3])
+res_num1 = int(row1[-3])
+res_num2 = int(row2[-3])
 except:
 raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s'. % line[0])
 
 # The residue name.
 try:
-res_name = row1[-4]
+res_name1 = row1[-4]
+res_name2 = row2[-4]
 except:
 raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name. % line[0])
 
@@ -132,4 +134,4 @@
 raise RelaxError(The peak intensity value %s from the line %s is 
invalid. % (intensity, line))
 
 # Add the assignment to the peak list object.
-peak_list.add(res_nums=[res_num, res_num], res_names=[res_name, 
res_name], spin_names=[name1, name2], intensity=intensities, 
intensity_name=spectra)
+peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], intensity=intensities, 
intensity_name=spectra)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21813 - /trunk/test_suite/gui_tests/relax_disp.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:15 2013
New Revision: 21813

URL: http://svn.gna.org/viewcvs/relax?rev=21813view=rev
Log:
Removed name from docstring in GUI test.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/gui_tests/relax_disp.py

Modified: trunk/test_suite/gui_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/relax_disp.py?rev=21813r1=21812r2=21813view=diff
==
--- trunk/test_suite/gui_tests/relax_disp.py (original)
+++ trunk/test_suite/gui_tests/relax_disp.py Fri Dec  6 09:57:15 2013
@@ -137,7 +137,7 @@
 
 
 def test_bug_21076_multi_col_peak_list(self):
-Test catching U{bug #21076https://gna.org/bugs/?21076}, loading a 
multi-spectra NMRPipe seriesTab file through the GUI, Error messages occur. 
Submitted by Troels E. Linnet.
+Test catching U{bug #21076https://gna.org/bugs/?21076}, loading a 
multi-spectra NMRPipe seriesTab file through the GUI, Error messages occur.
 
 # The paths to the data files.
 data_path = status.install_path + sep + 'test_suite' + sep + 
'shared_data' + sep + 'dispersion' + sep + 'KTeilum_FMPoulsen_MAkke_2006' + sep 
+ 'acbp_cpmg_disp_101MGuHCl_40C_041223' + sep


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21811 - /trunk/lib/spectrum/sparky.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:13 2013
New Revision: 21811

URL: http://svn.gna.org/viewcvs/relax?rev=21811view=rev
Log:
Issuing a warning instead of error when loading spins from sparky list where 
residue names are not present.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21811r1=21810r2=21811view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 09:57:13 2013
@@ -134,7 +134,8 @@
 try:
 res_name = row1[-4]
 except:
-raise RelaxError(Improperly formatted Sparky file, cannot process 
the assignment '%s' for residue name. % line[0])
+raise RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name.\nSetting residue name to None. % 
line[0])
+res_name = None
 
 # Chemical shifts.
 w1 = None


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21814 - in /trunk: lib/spectrum/sparky.py test_suite/gui_tests/relax_disp.py user_functions/spectrum.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:17 2013
New Revision: 21814

URL: http://svn.gna.org/viewcvs/relax?rev=21814view=rev
Log:
Added name to Copyrights header of modified files.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py
trunk/test_suite/gui_tests/relax_disp.py
trunk/user_functions/spectrum.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21814r1=21813r2=21814view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 09:57:17 2013
@@ -2,6 +2,7 @@
 # #
 # Copyright (C) 2004-2013 Edward d'Auvergne   #
 # Copyright (C) 2008 Sebastien Morin  #
+# Copyright (C) 2013 Troels E. Linnet #
 # #
 # This file is part of the program relax (http://www.nmr-relax.com).  #
 # #

Modified: trunk/test_suite/gui_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/relax_disp.py?rev=21814r1=21813r2=21814view=diff
==
--- trunk/test_suite/gui_tests/relax_disp.py (original)
+++ trunk/test_suite/gui_tests/relax_disp.py Fri Dec  6 09:57:17 2013
@@ -1,6 +1,7 @@
 ###
 # #
 # Copyright (C) 2013 Edward d'Auvergne#
+# Copyright (C) 2013 Troels E. Linnet #
 # #
 # This file is part of the program relax (http://www.nmr-relax.com).  #
 # #

Modified: trunk/user_functions/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/user_functions/spectrum.py?rev=21814r1=21813r2=21814view=diff
==
--- trunk/user_functions/spectrum.py (original)
+++ trunk/user_functions/spectrum.py Fri Dec  6 09:57:17 2013
@@ -1,6 +1,7 @@
 ###
 # #
 # Copyright (C) 2004-2013 Edward d'Auvergne   #
+# Copyright (C) 2004-2013 Troels E. Linnet#
 # #
 # This file is part of the program relax (http://www.nmr-relax.com).  #
 # #


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21815 - /trunk/pipe_control/spectrum.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:18 2013
New Revision: 21815

URL: http://svn.gna.org/viewcvs/relax?rev=21815view=rev
Log:
Changed to use return_spin for testing presence of spin.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/pipe_control/spectrum.py

Modified: trunk/pipe_control/spectrum.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/spectrum.py?rev=21815r1=21814r2=21815view=diff
==
--- trunk/pipe_control/spectrum.py (original)
+++ trunk/pipe_control/spectrum.py Fri Dec  6 09:57:18 2013
@@ -37,7 +37,7 @@
 from lib.statistics import std
 from lib.warnings import RelaxWarning, RelaxNoSpinWarning
 from pipe_control import pipes
-from pipe_control.mol_res_spin import are_spins_named, 
check_mol_res_spin_data, create_spin, generate_spin_id_unique, return_spin, 
spin_loop
+from pipe_control.mol_res_spin import check_mol_res_spin_data, create_spin, 
generate_spin_id_unique, return_spin, spin_loop
 
 
 def __errors_height_no_repl():
@@ -661,7 +661,7 @@
 spin_id = generate_spin_id_unique(mol_name=mol_name, res_num=res_num, 
res_name=res_name, spin_name=spin_name)
 
 # Check if the spin already exist.
-if not are_spins_named(spin_id=spin_id):
+if return_spin(spin_id=spin_id) == None:
 # Create the spin if not exist.
 create_spin(spin_num=spin_num, spin_name=spin_name, 
res_num=res_num, res_name=res_name, mol_name=mol_name)
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21812 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:14 2013
New Revision: 21812

URL: http://svn.gna.org/viewcvs/relax?rev=21812view=rev
Log:
Issued a warning instead of error, when loadning spin residue names from a 
NMRPipe SeriesTab formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21812r1=21811r2=21812view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 09:57:14 2013
@@ -114,12 +114,19 @@
 except:
 raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s'. % line[0])
 
-# The residue name.
+# The residue name for dimension 1.
 try:
 res_name1 = row1[-4]
+except:
+raise RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 1.\nSetting 
residue name to None. % line[0])
+res_name1 = None
+
+# The residue name for dimension 2.
+try:
 res_name2 = row2[-4]
 except:
-raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name. % line[0])
+raise RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 2.\nSetting 
residue name to None. % line[0])
+res_name2 = None
 
 # Get the intensities.
 try:


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21810 - /trunk/test_suite/gui_tests/relax_disp.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 09:57:11 2013
New Revision: 21810

URL: http://svn.gna.org/viewcvs/relax?rev=21810view=rev
Log:
Fix for proper spacing and comments in GUI test.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/gui_tests/relax_disp.py

Modified: trunk/test_suite/gui_tests/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/gui_tests/relax_disp.py?rev=21810r1=21809r2=21810view=diff
==
--- trunk/test_suite/gui_tests/relax_disp.py (original)
+++ trunk/test_suite/gui_tests/relax_disp.py Fri Dec  6 09:57:11 2013
@@ -178,7 +178,7 @@
 analysis.peak_wizard_launch(None)
 wizard = analysis.peak_wizard
 
-# The spectrum, use Keyword auto.
+# The spectrum, where the use of Keyword auto will auto-assign spectra 
Z_A{i}.
 page = wizard.get_page(wizard.page_indices['read'])
 
page.uf_args['file'].SetValue(str_to_gui(%sfolded_sparky_corr_final_max_standard_trunc.ser
 % data_path))
 page.uf_args['spectrum_id'].SetValue(['auto'])
@@ -191,11 +191,16 @@
 
 # Get ID from RMSD window.
 page = wizard.get_page(wizard.page_indices['rmsd'])
+
 # Flush all wx events (to allow the spectrum list GUI element to 
populate all its rows).
 wx.Yield()
-# Get the ID
+
+# Get the first ID from list.
 cur_id = page.uf_args['spectrum_id'].GetValue()
+
+# Now check that the first is set to 'Z_A0', since the keyword 'auto' 
was used for spectrum_id.
 self.assertEqual(cur_id, 'Z_A0')
+
 
 def test_hansen_trunc_data(self):
 Test the GUI analysis with Flemming Hansen's CPMG data truncated to 
residues 70 and 71.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21819 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:09:21 2013
New Revision: 21819

URL: http://svn.gna.org/viewcvs/relax?rev=21819view=rev
Log:
Implemented system test for reading spin ID's from NMRView formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21819r1=21818r2=21819view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 11:09:21 2013
@@ -139,6 +139,37 @@
 # Check the values.
 for i in range(len(times)):
 self.assertEqual(spin.intensities[names[i]], heights[index][i])
+
+
+def test_read_spins_peak_list_nmrview(self):
+Test the reading of an NMRView peak list.
+
+# Read the peak list.
+self.interpreter.spectrum.read_spins(file=cNTnC.xpk, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+self.interpreter.spectrum.read_spins(file=cNTnC.xpk, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 2)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 70)
+self.assertEqual(cdp.mol[0].res[0].name, None)
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[0].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[1].name, 'HN')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 72)
+self.assertEqual(cdp.mol[0].res[1].name, None)
+self.assertEqual(len(cdp.mol[0].res[1].spin), 2)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[1].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[1].name, 'HN')
 
 
 def test_read_spins_peak_list_NMRPipe_seriesTab(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21820 - /trunk/lib/spectrum/nmrview.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:09:22 2013
New Revision: 21820

URL: http://svn.gna.org/viewcvs/relax?rev=21820view=rev
Log:
Made reading of NMRView formatted file return the residue number as integer 
instead of string.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrview.py

Modified: trunk/lib/spectrum/nmrview.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrview.py?rev=21820r1=21819r2=21820view=diff
==
--- trunk/lib/spectrum/nmrview.py (original)
+++ trunk/lib/spectrum/nmrview.py Fri Dec  6 11:09:22 2013
@@ -80,7 +80,7 @@
 res_num = line[1].strip('{')
 res_num = res_num.strip('}')
 res_num = res_num.split('.')
-res_num = res_num[0]
+res_num = int(res_num[0])
 except ValueError:
 raise RelaxError(The peak list is invalid.)
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21818 - /trunk/lib/spectrum/sparky.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:09:19 2013
New Revision: 21818

URL: http://svn.gna.org/viewcvs/relax?rev=21818view=rev
Log:
Fix for issuing a warning when reading spins from a sparky formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21818r1=21817r2=21818view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 11:09:19 2013
@@ -27,10 +27,12 @@
 
 # Python module imports.
 from re import split
+from warnings import warn
 
 # relax module imports.
 from lib.errors import RelaxError
 from lib.io import open_write_file, strip
+from lib.warnings import RelaxWarning
 
 
 def read_list(peak_list=None, file_data=None):
@@ -135,7 +137,7 @@
 try:
 res_name = row1[-4]
 except:
-raise RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name.\nSetting residue name to None. % 
line[0])
+raise warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name.\nSetting residue name to None. % 
line[0]))
 res_name = None
 
 # Chemical shifts.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21817 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:09:17 2013
New Revision: 21817

URL: http://svn.gna.org/viewcvs/relax?rev=21817view=rev
Log:
Fix for issuing a warning in reading spins from a NMRPipe SeriesTab formatted 
file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21817r1=21816r2=21817view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 11:09:17 2013
@@ -25,10 +25,12 @@
 
 # Python module imports.
 import re
+from warnings import warn
 
 # relax module imports.
 from lib.errors import RelaxError
 from lib.io import open_write_file, strip
+from lib.warnings import RelaxWarning
 
 
 def read_seriestab(peak_list=None, file_data=None, int_col=None):
@@ -118,14 +120,14 @@
 try:
 res_name1 = row1[-4]
 except:
-raise RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 1.\nSetting 
residue name to None. % line[0])
+raise warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the assignment '%s' for residue name dimension 1.\nSetting 
residue name to None. % line[0]))
 res_name1 = None
 
 # The residue name for dimension 2.
 try:
 res_name2 = row2[-4]
 except:
-raise RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 2.\nSetting 
residue name to None. % line[0])
+raise warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the assignment '%s' for residue name dimension 2.\nSetting 
residue name to None. % line[0]))
 res_name2 = None
 
 # Get the intensities.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21816 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:09:16 2013
New Revision: 21816

URL: http://svn.gna.org/viewcvs/relax?rev=21816view=rev
Log:
Implemented another system test for reading NMRPipe SeriesTab files.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21816r1=21815r2=21816view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 11:09:16 2013
@@ -139,6 +139,46 @@
 # Check the values.
 for i in range(len(times)):
 self.assertEqual(spin.intensities[names[i]], heights[index][i])
+
+
+def test_read_spins_peak_list_NMRPipe_seriesTab(self):
+Test the reading of an NMRPipe seriesTab peak list.
+
+# Read the peak list.
+self.interpreter.spectrum.read_spins(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+self.interpreter.spectrum.read_spins(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 3)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 62)
+self.assertEqual(cdp.mol[0].res[0].name, 'W')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'NE1')
+self.assertEqual(cdp.mol[0].res[0].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[1].name, 'HE1')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 10)
+self.assertEqual(cdp.mol[0].res[1].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 2)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[1].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[1].name, 'HN')
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 6)
+self.assertEqual(cdp.mol[0].res[2].name, 'V')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 2)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[2].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[1].name, 'HN')
 
 
 def test_read_spins_peak_list_NMRPipe_seriesTab_multi(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21821 - in /trunk/lib/spectrum: nmrpipe.py sparky.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:26:35 2013
New Revision: 21821

URL: http://svn.gna.org/viewcvs/relax?rev=21821view=rev
Log:
Fix for calling the warn() function.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21821r1=21820r2=21821view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 11:26:35 2013
@@ -120,7 +120,7 @@
 try:
 res_name1 = row1[-4]
 except:
-raise warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the assignment '%s' for residue name dimension 1.\nSetting 
residue name to None. % line[0]))
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 1. Setting 
residue name to None. % line[0]))
 res_name1 = None
 
 # The residue name for dimension 2.

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21821r1=21820r2=21821view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 11:26:35 2013
@@ -137,7 +137,7 @@
 try:
 res_name = row1[-4]
 except:
-raise warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name.\nSetting residue name to None. % 
line[0]))
+warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name. Setting residue name to None. % 
line[0]))
 res_name = None
 
 # Chemical shifts.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21822 - /trunk/lib/spectrum/nmrview.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:31:10 2013
New Revision: 21822

URL: http://svn.gna.org/viewcvs/relax?rev=21822view=rev
Log:
Extended the error description for reading NMRView files.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrview.py

Modified: trunk/lib/spectrum/nmrview.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrview.py?rev=21822r1=21821r2=21822view=diff
==
--- trunk/lib/spectrum/nmrview.py (original)
+++ trunk/lib/spectrum/nmrview.py Fri Dec  6 11:31:10 2013
@@ -82,7 +82,7 @@
 res_num = res_num.split('.')
 res_num = int(res_num[0])
 except ValueError:
-raise RelaxError(The peak list is invalid.)
+raise RelaxError(Improperly formatted NMRView file, cannot 
process the assignment '%s'. % line[0])
 
 # Nuclei names.
 name2 = ''


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21823 - /trunk/lib/spectrum/nmrview.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 11:32:27 2013
New Revision: 21823

URL: http://svn.gna.org/viewcvs/relax?rev=21823view=rev
Log:
Fix for print statement.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrview.py

Modified: trunk/lib/spectrum/nmrview.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrview.py?rev=21823r1=21822r2=21823view=diff
==
--- trunk/lib/spectrum/nmrview.py (original)
+++ trunk/lib/spectrum/nmrview.py Fri Dec  6 11:32:27 2013
@@ -82,7 +82,7 @@
 res_num = res_num.split('.')
 res_num = int(res_num[0])
 except ValueError:
-raise RelaxError(Improperly formatted NMRView file, cannot 
process the assignment '%s'. % line[0])
+raise RelaxError(Improperly formatted NMRView file, cannot 
process the assignment '%s'. % line[1])
 
 # Nuclei names.
 name2 = ''


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21824 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 12:09:54 2013
New Revision: 21824

URL: http://svn.gna.org/viewcvs/relax?rev=21824view=rev
Log:
Implemented system test for reading spins from a NMRPipe SeriesTab formatted 
file, where the assignments for second dimension is missing.

This will be a typically export from SPARKY, converted to NMRPipe format, and 
proÂcessed with SeriesTab.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21824r1=21823r2=21824view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 12:09:54 2013
@@ -253,6 +253,33 @@
 self.assertEqual(len(cdp.mol[0].res[3].spin), 1)
 self.assertEqual(cdp.mol[0].res[3].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[3].spin[0].name, 'N')
+
+
+def test_read_spins_peak_list_NMRPipe_seriesTab_multi_no_2dim(self):
+Test the reading of an NMRPipe seriesTab peak list, with no 
assignment for second dimension.
+
+# Read the peak list.
+
self.interpreter.spectrum.read_spins(file=folded_sparky_corr_final_max_standard_trunc.ser,
 dir=status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'KTeilum_FMPoulsen_MAkke_2006'+sep+'acbp_cpmg_disp_101MGuHCl_40C_041223',
 dim=1)
+
self.interpreter.spectrum.read_spins(file=folded_sparky_corr_final_max_standard_trunc.ser,
 dir=status.install_path + 
sep+'test_suite'+sep+'shared_data'+sep+'dispersion'+sep+'KTeilum_FMPoulsen_MAkke_2006'+sep+'acbp_cpmg_disp_101MGuHCl_40C_041223',
 dim=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 2)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 61)
+self.assertEqual(cdp.mol[0].res[0].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+
+# 2nd residue, which is a None residue.
+self.assertEqual(cdp.mol[0].res[1].num, None)
+self.assertEqual(cdp.mol[0].res[1].name, None)
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'HN')
 
 
 def test_read_spins_peak_list_sparky(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21825 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 12:09:56 2013
New Revision: 21825

URL: http://svn.gna.org/viewcvs/relax?rev=21825view=rev
Log:
Fixed for reading spins from a NMRPipe SeriesTab formatted file, where 
dimension 2 misses residue number and residue name.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21825r1=21824r2=21825view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 12:09:56 2013
@@ -109,25 +109,32 @@
 row2 = re.split('([a-zA-Z]+)', assign2)
 name2 = row2[-2] + row2[-1]
 
-# Get the residue number.
+# Get the residue number for dimension 1.
 try:
 res_num1 = int(row1[-3])
+except:
+raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue number for dimension 1 in assignment: %s. % line[0])
+
+# Get the residue number for dimension 2.
+try:
 res_num2 = int(row2[-3])
 except:
-raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s'. % line[0])
+# We cannot always expect dimension 2 to have residue number.
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue number for dimension 2 in assignment: %s. Setting 
residue number to None. % line[0]))
+res_num2 = None
 
 # The residue name for dimension 1.
 try:
 res_name1 = row1[-4]
 except:
-warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 1. Setting 
residue name to None. % line[0]))
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 1 in assignment: %s. % line[0]))
 res_name1 = None
 
 # The residue name for dimension 2.
 try:
 res_name2 = row2[-4]
 except:
-raise warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the assignment '%s' for residue name dimension 2.\nSetting 
residue name to None. % line[0]))
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 2 in assignment: %s. Setting 
residue name to None. % line[0]))
 res_name2 = None
 
 # Get the intensities.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21826 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 12:12:43 2013
New Revision: 21826

URL: http://svn.gna.org/viewcvs/relax?rev=21826view=rev
Log:
Expanded the warning message for a systemtest.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21826r1=21825r2=21826view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 12:12:43 2013
@@ -127,7 +127,7 @@
 try:
 res_name1 = row1[-4]
 except:
-warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 1 in assignment: %s. % line[0]))
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 1 in assignment: %s. Setting 
residue name to None. % line[0]))
 res_name1 = None
 
 # The residue name for dimension 2.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21828 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 13:20:23 2013
New Revision: 21828

URL: http://svn.gna.org/viewcvs/relax?rev=21828view=rev
Log:
If dimension 2 in a SeriesTab formatted file does not contain residue 
number+name, it defaults to the dimension 1.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21828r1=21827r2=21828view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 13:20:23 2013
@@ -110,9 +110,11 @@
 name2 = row2[-2] + row2[-1]
 
 # Get the residue number for dimension 1.
+got_res_num1 = True
 try:
 res_num1 = int(row1[-3])
 except:
+got_res_num1 = False
 raise RelaxError(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue number for dimension 1 in assignment: %s. % line[0])
 
 # Get the residue number for dimension 2.
@@ -120,22 +122,31 @@
 res_num2 = int(row2[-3])
 except:
 # We cannot always expect dimension 2 to have residue number.
-warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue number for dimension 2 in assignment: %s. Setting 
residue number to None. % line[0]))
-res_num2 = None
+if got_res_num1:
+res_num2 = res_num1
+else:
+res_num2 = None
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the residue number for dimension 2 in assignment: %s. 
Setting residue number to %s. % (line[0], res_num2)))
 
 # The residue name for dimension 1.
+got_res_name1 = True
 try:
 res_name1 = row1[-4]
 except:
-warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 1 in assignment: %s. Setting 
residue name to None. % line[0]))
+got_res_name1 = False
 res_name1 = None
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 1 in assignment: %s. Setting 
residue name to %s. % (line[0], res_name1)))
 
 # The residue name for dimension 2.
 try:
 res_name2 = row2[-4]
 except:
-warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab file, 
cannot process the residue name for dimension 2 in assignment: %s. Setting 
residue name to None. % line[0]))
-res_name2 = None
+# We cannot always expect dimension 2 to have residue name.
+if got_res_name1:
+res_name2 = res_name1
+else:
+res_name2 = None
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the residue name for dimension 2 in assignment: %s. 
Setting residue name to %s. % (line[0], res_name2)))
 
 # Get the intensities.
 try:


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21827 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 13:20:22 2013
New Revision: 21827

URL: http://svn.gna.org/viewcvs/relax?rev=21827view=rev
Log:
Modified system test for reading an assignment, where the second dimension is 
missing.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21827r1=21826r2=21827view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 13:20:22 2013
@@ -265,21 +265,16 @@
 # Test some of the sequence.
 self.assertEqual(len(cdp.mol), 1)
 self.assertEqual(cdp.mol[0].name, None)
-self.assertEqual(len(cdp.mol[0].res), 2)
+self.assertEqual(len(cdp.mol[0].res), 1)
 
 # 1st residue.
 self.assertEqual(cdp.mol[0].res[0].num, 61)
 self.assertEqual(cdp.mol[0].res[0].name, 'L')
-self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2)
 self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
-
-# 2nd residue, which is a None residue.
-self.assertEqual(cdp.mol[0].res[1].num, None)
-self.assertEqual(cdp.mol[0].res[1].name, None)
-self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
-self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
-self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'HN')
+self.assertEqual(cdp.mol[0].res[0].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[1].name, 'HN')
 
 
 def test_read_spins_peak_list_sparky(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21830 - /trunk/lib/spectrum/xeasy.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 13:23:30 2013
New Revision: 21830

URL: http://svn.gna.org/viewcvs/relax?rev=21830view=rev
Log:
Modified xeasy reading function to pass residue names back.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/xeasy.py

Modified: trunk/lib/spectrum/xeasy.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/xeasy.py?rev=21830r1=21829r2=21830view=diff
==
--- trunk/lib/spectrum/xeasy.py (original)
+++ trunk/lib/spectrum/xeasy.py Fri Dec  6 13:23:30 2013
@@ -2,6 +2,7 @@
 # #
 # Copyright (C) 2004-2013 Edward d'Auvergne   #
 # Copyright (C) 2008 Sebastien Morin  #
+# Copyright (C) 2013 Troels E. Linnet #
 # #
 # This file is part of the program relax (http://www.nmr-relax.com).  #
 # #
@@ -24,9 +25,13 @@
 Module containing functions for handling XEasy files.
 
 
+# Python module imports.
+from warnings import warn
+
 # relax module imports.
 from lib.errors import RelaxError
 from lib.io import strip
+from lib.warnings import RelaxWarning
 
 
 def read_list(peak_list=None, file_data=None, int_col=None):
@@ -46,6 +51,8 @@
 w2_col = 2
 ass_w1_col = 7
 ass_w2_col = 4
+res_name1_col = 9
+res_name2_col = 5
 if int_col == None:
 int_col = 10
 
@@ -75,15 +82,26 @@
 if line[ass_w1_col] == 'inv.' or line[ass_w2_col] == 'inv.':
 continue
 
-# The residue number.
+# The residue number for dimension 1.
 try:
-res_num = int(line[5])
+res_num1 = int(line[8])
 except:
-raise RelaxError(Improperly formatted XEasy file, cannot read the 
line %s. % line)
+raise RelaxError(Improperly formatted XEasy file, cannot process 
the residue number for dimension 1 in assignment: %s. % line)
+
+# The residue number for dimension 2.
+try:
+res_num2 = int(line[5])
+except:
+warn(RelaxWarning(Improperly formatted XEasy file, cannot process 
the residue number for dimension 2 in assignment: %s. Setting residue number to 
None. % line))
+res_num2 = None
 
 # Nuclei names.
 name1 = line[ass_w1_col]
 name2 = line[ass_w2_col]
+
+# Residue names.
+res_name1 = line[res_name1_col]
+res_name2 = line[res_name2_col]
 
 # Chemical shifts.
 try:
@@ -102,4 +120,4 @@
 raise RelaxError(The peak intensity value from the line %s is 
invalid. % line)
 
 # Add the assignment to the peak list object.
-peak_list.add(res_nums=[res_num, res_num], spin_names=[name1, name2], 
shifts=[w1, w2], intensity=intensity)
+peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], shifts=[w1, w2], intensity=intensity)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21829 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 13:23:29 2013
New Revision: 21829

URL: http://svn.gna.org/viewcvs/relax?rev=21829view=rev
Log:
Implemented system test for reading spins from an xeasy file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21829r1=21828r2=21829view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 13:23:29 2013
@@ -331,6 +331,49 @@
 self.assertEqual(len(cdp.mol[0].res[5].spin), 1)
 self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
+
+
+def test_read_spins_peak_list_xeasy(self):
+Test the reading of spins from an XEasy peak list.
+
+# Read the peak list.
+self.interpreter.spectrum.read_spins(file=xeasy_r1_20ms.text, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 21)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 21)
+self.assertEqual(cdp.mol[0].res[0].name, 'LEU')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 79)
+self.assertEqual(cdp.mol[0].res[1].name, 'TRP')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'NE1')
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 110)
+self.assertEqual(cdp.mol[0].res[2].name, 'PHE')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 1)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
+
+# 10th residue.
+self.assertEqual(cdp.mol[0].res[9].num, 107)
+self.assertEqual(cdp.mol[0].res[9].name, 'TRP')
+self.assertEqual(len(cdp.mol[0].res[9].spin), 2)
+self.assertEqual(cdp.mol[0].res[9].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[9].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[9].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[9].spin[1].name, 'C')
+
 
 def test_read_peak_list_generic(self):
 Test the reading of a generic peak intensity list.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21831 - /trunk/test_suite/shared_data/peak_lists/sparky2dim.list

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 14:08:34 2013
New Revision: 21831

URL: http://svn.gna.org/viewcvs/relax?rev=21831view=rev
Log:
Copyied SeriesTab file for implementation of double assignment in sparky files.

Added:
trunk/test_suite/shared_data/peak_lists/sparky2dim.list
  - copied unchanged from r21830, 
trunk/test_suite/shared_data/peak_lists/seriesTab.ser


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21832 - in /trunk: specific_analyses/relax_disp/ target_functions/

2013-12-06 Thread edward
Author: bugman
Date: Fri Dec  6 14:52:31 2013
New Revision: 21832

URL: http://svn.gna.org/viewcvs/relax?rev=21832view=rev
Log:
Redesign of the CPMG frequency and spin-lock field strength data structures.

These now have an extra dimension for the offset so that the values are now 
experiment, magnetic
field strength and offset dependent.  If many offsets are present but are 
variable for each
dispersion point, then this saves a lot of calculation time.  This mainly 
affects R1rho-type data.
To better handle this, all of the 
specific_analyses.relax_disp.disp_data.loop_*() functions have
been modified to accept data values rather than indices.


Modified:
trunk/specific_analyses/relax_disp/catia.py
trunk/specific_analyses/relax_disp/disp_data.py
trunk/specific_analyses/relax_disp/optimisation.py
trunk/specific_analyses/relax_disp/sherekhan.py
trunk/target_functions/relax_disp.py

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: trunk/specific_analyses/relax_disp/catia.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/catia.py?rev=21832r1=21831r2=21832view=diff

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=21832r1=21831r2=21832view=diff

Modified: trunk/specific_analyses/relax_disp/optimisation.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/optimisation.py?rev=21832r1=21831r2=21832view=diff

Modified: trunk/specific_analyses/relax_disp/sherekhan.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/sherekhan.py?rev=21832r1=21831r2=21832view=diff

Modified: trunk/target_functions/relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/target_functions/relax_disp.py?rev=21832r1=21831r2=21832view=diff


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21833 - /trunk/specific_analyses/relax_disp/disp_data.py

2013-12-06 Thread edward
Author: bugman
Date: Fri Dec  6 15:03:48 2013
New Revision: 21833

URL: http://svn.gna.org/viewcvs/relax?rev=21833view=rev
Log:
Fix for a bug introduced in the last commit (r21832).


Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=21833r1=21832r2=21833view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Fri Dec  6 15:03:48 2013
@@ -3008,9 +3008,9 @@
 
 # Convert to numpy arrays.
 relax_times = array(relax_times, float64)
-for ei in range(exp_num):
+for exp_type, ei in loop_exp(return_indices=True):
 for si in range(spin_num):
-for mi in range(field_count):
+for frq, mi in loop_frq(return_indices=True):
 for offset, oi in loop_offset(exp_type=exp_type, frq=frq, 
return_indices=True):
 values[ei][si][mi][oi] = array(values[ei][si][mi][oi], 
float64)
 errors[ei][si][mi][oi] = array(errors[ei][si][mi][oi], 
float64)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21834 - /trunk/specific_analyses/relax_disp/disp_data.py

2013-12-06 Thread edward
Author: bugman
Date: Fri Dec  6 15:06:18 2013
New Revision: 21834

URL: http://svn.gna.org/viewcvs/relax?rev=21834view=rev
Log:
Reverted r21803 as this change was rubbish.

The command used was:
svn merge -r21803:r21802 .

.
  r21803 | bugman | 2013-12-06 09:07:56 +0100 (Fri, 06 Dec 2013) | 5 lines
  Changed paths:
 M /trunk/specific_analyses/relax_disp/disp_data.py
  
  Neutralised the negative sign of the 15N gyromagnetic ratio in the 
return_offset_data() method.
  
  This is to match the behaviour of Dmitry Korzhnev's cpmg_fit software.
.


Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=21834r1=21833r2=21834view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Fri Dec  6 15:06:18 2013
@@ -2636,11 +2636,6 @@
 spin = spins[si]
 spin_id = spin_ids[si]
 
-# The sign to multiply shifts and offsets by.
-sign = 1.0
-if spin.isotope == '15N':
-sign = -1.0
-
 # No data.
 shift = 0.0
 if hasattr(spin, 'chemical_shift'):
@@ -2673,7 +2668,7 @@
 fields = return_spin_lock_nu1_single(exp_type=exp_type, 
frq=frq, offset=offset, ref_flag=False)
 
 # Convert the shift from ppm to rad/s and store it.
-shifts[ei][si][mi] = sign * frequency_to_rad_per_s(frq=shift, 
B0=frq, isotope=spin.isotope)
+shifts[ei][si][mi] = frequency_to_rad_per_s(frq=shift, B0=frq, 
isotope=spin.isotope)
 
 # Find a matching experiment ID.
 found = False
@@ -2701,7 +2696,7 @@
 # Store the offset in rad/s.  Only once and using the first key.
 if offsets[ei][si][mi][oi] == None:
 if r1rho_flag and hasattr(cdp, 'spin_lock_offset'):
-offsets[ei][si][mi][oi] = sign * 
frequency_to_rad_per_s(frq=cdp.spin_lock_offset[id], B0=frq, 
isotope=spin.isotope)
+offsets[ei][si][mi][oi] = 
frequency_to_rad_per_s(frq=cdp.spin_lock_offset[id], B0=frq, 
isotope=spin.isotope)
 else:
 offsets[ei][si][mi][oi] = 0.0
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21835 - /trunk/specific_analyses/relax_disp/disp_data.py

2013-12-06 Thread edward
Author: bugman
Date: Fri Dec  6 15:09:48 2013
New Revision: 21835

URL: http://svn.gna.org/viewcvs/relax?rev=21835view=rev
Log:
Improved the printout of the relax_disp.r2eff_read_spin user function for the 
R2eff keys.


Modified:
trunk/specific_analyses/relax_disp/disp_data.py

Modified: trunk/specific_analyses/relax_disp/disp_data.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_analyses/relax_disp/disp_data.py?rev=21835r1=21834r2=21835view=diff
==
--- trunk/specific_analyses/relax_disp/disp_data.py (original)
+++ trunk/specific_analyses/relax_disp/disp_data.py Fri Dec  6 15:09:48 2013
@@ -2189,9 +2189,9 @@
 
 # Append the data for printout.
 if disp_point_col != None:
-data.append([%20.15f % disp_point, %20.15f % value, %20.15f 
% error])
+data.append([%-40s % point_key, %20.15f % disp_point, 
%20.15f % value, %20.15f % error])
 else:
-data.append([%20.15f % offset, %20.15f % value, %20.15f % 
error, point_key])
+data.append([%-40s % point_key, %20.15f % offset, %20.15f % 
value, %20.15f % error])
 
 # Data added.
 data_flag = True
@@ -2203,9 +2203,9 @@
 # Print out.
 print(The following R2eff/R1rho data has been loaded into the relax data 
store:\n)
 if disp_point_col != None:
-write_data(out=sys.stdout, headings=[Disp_point, R2eff, 
R2eff_error], data=data)
+write_data(out=sys.stdout, headings=[R2eff_key, Disp_point, 
R2eff, R2eff_error], data=data)
 else:
-write_data(out=sys.stdout, headings=[Offset (ppm), R2eff, 
R2eff_error, key], data=data)
+write_data(out=sys.stdout, headings=[R2eff_key, Offset (ppm), 
R2eff, R2eff_error], data=data)
 
 
 def randomise_R1(spin=None, ri_id=None, N=None):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21837 - /trunk/test_suite/shared_data/peak_lists/sparky2dim.list

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 15:35:07 2013
New Revision: 21837

URL: http://svn.gna.org/viewcvs/relax?rev=21837view=rev
Log:
Modified sparky peak list for two dimensional assignment example.

This will typically be the export from CcpNmr Analysis.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/shared_data/peak_lists/sparky2dim.list

Modified: trunk/test_suite/shared_data/peak_lists/sparky2dim.list
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/peak_lists/sparky2dim.list?rev=21837r1=21836r2=21837view=diff
==
--- trunk/test_suite/shared_data/peak_lists/sparky2dim.list (original)
+++ trunk/test_suite/shared_data/peak_lists/sparky2dim.list Fri Dec  6 15:35:07 
2013
@@ -1,16 +1,9 @@
-REMARK SeriesTab Input: ../peaks.dat Output: ../peaks_0.ser
-REMARK Mode: Summation Dimensions: 2
-REMARK Input Region:X +/- 1 X-ZF: 3
-REMARK Analysis Region: X +/- 1
-REMARK Input Region:Y +/- 1 Y-ZF: 3
-REMARK Analysis Region: Y +/- 1
+  Assignment w1 w2   Data Height
 
-VARS   INDEX X_AXIS Y_AXIS X_PPM Y_PPM VOL ASS Z_A0
-FORMAT %5d %9.3f %9.3f %8.3f %8.3f %+e %s %7.4f
-
-NULLVALUE -666
-NULLSTRING *
-
-1   246.65818.2689.932  128.374 +1.851056e+06 W62NE1-W62HE1  1.
-2   321.69830.9949.419  127.066 +3.224387e+05 L10N-L10HN  1.
-3   320.08955.7379.430  124.523 +1.479366e+06 V6N-V6HN  1.
+   W62NE1-W62HE1128.374  9.932 +1.851056e+06
+  L10N-L10HN127.066  9.419 +3.224387e+05
+V6N-V6HN124.523  9.430 +1.479366e+06
+T2N-T2HN115.994  8.521 +1.179448e+06
+K3N-T2HN125.899  8.695 +4.407306e+06
+A4N-T2HN123.001  9.123 +3.480382e+06
+V5N-T2HN120.839  9.444 +4.306408e+06


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21839 - /trunk/lib/spectrum/sparky.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 15:35:10 2013
New Revision: 21839

URL: http://svn.gna.org/viewcvs/relax?rev=21839view=rev
Log:
Extended reading of spins from sparky files for up to two dimensional 
assignments.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21839r1=21838r2=21839view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 15:35:10 2013
@@ -127,18 +127,44 @@
 row4 = split('([a-zA-Z]+)', assign4)
 name4 = row4[-2] + row4[-1]
 
-# The residue number.
-try:
-res_num = int(row1[-3])
-except:
-raise RelaxError(Improperly formatted Sparky file, cannot process 
the assignment '%s'. % line[0])
-
-# The residue name.
-try:
-res_name = row1[-4]
-except:
-warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name. Setting residue name to None. % 
line[0]))
-res_name = None
+# Get the residue number for dimension 1.
+got_res_num1 = True
+try:
+res_num1 = int(row1[-3])
+except:
+got_res_num1 = False
+raise RelaxError(Improperly formatted Sparky file, cannot process 
the residue number for dimension 1 in assignment: %s. % line[0])
+
+# Get the residue number for dimension 2.
+try:
+res_num2 = int(row2[-3])
+except:
+# We cannot always expect dimension 2 to have residue number.
+if got_res_num1:
+res_num2 = res_num1
+else:
+res_num2 = None
+warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the residue number for dimension 2 in assignment: %s. Setting residue 
number to %s. % (line[0], res_num2)))
+
+# The residue name for dimension 1.
+got_res_name1 = True
+try:
+res_name1 = row1[-4]
+except:
+got_res_name1 = False
+res_name1 = None
+warn(RelaxWarning(Improperly formatted Sparky file, cannot 
process the residue name for dimension 1 in assignment: %s. Setting residue 
name to %s. % (line[0], res_name1)))
+
+# The residue name for dimension 2.
+try:
+res_name2 = row2[-4]
+except:
+# We cannot always expect dimension 2 to have residue name.
+if got_res_name1:
+res_name2 = res_name1
+else:
+res_name2 = None
+warn(RelaxWarning(Improperly formatted NMRPipe SeriesTab 
file, cannot process the residue name for dimension 2 in assignment: %s. 
Setting residue name to %s. % (line[0], res_name2)))
 
 # Chemical shifts.
 w1 = None
@@ -175,13 +201,13 @@
 
 # Add the assignment to the peak list object.
 if dim == 1:
-peak_list.add(res_nums=[res_num], res_names=[res_name], 
spin_names=[name1], shifts=[w1], intensity=intensity)
+peak_list.add(res_nums=[res_num1], res_names=[res_name1], 
spin_names=[name1], shifts=[w1], intensity=intensity)
 elif dim == 2:
-peak_list.add(res_nums=[res_num, res_num], res_names=[res_name, 
res_name], spin_names=[name1, name2], shifts=[w1, w2], intensity=intensity)
+peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], shifts=[w1, w2], intensity=intensity)
 elif dim == 3:
-peak_list.add(res_nums=[res_num, res_num, res_num], 
res_names=[res_name, res_name, res_name], spin_names=[name1, name2, name3], 
shifts=[w1, w2, w3], intensity=intensity)
+peak_list.add(res_nums=[res_num1, res_num2, res_num1], 
res_names=[res_name1, res_name2, res_name1], spin_names=[name1, name2, name3], 
shifts=[w1, w2, w3], intensity=intensity)
 elif dim == 4:
-peak_list.add(res_nums=[res_num, res_num, res_num, res_num], 
res_names=[res_name, res_name, res_name, res_name], spin_names=[name1, name2, 
name3, name4], shifts=[w1, w2, w3, w4], intensity=intensity)
+peak_list.add(res_nums=[res_num1, res_num2, res_num1, res_num1], 
res_names=[res_name1, res_name2, res_name1, res_name1], spin_names=[name1, 
name2, name3, name4], shifts=[w1, w2, w3, w4], intensity=intensity)
 
 
 def write_list(file_prefix=None, dir=None, res_names=None, res_nums=None, 
atom1_names=None, atom2_names=None, w1=None, w2=None, data_height=None, 
force=True):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get 

r21838 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 15:35:08 2013
New Revision: 21838

URL: http://svn.gna.org/viewcvs/relax?rev=21838view=rev
Log:
Implemented system test for using double assignments in sparky formatted files.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21838r1=21837r2=21838view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 15:35:08 2013
@@ -334,6 +334,76 @@
 self.assertEqual(len(cdp.mol[0].res[5].spin), 2)
 self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
+
+
+def test_read_spins_peak_list_sparky_with_2dim_ass(self):
+Test the reading of spins from a Sparky peak list with two 
dimensional assignment
+
+# Read the spins from peak list.
+self.interpreter.spectrum.read_spins(file=sparky2dim.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+self.interpreter.spectrum.read_spins(file=sparky2dim.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 7)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 62)
+self.assertEqual(cdp.mol[0].res[0].name, 'W')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'NE1')
+self.assertEqual(cdp.mol[0].res[0].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[1].name, 'HE1')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 10)
+self.assertEqual(cdp.mol[0].res[1].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 2)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[1].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[1].name, 'HN')
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 6)
+self.assertEqual(cdp.mol[0].res[2].name, 'V')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 2)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[2].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[1].name, 'HN')
+
+# 4th residue.
+self.assertEqual(cdp.mol[0].res[3].num, 2)
+self.assertEqual(cdp.mol[0].res[3].name, 'T')
+self.assertEqual(len(cdp.mol[0].res[3].spin), 2)
+self.assertEqual(cdp.mol[0].res[3].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[3].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[3].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[3].spin[1].name, 'HN')
+
+# 5th residue.
+self.assertEqual(cdp.mol[0].res[4].num, 3)
+self.assertEqual(cdp.mol[0].res[4].name, 'K')
+self.assertEqual(len(cdp.mol[0].res[4].spin), 1)
+self.assertEqual(cdp.mol[0].res[4].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[4].spin[0].name, 'N')
+
+# 6th residue.
+self.assertEqual(cdp.mol[0].res[5].num, 4)
+self.assertEqual(cdp.mol[0].res[5].name, 'A')
+self.assertEqual(len(cdp.mol[0].res[5].spin), 1)
+self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
+
+# 7th residue.
+self.assertEqual(cdp.mol[0].res[6].num, 5)
+self.assertEqual(cdp.mol[0].res[6].name, 'V')
+self.assertEqual(len(cdp.mol[0].res[6].spin), 1)
+self.assertEqual(cdp.mol[0].res[6].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[6].spin[0].name, 'N')
 
 
 def test_read_spins_peak_list_xeasy(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21836 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 15:35:06 2013
New Revision: 21836

URL: http://svn.gna.org/viewcvs/relax?rev=21836view=rev
Log:
Extended system test for reading spins from SPARKY files with empty residue 
name+number second dimension assignment.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21836r1=21835r2=21836view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 15:35:06 2013
@@ -281,7 +281,8 @@
 Test the reading of spins from a Sparky peak list.
 
 # Read the spins from peak list.
-self.interpreter.spectrum.read_spins(file=ref_ave.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+self.interpreter.spectrum.read_spins(file=ref_ave.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+self.interpreter.spectrum.read_spins(file=ref_ave.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=2)
 
 # Test some of the sequence.
 self.assertEqual(len(cdp.mol), 1)
@@ -291,35 +292,37 @@
 # 1st residue.
 self.assertEqual(cdp.mol[0].res[0].num, 3)
 self.assertEqual(cdp.mol[0].res[0].name, 'LEU')
-self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[0].spin), 2)
 self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+self.assertEqual(cdp.mol[0].res[0].spin[1].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[1].name, 'HN')
 
 # 2nd residue.
 self.assertEqual(cdp.mol[0].res[1].num, 4)
 self.assertEqual(cdp.mol[0].res[1].name, 'GLY')
-self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[1].spin), 2)
 self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
 
 # 3rd residue.
 self.assertEqual(cdp.mol[0].res[2].num, 5)
 self.assertEqual(cdp.mol[0].res[2].name, 'SER')
-self.assertEqual(len(cdp.mol[0].res[2].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[2].spin), 2)
 self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
 
 # 4th residue.
 self.assertEqual(cdp.mol[0].res[3].num, 6)
 self.assertEqual(cdp.mol[0].res[3].name, 'MET')
-self.assertEqual(len(cdp.mol[0].res[3].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[3].spin), 2)
 self.assertEqual(cdp.mol[0].res[3].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[3].spin[0].name, 'N')
 
 # 5th residue.
 self.assertEqual(cdp.mol[0].res[4].num, 40)
 self.assertEqual(cdp.mol[0].res[4].name, 'TRP')
-self.assertEqual(len(cdp.mol[0].res[4].spin), 2)
+self.assertEqual(len(cdp.mol[0].res[4].spin), 4)
 self.assertEqual(cdp.mol[0].res[4].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[4].spin[0].name, 'N')
 self.assertEqual(cdp.mol[0].res[4].spin[1].num, None)
@@ -328,7 +331,7 @@
 # 6th residue.
 self.assertEqual(cdp.mol[0].res[5].num, 55)
 self.assertEqual(cdp.mol[0].res[5].name, 'ASN')
-self.assertEqual(len(cdp.mol[0].res[5].spin), 1)
+self.assertEqual(len(cdp.mol[0].res[5].spin), 2)
 self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
 


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21841 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 16:46:38 2013
New Revision: 21841

URL: http://svn.gna.org/viewcvs/relax?rev=21841view=rev
Log:
Added system test for reading CcpNmr Analysis exported sparky file

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21841r1=21840r2=21841view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 16:46:38 2013
@@ -334,6 +334,47 @@
 self.assertEqual(len(cdp.mol[0].res[5].spin), 2)
 self.assertEqual(cdp.mol[0].res[5].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[5].spin[0].name, 'N')
+
+
+def test_read_spins_peak_list_sparky_export_ccpnmr_analysis(self):
+Test the reading of spins from a Sparky peak list exported from 
CcpNmr Analysis.
+
+# Read the spins from peak list.
+
self.interpreter.spectrum.read_spins(file=peak_list_ccpnmr_analysis.list, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 3)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 76)
+self.assertEqual(cdp.mol[0].res[0].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 74)
+self.assertEqual(cdp.mol[0].res[1].name, 'T')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 31)
+self.assertEqual(cdp.mol[0].res[2].name, 'T')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 1)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, 'N')
+
+# Read the peak list intensity.
+
self.interpreter.spectrum.read_intensities(file=peak_list_ccpnmr_analysis.list,
 dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
spectrum_id='test', int_method='height')
+
+# Test the data.
+
self.assertEqual(list(cdp.mol[0].res[0].spin[0].intensities.values())[0], 
2.32E+05)
+
self.assertEqual(list(cdp.mol[0].res[1].spin[0].intensities.values())[0], 
2.01E+05)
+
self.assertEqual(list(cdp.mol[0].res[2].spin[0].intensities.values())[0], 
2.08E+05)
 
 
 def test_read_spins_peak_list_sparky_with_2dim_ass(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21842 - /trunk/lib/spectrum/sparky.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 16:46:39 2013
New Revision: 21842

URL: http://svn.gna.org/viewcvs/relax?rev=21842view=rev
Log:
Modified reading of sparky files, when exported from CcpNmr Analysis.

The keyword 'Data' is not present here.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21842r1=21841r2=21842view=diff
==
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 16:46:39 2013
@@ -71,8 +71,13 @@
 w4_col = i
 
 # The peak height.
-elif file_data[0][i] == 'Data' and file_data[0][i+1] == 'Height':
+elif file_data[0][i] == 'Height':
+# The peak height when exported from CcpNmr Analysis export 
without 'Data'.
 int_col = i
+
+# The peak height when exported from Sparky.
+if file_data[0][i-1] == 'Data' and file_data[0][i] == 'Height':
+int_col = i-1
 
 # The peak volume.
 elif file_data[0][i] == 'Intensity':


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21840 - /trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 16:46:37 2013
New Revision: 21840

URL: http://svn.gna.org/viewcvs/relax?rev=21840view=rev
Log:
Added example of CcpNmr analysis exported Sparky file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Added:
trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list

Added: trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list?rev=21840view=auto
==
--- trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list 
(added)
+++ trunk/test_suite/shared_data/peak_lists/peak_list_ccpnmr_analysis.list Fri 
Dec  6 16:46:37 2013
@@ -1,0 +1,4 @@
+  Assignment w1 w2   Height   Volume
+   L76N-L76HN115.052  8.406   2.32E+05   1.09E+06 bx
+   T74N-T74HN114.602  8.082   2.01E+05   9.87E+05 bx
+   T31N-T31HN114.568  8.174   2.08E+05   1.04E+06 bx


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21845 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 18:11:32 2013
New Revision: 21845

URL: http://svn.gna.org/viewcvs/relax?rev=21845view=rev
Log:
Added another systemtest for returning spins from a generic file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21845r1=21844r2=21845view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 18:11:32 2013
@@ -186,6 +186,32 @@
 self.assertEqual(len(cdp.mol[0].res[4].spin), 1)
 self.assertEqual(cdp.mol[0].res[4].spin[0].num, None)
 self.assertEqual(cdp.mol[0].res[4].spin[0].name, None)
+
+
+def test_read_spins_peak_list_generic_with_spin_name(self):
+Test the reading of spins with spin name in columns from a generic 
peak intensity list.
+
+# Read the peak spins.
+self.interpreter.spectrum.read_spins(file='test.seq', 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
mol_name_col=1, res_num_col=2, res_name_col=3, spin_num_col=4, spin_name_col=5)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, 'protein')
+self.assertEqual(len(cdp.mol[0].res), 10)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 10)
+self.assertEqual(cdp.mol[0].res[0].name, 'L')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, 10)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, 'N')
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 6)
+self.assertEqual(cdp.mol[0].res[1].name, 'V')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, 6)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, 'N')
 
 
 def test_read_spins_peak_list_nmrview(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21844 - /trunk/lib/spectrum/peak_list.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 18:11:30 2013
New Revision: 21844

URL: http://svn.gna.org/viewcvs/relax?rev=21844view=rev
Log:
Modified the generic list to also return spin information when intensity is not 
present.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/peak_list.py

Modified: trunk/lib/spectrum/peak_list.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/peak_list.py?rev=21844r1=21843r2=21844view=diff
==
--- trunk/lib/spectrum/peak_list.py (original)
+++ trunk/lib/spectrum/peak_list.py Fri Dec  6 18:11:30 2013
@@ -96,12 +96,14 @@
 @raises RelaxError: When the expected peak intensity is not a float.
 
 
-# Check the intensity column argument.
-if data_col == None:
-raise RelaxError(The data column argument has not been supplied.)
-
 # Strip the data.
 file_data = strip(file_data)
+
+# Check the intensity column argument.
+data_present = True
+if data_col == None:
+warn(RelaxWarning(The data column argument has not been supplied, and 
function will only return spin data.))
+data_present = False
 
 # Convert the the data_col argument to a list if needed.
 if not isinstance(data_col, list):
@@ -115,14 +117,21 @@
 # Extract the data for the single line (loop of a single element).
 for values in read_spin_data(file_data=[line], 
spin_id_col=spin_id_col, mol_name_col=mol_name_col, res_num_col=res_num_col, 
res_name_col=res_name_col, spin_num_col=spin_num_col, 
spin_name_col=spin_name_col, data_col=data_col[i], sep=sep, spin_id=spin_id):
 # Check the values.
-if len(values) != 6:
+if len(values) != 6 and data_present:
 raise RelaxError(The molecule name, residue number and 
name, spin number and name, and value columns could not be found in the data 
%s. % repr(values))
 
-# Unpack.
-mol_name, res_num, res_name, spin_num, spin_name, value = 
values
-
-# Store the intensity.
-intensity.append(value)
+# Unpack when peak data is present
+elif data_present:
+# Unpack.
+mol_name, res_num, res_name, spin_num, spin_name, value = 
values
+
+# Store the intensity.
+intensity.append(value)
+
+# Unpack when peak data is not present.
+elif not data_present:
+# Unpack.
+mol_name, res_num, res_name, spin_num, spin_name = values
 
 # Add the assignment to the peak list object.
 peak_list.add(mol_names=[mol_name, mol_name], res_nums=[res_num, 
res_num], res_names=[res_name, res_name], spin_nums=[spin_num, spin_num], 
spin_names=[spin_name, spin_name], intensity=intensity)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21843 - /trunk/test_suite/system_tests/peak_lists.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 18:11:29 2013
New Revision: 21843

URL: http://svn.gna.org/viewcvs/relax?rev=21843view=rev
Log:
Added system for using generic file for reading spins.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/peak_lists.py

Modified: trunk/test_suite/system_tests/peak_lists.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/peak_lists.py?rev=21843r1=21842r2=21843view=diff
==
--- trunk/test_suite/system_tests/peak_lists.py (original)
+++ trunk/test_suite/system_tests/peak_lists.py Fri Dec  6 18:11:29 2013
@@ -139,6 +139,53 @@
 # Check the values.
 for i in range(len(times)):
 self.assertEqual(spin.intensities[names[i]], heights[index][i])
+
+
+def test_read_spins_peak_list_generic(self):
+Test the reading of spins from a generic peak intensity list.
+
+   # Read the peak spins.
+self.interpreter.spectrum.read_spins(file=generic_intensity.txt, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
res_num_col=1, res_name_col=2)
+
+# Test some of the sequence.
+self.assertEqual(len(cdp.mol), 1)
+self.assertEqual(cdp.mol[0].name, None)
+self.assertEqual(len(cdp.mol[0].res), 5)
+
+# 1st residue.
+self.assertEqual(cdp.mol[0].res[0].num, 20)
+self.assertEqual(cdp.mol[0].res[0].name, 'GLY')
+self.assertEqual(len(cdp.mol[0].res[0].spin), 1)
+self.assertEqual(cdp.mol[0].res[0].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[0].spin[0].name, None)
+
+# 2nd residue.
+self.assertEqual(cdp.mol[0].res[1].num, 23)
+self.assertEqual(cdp.mol[0].res[1].name, 'ALA')
+self.assertEqual(len(cdp.mol[0].res[1].spin), 1)
+self.assertEqual(cdp.mol[0].res[1].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[1].spin[0].name, None)
+
+# 3rd residue.
+self.assertEqual(cdp.mol[0].res[2].num, 34)
+self.assertEqual(cdp.mol[0].res[2].name, 'CYS')
+self.assertEqual(len(cdp.mol[0].res[2].spin), 1)
+self.assertEqual(cdp.mol[0].res[2].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[2].spin[0].name, None)
+
+# 4th residue.
+self.assertEqual(cdp.mol[0].res[3].num, 35)
+self.assertEqual(cdp.mol[0].res[3].name, 'MET')
+self.assertEqual(len(cdp.mol[0].res[3].spin), 1)
+self.assertEqual(cdp.mol[0].res[3].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[3].spin[0].name, None)
+
+# 5th residue.
+self.assertEqual(cdp.mol[0].res[4].num, 36)
+self.assertEqual(cdp.mol[0].res[4].name, 'LYS')
+self.assertEqual(len(cdp.mol[0].res[4].spin), 1)
+self.assertEqual(cdp.mol[0].res[4].spin[0].num, None)
+self.assertEqual(cdp.mol[0].res[4].spin[0].name, None)
 
 
 def test_read_spins_peak_list_nmrview(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21846 - /trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.py

2013-12-06 Thread edward
Author: bugman
Date: Fri Dec  6 18:23:38 2013
New Revision: 21846

URL: http://svn.gna.org/viewcvs/relax?rev=21846view=rev
Log:
Fix for a script in the test suite shared data for the recent relaxation 
dispersion changes.


Modified:
trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.py

Modified: trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.py?rev=21846r1=21845r2=21846view=diff
==
--- trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.py 
(original)
+++ trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.py Fri 
Dec  6 18:23:38 2013
@@ -131,7 +131,7 @@
 file = open('r2eff_data' + sep + file_name, 'w')
 
 # Generate the key.
-key = return_param_key_from_data(frq, point)
+key = return_param_key_from_data(exp_type=exp_type, frq=frq, point=point)
 
 # A header.
 file.write(# This data corresponds to:\n)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21847 - in /trunk/test_suite/shared_data/dispersion/Hansen: ./ r2eff_data/

2013-12-06 Thread edward
Author: bugman
Date: Fri Dec  6 18:46:11 2013
New Revision: 21847

URL: http://svn.gna.org/viewcvs/relax?rev=21847view=rev
Log:
Added residue 4 to the R2eff files for the truncated CPMG data from Flemming 
Hansen.


Modified:
trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.log
trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.py
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_1000.00.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_133.33.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_200.00.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_266.67.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_333.33.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_400.00.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_466.67.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_533.33.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_600.00.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_66.67.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_666.67.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_733.33.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_800.00.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_866.67.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_933.33.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_1000.00.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_133.33.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_200.00.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_266.67.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_333.33.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_400.00.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_466.67.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_533.33.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_600.00.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_66.67.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_666.67.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_733.33.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_800.00.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_866.67.r2eff
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/800_933.33.r2eff

[This mail would be too long, it was shortened to contain the URLs only.]

Modified: 
trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.log
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.log?rev=21847r1=21846r2=21847view=diff

Modified: trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/generate_r2eff_files.py?rev=21847r1=21846r2=21847view=diff

Modified: 
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_1000.00.r2eff
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_1000.00.r2eff?rev=21847r1=21846r2=21847view=diff

Modified: 
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_133.33.r2eff
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_133.33.r2eff?rev=21847r1=21846r2=21847view=diff

Modified: 
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_200.00.r2eff
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_200.00.r2eff?rev=21847r1=21846r2=21847view=diff

Modified: 
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_266.67.r2eff
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_266.67.r2eff?rev=21847r1=21846r2=21847view=diff

Modified: 
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_333.33.r2eff
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_333.33.r2eff?rev=21847r1=21846r2=21847view=diff

Modified: 
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_400.00.r2eff
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_400.00.r2eff?rev=21847r1=21846r2=21847view=diff

Modified: 
trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_466.67.r2eff
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/r2eff_data/500_466.67.r2eff?rev=21847r1=21846r2=21847view=diff

Modified: 

r21848 - in /trunk/test_suite/shared_data/dispersion/Hansen: ./ cpmg_fit_results/

2013-12-06 Thread edward
Author: bugman
Date: Fri Dec  6 19:11:30 2013
New Revision: 21848

URL: http://svn.gna.org/viewcvs/relax?rev=21848view=rev
Log:
Added cpmg_fit results to the software comparison table for Flemming Hansen's 
CPMG data.

The cpmg_fit input and log files have been added as well.


Added:
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res4.in

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res4.log

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res70.in

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res70.log

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res71.in

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res71.log

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res4.in

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res4.log

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res70.in

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res70.log

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res71.in

trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res71.log
Modified:
trunk/test_suite/shared_data/dispersion/Hansen/software_comparison

[This mail would be too long, it was shortened to contain the URLs only.]

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res4.in
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res4.in?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res4.log
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res4.log?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res70.in
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res70.in?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res70.log
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res70.log?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res71.in
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res71.in?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res71.log
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/cr72_res71.log?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res4.in
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res4.in?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res4.log
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res4.log?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res70.in
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res70.in?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res70.log
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res70.log?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res71.in
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res71.in?rev=21848view=auto

Added: 
trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res71.log
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/cpmg_fit_results/ns_2site_res71.log?rev=21848view=auto

Modified: trunk/test_suite/shared_data/dispersion/Hansen/software_comparison
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/software_comparison?rev=21848r1=21847r2=21848view=diff


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21849 - in /trunk/test_suite/shared_data/dispersion: Hansen/software_comparison software_comparison

2013-12-06 Thread edward
Author: bugman
Date: Fri Dec  6 19:15:20 2013
New Revision: 21849

URL: http://svn.gna.org/viewcvs/relax?rev=21849view=rev
Log:
Shifted the software comparison down a directory so it can be used for all the 
different data.


Added:
trunk/test_suite/shared_data/dispersion/software_comparison
  - copied, changed from r21848, 
trunk/test_suite/shared_data/dispersion/Hansen/software_comparison
Removed:
trunk/test_suite/shared_data/dispersion/Hansen/software_comparison

Removed: trunk/test_suite/shared_data/dispersion/Hansen/software_comparison
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/shared_data/dispersion/Hansen/software_comparison?rev=21848view=auto
==
--- trunk/test_suite/shared_data/dispersion/Hansen/software_comparison 
(original)
+++ trunk/test_suite/shared_data/dispersion/Hansen/software_comparison (removed)
@@ -1,181 +1,0 @@
-Parameter conversions
-=
-
-For the strange CPMGFit parameter conversions to match the other software, see 
cpmgfit_results/README.
-
-
-The no exchange model
-=
-
-Residue :4
---
-
-Param   relax   NESSY   CPMGFit ShereKhan
-R2 (500)1.602   1.608 N/A N/A
-R2 (800)1.638   1.634 N/A N/A
-chi2   29.901  18.311 N/A N/A
-
-Residue :70

-
-Param   relax   NESSY   CPMGFit ShereKhan
-R2 (500)   10.534  11.401 N/A N/A
-R2 (800)   16.111  16.823 N/A N/A
-chi2 8973.848 860.149 N/A N/A
-
-Residue :71

-
-Param   relax   NESSY   CPMGFit ShereKhan
-R2 (500)5.831   5.969 N/A N/A
-chi2 3908.008  91.093 N/A N/A
-
-
-The LM63 model
-==
-
-Residue :4
---
-
-Param   relax   NESSY   CPMGFit ShereKhan
-R2 (500)1.583   1.574   1.584 refused
-R2 (800)1.589   1.555   1.584 refused
-phi 0.001   0.003   0.001 refused
-kex  3092.2186109.7323302.510 refused
-tex 3.234e-04   1.637e-04   3.028e-04 refused
-chi2   24.752   9.923  24.771 refused
-
-Residue :70

-
-Param   relax   NESSY   CPMGFit ShereKhan
-R2 (500)6.743   7.639   6.831   6.744
-R2 (800)6.574   7.387   6.831   6.574
-phi 0.313   0.259   0.302   0.313
-kex  4723.0993906.1894616.8054723.051
-tex 2.117e-04   2.560e-04   2.166e-04   2.117e-04
-chi2  363.534  78.223 363.912 363.534
-
-Residue :71

-
-Param   relax   NESSY   CPMGFit ShereKhan
-R2 (500)5.008   5.000   3.945   5.008
-phi 0.055  -0.054   0.182   0.055
-kex  2781.723   -2286.6316365.3722781.723
-tex 3.595e-04  -4.373e-04   1.571e-04   3.594e-04
-chi2   17.078  23.481 196.343  17.078
-
-
-The CR72 model
-==
-
-Residue :4
---
-
-Param   relax   NESSY   CPMGFit ShereKhancpmg_fit
-R2 (500)1.569   1.600   1.584   1.583   1.572
-R2 (800)1.587   1.621   1.584   1.589   1.588
-pA  1.000   0.999   0.987   0.995   1.000
-dw  6.100   1.274   0.672   0.536   5.827
-kex   631.962 134.6403299.5003075.776 951.344
-chi2   24.418  19.621  24.771  24.750  24.459
-
-Residue :70

-
-Param   relax   NESSY   CPMGFit ShereKhancpmg_fit
-R2 (500)6.973   7.236   5.957   6.973   6.962
-R2 (800)9.410  10.027   5.957   9.410   9.399
-pA  0.990   0.989   0.989   0.990   0.990
-dw  5.609   5.373  12.239   5.609   5.673
-kex  1752.8881522.0593421.3001752.8841715.859
-chi2   53.838   7.701 190.334  53.838  52.582
-
-Residue :71

-
-Param   relax   NESSY   CPMGFit ShereKhancpmg_fit
-R2 (500)5.003  49.999   3.939   5.003   5.005
-R2 (800)6.902   -   3.939   6.902   6.904
-pA  0.986   0.962   0.886   0.986   0.987
-dw  2.005   6.281   2.531   2.005   2.095
-kex  2481.008 -44.8486356.9002481.0122439.209
-chi2   15.660   8.771 197.324  15.660  15.168
-
-
-The IT99 model
-==
-
-Residue :4
---
-
-Param   relax   NESSY   CPMGFit ShereKhan
-R2 (500)1.583 N/A   1.583 N/A
-R2 (800)

r21852 - /trunk/test_suite/system_tests/chemical_shift.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 19:24:03 2013
New Revision: 21852

URL: http://svn.gna.org/viewcvs/relax?rev=21852view=rev
Log:
Additional chemical shift reading test for SeriesTab formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/chemical_shift.py

Modified: trunk/test_suite/system_tests/chemical_shift.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/chemical_shift.py?rev=21852r1=21851r2=21852view=diff
==
--- trunk/test_suite/system_tests/chemical_shift.py (original)
+++ trunk/test_suite/system_tests/chemical_shift.py Fri Dec  6 19:24:03 2013
@@ -47,13 +47,33 @@
 Test the reading of chemical shifts from an NMRPipe seriesTab peak 
list.
 
 # Read the spins from peak list.
-self.interpreter.spectrum.read_spins(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+self.interpreter.spectrum.read_spins(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
 
 # Read the chemical shift from the list.
 self.interpreter.chemical_shift.read(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
 
 # Test the data.
 cs = [128.374, 127.066, 124.523]
+i = 0
+for spin in spin_loop():
+# Check the shift.
+self.assertEqual(spin.chemical_shift, cs[i])
+
+# Increment the index.
+i += 1
+
+
+def test_read_nmrpipe_seriestab_multi(self):
+Test the reading of chemical shifts from an NMRPipe seriesTab peak 
list with multi columns.
+
+# Read the spins from peak list.
+self.interpreter.spectrum.read_spins(file=seriesTab_multi.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Read the chemical shift from the list.
+self.interpreter.chemical_shift.read(file=seriesTab_multi.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Test the data.
+cs = [115.994, 125.899, 123.001, 120.839, 128.998]
 i = 0
 for spin in spin_loop():
 # Check the shift.


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21850 - /trunk/test_suite/system_tests/chemical_shift.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 19:23:58 2013
New Revision: 21850

URL: http://svn.gna.org/viewcvs/relax?rev=21850view=rev
Log:
Added system test for reading chemical shift from NMRPipe SeriesTab file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/test_suite/system_tests/chemical_shift.py

Modified: trunk/test_suite/system_tests/chemical_shift.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/chemical_shift.py?rev=21850r1=21849r2=21850view=diff
==
--- trunk/test_suite/system_tests/chemical_shift.py (original)
+++ trunk/test_suite/system_tests/chemical_shift.py Fri Dec  6 19:23:58 2013
@@ -41,6 +41,26 @@
 
 # Create the data pipe.
 self.interpreter.pipe.create('cs', 'mf')
+
+
+def test_read_nmrpipe_seriestab(self):
+Test the reading of chemical shifts from an NMRPipe seriesTab peak 
list.
+
+# Read the spins from peak list.
+self.interpreter.spectrum.read_spins(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists', 
dim=1)
+
+# Read the chemical shift from the list.
+self.interpreter.chemical_shift.read(file=seriesTab.ser, 
dir=status.install_path + sep+'test_suite'+sep+'shared_data'+sep+'peak_lists')
+
+# Test the data.
+cs = [128.374, 127.066, 124.523]
+i = 0
+for spin in spin_loop():
+# Check the shift.
+self.assertEqual(spin.chemical_shift, cs[i])
+
+# Increment the index.
+i += 1
 
 
 def test_read_nmrview(self):


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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


r21851 - /trunk/lib/spectrum/nmrpipe.py

2013-12-06 Thread tlinnet
Author: tlinnet
Date: Fri Dec  6 19:24:02 2013
New Revision: 21851

URL: http://svn.gna.org/viewcvs/relax?rev=21851view=rev
Log:
Implemented reading of chemical shifts from NMRPipe SeriesTab formatted files.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
trunk/lib/spectrum/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21851r1=21850r2=21851view=diff
==
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 19:24:02 2013
@@ -80,6 +80,16 @@
 # Find index of assignment ASS.
 ass_i = varsline.index('ASS')
 
+# Chemical shifts preparation.
+w1_col = None
+w2_col = None
+
+# Find index of chemical shift Y_PPM which in sparky is w1.
+w1_col = varsline.index('Y_PPM')
+
+# Find index of chemical shift X_PPM which in sparky is w2.
+w2_col = varsline.index('X_PPM')
+
 # Make a regular search for Z_A entries.
 Z_A = re.compile(Z_A*)
 spectra = list(filter(Z_A.search, varsline))
@@ -160,5 +170,19 @@
 except ValueError:
 raise RelaxError(The peak intensity value %s from the line %s is 
invalid. % (intensity, line))
 
+# Chemical shifts.
+w1 = None
+w2 = None
+if w1_col != None:
+try:
+w1 = float(line[w1_col])
+except ValueError:
+raise RelaxError(The chemical shift from the line %s is 
invalid. % line)
+if w2_col != None:
+try:
+w2 = float(line[w2_col])
+except ValueError:
+raise RelaxError(The chemical shift from the line %s is 
invalid. % line)
+
 # Add the assignment to the peak list object.
-peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], intensity=intensities, 
intensity_name=spectra)
+peak_list.add(res_nums=[res_num1, res_num2], res_names=[res_name1, 
res_name2], spin_names=[name1, name2], shifts=[w1, w2], intensity=intensities, 
intensity_name=spectra)


___
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

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