*File
*

set 1 ../lib
! pdb or pdb.crd file name
set 4 mini_helix_allh_final
! file name 
set 2 helix_const_6_zwit
! number of steps
set 3 1500000     

open read unit 11 card name @1/toph19_eef1.1.inp
read rtf card unit 11
close unit 11

open read unit 12 card name @1/param19_eef1.1.inp
read para card unit 12
close unit 12

open read unit 12 card name ../coor/@4.crd
read sequ coor unit 12
close unit 12

gene prot first nter last cter setu

!patch disu prot  6 prot 120
!patch disu prot 28 prot 111
!patch disu prot 61 prot 77
!patch disu prot 73 prot 91



open read unit 12 card name ../coor/@4.crd
read coor card unit 12
close unit 12

ic param
ic build
coor init sele type H* end
hbuild



coor orient           !this aligns it with x axis
coor rotate xdir 0. ydir 1. zdir 0. phi  -90.0
coor trans zdir 0


open write unit 2 card name ../coor/@2.crd
write coor card unit 2
close unit 2


open write unit 2 form name ../coor/@2.pdb
write coor pdb unit 2



                                                                                                       
! write out the protein structure file (psf)
                                                                                                       
open unit 1 name ../lib/@2.psf write formatted
write psf card unit 1
* Human phospholipid scramblase 1 from human_plscr1_B99990001.pdb
*
                                                                                                       
open unit 1 name ../lib/@2.xplor.psf write formatted
write psf xplor card unit 1
* Human phospholipid scramblase 1 from human_plscr1_B99990001.pdb
*
                                                                                                       

!stop


eef1 setup membrane slvt water slv2 chex nsmth 10 width 23.0 temp 298.15 -
              unit 93 name @1/solvpar.inp  aemp 0.85  
     !gouy anfr 0.50 area 70. conc 0.03 offset 3.0 valence 1
update ctonnb 7. ctofnb 9. cutnb 10. group rdie
                                                                                
cons harm sele (atom * * ca) .or. (atom * * c) -
      .or. (atom * * o) .or. (atom * * n) end force 1.0
                                                                                
mini abnr nstep 300
                                                                                
open write unit 2 card name ../coor/@2min.crd
write coor card unit 2
        
open write unit 2 form name ../coor/@2min.pdb
write coor pdb unit 2
                                                                                
shake bonh

open write unit 31 card name ../rst/@2.rst
open write unit 32 file name ../dcd/@2.dcd
dynamics verlet - 
      timestep 0.002 nstep @3 nprint 100 iprfrq 1000 -
      ieqfrq 200 ichecw 1 -
      firstt 240 finalt 300 twindh 2.0 -
      iasors 0 iasvel 1 nsavc  500 inbfrq 20 -
      iunrea -1 iunwri 31 iuncrd 32


open write unit 2 card name ../coor/@2dyn.crd
write coor card unit 2
               
open write unit 2 form name ../coor/@2dyn.pdb
write coor pdb unit 2
                                                                                
mini abnr nstep 300
                                                                                
open write unit 2 card name ../coor/@2dynmin.crd
write coor card unit 2
     
open write unit 2 form name ../coor/@2dynmin.pdb
write coor pdb unit 2
                                                                                 
prnlev 10
energy
coor trans zdir 500
energy ! will calculate the energy of the protein solvated in water ! 

stop
