Author: bugman
Date: Mon Jan 12 22:20:30 2009
New Revision: 8427
URL: http://svn.gna.org/viewcvs/relax?rev=8427&view=rev
Log:
All relaxation data is now placed in the BMRB STAR formatted file.
Modified:
branches/bmrb/specific_fns/model_free/bmrb.py
Modified: branches/bmrb/specific_fns/model_free/bmrb.py
URL:
http://svn.gna.org/viewcvs/relax/branches/bmrb/specific_fns/model_free/bmrb.py?rev=8427&r1=8426&r2=8427&view=diff
==============================================================================
--- branches/bmrb/specific_fns/model_free/bmrb.py (original)
+++ branches/bmrb/specific_fns/model_free/bmrb.py Mon Jan 12 22:20:30 2009
@@ -58,37 +58,74 @@
# Get the current data pipe.
cdp = get_pipe()
+ # Initialise the spin specific data lists.
+ res_num_list = []
+ res_name_list = []
+ atom_name_list = []
+ relax_data_list = []
+ relax_error_list = []
+ for i in range(cdp.num_ri):
+ relax_data_list.append([])
+ relax_error_list.append([])
+
# Store the spin specific data in lists for later use.
- for spin in spin_loop():
- pass
+ for spin, mol_name, res_num, res_name in spin_loop(full_info=True):
+ # Skip deselected spins.
+ if not spin.select:
+ continue
+
+ # The residue/spin info.
+ res_num_list.append(str(res_num))
+ res_name_list.append(str(res_name))
+ atom_name_list.append(str(spin.name))
+
+ # The relaxation data.
+ for i in range(cdp.num_ri):
+ relax_data_list[i].append(str(spin.relax_data[i]))
+ relax_error_list[i].append(str(spin.relax_error[i]))
# Relaxation data save frames.
+ r1_inc = 0
+ r2_inc = 0
+ noe_inc = 0
for i in range(cdp.num_ri):
# Data type labels.
if cdp.ri_labels[i] == 'R1':
+ r1_inc = r1_inc + 1
+ ri_inc = r1_inc
ri_label = 'T1'
coherence = 'Nz'
elif cdp.ri_labels[i] == 'R2':
+ r2_inc = r2_inc + 1
+ ri_inc = r2_inc
ri_label = 'T2'
coherence = 'Ny'
elif cdp.ri_labels[i] == 'NOE':
+ noe_inc = noe_inc + 1
+ ri_inc = noe_inc
ri_label = 'NOE'
- coherence = 'Ny'
# Initialise the save frame.
- frame = SaveFrame(title=cdp.ri_labels[i], text='hello')
+ frame =
SaveFrame(title='heteronuclear_'+ri_label+'_list_'+`ri_inc`)
- # Specifics of the collected data.
-
frame.tagtables.append(TagTable(tagnames=['_Sample_conditions_label'],
tagvalues=[['$condition_one']]))
-
frame.tagtables.append(TagTable(tagnames=['_Spectrometer_frequency_1H'],
tagvalues=[[str(cdp.frq[cdp.remap_table[i]]/1e6)]]))
+ # The save frame category.
+ frame.tagtables.append(TagTable(free=True,
tagnames=['_Saveframe_category'], tagvalues=[[ri_label+'_relaxation']]))
+
+ # Sample info.
+ frame.tagtables.append(TagTable(free=True,
tagnames=['_Sample_label'], tagvalues=[['$sample_1']]))
+ frame.tagtables.append(TagTable(free=True,
tagnames=['_Sample_conditions_label'], tagvalues=[['$conditions_1']]))
+
+ # NMR info.
+ frame.tagtables.append(TagTable(free=True,
tagnames=['_Spectrometer_frequency_1H'],
tagvalues=[[str(cdp.frq[cdp.remap_table[i]]/1e6)]]))
if ri_label in ['T1', 'T2']:
-
frame.tagtables.append(TagTable(tagnames=['_'+ri_label+'_coherence_type'],
tagvalues=[[coherence]]))
-
frame.tagtables.append(TagTable(tagnames=['_'+ri_label+'_value_units'],
tagvalues=[['1/s']]))
+ frame.tagtables.append(TagTable(free=True,
tagnames=['_'+ri_label+'_coherence_type'], tagvalues=[[coherence]]))
+ frame.tagtables.append(TagTable(free=True,
tagnames=['_'+ri_label+'_value_units'], tagvalues=[['1/s']]))
# The relaxation tag names.
tag_names = ['_Residue_seq_code', '_Residue_label', '_Atom_name',
'_'+ri_label+'_value', '_'+ri_label+'_value_error']
- table = TagTable(title='hello', tagnames=tag_names,
tagvalues=[['0', '1', '2', '3', '4']])
+ # Add the data.
+ table = TagTable(tagnames=tag_names, tagvalues=[res_num_list,
res_name_list, atom_name_list, relax_data_list[i], relax_error_list[i]])
# Add the tag table to the save frame.
frame.tagtables.append(table)
_______________________________________________
relax (http://nmr-relax.com)
This is the relax-commits mailing list
[email protected]
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