Author: bugman Date: Fri Oct 25 13:17:57 2013 New Revision: 21227 URL: http://svn.gna.org/viewcvs/relax?rev=21227&view=rev Log: Created a relax state for the R2eff SQ data of Korzhnev et al., 2005. Added: branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/relax_state_sq.log branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/relax_state_sq.py branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/sq_state.bz2 (with props) Added: branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/relax_state_sq.log URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/relax_state_sq.log?rev=21227&view=auto ============================================================================== --- branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/relax_state_sq.log (added) +++ branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/relax_state_sq.log Fri Oct 25 13:17:57 2013 @@ -1,0 +1,122 @@ + + + + relax repository checkout r21218 + svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/relax_disp + + Molecular dynamics by NMR data analysis + + Copyright (C) 2001-2006 Edward d'Auvergne + Copyright (C) 2006-2013 the relax development team + +This is free software which you are welcome to modify and redistribute under the conditions of the +GNU General Public License (GPL). This program, including all modules, is licensed under the GPL +and comes with absolutely no warranty. For details type 'GPL' within the relax prompt. + +Assistance in using the relax prompt and scripting interface can be accessed by typing 'help' within +the prompt. + +Processor fabric: Uni-processor. + +script = 'relax_state_sq.py' +---------------------------------------------------------------------------------------------------- +# Create a relax state file for the 1H and 15N SQ data. + +# relax module imports. +from specific_analyses.relax_disp.disp_data import return_param_key_from_data + + +# Create a data pipe. +pipe.create('R2eff', 'relax_disp') + +# Create the spin system. +spin.create(res_name='Asp', res_num=9, spin_name='H') +spin.create(res_name='Asp', res_num=9, spin_name='N') +spin.isotope('1H', spin_id='@H') +spin.isotope('15N', spin_id='@N') + +# Initialise the global data structures. +cdp.cpmg_frqs = {} +cdp.cpmg_frqs_list = [] +cdp.exp_type = {} +cdp.relax_times = {} +cdp.spectrometer_frq = {} +cdp.spectrometer_frq_list = [] +cdp.spectrometer_frq_count = 0 +cdp.spectrum_ids = [] + +# Loop over the spin data. +for spin_label in ['hs', 'ns']: + # Alias the spin container. + spin_cont = cdp.mol[0].res[0].spin[0] + if spin_label == 'ns': + spin_cont = cdp.mol[0].res[0].spin[1] + + # Initialise the data structures. + spin_cont.model = 'R2eff' + spin_cont.r2eff = {} + spin_cont.r2eff_err = {} + + # Loop over the spectrometer frequencies. + for frq in [500, 600, 800]: + # The file data. + file_name = "%s_%s.res" % (spin_label, frq) + print("Reading the data from the file '%s'." % file_name) + file = open(file_name) + lines = file.readlines() + file.close() + + # Loop over the dispersion points. + for i in range(len(lines)): + # Split up the line. + row = lines[i].split() + + # Convert the data. + cpmg_frq = float(row[0]) + r2eff = float(row[1]) + r2eff_err = float(row[2]) + + # A key for the global data. + key = "%s_%s" % (frq, row[0]) + + # Update the global data. + if key not in cdp.spectrum_ids: + cdp.spectrum_ids.append(key) + cdp.cpmg_frqs[key] = cpmg_frq + cdp.cpmg_frqs_list.append(cpmg_frq) + cdp.exp_type[key] = 'CPMG' + cdp.relax_times[key] = 500000 + cdp.spectrometer_frq[key] = frq * 1e6 + cdp.spectrometer_frq_list.append(frq * 1e6) + cdp.spectrometer_frq_count += 1 + + # The dispersion point key. + key = return_param_key_from_data(frq=frq*1e6, point=cpmg_frq) + + # Store the spin data. + spin_cont.r2eff[key] = r2eff + spin_cont.r2eff_err[key] = r2eff_err + +# Save the state. +state.save('sq_state', force=True) +---------------------------------------------------------------------------------------------------- + +relax> pipe.create(pipe_name='R2eff', pipe_type='relax_disp', bundle=None) + +relax> spin.create(spin_name='H', spin_num=None, res_name='Asp', res_num=9, mol_name=None) + +relax> spin.create(spin_name='N', spin_num=None, res_name='Asp', res_num=9, mol_name=None) + +relax> spin.isotope(isotope='1H', spin_id='@H', force=False) + +relax> spin.isotope(isotope='15N', spin_id='@N', force=False) +Reading the data from the file 'hs_500.res'. +Reading the data from the file 'hs_600.res'. +Reading the data from the file 'hs_800.res'. +Reading the data from the file 'ns_500.res'. +Reading the data from the file 'ns_600.res'. +Reading the data from the file 'ns_800.res'. + +relax> state.save(state='sq_state', dir=None, compress_type=1, force=True) +Opening the file 'sq_state.bz2' for writing. + Added: branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/relax_state_sq.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/relax_state_sq.py?rev=21227&view=auto ============================================================================== --- branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/relax_state_sq.py (added) +++ branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/relax_state_sq.py Fri Oct 25 13:17:57 2013 @@ -1,0 +1,79 @@ +# Create a relax state file for the 1H and 15N SQ data. + +# relax module imports. +from specific_analyses.relax_disp.disp_data import return_param_key_from_data + + +# Create a data pipe. +pipe.create('R2eff', 'relax_disp') + +# Create the spin system. +spin.create(res_name='Asp', res_num=9, spin_name='H') +spin.create(res_name='Asp', res_num=9, spin_name='N') +spin.isotope('1H', spin_id='@H') +spin.isotope('15N', spin_id='@N') + +# Initialise the global data structures. +cdp.cpmg_frqs = {} +cdp.cpmg_frqs_list = [] +cdp.exp_type = {} +cdp.relax_times = {} +cdp.spectrometer_frq = {} +cdp.spectrometer_frq_list = [] +cdp.spectrometer_frq_count = 0 +cdp.spectrum_ids = [] + +# Loop over the spin data. +for spin_label in ['hs', 'ns']: + # Alias the spin container. + spin_cont = cdp.mol[0].res[0].spin[0] + if spin_label == 'ns': + spin_cont = cdp.mol[0].res[0].spin[1] + + # Initialise the data structures. + spin_cont.model = 'R2eff' + spin_cont.r2eff = {} + spin_cont.r2eff_err = {} + + # Loop over the spectrometer frequencies. + for frq in [500, 600, 800]: + # The file data. + file_name = "%s_%s.res" % (spin_label, frq) + print("Reading the data from the file '%s'." % file_name) + file = open(file_name) + lines = file.readlines() + file.close() + + # Loop over the dispersion points. + for i in range(len(lines)): + # Split up the line. + row = lines[i].split() + + # Convert the data. + cpmg_frq = float(row[0]) + r2eff = float(row[1]) + r2eff_err = float(row[2]) + + # A key for the global data. + key = "%s_%s" % (frq, row[0]) + + # Update the global data. + if key not in cdp.spectrum_ids: + cdp.spectrum_ids.append(key) + cdp.cpmg_frqs[key] = cpmg_frq + cdp.cpmg_frqs_list.append(cpmg_frq) + cdp.exp_type[key] = 'CPMG' + cdp.relax_times[key] = 500000 + cdp.spectrometer_frq[key] = frq * 1e6 + cdp.spectrometer_frq_list.append(frq * 1e6) + cdp.spectrometer_frq_count += 1 + + # The dispersion point key. + key = return_param_key_from_data(frq=frq*1e6, point=cpmg_frq) + + # Store the spin data. + spin_cont.r2eff[key] = r2eff + spin_cont.r2eff_err[key] = r2eff_err + +# Save the state. +state.save('sq_state', force=True) Added: branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/sq_state.bz2 URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/sq_state.bz2?rev=21227&view=auto ============================================================================== Binary file - no diff available. Propchange: branches/relax_disp/test_suite/shared_data/dispersion/Korzhnev_et_al_2005/sq_state.bz2 ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream