YARM samples

Correlation plot

This script generates a correlation plot file which shows the per crosspeak correlation between experimental and simulated NOE volumes.


#!/usr/local/bin/perl 
# yarm Yet Another Relaxation Matrix program

# Read in the library file:
require "/usr/local/yarm/yarm_lib.pl";

#############################################
# Define variables
#############################################
$pdb_file = "dick_xtal.pdb";
$sfreq = 600;
$vol0 = 100;
$tmix = 0.25;

$tl = 2.5;
$ts = 6;
$tc = 3;

$f95_vol_file = "d12_30s.vols";
$f95_peak_file = "d12_30s.peaks";

# Set to 0 for no debugging messages
# Set to 1 for a few debugging messages
# set to 2 for TONS of debugging messages (lots!)
$debug = 0; 

#############################################
# Call YARM subroutines
#############################################
print "$yarm_version\n";

# Get non-exchangeable nucleic acid protons from a PDB file
%xyz = &Pdb_Read_All( $pdb_file );
%xyz = &Get_Atom_Type( \%xyz, \%nonX_NA );
%xyz = &Pseudo_Methyl( \%xyz );

# Measure distances of all atom pairs between 
# 0 to 10 angstroms
%rij  = &Rij_Hash( \%xyz, 0, 10 );

# ANISOTROPIC ROTATION
# Calculate the principal axis of rotation vector
print "Simulating NOE volumes using anisotropic-rigid...\n";
( $Ax, $Ay, $Az ) = Principal_Axis( \%xyz );
printf ("Principal axis vector components Ax=%4.2f Ay=%4.2f Az=%4.2f\n", $Ax, $Ay, $Az);
%vol_sim = &Sim_Vol( $sfreq, $tmix, $vol0, \%xyz, \%rij, $tl, $ts, $Ax, $Ay, $Az );

# ISOTROPIC ROTATION
# print "Simulating NOE volumes using isotropic-rigid...\n";
# %vol_sim = &Sim_Vol( $sfreq, $tmix, $vol0, \%xyz, \%rij, $tc );

# Read in experimental volumes
%vol_exp = &F95_Read_Merge( $f95_vol_file, $f95_peak_file );
%vol_exp = &Make_Symm_Molecule( A, B, \%vol_exp );

# Normalize the experimental volumes by comparing h5-h6 volumes
%vol_exp = &Norm_Hash( \%vol_exp, \%vol_sim);

print "Creating correlation plot file temp.correlation\n";
$corr_file = "temp.correlation";
&Print_Correlation( \%vol_exp, \%vol_exp, \%vol_sim, $corr_file );

exit;