Image dipole_pair Image edit-rename


Set the inter-spin distances.


interatom.set_dist(spin_id1=`@N', spin_id2=`@H', ave_dist=1.0200000000000001e-10, unit=`meter')

Keyword arguments

spin_id1: The spin identification string for the first spin of the dipole pair.

spin_id2: The spin identification string for the second spin of the dipole pair.

ave_dist: The rˆ-3 averaged distance between the two spins to be used in the magnetic dipole constant, defaulting to meters.

unit: The unit of distance (the default is `meter').


For many NMR interactions, the distance between the spin of interest and another spin or atom must be defined. This information can be extracted from a 3D structure but, in many cases, these distances are not of interest. For example the empirical or fixed distance calculation of proton positions in X-ray crystallographic structures will often not correspond to the real interatomic distances.

Another example is the magnetic dipole-dipole interaction which is averaged over the interatomic distance to the inverse third power. In this case, the interatomic distances from any 3D structural file can be of no use for defining the interaction. The average distances must be explicitly supplied. This user function allows these distances to be set up. The default measurement unit is meter but this can be changed to Å. Alternatively the distances can be read from a file using other user functions in this class.

Prompt examples

To set the N-H distance for protein the 15N heteronuclear relaxation mechanism to 1.02 Å, type one of the following:

relax> interatom.set_dist('@N', '@H', 1.02 * 1e-10)

relax> interatom.set_dist(spin_id1='@N', spin_id2='@H', ave_dist=1.02 * 1e-10, unit='meter')

relax> interatom.set_dist(spin_id1='@N', spin_id2='@H', ave_dist=1.02, unit='Angstrom')

The relax user manual (PDF), created 2016-10-28.