-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
175 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<link rel="icon" href="img/eslogo196.png"> | ||
<link rel="stylesheet" type="text/css" href="style.css"> | ||
<link rel="stylesheet" href="highlight/matlab.css"> | ||
<script src="highlight/highlight.min.js"></script> | ||
<script src="highlight/do_highlight.js"></script> | ||
<title>dipkernel</title> | ||
</head> | ||
|
||
<body> | ||
|
||
<header> | ||
<ul> | ||
<li><img src="img/eslogo42.png"> | ||
<li class="header-title">EasySpin | ||
<li><a href="index.html">Documentation</a> | ||
<li><a href="references.html">Publications</a> | ||
<li><a href="http://easyspin.org" target="_blank">Website</a> | ||
<li><a href="http://easyspin.org/academy" target="_blank">Academy</a> | ||
<li><a href="http://easyspin.org/forum" target="_blank">Forum</a> | ||
</ul> | ||
</header> | ||
|
||
<section> | ||
|
||
<div class="functitle">dipbackground</div> | ||
|
||
<p> | ||
Calculate dipolar EPR (DEER) background signal. | ||
</p> | ||
|
||
<!-- =================================================================== --> | ||
<div class="subtitle">Syntax</div> | ||
|
||
<pre class="matlab"> | ||
Vinter = dipbackground(t,conc,lambda) | ||
dipbackground(...) | ||
</pre> | ||
|
||
<!-- =================================================================== --> | ||
<div class="subtitle">Description</div>W | ||
|
||
<p> | ||
<code>dipbackground</code> calculates the inter-molecular DEER signal for a homogeneous three-dimensional distribution of spins. | ||
</p> | ||
|
||
<p> | ||
<code>t</code> is the time vector, in microseconds. <code>conc</code> is the spin concentration, in micromolar (µM). <code>lambda</code> is the modulation depth, between 0 and 1. | ||
</p> | ||
|
||
<p> | ||
The output <code>Vinter</code> is the inter-molecular dipolar background decay function, scaled such that it is equal to 1 at time zero. | ||
</p> | ||
|
||
<!-- ========================================================== --> | ||
<div class="subtitle">Examples</div> | ||
|
||
<p> | ||
Here is a typical application, for a 50 µM spin concentration and a modulation depth of 0.3: | ||
</p> | ||
|
||
<pre class="matlab"> | ||
t = -0.2:0.020:5; % µs | ||
Vinter = dipbackground(t,100,0.3); | ||
plot(t,Vinter) | ||
</pre> | ||
|
||
<!-- =================================================================== --> | ||
<div class="subtitle">See also</div> | ||
<p> | ||
<a class="esf" href="dipkernel.html">dipkernel</a>, | ||
<a class="esf" href="diptensor.html">diptensor</a>, | ||
<a class="esf" href="ham_ee.html">ham_ee</a> | ||
</p> | ||
|
||
<hr> | ||
</section> | ||
|
||
<footer></footer> | ||
|
||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
% dipbackground Intermolecular dipolar background decay | ||
% | ||
% Vinter = dipbackground(t,conc,lambda) | ||
% dipbackground(...) | ||
% | ||
% Calculates the intermolecular dipolar background decay over the time axis, | ||
% for spin concentration conc (in µM) and modulation depth lambda (between 0 and 1). | ||
% | ||
% Input: | ||
% t time axis (µs) | ||
% conc spin concentration (µM) | ||
% lambda modulation depth | ||
% | ||
% Output: | ||
% Vinter intermolecular background decay function | ||
% | ||
% Example: | ||
% t = linspace(-0.2,5); % µs | ||
% Vinter = dipbackground(t,100,0.3); | ||
% plot(t,Vinter); | ||
|
||
function Vinter = dipbackground(t,conc_uM,lambda) | ||
|
||
if nargin==0 | ||
help(mfilename); | ||
return | ||
end | ||
|
||
g1 = gfree; | ||
g2 = gfree; | ||
|
||
D = mu0/(4*pi)*g1*g2*bmagn^2/hbar; % rad/s | ||
conc_mM = conc_uM/1e3; % µM -> mM=mol/m^3 | ||
conc = conc_mM*avogadro; % mM=mol/m^3 -> m^-3 | ||
t = t*1e-6; % µs -> s | ||
k = 8*pi^2/(9*sqrt(3))*D*conc*lambda; | ||
Vinter = exp(-k*abs(t)); | ||
|
||
% Plotting | ||
if nargout==0 | ||
plot(t/1e-6,Vinter) | ||
xlabel('time (µs)') | ||
ylabel('{\it{V}}_{inter}') | ||
grid on | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
function ok = test() | ||
|
||
t_us = 1.1; % µs | ||
conc_uM = 100; % µM | ||
lambda = 0.7; | ||
|
||
c_mM = conc_uM/1e3; % µM -> mM=mol/m^3 | ||
c = c_mM*avogadro; % mol/m^3 -> m^-3 | ||
|
||
g = gfree; | ||
D = mu0/(4*pi)*g^2*bmagn^2/hbar; % rad/s | ||
k = 8*pi^2/(9*sqrt(3))*D*lambda*c; | ||
Vinter_ref = exp(-k*t_us*1e-6); | ||
Vinter = dipbackground(t_us,conc_uM,lambda); | ||
|
||
ok = areequal(Vinter,Vinter_ref,1e-10,'rel'); | ||
|
||
end |