C code to run ANM and define ligand atoms as nodes
Matlab code to obtain subset of slow modes
 
The programs: 

1. Full ANM using SVD. Appropriate only to relatively small systems

Compilation:
cc -O2 -o anm_svd anm_svd.c -lm

Run:
anm_svd [pdb_file] [chain] [model] 

Note:
The pdb file should be in the current directory. 
Chain must be specified. If the chain is the space character you have to put " " (you need to
put the "" in the command line) in the second parameter. To model all chains in the file use "*" (again, you need to
put the "" in the command line).
The model also nust be specified. If there is no model or you want to consider residues in
all models use the 0 value for the third argument.

Example:

anm_svd 1atp.pdb "*" 0

will model all the nodes (as defined in nodes.txt) in all the chains and all nodels of pdb file 1atp.pdb.  

The input file nodes.txt defines the nodes in the system and the cutoffs. for example:
#ATM CUTOFF  
#%4S%5.2f
 CA  3.65
 P   5.00
defines that CA atoms and P atoms are nodes.

The cutoff distance of the program to determine contact between pairs of atoms is the sum of the atomic cutoffs in this file.
for example, here the interaction cutoff between two CA atoms will be 3.65A+3.65A=7.3A and for interactions between CA and P 
will be 3.65A+5A=8.65A

The input file ligand_nodes.txt defines nodes from heterogroups and their cutoffs. for example: 

#ATM RES CUTOFF
#%4S %3S %5.2f  (with spaces)
 PA  ATP  5.00
 C4* ATP  5.00


The output files include:

pdb_file.hessian:       the hessian of the system
pdb_file.sparsehessian: the hessian of the system in a sparse format (i j value).
pdb_file.index:         defines the nodes and include also coordinates and b-factor information
pdb_file.log            give basic information about this run
pdb_file.invhessian     the psudo inverse of the Hessian (the covariance matrix)
pdb_file.eigenx         x components of the eigenvectors (excluding the first 6).
pdb_file.eigeny         y components of the eigenvectors (excluding the first 6).
pdb_file.eigenz         z components of the eigenvectors (excluding the first 6).
pdb_file.eigen          complete eigenvectors (including the first 6). Eigenvector files are listed as columns.
pdb_file.eigenvalues    eigenvalues (including the first 6 zero eigenvalues).


2.  Construction of Hessian matrix. Appropriate for large systems, where the eignen problem should be solved by other
application

Compilation:
cc -O2 -o anm_hessian_econo anm_hessian_econo.c -lm

Run:
anm_hessian_econo [pdb_file] [chain] [model] 

Note:
The pdb file should be in the current directory. 
Chain must be specified. If the chain is the space character you have to put " " (you need to
put the "" in the command line) in the second parameter. To model all chains in the file use "*" (again, you need to
put the "" in the command line).
The model also nust be specified. If there is no model or you want to consider residues in
all models use the 0 value for the third argument.
Updated to the wwPDB mediation. Nuc acids with "'" sugar atoms instead of "*" can be read (11/2007).

Example:

anm_hessian_econo 1atp.pdb "*" 0

will create the Hessian based on the nodes (as defined in nodes.txt) in all the chains and all nodels of pdb file 1atp.pdb.  


The output files include
pdb_file.sparsehessian: the hessian of the system in a sparse format (i j value).
pdb_file.index:         defines the nodes and include also coordinates and b-factor information
pdb_file.log            give basic information about this run


3. A Matlab code to call the function the retrieve a subset of modes (eigenvalues and eigenvectors) .Uses the eigs function of Matlab (which uses ARPACK). The input is a sparse matrix.

To functions are 
useeigs.m  (call the eigs function)
readhes.m  (parse the Hessian)

To call the function within matlab:

useeigs ('pdb_file.sparsehessian' , neigen) ;

'pdb_file.sparsehessian' is the file obtained from anm_hessian_econo. neigen is the number of slow modes requested.

The matlab code creates 3 output files:

anmeigs.flag:            a flag to indicate a success run (0 value)
anmeigs.eigenvectors:    eigen vectors (listed as columns, including first 6)
anmeigs.eigenvalues:     eigen values  (including the first 6 zero eigenvalues).

Refer to the Matlab documentation for more help regarding the matlab code.


The code and documentation were written by Eran Eyal (2008) eyal@ccbb.pitt.edu






 

