set MOL pope-water

set temp 500

set xbox 70
set ybox 70
set zbox 94

structure ${MOL}.psf 
coordinates ${MOL}.pdb 
temperature 0 
parameters par_all27_prot_lipid.prm 
paraTypeCharmm on

outputEnergies  100
outputTiming    100
xstFreq         100
dcdFreq         500
wrapAll         on

timestep        1
nonBondedFreq   2
fullElectFrequency 4
stepsPerCycle   20

exclude         scaled1-4
1-4scaling      1.0
switching       on
switchDist      14
cutoff          16
pairlistdist    16

cellBasisVector1        $xbox   00.00   00.00
cellBasisVector2        00.00   $ybox   00.00
cellBasisVector3        00.00   00.00   $zbox
cellOrigin -0.58 -0.78 0.056

Pme             on
PmeGridsizeX    60
PmeGridsizeY    60
PmeGridsizeZ    96

#########################################
# CONSTRAINTS
#########################################
constraints     on
consRef         ${MOL}-cons.pdb  
consKFile       ${MOL}-cons.pdb
consKCol        B

#########################################
# PRESSURE AND TEMPERATURE CONTRON
#########################################

langevin                on
langevinDamping         5
langevinTemp            $temp
langevinHydrogen        no

useflexiblecell 	yes
langevinPiston          on
langevinPistonTarget    1.01325
langevinPistonPeriod    100
langevinPistonDecay     50
langevinPistonTemp      $temp

binaryoutput    off
outputname      ${MOL}-equil

# GET INIT. ENERGY
minimize 0	

###########
# MINIMIZE 
###########

minimize 10000
output ${mol}-cons

#######
# HEAT 
#######

set tem 1
while { $tem <= 500 } { 
langevinTemp $tem
run 3000
set tem [expr $tem + 3]
}
