<!--------------------------------------------------------->
<a href="#readCSA">readCSA</a> |
<a href="#calcEuler">calcEuler</a> |
<a href="#mapCSA">mapCSA</a> |
<a href="#build_axialCSA">build_axialCSA</a> |
<a href="#rotateCSA">rotateCSA</a> |
<a href="#viewCSA">viewCSA</a> |
<a href="#writeCSA">writeCSA</a> |
<a href="#calcLRF">calcLRF</a> |
<a href="#massageCSA">massageCSA</a>
<p>
These are the subroutines that work with Chemical Shift Anisotropy.

<!--------------------------------------------------------->
<a name="readCSA">
<hr>
<h4>&readCSA</h4>
<b>Summary:</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Reads in a YARM CSA data file of any type.
<p>

<b>Usage:</b><br>
%csa = &readCSA( $data_dir );
<p>

<b>Description:</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
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
<p>

<b>Example:</b><br>

<!--------------------------------------------------------->
<a name="calcEuler">
<hr>
<h4>&calcEuler</h4>
<b>Summary:</b><br>
Calculates the Euler angles between the two matrices @a and @b
<p>
<b>Usage:</b><br>
( $alpha, $beta, $gamma ) = &calcEuler( \@a, \@b );
<p>
<b>Description:</b><br>
<p>

<b>Example:</b><br>



<!--------------------------------------------------------->
<a name="mapCSA">
<hr>
<h4>&mapCSA</h4>
<b>Summary:</b><br>
<p>
<b>Usage:</b><br>
%csa = &mapCSA( \%csa_unmapped, \%xyz );
<p>
<b>Description:</b><br>
"Maps" an unmapped CSA hash onto a 1D coordinate hash,
returns the CSA hash "rotated" into the new coordinate hash.
<p>

<b>Example:</b><br>

<!--------------------------------------------------------->
<a name="build_axialCSA">
<hr>
<h4>&build_axialCSA</h4>
<b>Summary:</b><br>
Then you need to map it onto a structure, etc...

<p>
<b>Usage:</b><br>
$csa{"* * * N*"} = build_axialCSA( Ds );
<p>
<b>Description:</b><br>
<p>

<b>Example:</b><br>

<!--------------------------------------------------------->
<a name="rotateCSA">
<hr>
<h4>&rotateCSA</h4>
<b>Summary:</b><br>
<p>
<b>Usage:</b><br>
%csa = &rotateCSA( \%csa, \%xyz );<br>
or<br>
%csa = &rotateCSA( \%csa, \%xyz, "inverse" );
<p>
<b>Description:</b><br>
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.
<p>

<b>Example:</b><br>

<!--------------------------------------------------------->
<a name="viewCSA">
<hr>
<h4>&viewCSA</h4>
<b>Summary:</b><br>
<p>
<b>Usage:</b><br>
&viewCSA( $dir, \%YarmModel );<br>
or<br>
&viewCSA( $dir, \%YarmModel, $length11, $length22, $length33 );
<p>
<b>Description:</b><br>
where $dir is the directory to be made for placement 
of the csa pdb files.	
<p>

<b>Example:</b><br>

<!--------------------------------------------------------->
<a name="writeCSA">
<hr>
<h4>&writeCSA</h4>
<b>Summary:</b><br>
Write a CSA input data file for the C programs in YARM  to read in
<p>
<b>Usage:</b><br>
&writeCSA( $file, \%xyz, \%csa );
<p>
<b>Description:</b><br>
<p>

<b>Example:</b><br>

<!--------------------------------------------------------->
<a name="calcLRF">
<hr>
<h4>&calcLRF</h4>
<b>Summary:</b><br>
Calculates the "local reference frame" of $atom, 
$atom1 and $atom2 in the %xyz coordinate basis
<p>

<b>Usage:</b><br>
@frame = &calcLRF( $atom, $atom1, $atom2, \%xyz );
<p>
<b>Description:</b><br>
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.
<p>

The returned array is two dimensional:<br>
<pre>
$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]
</pre>
So there is no confusion about row or column major data...
<p>

<b>Example:</b><br>

<!--------------------------------------------------------->
<a name="massageCSA">
<hr>
<h4>&massageCSA</h4>
<b>Summary:</b><br>
Returns all kinds of interesting bits of information
about a supplied CSA hash.
<p>

<b>Usage:</b><br>
%info = &massageCSA( \%csa );
<p>
<b>Description:</b><br>
<p>

<b>Example:</b><br>

