=====================================================================
   To compute an hessian for an ENM: use pdbmat.
   To diagonalize the hessian: use diagstd.
   To look at one of the so calculated normal modes: use rms_mode.
   Try them in that order in the ../Try_ENM_v3.73 directory.
=====================================================================
   -------
   Pdbmat:
   -------
   Computes the mass-weighted second derivatives energy matrix,
   using Tirion's model, that is, an elastic network model (ENM).
   In such models, close particles (atoms) are linked by springs.

   In Tirions's model, springs are set between atoms less than 
   CUToff Angstroms away from each others.

   In Hinsen's version, springs are weighted by exp(-dij/rkh)**2.
   Herein, both kind of typical distances (cutoff & rkh) can be mixed.

   Goal: Computing the low-frequency (collective) normal modes 
   of vibration of the system.

   To do so, the matrix produced by pdbmat has to be diagonalized
   with a program like DIAGSTD or, for large systems, DIAGRTB,
   BLZPACK, etc.

=====================================================================

   INPUT: 
   ******
  -A parameter file named pdbmat.dat.  

   Note that each run of pdbmat produces a pdbmat.dat_run file,
   where parameter values are shown (and shortly commented).
   pdbmat.dat_run can be modified and used as a pdbmat.dat file, 
   for further runs. 
   So, the simplest is to compile and run pdbmat...
   and have a look at the pdbmat.dat_run file so produced.
   If you want to see there the syntax of other available commands,
   just raise the PRINting level.

  -Among the parameters: 

  *The name of a file with the coordinates of the system, 
   in FREE or PDB (protein data bank) format.

   Free format: x, y, z, mass.
   PDB  format: Only lignes with the ATOM keyword are considered.
        Masses can be given in the Bfactors column.
   Note that masses can be read, but they are not required.
   In the later case, they are all set to 1.0 (as often done).

  *A way to identify pairs of neighbors:
   Either a CUTOFF value (standard Tirion's model)
   Or a file with a list of pairs of neighbors.
   Format of each ligne of this later file: atom-number atom-number

   Alternatively, Hinsen's version can be used.

   For one-atom-per-residue protein models, typical values are:
   Tirion's distance cutoff = 10-12 Angstroms.
   Hinsen's typical range   = 3 Angstroms.

   OUTPUT:
   *******

  -Default output matrix filename:
   Formatted file: pdbmat.sdijf 
   Binary    file: pdbmat.sdijb 

   This is a matrix in format: i, j, non-zero-i-j-matrix-element

  -Output coordinate filename (in free format):
   pdbmat.xyzm

   This is a coordinate file with, for each atom: 
   x, y, z, mass, block-number
   For a pdb file, the block-number is the amino-acid residue number
  (it is of use only in other programs like DIAGRTB).

   More specialized ones:
   ----------------------

  -VMD-command filename: 
   pdbmat.vmd

   This is a command file for vizualising the elastic network
   with VMD, the Visual Molecular Dynamics program (v1.8):
   vmd -e pdbmat.vmd 
   But if you just want to vizualise a standard ENM (defined with
   a cutoff distance), there are more efficient (faster) ways.

  -Molscript-command-file:
   pdbmat.molscript

   This is a command file for vizualising the elastic network
   with Molscript (v2.1).
   molscript < pdbmat.molscript > pdbmat.ps
   But if you just want to vizualise a standard ENM (defined with
   a cutoff distance) with Molscript, there are much faster ways.

.....................................................................
   This is a fortran 77 program, so it has predefined:

   **************
   MEMORY LIMITS:
   **************

   NATMAX  :  Maximum number of atoms (particles).
   NRESMX  :  Maximum number of residues (groups of particles).
   NVOISMX :  Maximum number of pairs of neighbors.  

   Increase them if needed. To (re)compile pdbmat, type:
   make pdbmat
   or:
   g77 -o pdbmat pdbmat.f
   or use your favorite fortran compiler (instead of g77).
.....................................................................

   ABOUT Tirion's model:
   *********************

   Principe du modele (Tirion, 1996): 
   
   Tous les atomes a moins de "cutoff" les uns des autres 
   sont supposes lies par des ressorts, qui ont tous
   la meme raideur.
   Simplification supplementaire par rapport au modele initial: 
   les atomes sont supposes avoir tous la meme taille
  (le cutoff est le meme pour toutes les paires d'atomes).
   On peut de plus poser qu'ils ont tous la meme masse.
   Sinon, celles-ci sont lues dans la colonne des 
   facteurs B du fichier pdb.

   Principaux resultats:

   Les modes de vibration de basse frequence obtenus
   a partir d'un tel modele sont tres voisins de ceux
   obtenus avec un modele beaucoup plus detaille, tels
   ceux utilises lors des etudes de Dynamique Moleculaire.

   Dans le cas ou le mouvement fonctionnel d'une proteine est un 
   mouvement d'ensemble (collectif), on constate qu'il peut tres 
   souvent etre decrit comme une combinaison lineaire de quelques
   uns de ces modes (de un a trois).

   Principaux avantages:

   Pas besoin de prendre en compte tous les atomes.
   Pas besoin de minimisation d'energie prealablement
   au calcul des modes de vibration (E=0 par construction).

.....................................................................

   MAIN REFERENCES:
   ****************

   1) M.M. Tirion (1996):
  "Large amplitude elastic motions in proteins from
   a single-parameter, atomic analysis",
   Phys. Rev. letters vol.77(9), p1905-1908.

   2) K. Hinsen (1998):
  "Analysis of domain motions by approximate normal mode calculations"
   Proteins vol.33, p417-429.

   3) F. Tama, Y.H. Sanejouand (2001):
  "Conformational change of proteins arising 
   from normal modes calculations"
   Protein Engineering vol.14, p1-6.

   4) A.R. Atilgan, S.R. Durell, R.L. Jernigan, M.C. Demirel,
   O. Keskin, I. Bahar (2001):
  "Anisotropy of Fluctuation Dynamics of Proteins with an Elastic 
   Network Model"
   Biophys Journal vol.80, p.505-515.

   5) S. Nicolay, Y.H. Sanejouand (2006):
  "Functional modes of proteins are among the most robust"
   Phys. Rev. letters vol.96, p078104.

   In case of problem, feel free to contact: 
   Yves-Henri.Sanejouand@ens-lyon.fr
  (bug reports may help you, but also others)

.....................................................................
   New features since the previously released version (v3.50):
  -The list of pairs of neighbors can be read in a file.
  -The elastic network can be visualized, using VMD or Molscript.
  -The output format has been extended.
  -Hinsen's weight added.
  -Bond-dihedral energy term added (1-4 bond, dihedral-like). 
  -DoCumentation included in the code.
.....................................................................
   Specific details:
   Covalent bond detection: through a distance-cutoff criterium.
      Even when the CONsecutif keyword is used.
   Bond-ANGLes are allowed only if there are BONDs.
   Bond-DIHEdrals are allowed only if there are BONDs and ANGLes.
         Hinsen's version: force constant * exp(-(dist/rkh)**2.d0)
        (except for topological bond force constants, e.g. ANGLes).
====================================================================
   --------
   diagstd:
   --------
   Diagonalization of a matrix, real, symmetrical.

   Diagonalization routine: TQLI (EISPACK).
  -simple, public domain, but slow (ALL eigenvectors are computed).

====================================================================

   INPUT matrix filename (expected from, e.g., PDBMAT program):
   ************************************************************
   CERFACS -Formatted : matrix.sdijf
   CERFBIN -Binary    : matrix.sdijb

   Input matrix format: i, j, non-zero-ij-element.

   It can start with a title, recognized by: 
   !,# in first column, or 'program-name>' as first word.

   OUTPUT:
   *******
   Eigenvector filename: matrix.eigenfacs (in CERFACS format)

.....................................................................

   MEMORY LIMITS:
   **************
   NATMAX: Maximum number of atoms allowed.

.....................................................................
   Eigenvector are given by increasing eigenvalues (LOWE).

   TRED2 and TQLI (based on the original EISPACK library) 
   perform a diagonalization of a real symmetric matrix based 
   on the QL algorithm. 
=====================================================================
   ---------
   rms_mode:
   ---------
   For a set of CERFACS vectors.
   Extracts one of them. 
   Gives the amplitude of each atom displacement.

=====================================================================
