These subroutines allow you to read/write in formats compatible
with data exchange between YARM and other programs.
Usage:
Reads in arbitrary data files of this construct:
Usage:
Writes out arbitrary data files of this construct:
Usage:
Description:
In YARM, an atom is always "named" by 4 values:
Notes:
Example:
Usage:
Description:
$first_atom_num = the first number to begin counting from
Usage:
Description:
Example:
Usage:
Description:
Example:
Usage:
Description:
Example:
Usage:
Description:
Displays a pdb file using the Midas program from UCSC.
&readData
Summary:
%data = &readData( $file );
"A B C" : value1
or
"A B C" : value1 : value2
or
"A B C" : value1 : value2 : value3 : etc....
&writeData
Summary:
&writeData( $file, \%data );
"A B C" : value1
or
"A B C" : value1 : value2
or
"A B C" : value1 : value2 : value3 : etc....
&readPdb
Summary:
Reads in PDB files
%xyz = &readPdb( $pdb_file );
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).
1) the segment identifier (or chainid)
2) the residue number
3) the residue name
4) the atom name
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.
%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...
}
Thus, $pdb{"A 3 CYT C6"}[2] returns the z coordinate of the
C6 atom of cytosine #4 on chainid A.
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)
&writePdb
Summary:
Reads in PDB files
&writePdb( \%xyz, $pdb_file );
or
&writePdb( \%xyz, $pdb_file, "a", first_atom_num );
Use "a" to append rather then overwrite to pdb file.
&readFelix
Summary:
Reads in Felix files
%data = &readFelix( "shifts", $version, $peak_file );
or
%data = &readFelix( "data", $version, $peak_file, $data_file );
$version => 95 or 97 is the Felix version
&writeXplor
Summary:
&writeXplor( \%rij, \%ref_hash, $min, $max, $file );
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.
&writeXplor2
Summary:
&writeXplor2( \%rij, \%ref_hash, $file );
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:
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
&readXplor
Summary:
Reads an XPLOR restraint file into a 2D data hash
%rij = &readXplor( $xplor_file, \%ref_hash );
&viewMidas
Usage:
&viewMidas( $pdb_file );