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
Measure : calcDiffPAS | calcInertiaTensor | calcCenterMass | calcRij | calcAngles
Manipulate : symmMolecule | removeElement | getAtomType | addChainIds | replaceMethyls | fixRij | refineStructure | xyz_2_Reference |

These subroutines that work with the structural elements of a coordinate (%xyz) hash. The routines can be subdivided by whether they "measure" some quantity concerning the structure or whether they "manipulate" some parameter of the structure.

The measurement routines will always return some measured quantity (for example: &calcRij returns a 2D array containing the distances between the atoms of interest). The manipulate routines will always return a 1D structure array containing the "new" structure post-manipulation (for example: &.... )


calcDiffPAS

Summary:
Calculates the principal axis of diffusion of a structure

Usage:
( $Ax, $Ay, $Az ) = &calcDiffPAS( \%xyz );
or
( $Ax, $Ay, $Az, @U ) = &calcDiffPAS( \%xyz );

Description:
Calculates the principal axis of diffusion of a structure by calculating the inertia tensor.

@U is (optionally) returned, and is the eigenvectors of the Inertia Tensor

Example:


calcInertiaTensor

Summary:
Calculates the inertia tensor of a structure

Usage:
@inertia_tensor = &calcInertiaTensor( \%xyz );

Description:

Example:


calcCenterMass

Summary:
Calculates the centetr of mass of a structure

Usage:
( $ComX, $ComY, $ComZ ) = &CenterMass( \%xyz );

Description:
Calculate the center of mass of %xyz.

Example:


calcRij

Usage:
%rij = &calcRij( \%xyz );
or
%rij = &calcRij( \%xyz, $min, $max );

Returns distances between all atoms found in the coordinate hash %xyz. Optionally, if $min and $max are supplied, only rij distances between $min and $max will be returned.


calcAngles

Summary:
Calculate the angle between an arbitrary vector and the internuclear vectors

Usage:
%beta = &calcAngles( \%xyz, $Ax, $Ay, $Az );
or
%beta = &calcAngles( \%xyz, $Ax, $Ay, $Az, $min, $max );
or
%beta = &calcAngles( \%xyz, $Ax, $Ay, $Az, $min, $max, \%restriction_2d );

Description:
Builds the beta angle hash (associative array). The beta angle is the angle a vector in %xyz makes with respect to the vector $Ax $Ay $Az. %restriction_2d is used as a reference 2D hash and determines which pairs to return (often his is a %rij hash). $min and $max determine the minimum and maximum angle to return, they are optional, if left off, $min=0 and $max=90

Example:


symmMolecule

Summary:
"Symmeterizes" a structure 2D input hash.

Usage:
%vol = &symmMolecule( "Segid1", "Segid2", \%vol );

Description:

Example:


&removeElement

Summary:

Usage:
%xyz = &removeElement( \%xyz, $element );

Description:
$element is one of C,H,N,O,P,S (or any other element).

Example:


&getAtomType

Usage:
%xyz = &Get_Atom_Type( \%xyz, \%ref_hash );


addChainIds

Summary:

Usage:
%vol = &addChainIds( "Segid1", "Segid2", $num1, $num2, \%vol );

Description:

Example:


replaceMethyl

Summary:
Usage:
%xyz = &replaceMethyl( \%xyz );
or
%xyz = &replaceMethyl( \%xyz, $atom1, $atom2, $atom3, $new_name );

Description:
$atom1, $atom2, $atom3 = atom name 1, 2 and 3 of the methyl
$new_name = New name of pseudo_methyl

Example:


fixRij

Summary:

Usage:
%rij = &fixRij( \%rij, \%rij_fix );

Description:

Example:


refineStructure

Summary:

Usage:
&refineStructure( \%YarmModel, \%NmrParams, \%exp_vols, $vol0, $tmix, $niters );

Description:
%exp_vols = experimentally measured NOE volumes
$vol0 = volume of autopeaks at a tmix=0
$tmix = NOE mixing time
$niters = maximum number of conjugate gradient iterations

This subroutine creates a file named "yarm_output.refine_xyz" that contains the _new_ coordinate positions of the atoms from %YarmModel that best fit the NOE volume data.

Example:


xyz_2_Reference

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

Calculate the reference frame of $atom using $atom1 and $atom2 to define a plane, using the following rules:

rule 1 - define x-axis to be along the bond vector between the
	   site def and the first element of the corresponding list
	   within the plane def hash.  This element is found by vector
	   subtraction.

rule 2 - define y-axis to be the normal to the plane defined by the 
	   x-axis and the second element of the corresponding list within 
	   the plane def hash.  This element is found by computing the cross 
	   product between the vector defining the x-axis and the....
	   The cross-product is defined as the vector determinant of 
		   | i  j  k  |
		   | Ax Ay Az | = ( Cx, Cy, Cz )
		   | Bx By Bz |
	   where Cx = ( AyBz - AzBy ), Cy = -( AxBz - AzBx ), Cz = ( AxBy - AyBx )
	   Vector calculus if cool!  Hug a chemical physicist.

rule 3 - define z-axis to be the normal to the plane defined by the 
	   x-axis and the y-axis.  This element is found by computing the 
	   cross-product between the x-axis vector and the y-axis vector.