Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - MalcolmHLevitt

Pages: 1 ... 4 5 [6] 7
Bug reports / Re: Composite operator basis
« on: March 29, 2013, 01:27:52 PM »
 I am trying to reproduce this bug in v2.6.0 but I do not find the abnormal behaviour. Maybe it has somehow fixed itself. Can you try to reproduce the bug and provide an example notebook if it persists?

This is indeed a disturbing bug, and it is still there in 2.6.0.

I have fixed the problem. The next release 2.6.1 will not experience this bug.

Bug reports / Re: Parallel computing using SpinDynamica 2.6.0
« on: March 29, 2013, 01:12:42 PM »
Another question:
There is a warning in /NMR/SpinDynamics.nb (see section "Parallel") that basis transformation matrices should be freshly evaluated.  I assume this means that SpinDynamica otherwise calculates the matrices across all kernels.  Is that correct?

On this subject I remember a while ago that we discussed "hard coding" matrices into SpinDynamica for common bases and basis transformations, so that these may be loaded from definitions as opposed to being calculated on-the-fly.  Maybe there is scope for that in future releases.

Thanks Michael and Jyrki,
 Maybe I do not see the $Path errors because I set the path in the init.m file of my Autoload directory. When the new kernels are launched they probably all use the same init.m. In the next release I will modify the PrepareParallel routine to ensure that $Path is set correctly in all the running kernels, even if this procedure is not used.
 Some tests I use for the parallelization are attached.
 SpinDynamica currently does remember and reuse all calculations of basis transformation matrices, so I think your last point is already taken care of.
all the best

Feature requests / Re: ZCW6044 and simple parallelization of Signal1D
« on: March 26, 2013, 09:27:13 AM »
ZCW6044 orientational sampling, and parallelization of EnsembleAverage, are now included in SDv2.6.0

Bug reports / Re: Needs["Rotations`OrientationalSampling`"] (SD 2.5.5)
« on: March 25, 2013, 12:05:52 PM »
Thanks Michael,
 the message appears when the package "Rotations`OrientationalSampling`" is loaded and added to $Path. When Needs[..] is executed again, Mathematica looks to see if the package is already on $Path (and therefore loaded), and does not load again if it is there. So there is no way to force Needs[..] to regenerate the message a second time, without redefining the built-in Needs function, which might have unintended consequences, and is inadvisable. So there is no straight workaround for this.

However, as you discovered, executing or Orientations[] or OrientationsAndWeights[] will list the available orientational sampling schemes.

Updates and Messages / SpinDynamica 2.6.0
« on: March 18, 2013, 09:58:46 PM »
SpinDynamica 2.6.0 has been released here:

  • bug fixes and speed enhancements
  • parallel computing of EnsembleAverage

The parallelization of EnsembleAverage is implemented by default. It may be disabled by using the option Parallel->False. Numerical values such as Parallel->n implement the computation by distributing over n parallel kernels. The default Parallel->True distributes over all available parallel kernels.

Thanks to Andreas Brinkmann for help with the parallelization.

Examples / Re: Ernst angle
« on: February 20, 2013, 12:18:56 PM »
Hi Michael, thanks for this -
 - however please repost using the standard input Needs["SpinDynamica`"], otherwise your .nb will not run. I would also request that you use standard LeftToRight chronology..
 all the best

Examples / Re: Spin 1 quadrupolar powder patterns
« on: January 11, 2013, 05:13:55 PM »
Hi 1K, no, this is not correct. In the secular limit (interaction with static field much larger than the quadrupolar Hamiltonian) then the m !=0 components of the spin operators are suppressed. See pages 185 and 190 of SpinDynamics 2nd edition. The presence of biaxiality (eta!=0) has nothing to do with this. In the example notebook, biaxiality is simulated by including m!=0 components of the spatial part of the interaction (not the spin part).

You're correct that the zero-field form of the quadrupolar interaction would include all combinations of spin and space tensor components (see page 614). However, in high magnetic field, the interaction with the main field suppresses the influence of the T2-1, T2-2, T21 and T22 terms. If these were included, the simulation concerns zero-field NMR of quadrupolar nuclei (also known as NQR).

Examples / Spin 1 quadrupolar powder patterns
« on: December 20, 2012, 02:36:34 PM »
This notebook (which uses v2.5.5) shows how to calculate spin-1 powder patterns, including biaxiality (often referred to as "asymmetry").

Bug reports / Multiplying operators (a trap for the unwary)
« on: December 18, 2012, 02:12:36 PM »
Unexpected behaviour (including getting stuck) has been reported by users who attempt to multiply two operators using Times rather than Dot, i.e.

opI[1,"x"]*opI[2,"z"]  (incorrect)

rather than

opI[1,"x"].opI[2,"z"] (correct)

using Times ("*") for operators is illegal. Always use Dot (".") to multiply operators (and vectors, for that matter).

Times may however be used to multiply operators by numbers, for example

2 Pi * opI[1,"x"] (correct)  or
2 Pi opI[1,"x"].opI[2,"z"] (correct)

Hello 1K.

Please include complete code or an attached notebook when posting a question to the forum. Your post does not contain enough information to inform other users precisely what you are doing.

The answer to your first question is probably that you have left some coefficients of the Hamiltonian symbolic, and so Signal1D attempts to find a symbolic rather than a numerical solution. This is taking too much time. SpinDynamica v2.5.5 includes a trap to catch such inappropriate usage.

The answer to the second questions is that by default, Signal1D uses observables for all spins in the system. If you have extra spins in the system, that are not used, they do not evolve, and hence generate extra peaks at zero frequency in the spectrum. You can specify which spins are observable by using the Observable option of Signal1D. For example, if you use SetSpinSystem[3], then you can only observe spin #2 by using the option Observable->2, and you can only observe spins #1 and #3 by Observable->{1,3}. In general you can specify Observable->op, where op is any operator.

Updates and Messages / SpinDynamica 2.5.5
« on: December 18, 2012, 09:32:14 AM »
SpinDynamica 2.5.5 has been released here:

Apart from miscellaneous debugging and speed enhancements, some reorganization has been implemented. SpinDynamica may now be loaded by


This instruction now reads in the other packages. All users should upgrade to v2.5.5

Updates and Messages / SpinDynamica 2.5.4
« on: November 18, 2012, 12:03:27 PM »
SpinDynamica 2.5.4 has been posted here:

There have been some important enhancements and bug fixes in Trajectory.
It was found that Trajectory in v2.5.3 was not evaluating sufficiently accurately in some cases.
v2.5.4 also includes some major speed enhancements to the EnsembleAverage within Trajectory.

The documentation files have been updated.

Examples / Pake patterns and orientational averaging
« on: October 19, 2012, 06:10:46 PM »
This notebook shows how to calculate a Pake pattern in solid-state NMR, using ensemble averaging over a single orientational angle.

There are examples of incorrect strategies for calculating the orientational average, and some correct strategies.

Hi Ronghui,
 I looked at this briefly. I agree that the initial density operator does not look right. If spins 1 and 2 come from parahydrogen the initial density operator should simply be opI[1].opI[2].

 In general, when asking for advice, it is not constructive to say "something is wrong". Please be more helpful and specific, and provide a highlighted comment in the .nb file.

good luck

Pages: 1 ... 4 5 [6] 7