mailRe: numeric values of d and c


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

Header


Content

Posted by Edward d'Auvergne on March 18, 2014 - 10:05:
Hi Stefano,

For this, you need to become a power-user and dive into the relax
library itself!  Once you start playing with the relax library, you'll
discover a huge range of analysis opportunities.  The relax data store
combined with the relax library creates a development environment
rivalling Mathematica, Matlab, Maxima, Octave, etc. but with a strong
focus on NMR.  This includes support for handling 3D molecular
structures (or no structure), spectral data input, NMR phenomenon and
many mathematics functions specific for NMR, and data visualization.

I have written a quick script, which I have copied and pasted below,
that will perform the calculation for you.  This code comes mainly
from the specific_analyses.jw_mapping.__init__ and
target_functions.jw_mapping modules. Note that when copying these for
yourself that you have to be careful about newlines introduced by the
email text wrapping of 80 characters - you will have to fix these
yourself.

Regards,

Edward


P. S.  Here is the script:


# Python module imports.
from numpy import float64, zeros

# relax module imports.
from lib.auto_relaxation.ri_comps import calc_fixed_csa,
calc_fixed_dip, comp_csa_const_func, comp_dip_const_func
from lib.physical_constants import h_bar, mu0, return_gyromagnetic_ratio


class Data:
    """Dummy class for storing data."""

# Initialise the data container.
data = Data()

# The spectrometer frequency (Hz).
frq = 500e6

# The dynamically averaged bond length (m) and chemical shift tensor 
anisotropy.
r = 1.02e-10
csa = -172e-6

# Add the needed physical constants to the data storage.
data.gx = return_gyromagnetic_ratio('15N')
data.gh = return_gyromagnetic_ratio('1H')
data.mu0 = mu0
data.h_bar = h_bar

# The number of frequencies.
data.num_frq = 1

# Initialise dipolar and CSA data structures.
data.dip_const_fixed = 0.0
data.csa_const_fixed = [0.0]
data.dip_const_func = 0.0
data.csa_const_func = zeros(1, float64)

# Nuclear frequencies.
frq = frq * 2 * pi
frqX = frq * data.gx / data.gh

# Calculate the five frequencies which cause R1, R2, and NOE relaxation.
data.frq_list = zeros((1, 5), float64)
data.frq_list[0, 1] = frqX
data.frq_list[0, 2] = frq - frqX
data.frq_list[0, 3] = frq
data.frq_list[0, 4] = frq + frqX
data.frq_sqrd_list = data.frq_list ** 2

# Calculate the fixed component of the dipolar and CSA constants.
calc_fixed_dip(data)
calc_fixed_csa(data)

# Calculate the dipolar and CSA constants.
comp_dip_const_func(data, r)
comp_csa_const_func(data, csa)

# Rename the dipolar and CSA constants.
d = data.dip_const_func
c = data.csa_const_func[0]

# Printout.
print("d: %s" % d)
print("c: %s" % c)




On 17 March 2014 19:44, Stefano Luciano Ciurli <stefano.ciurli@xxxxxxxx> 
wrote:
Hi,
as a self check: could anyone tell me the exact numerical values used by 
relax for the d and c constants, expressed in rad^2 s^-2?
Thanks,
Stefano



Related Messages


Powered by MHonArc, Updated Tue Mar 18 17:20:18 2014