Author: bugman Date: Tue Feb 1 17:00:01 2011 New Revision: 12488 URL: http://svn.gna.org/viewcvs/relax?rev=12488&view=rev Log: The correlation times are now being scaled based on the TauEValUnits tag value. 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=12488&r1=12487&r2=12488&view=diff ============================================================================== --- branches/bmrb/specific_fns/model_free/bmrb.py (original) +++ branches/bmrb/specific_fns/model_free/bmrb.py Tue Feb 1 17:00:01 2011 @@ -153,6 +153,26 @@ # Generate the sequence if needed. generate_sequence(N, spin_ids=spin_ids, spin_names=data['atom_names'], res_nums=data['res_nums'], res_names=data['res_names'], mol_names=mol_names) + # Correlation time scaling. + table = {'s': 1.0, + 'ns': 1e-9, + 'ps': 1e-12} + te_scale = 1.0 + if data['te_units']: + te_scale = table[data['te_units']] + + # Fast correlation time scaling. + if data['tf_units']: + tf_scale = table[data['tf_units']] + else: + tf_scale = te_scale + + # Slow correlation time scaling. + if data['ts_units']: + ts_scale = table[data['ts_units']] + else: + ts_scale = te_scale + # Loop over the spins. for i in range(N): # Generate a spin ID. @@ -171,8 +191,20 @@ if not mf_bmrb_key[j] in keys or data[mf_bmrb_key[j]] == None: continue + # The value. + value = data[mf_bmrb_key[j]][i] + + # Parameter scaling. + if value != None: + if mf_params[j] == 'te': + value = value * te_scale + elif mf_params[j] == 'tf': + value = value * tf_scale + elif mf_params[j] == 'ts': + value = value * ts_scale + # Set the parameter. - setattr(spin, mf_params[j], data[mf_bmrb_key[j]][i]) + setattr(spin, mf_params[j], value) # Set the error. mf_bmrb_key_err = mf_bmrb_key[j] + '_err'