YARM samples
Structural refinement
This script will "reposition" atomic coordinates until the function
R=Vol_Exp-Vol_Sim is minimized. R is the "residual" of the difference
between the experimental volumes and the simulated volumes. %xyz is the
original coordinate positions and %xyz2 is the refined coordinate positions.
#!/usr/local/bin/perl
# yarm Yet Another Relaxation Matrix program
# Read in the library file:
require "/usr/local/yarm/yarm_lib.pl";
################################################
# Define variables
################################################
# Starting structure
$pdb_file = "dick_a.pdb";
$peak_file = "d12_30s.peaks";
$vol_file = "d12_30s.vols";
# NMR relaxation paramters
$tl = 3;
$ts = 6;
$tc = 4;
$sfreq = 600;
$tmix = 0.2;
$vol0 = 100;
## Refinement variables ##
# Number of refinement iterations to perform
$num_iter = 3;
# Min and max for XPLOR distance restraint file
$min = 0.1; $max = 0.1;
# Name of XPLOR distance restraint file
$xplor_file = "noe.dat";
##############################################
# Begin YARM structure refinement process
##############################################
print "$yarm_version\n";
# Get non-exchangeable nucleic acid protons from a PDB file
# STARTING STRUCTURE FOR REFINEMENT
%xyz = &Pdb_Read_All( $pdb_file );
%xyz = &Get_Atom_Type( \%xyz, \%nonX_NA );
%xyz = &Pseudo_Methyl(\%xyz);
# Read in experimental volumes
%vol_exp = &F95_Read_Merge( $vol_file, $peak_file );
%vol_exp = &Make_Symm_Molecule( A, B, \%vol_exp );
# B-form volumes (just for normalization)
%rij = Rij_Hash( \%xyz );
# Must simulate volumes in order to normalize the experimental values
# ANISOTROPIC SIMULATION
( $Ax, $Ay, $Az ) = &Principal_Axis( \%xyz );
print "Simulating NOE volumes using anisotropic-rigid model\n";
print "Ax=$Ax Ay=$Ay Az=$Az\n";
%vol_sim = &Sim_Vol( $sfreq, $tmix, $vol0, \%xyz, \%rij, $tl, $ts, $Ax, $Ay, $Az );
# ISOTROPIC SIMULATION
# print "Simulating NOE volumes using isotropic-rigid model\n";
# %vol_sim = &Sim_Vol( $sfreq, $tmix, $vol0, \%xyz, \%rij, $tc );
# Normalize the experimental volumes to the simulated
%vol_exp = &Norm_Hash( \%vol_exp, \%vol_sim );
# Calculate new coordinate set %xyz2
# %xyz2 = &Structure_Refine( \%xyz, \%vol_exp, $num_iter, $sfreq, $tmix, $vol0, $tl, $ts, $Ax, $Ay, $Az );
%xyz2 = &Structure_Refine( \%xyz, \%vol_exp, $num_iter, $sfreq, $tmix, $vol0, $tc );
%rij2 = Rij_Hash( \%xyz2 );
%rij2 = Fix_Rij( \%rij2 );
&Xplor_Write2( \%vol_exp, \%rij2, $min, $max, $xplor_file );