
Interface subroutines: <br>
YARM: 
<a href="#readData">readData</a> | 
<a href="#writeData">writeData</a><br>
PDB:
<a href="#readPdb">readPdb</a> | 
<a href="#writePdb">writePdb</a><br>
Felix:
<a href="#readFelix">readFelix</a><br>
X-PLOR: 
<a href="#readPdb">readXplor</a> | 
<a href="#writeXplor">writeXplor</a> | 
<a href="#writeXplor2">writeXplor2</a><br>
Midas:
<a href="#viewMidas">viewMidas</a><br>
NMRView:
<a href="#readXPK">readXPK</a> 

<p>
These subroutines allow you to read/write in formats compatible
with data exchange between YARM and other programs.

<!--------------------------------------------------------->
<a name="readData">
<hr>
<h4>&readData</h4>
<b>Summary:</b><br>
<p>

<b>Usage:</b><br>
%data = &readData( $file );
<p>

Reads in arbitrary data files of this construct:<br>
"A B C" : value1<br>
or<br>
"A B C" : value1 : value2<br>
or<br>
"A B C" : value1 : value2 : value3 : etc....<br>

<!--------------------------------------------------------->
<a name="writeData">
<hr>
<h4>&writeData</h4>
<b>Summary:</b><br>
<p>

<b>Usage:</b><br>
&writeData( $file, \%data );
<p>

Writes out arbitrary data files of this construct:<br>
"A B C" : value1<br>
or<br>
"A B C" : value1 : value2<br>
or<br>
"A B C" : value1 : value2 : value3 : etc....<br>


<!--------------------------------------------------------->
<a name="readPdb">
<hr>
<h4>&readPdb</h4>
<b>Summary:</b><br>
Reads in PDB files
<p>

<b>Usage:</b><br>
%xyz = &readPdb( $pdb_file );
<p>

<b>Description:</b><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Opens a pdb structure file, record each atom name (key value)
and the x,y and z coordinates (list value for the key)
and the number of nuclei at this coordinate, n, (always 1).
<p>

In YARM, an atom is always "named" by 4 values:
<pre>
   1) the segment identifier (or chainid)
   2) the residue number
   3) the residue name
   4) the atom name
</pre>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
For example, the "C6" atom on chainid A, residue number 4, 
   residue cytosine would be called "A 3 CYT C6" in YARM.
   A PDB file can be read into YARM via "Pdb_Read_All" command thusly:
   %xyz = &Pdb_Read_All( "dna.pdb" );
   The 1D associavite array called %xyz contains all the atoms
   and their associated Cartesian orthogonal coordinates.  

<pre>
%pdb = {
	'chain res_num res atom' => [ x0 , y0 , z0, n0, isotope1, fract1, isotope2, fract2 ],
	'chain res_num res atom' => [ x1 , y1 , z1, n1, isotope1, fract1, isotope2, fract2 ], 
	etc...
}
</pre>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 Thus, $pdb{"A 3 CYT C6"}[2] returns the z coordinate of the 
  C6 atom of cytosine #4 on chainid A.
<p>

Notes:
<pre>
1) The required data from a PDB file are "atom", "x", "y", and "z".
2) If no "chain" or "segid" is found in the PDB file, the "chain"
    will be assigned as A
3) If no "res" is found, it will be assigned as "A"
4) If no "res_num" is found, it will be assigned as "1"

The layout of a PDB file (note: counting from 0, not 1):

YARM name      column  length type    long name
-------------  ------  ------ ------  ------
rec            0-5     6      char    Record type
atom_num       6-10    5      int     Atom serial number
atom           12-15   4      char    Atom name
alt            16      1      char    Alternate location indicator
res            17-19   3      char    Residue name
chain          20      1      char    Chain identifier
res_num        22-25   4      int     Residue sequence number
inserts        26      1      char    Code for insertion of residues
x              30-37   8      float   X orthogonal coordinate (Angs)
y              38-45   8      float   Y orthogonal coordinate (Angs)
z              46-53   8      float   Z orthogonal coordinate (Angs)
occ            54-59   6      float   Occupancy
temp           60-65   6      float   Temperature factor
segid          72-74   4      float   Segment identifier (from X-PLOR)
</pre>

