*FILENAME: hbonds.inp
*PURPOSE: compute static and time-dependent hydrogen bonds from trajectory
*AUTHOR: Lennart Nilsson, Karolinska Institutet, October 2003
*
!unix environment variable CHM_HOME points to CHARMM installation directory
read rtf card name $CHM_HOME/toppar/top_all22_prot.inp
read para card name $CHM_HOME/toppar/par_all22_prot.inp
! we assume there are three segments in this psf
! prot = a protein
! lig = a bound ligand
! wat = solvent waer
read psf card name my_psf.psf
read coor card name my_structure.crd
! hydrogen bonding patterns in initial structure
! the "coor hbond" depends on DONOr/ACCEptor information in PSF to
! identify possible hbonding partners; see corman.doc for details
! we use strictly geometric criteria on the H...A distance, and optionally
! on the D-H...A angle to define the hydrogen bond
! first look at the backbone-backbone hydrogen bonds
coor hbond verbose select type HN .or. type O end select type HN .or. type O end
! protein-solvent !!NB your psf MUST have DONOr/ACCEptor specifications
! for the water molecules for this to work;
! if any of the following lines are missing from RESI TIP3
! in your RTF (and hence in the PSF), add missing bits to RTF and
! regenerate the PSF
! ACCEPTOR OH2
! DONOR H1 OH2
! DONOR H2 OH2
coor hbond verbose select segid prot end select segid wat end

! now get the timedependent hydrogen bonds; the output can be voluminous, especially
! with the verbose option
open unit 51 read unform name my_traj1.cor
open unit 52 read unform name my_traj2.cor
! the SKIP 2500 (=5ps) means that for a hydrogen bond to be counted as broken
! in the calculation of average lifetime it has to be broken for > 5ps (otherwise
! we are unlikely to detect the break)

! backbone-backbone
coor hbond verbose select type HN .or. type O end select type HN .or. type O end -
firstu 51 nunit 2 begin 10500 skip 2500

! note that the trajectory is not closed between these commands, and can be reused
! protein - solvent
coor hbond verbose select segid prot end select segid wat end -
firstu 51 nunit 2 begin 10500 skip 2500

! protein - water - ligand
coor hbond verbose select segid prot end select segid lig end -
bridge tip3 firstu 51 nunit 2 begin 10500 skip 2500



Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden