# Shift iso.m

Replaces the isotropic parts of interaction tensors with user-supplied values. This is useful for correcting DFT calculations, where the anisotropy is usually satisfactory, but the isotropic part often is not. Arguments:

     tensors      - a cell array of interaction tensors as 3x3 matrices

     spin_numbers - a vector containing the numbers of spins in the tensors
array that should have the isotropic values replaced

     new_iso      - a vector containing the new isotropic parts in the same
order as the spin numbers listed in spin_numbers


Example:

    % Read chemical shift tensors from DFT
[sys,inter]=g2spinach(gparse('filename.log'),{{'H','1H'},{'N','14N'}},[31.8 0.0],options);

    % Replace the isotropic parts with the experimental values
inter.zeeman.matrix=shift_iso(inter.zeeman.matrix,1:14,[5.505 3.042 3.442 3.953 0.000 2.646 7.000 7.000 7.000 7.000 7.000 3.722 3.722 3.722]);


New in Revision 957.