<p>
Example:


<!--------------------------------------------------------->
<a name="writePdb">
<hr>
<h4>&writePdb</h4>
<b>Summary:</b><br>
Reads in PDB files
<p>

<b>Usage:</b><br>
&writePdb( \%xyz, $pdb_file );<br>
or<br>
&writePdb( \%xyz, $pdb_file, "a", first_atom_num );<br>
<p>

<b>Description:</b><br>
Use "a" to append rather then overwrite to pdb file.
<p>
$first_atom_num = the first number to begin counting from
<p>


<!--------------------------------------------------------->
<a name="readFelix">
<hr>
<h4>&readFelix</h4>
<b>Summary:</b><br>
Reads in Felix files
<p>

<b>Usage:</b><br>
%data = &readFelix( "shifts", $version, $peak_file );<br>
or<br>
%data = &readFelix( "data", $version, $peak_file, $data_file );<br>
<p>
<b>Description:</b><br>
$version => 95 or 97 is the Felix version
<p>

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


<!--------------------------------------------------------->
<a name="writeXplor">
<hr>
<h4>&writeXplor</h4>
<b>Summary:</b><br>
<p>

<b>Usage:</b><br>
&writeXplor( \%rij, \%ref_hash, $min, $max, $file );
<p>

<b>Description:</b><br>
X-PLOR (restrained molecular dynamics) interface.  
Writes out a file in the XPLOR distance file format from the
supplied %rij hash.  The distance range is determined from the 
$min and $max variables.
<p>
<b>Example:</b><br>

<!--------------------------------------------------------->
<a name="writeXplor2">
<hr>
<h4>&writeXplor2</h4>
<b>Summary:</b><br>
<p>

<b>Usage:</b><br>
&writeXplor2( \%rij, \%ref_hash, $file );
<p>
<b>Description:</b><br>
X-PLOR (restrained molecular dynamics) interface.  
Writes out a file in the XPLOR distance file format from the
supplied %rij hash.  The distance range is given by the 
following formula:<br>
<pre>
rij <3  min=0.1 max=0.1
rij <4  min=0.2 max=0.2
rij <5  min=0.3 max=0.3
rij <6  min=0.4 max=0.4
rij >=6 min=0.5 max=0.5
</pre>
<p>
<b>Example:</b><br>
<p>

<!--------------------------------------------------------->
<a name="readXplor">
<hr>
<h4>&readXplor</h4>
<b>Summary:</b><br>
Reads an XPLOR restraint file into a 2D data hash
<p>

<b>Usage:</b><br>
%rij = &readXplor( $xplor_file, \%ref_hash );
<p>

<b>Description:</b><br>
<p>

<!--------------------------------------------------------->
<a name="viewMidas">
<hr>
<h4>&viewMidas</h4>
<b>Usage:</b><br>
&viewMidas( $pdb_file );
<p>
Displays a pdb file using the Midas program from UCSC.
<p>


<!--------------------------------------------------------->
<a name="readXPK">
<hr>
<h4>&readXPK</h4>
<b>Summary:</b><br>

<b>Usage:</b><br>
%hash = &readXPS( $xpk_file );<br>
or<br>
%hash = &readXPS( $xpk_file, $oatom );<br>
or<br>
%hash = &readXPS( $xpk_file, $oatom, $olist );<br>
<p>

<b>Description:</b><br>
This subroutine parses and NMRView .xpk file for valuable information
such as cross-peak assignments, chemical shift assignments, cross-peak
volume measurements, and cross-intensity measurements.  All numbers are 
returned as list entries in a 2-D hash references by the cross-peak 
assignments.  This subroutine is upgradeable to select for more information
in the .xpk file

<pre>
$oatom = "usei"  => return a 1D hash with iatoms as keys
$oatom = "usej"  => return a 1D hash with jatoms as keys
$oatom = "useij" => return a 2D hash with iatoms and jatoms as 
					 keys (default)

$olist = "all"  => return an array of (cs, int, vol) (default)
$olist = "cs", "int, "vol"  => return the Chemical shift, intensity, 
         or volume data.
</pre>
<p>
<b>Example:</b><br>
<p>

