YARM: Yet Another Relaxation Matrix program
A program for performing nuclear spin relaxation calculations

Sections: Main | Using YARM | Subroutines | Theory | Samples | Resources
Subsections: Introduction | Relaxation | CSA | Structure | Data Fitting | Hydrodynamics | Interface | Utilities | System
readCSA | calcEuler | mapCSA | build_axialCSA | rotateCSA | viewCSA | writeCSA | calcLRF | massageCSA

These are the subroutines that work with Chemical Shift Anisotropy.


&readCSA

Summary:
      Reads in a YARM CSA data file of any type.

Usage:
%csa = &readCSA( $data_dir );

Description:
      This is the main subroutine use to read in CSA data, it determines the type of data found in $data_dir and calls the appropriate subroutines to read that data

Example:


&calcEuler

Summary:
Calculates the Euler angles between the two matrices @a and @b

Usage:
( $alpha, $beta, $gamma ) = &calcEuler( \@a, \@b );

Description:

Example:


&mapCSA

Summary:

Usage:
%csa = &mapCSA( \%csa_unmapped, \%xyz );

Description:
"Maps" an unmapped CSA hash onto a 1D coordinate hash, returns the CSA hash "rotated" into the new coordinate hash.

Example:


&build_axialCSA

Summary:
Then you need to map it onto a structure, etc...

Usage:
$csa{"* * * N*"} = build_axialCSA( Ds );

Description:

Example:


&rotateCSA

Summary:

Usage:
%csa = &rotateCSA( \%csa, \%xyz );
or
%csa = &rotateCSA( \%csa, \%xyz, "inverse" );

Description:
Rotates a CSA tensor hash onto the frame described by %xyz. If the word "reverse" is supplied, the inverse of the rotation is applied. The rotation matrix is determined by the coordinate axes define by the LRF for each nucleus in %xyz. This subroutine works by looping through all the elements in %csa and calls the subroutine RotateTensor (see below) to do the actual rotation.

Example:


&viewCSA

Summary:

Usage:
&viewCSA( $dir, \%YarmModel );
or
&viewCSA( $dir, \%YarmModel, $length11, $length22, $length33 );

Description:
where $dir is the directory to be made for placement of the csa pdb files.

Example:


&writeCSA

Summary:
Write a CSA input data file for the C programs in YARM to read in

Usage:
&writeCSA( $file, \%xyz, \%csa );

Description:

Example:


&calcLRF

Summary:
Calculates the "local reference frame" of $atom, $atom1 and $atom2 in the %xyz coordinate basis

Usage:
@frame = &calcLRF( $atom, $atom1, $atom2, \%xyz );

Description:
By default the local reference frame is calculated as the z-axis defined by the vector between $atom and $atom1. The y-axis is the normal to the plane formed by $atom, $atom1, and $atom2. The x-axis is then the normal to the plane formed by the y-axis and the z-axis.

The returned array is two dimensional:

$frame[0][0], $frame[0][1], $frame[0][2]
$frame[1][0], $frame[1][1], $frame[1][2]
$frame[2][0], $frame[2][1], $frame[2][2]
So there is no confusion about row or column major data...

Example:


&massageCSA

Summary:
Returns all kinds of interesting bits of information about a supplied CSA hash.

Usage:
%info = &massageCSA( \%csa );

Description:

Example: