What would be the optimal way of adding a small term to the NMR/EPR Hamiltonian that has the following form:
H_pert = (I+S  IS+)*sin((wI  wS)*t)?
I would like to compute the effect of the acting of H_pert for a given time on the initial density matrix of the spin system.
custom Hamiltonian with a sinusoidal term
Re: custom Hamiltonian with a sinusoidal term
Use the operator function to get those operators, for example:
LpSm=operator(spin_system,{'L+','L'},{1,2});
then add them together and multiply by your modulation term. The Hamiltonian would of course be timedependent; propagating the system under timedependent Hamiltonians is separate long story.
LpSm=operator(spin_system,{'L+','L'},{1,2});
then add them together and multiply by your modulation term. The Hamiltonian would of course be timedependent; propagating the system under timedependent Hamiltonians is separate long story.
Re: custom Hamiltonian with a sinusoidal term
OK, I added this term to the Hamiltonian. However, I am not sure how to use the time variable in Spinach.
If, as in the attached file, I simply write "t," then the message "t is unrecognized variable" appears.
Should I use the step function in a loop and approximate my modulation by a series of short intervals of fixed modulation amplitude?
The frequency of modulation is quite high, approx. 100 GHz (modulation time 1 s).
The other option would be a transformation to the rotating frame. In this case, I do not need to use time explicitly.
Is there practically any other way to treat this issue in Spinach?
If, as in the attached file, I simply write "t," then the message "t is unrecognized variable" appears.
Should I use the step function in a loop and approximate my modulation by a series of short intervals of fixed modulation amplitude?
The frequency of modulation is quite high, approx. 100 GHz (modulation time 1 s).
The other option would be a transformation to the rotating frame. In this case, I do not need to use time explicitly.
Is there practically any other way to treat this issue in Spinach?
 Attachments

 H_e.zip
 (2.29 KiB) Downloaded 254 times
Re: custom Hamiltonian with a sinusoidal term
Yes, there's shaped_pulse_af() function for offresonance irradiation; it would work in the laboratory frame:
https://spindynamics.org/wiki/index.php ... pulse_af.m
Alternatively, a numerical rotating frame transformation may be performed by calling rotframe():
https://spindynamics.org/wiki/index.php ... Rotframe.m
It looks like you are running DNP simulations. There are plenty of examples of solid and liquid state DNP simulations in the example set. Do you really need the timedomain trajectory, or would the steady state under microwave irradiation be sufficient? The latter is massively easier to compute.
https://spindynamics.org/wiki/index.php ... pulse_af.m
Alternatively, a numerical rotating frame transformation may be performed by calling rotframe():
https://spindynamics.org/wiki/index.php ... Rotframe.m
It looks like you are running DNP simulations. There are plenty of examples of solid and liquid state DNP simulations in the example set. Do you really need the timedomain trajectory, or would the steady state under microwave irradiation be sufficient? The latter is massively easier to compute.