# Created by Octave 3.2.4, Tue Nov 23 12:53:51 2010 EST <mockbuild@jetta.math.Princeton.EDU.private>
# name: cache
# type: cell
# rows: 3
# columns: 4
# name: <cell-element>
# type: string
# elements: 1
# length: 7
plotpdb
# name: <cell-element>
# type: string
# elements: 1
# length: 79
function plotpdb(pdb)
    
 Visualizes a pdb-file or a pdb-struct with rasmol.

# name: <cell-element>
# type: string
# elements: 1
# length: 78
function plotpdb(pdb)
    
 Visualizes a pdb-file or a pdb-struct with rasmol.

# name: <cell-element>
# type: string
# elements: 1
# length: 8
read_pdb
# name: <cell-element>
# type: string
# elements: 1
# length: 1719
function p = read_pdb(fname)

 Read a protein databank file from fname to a structure p containing 
 some of the elements below:

 p.cellsize       = Vector giving the lengths of lattice vectors a, b and c
 p.cellangl       = Vector giving the lattice angles alpha, beta and gamma
 p.sgroup         = The full Hermann-Mauguin space group symbol
 p.z              = Z, number of polymeric chains in a unit cell
 p.scalem         = Matrix of the transformation to crystallographic coords
 p.scalev         = Vector of the transformation to crystallographic coords
 p.atomname       = Names of the atoms in ATOM entries (N x 4 char matrix)
 p.aresname       = Name of the residue (N x 3 char matrix)
 p.aresseq        = Residue sequence number (N x 1 matrix)   
 p.acoord         = Coordinates of the atoms in ATOM entries (N x 3 matrix)
 p.aoccupancy     = Occupancy of the atom (N x 1 matrix) 
 p.atempfactor    = Temperature factor of the atoms (N x 1 matrix) 
 p.az             = Number of electrons, Z, of the atoms (N x 1 matrix) 
 p.hetname        = Names of the heterogen atoms (N x 4 char matrix)
 p.hetresname     = Name of the heterogen residue (N x 3 char matrix)
 p.hetresseq      = Heterogen residue sequence number (N x 1 matrix)   
 p.hetcoord       = Coordinates of the heterogen atoms (N x 3 matrix)
 p.hetoccupancy   = Occupancy of the heterogen atoms (N x 1 matrix) 
 p.hettempfactor  = Temperature factors of the hetatoms (N x 1 matrix) 
 p.hetz           = Number of electrons, Z, of the hetatoms (N x 1 matrix) 
 
 NOTE: This function also returns the atomic numbers of the atoms in the
 structure (fields p.az and p.hetz), if you do not need this information,
 use the faster function creadpdb.oct

# name: <cell-element>
# type: string
# elements: 1
# length: 29
function p = read_pdb(fname)


# name: <cell-element>
# type: string
# elements: 1
# length: 6
strtoz
# name: <cell-element>
# type: string
# elements: 1
# length: 594
function [Z,w] = strtoz(s)

 Return atomic numbers Z and the corresponding number of elements w  
 in the compound.
 Input s is either a string containing the name of the
 compound or the atomic number Z.
 If s is a string matrix the compounds are read rowwise and the outputs
 Z and w are matrices whose rows correspond to the compounds read from 
 the rows of s.
 
 in:
 s = string containing the stoichiometry of the compound (eg. AlO3)
     or atomic number Z
 out:
 Z = vector containing the atomic numbers of the elements in compound s
 w = number atoms of each element Z of the compound

# name: <cell-element>
# type: string
# elements: 1
# length: 27
function [Z,w] = strtoz(s)


# name: <cell-element>
# type: string
# elements: 1
# length: 9
write_pdb
# name: <cell-element>
# type: string
# elements: 1
# length: 175
function write_pdb(p, fname[, quick])

 Writes a pdb struct p (see read_pdb.m) to a pdb-file fname.

 If the third parameter quick is given, write only ATOM and HETATM lines.

# name: <cell-element>
# type: string
# elements: 1
# length: 38
function write_pdb(p, fname[, quick])


