* Cuttest2
*

! Tests Non-bond cutoff options:
! CUTNB 8.0 CTOFNB 7.5 EPS 1.0 E14FAC 0.4 WMIN 1.5
! (1) ATOM CDIE SHIFT  VATOM VSHIFT CTONNB 6.5
! (2) ATOM CDIE SWITCH VATOM VSHIFT CTONNB 6.5
! (3) ATOM CDIE SWITCH VATOM VSHIFT CTONNB 7.5
! (4) ATOM CDIE FSHIFT VATOM VSHIFT CTONNB 6.5
! (5) ATOM RDIE SHIFT  VATOM VSHIFT CTONNB 6.5
! (6) ATOM RDIE SWITCH VATOM VSHIFT CTONNB 6.5
! (7) ATOM RDIE SWITCH VATOM VSHIFT CTONNB 7.5
! By Stephen Fleischman 11/91
!
! Compare derivatives of selected atoms to the numerical derivatives.
! The difference should be less than 0.008.  The tolerance in the TEST
! FIRST command is set very small so that all of the specified 
! derivatives will be printed out.

stream datadir.def
bomlev -2
OPEN READ FORM UNIT 1 NAME @0toph19.rtf
READ RTF  CARD UNIT 1
CLOSE UNIT 1
OPEN READ FORM UNIT 2 NAME @0param19.prm
READ PARAMETER CARD UNIT 2
CLOSE UNIT 2

READ      SEQUENCE  CARDS
*PTI SEQUENCE
*
   58
ARG PRO ASP PHE CYS LEU GLU PRO PRO TYR 
THR GLY PRO CYS LYS ALA ARG ILE ILE ARG
TYR PHE TYR ASN ALA LYS ALA GLY LEU CYS 
GLN THR PHE VAL TYR GLY GLY CYS ARG ALA
LYS ARG ASN ASN PHE LYS SER ALA GLU ASP 
CYS MET ARG THR CYS GLY GLY ALA
GENERATE  MAIN
PATCH DISU MAIN  5 MAIN 55
PATCH DISU MAIN 14 MAIN 38
PATCH DISU MAIN 30 MAIN 51
READ SEQUENCE WATER 4
GENERATE SOLV NOANGLE

! define atoms for force testing
DEFINE FATOMS SELE SEGID MAIN .AND. RESID 12 END

OPEN UNIT 3 READ CARD NAME @0bpti.crd
READ COORD CARD UNIT 3
CLOSE UNIT 3
COOR COPY COMP

!{1. ATOM/CDIE/SHIFT/VATOM/VSHIF  CTONNB 6.5}
FASTER OFF
ENERGY ATOM CDIE SHIF VATOM VSHIF VDIS IHBFRQ 0 -
  CUTNB 8.0  CTOFNB 7.5  CTONNB 6.5  EPS 1.0  E14FAC 0.4  WMIN 1.5
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
TEST FIRST SELE FATOMS END STEP 0.00001 TOL 0
FASTER SCALAR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
FASTER VECTOR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END

!{2. ATOM/CDIE/SWITCH/VATOM/VSHIFT  CTONNB 6.5}
FASTER OFF
ENERGY ATOM CDIE SWIT VATOM VSHIFT VDIS CTONNB 6.5
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
TEST FIRST SELE FATOMS END STEP 0.00001 TOL 0
FASTER SCALAR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
FASTER VECTOR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END

!{3. ATOM/CDIE/SWITCH/VATOM/VSHIFT  CTONNB 7.5}
FASTER OFF
ENERGY ATOM CDIE SWIT VATOM VSHIFT VDIS CTONNB 7.5
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
TEST FIRST SELE FATOMS END STEP 0.00001 TOL 0
FASTER SCALAR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
FASTER VECTOR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END

!{4. ATOM/CDIE/FSHIFT/VATOM/VSHIFT  CTONNB 6.5}
FASTER OFF
ENERGY ATOM CDIE FSHIF VATOM VSHIFT VDIS CTONNB 6.5
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
TEST FIRST SELE FATOMS END STEP 0.00001 TOL 0
FASTER SCALAR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
FASTER VECTOR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END

!{5. ATOM/RDIE/SHIFT/VATOM/VSHIFT  CTONNB 6.5}
FASTER OFF
ENERGY ATOM RDIE SHIF VATOM VSHIFT VDIS CTONNB 6.5
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
TEST FIRST SELE FATOMS END STEP 0.00001 TOL 0
FASTER SCALAR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
FASTER VECTOR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END

!{6. ATOM/RDIE/SWITCH/VATOM/VSHIFT  CTONNB 6.5}
FASTER OFF
ENERGY ATOM RDIE SWIT VATOM VSHIFT VDIS CTONNB 6.5
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
TEST FIRST SELE FATOMS END STEP 0.00001 TOL 0
FASTER SCALAR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
FASTER VECTOR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END

!{7. ATOM/RDIE/SWITCH/VATOM/VSHIFT  CTONNB 7.5}
FASTER OFF
ENERGY ATOM RDIE SWIT VATOM VSHIFT VDIS CTONNB 7.5
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
TEST FIRST SELE FATOMS END STEP 0.00001 TOL 0
FASTER SCALAR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END
FASTER VECTOR
ENERGY
COOR FORCE COMP SELE FATOMS END
PRINT COOR COMP SELE FATOMS END

STOP