From NESG Wiki
Jump to navigation Jump to search

Sample shimming is a process of optimizing magnetic field homogeneity for recording high resolution spectra. The shim system is essentially a set of coils with specific field profiles in 3D space. There are three shimming methods: shimming on the lock level, shimming on the FID (or spectrum) and gradient shimming.  The currents in the shim coils are adjusted to cancel any unwanted magnetic field gradients across the NMR sample as accurately as possible.

Routine Shimming Protocol

  1. Retrieve the starting shims. This should be the closest set shims for your particular sample. e.g.:
    • Previous shims for the same sample.
    • Shims for a different sample of the same tube geometry and similar filling height.
    • Reference shims determined for a lineshape or doped water sample.
  2. Find and activate lock, while avoiding its saturation.
  3. Manually optimize Z1 and Z2 shims, then optimize X1 and Y1 shims.
  4. Start gmapsys and set up 1H gradient shimming. Optimize parameters and generate a new shimmap if necessary. Run gradient shimming with the appropriate gzsize setting. You can use a smaller gzsize value at this step.
  5. Manually optimize X1 and Y1 shims, then optimize XZ and YZ shims.
  6. Repeat step 4 with the optimal gzsize setting.

Storing and Retrieving Shims

To save current shim parameters in a shim file named 'myshims', type in the command prompt


The shim file will be stored stored in ~/vnmrsys/shims/.

To retrieve shim parameters type


The rts command only loads the shim values into VNMR or VNMRJ. The su command is needed to send the new shim values to the shim unit. you are likely see a change in the lock level as the new shims are applied. See also information on the load parameter.

It may be a good idea to load old shim parameters before shimming. For example, if you want to acquire using a shigemi tube, but someone before you was using a regular NMR tube in the same spectrometer, loading old shim parameters should make the shimming easier. If you have shim parameters saved from an earlier measurement on the same sample, it is better to load those, since they are likely to be a much closer match.

Manual shimming on the lock

Adjusting shim values to maximize the lock level is called shimming on the lock. As the name suggests, you need to have your sample locked for this procedure. Make sure the lock resonance is not saturated. The entire procedure is complex, and is described in Section 6.9. Using the Acquisition Window of the VNMR 6.1C Getting Started manual and Section 3.10. Shimming on the Lock Signal Manually of VNMRJ Liquids NMR User Guide

A routine procedure for any sample:

  1. Alternate between Z1 and Z2 to maximize lock
  2. Alternate between X and Y to maximize lock

This should improve convergence of gradient shimming.

Shimming of higher-order spinning shims is usually only done for standard lineshape samples.

Gradient Shimming

In gradient shimming, like in MRI, gradients are used to probe the field profile within the sample. For that you need a single strong signal in your sample. For protein samples this is usually the H2O resonance. (In principle, gradient shimming can be done with any solvent, and even run on deuterium resonances). On our spectrometers gradient shimming only adjusts Z-shims (on some spectrometers with XYZ-gradient probes it is possible to use gradient shimming for all X-, Y- and Z-shims).

Even though it is not directly obvious, you MUST have the sample locked to run gradient shimming.

The procedure for gradient shimming is documented in the Section 11.6. Gradient Sample Shimming of User's Guide: Liquids NMR

Initial Setup and Parameter Optimization

  1. Make sure that your sample is locked and lock signal is not saturated.
  2. Turn spinning off.
  3. Make coarse adjustments of Z1, Z2, X, and Y shims as described above.
  4. Load gmapz dataset by typing gmapsys.
  5. Type dps or tn? to confirm that you have the dataset configured for 1H. Otherwise select 1H gradient shimming by clicking on the PFG H1 button in the Acquire -> Gradient Shim tab in VNMRJ.
  6. Check parameters pw, tpwr, gain, d3, d1, nt and ss. For aqueous protein samples pw should be 1 or 2 microseconds, and gain should be low (< 6, otherwise ADC overflow may occur).
  7. Acquire test field profiles:
    • In VNMRJ Click on Acquire Trial Spectra in the Acquire -> Gradient Shim tab
    • In VNMR: Click on Set Params -> go, dssh. Click Return to get back to the main gmapz menu.

To further minimize radiation damping it may be useful not to tune the probe before shimming.


You should see two field profiles, the second one smaller than the first. If the shims are already quite good the profiles would be symmetric. Room-temperature probes typically yield hat-like profiles, while cryogenic probes yield more rectangular or trapezoidal profiles. The profile width is determined by the filling height.

Make sure that the profiles are smooth and have a high SN before proceeding.

Some examples of bad field profiles:

  • Noisy baseline and profile - insufficient SN, increase gain and/or pw.
  • Jagged baseline and profile - ADC overflow, decrease gain and/or pw.
  • Rough left edge of the profile - Likely sample precipitation.
  • Rough right edge of the profile - Likely bubbles in a shigemi tube under the plunger, eject sample and remove bubbles.

For optimal performance the second profile should be about 50% lower than the first. This is controlled by the d3 parameter, which sets the de-phasing time. This is an arrayed parameter: its first value is 0 and leads to the first profile, the second value is set to some delay and generates the second profile. If the starting shims are very good (this includes both axial and spinning shims!) and field homogeneity is high, then you need a longer delay to observe sufficient de-phasing. If, on the other hand, the starting shims are too far off, the de-phasing could be too large to be accurately quantified by the read-out gradient.

Creating Shim Maps

  • Set gzsize = 5 to select shims Z1 through Z5. Even though you may omit Z5 in subsequent gradient shimming, it is worth to have a map for it in the first place.
  • Click Shim Maps -> Automake Shimmap to run automatic shim mapping. Give a name to your shim map (usually includes your sample name and the date).

Manual Calculation of gzwin and tof (Optional)

The gzwin parameter determines the size of the spectral region used to optimize shims, and tof in this particular case describes how it is centered. This region ideally corresponds to the active sample volume and is normally calculated automatically when you click on Set Params -> Find gzwin, or Shim Maps -> Automake Shimmap.

For some samples, however, these parameters may be determined incorrectly due to imperfect field profiles. This is often observed for samples of suboptimal volume or samples with precipitation at the bottom.

In this case you can calculate gzwin and tof and map shims manually. The procedure is:

  • Click on Set Params -> go, dssh.
  • Type ds to display the first profile
  • Use the box cursors to define the desired region
  • Enter gmapsys and click Set Params -> Calculate gzwin.
  • Click on Return -> Shim Maps -> Make Shimmap (ShimMapResult)
  • Click on Return -> Display -> Display Shimmap (Shim map example)

Gradient Sample Shimming

First set gzsize to select the order of Z shims to be used:

  • For large sample depths (e.g. in a regular tube) set gzsize = 5. If gmap_z1z4 = 'y' the first iterations will be carried out with Z1-Z4 shims and then with Z1-Z5 shims.
  • For shigemi tubes with optimal sample volume (250-300 ul) set gzsize = 4.
  • For shigemi tubes with lower than optimal sample depth use gzsize = 3.

Click on the Autoshim on Z button to start gradient shimming. Sample shimming will go on until rms error number is less than 1, or until maximum number of iterations (generally 5) are reached.

Using higher-order shims with a low sample depth may decrease convergence - you may even end up with worse shims than that you started with. Save the current shims with svs before testing to see if using higher-order shims has any benefits.

For best results, alternate between gradient shimming and adjusting X, Y, XZ and YZ shims by shimming on the lock.

For example, you have a sample of 220 ul in shigemi tube. Run gradient shimming with Z1-Z3 (gzsize = 3), then adjust X, Y, XZ and YZ, then do gradient shimming again with Z1-Z3 (gzsize = 3), save shims and run gradient shimming again with Z1-Z4 (gzsize = 4).

Click on Quit button to exit gradient shimming mode and go back to your experiment set up.

Re-cabling for Gradient Shimming on Deuterium

The 500 MHz instrument in Buffalo has a relay, which allows gradient shimming on 2H without switching cables.

The 600 MHz and 750 MHz instruments need to be wired for 2H observe in order to run gradient shimming on 2H. Assuming that you start with the instrument configured for 1H observe, do the following:

  1. Disconnect the cable from the "PROBE J1" port on the lock switch (bottom right on the picture below)
  2. Connect this cable to the "PROBE" port on the broadband preamp, as indicated by the red arrow (the left side of the magnet leg).

Also see the related topic on directly observing deuterium.

Background Hardware Autoshim

Background hardware autoshim can only be active during acquisition. It starts with an acquisition start command (ga, go or au). This method is very useful for protein samples, whose B0 homogeneity is affected by continuous precipitation. It can also be useful for magnets with large drift rates, where large field corrections with Z0 coil introduce substantial Z1 perturbation.


  • hdwshim='y' su - Enable hardware autoshim during the first delay in the pulse sequence
  • hdwshim='p' su - Enable hardware autoshim during the first presaturation delay in the pulse sequence
  • hdwshim='n' su - Disable hardware autoshim

The shims used in hardware autoshim are determine by the global hdwshimlist parameter. If hdwshimlist does not exist, autoshim will only use z1.

To create the hdwshimlist type create('hdwshimlist', 'string', 'global')

You can set hdwshimlist to any combination of the following: z1, z1c, z2, z2c, x1, y1. The order is irrelevant. However, use of coarse shims (z1c and z2c) is not recommended. Examples:

  • hdwshimlist='z1z2'
  • hdwshimlist='z1z2x1y1'

In VNMRJ you can also control hardware autoshim from the Setup -> Shim tab.

Note that hardware autoshim is automatically switched off when other shim methods, like gradient shimming or software autoshim, are started. Check the hdwshim to see if hardware autoshim is still enabled.

Sample Shimming on the FID

This is the option of last resort if you don't have a lock substance in your sample.

See Section 6.9. Using the Acquisition Window of the Getting Started manual of VNMR 6.1C for details

Shimming with the CHCl3 lineshape sample

-- Main.GaohuaLiu - 24 Jan 2007