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
Sorting: sortAtoms
Misc Math: normHash | calcAngle | calcStats | calcStats1D | calcStats2D
Misc: calcIsotope | calcNmrActive | calcSubset | calcTrimMean | calcFixed_Rij | txyz_2_Diffusion | calcDate

These subroutines perform various miscellaneous utility functions.


&sortAtoms

Summary:

Usage:
@atoms = &sortAtoms( \@atoms );

Description:

Example:


&normHash

Summary:

Usage:
%normed_hash1 = &normHash( \%hash1, \%hash2 );
or
%normed_hash1 = &normHash( \%hash1, \%hash2, \%ref_hash );

Description:
Normalize all values in a 2D hash1 to those in 2D hash2 by summing all common values and calculating a normalization factor. This normalization factor is then multiplied to each element in hash1 and returned. If a 2D ref_hash is supplied, the summing process will only use those atom pairs (for instance, if you only want to use an H5-H6 pair)

Example:


&calcAngle

Summary:

Usage:
$angle = &calcAngle( $Ax, $Ay, $Az, $Bx, $By, $Bz );

Description:
Calculate the angle between two vectors, $Ax, $Ay, $Az, $Bx, $By, $Bz. Only use this to calculate a few angles!!! If you need many, it is much faster to use Beta_Hash (which calls the C++ programs!)

Example:


&calcStats

Summary:
Calculates the standard deviation, average, or sum of a input list of numbers

Usage:
$sd = &calcSDev( \@numbers, "sd" ); or
( $sd, $avg, $sum ) = &calcSDev( \@numbers, "sd", "avg", "sum" );

Description:
Calculates the standard deviation of a input list of numbers. Also returns the average value and sum of all input numbers, if you want them.

Example:

@list = ( 12, 10, 11.2, 4.5, 14, 10.01 );
$sd = &calcStats( \@list, "sd" );
print "sd=$sd\n";
returns
sd=3.20008593634608

&calcStats1d

Summary:

Usage:
( $rms, $r, $q, $q6 ) = &calcStats1D( \%hash1, \%hash2 );
or
( $rms, $r, $q, $q6 ) = &calcStats1D( \%hash1, \%hash2, \%ref );

Description:
See &calcStats_2D below for a description.

Example:


&calcStats2d

Summary:

Usage:
( $rms, $r, $q, $q6 ) = &calcStats2D( \%hash1, \%hash2 );
or
( $rms, $r, $q, $q6 ) = &calcStats2D( \%hash1, \%hash2, \%ref );

Description:
Calculates pairwise statistical analysis between the values of %hash1 and %hash2. Optionally, if %ref is supplied, the analysis between %hash1 and %hash2 will be restricted only to the atom pairs found in %ref, this can be used to examine the statistics of a particular nucleotide, for instance.

Some of the returned statistics are only meaningful for NMR NOE volumes (i.e.: q^6 );

Supported statistics:

Root Mean Square (rms):

R-factor (r):

Q-factor (q):

Q^(1/6)-factor (q6):

Example:


&calcIsotope

Summary:

Usage:
$I = &Get_Isotope( "A 3 CYT H1'" );
Returns the isotope number of the supplied atom.

Description:

Example:


&calcNmrActive

Summary:
Determine which nuclei in %YarmModel{xyz_pdb} are NMR active

Usage:
%xyz_nmr = &calcNmrActive( \%YarmModel );

Description:

Example:


&calcSubset

Summary:

Usage:
%vol_keys = &calcSubset($i_identifier, $j_identifier, \%vol_exp_hash );

Description:
Makes a new 2D hash from vol_exp with identifiers specified by $i_identifier and $j_identifier

Example:


&calcFixed_Rij

Summary:

Usage:
$fixed_rij = &calcFixed_Rij( $atom_i, $atom_j );

Description:

Example:


&txyz_2_Diffusion

Summary:

Usage:
@D = &txyz_2_Diffusion( $txx, $tyy, $tzz, @U );

Description:
$txx, $tyy, $tzz = correlation times about the 3 principal axes of the diffusion tensor, where Dxx=1/(6txx), etc...

@U are the unit vectors about which txx, tyy and tzz apply (this can be from the inertia tensor...?)

Example:


&calcDate

Summary:
Returns the date in a usable format

Usage:
( $dayname, $monthname, $mday, $hour, $min, $year ) = &calcDate;

Description:
Returns the current time/date information

Example: