Re: FIRSTTIMESTEP in config file

From: Gadi Oron (gadi_at_proteologics.com)
Date: Mon Mar 15 2004 - 04:02:07 CST

Hi,

I have made a config file (common.namd attached to the message) that
might be useful, it rename the minimize and run routines to dump the
last timestep into the file timestep.txt. If the file exists and no
FIRSTTIMESTEP directive is given then the first timestep is taken from
the file.

This file also controls some config parameters that are
activated/deactivated using a single variable. See the other config
files for the usage.

Hope this helps.

On Wed, 2004-03-10 at 13:49, Satyavani Vemparala wrote:
> Hello:
>
> Is there no way that NAMD can pick this number from the restart files?, is
> manually putting this number into the config file the only way?
>
> I am having problems setting up continuation runs, and wasting some time
> if the jobs get done at night as i need to do this, was wondering how
> others are handling this.
>
> Thanks
> Vani

-- 
================= Gadi ORON, PhD -o- Proteologics ======================
========== gadi/at/proteologics.com ========== +972 8 9475666 ==========
pain, n.:
	One thing, at least it proves that you're alive!

# Common part of the NAMD configuration file
# Author Gadi Oron
# Gadi.Oron_at_bigfoot.com

## molecular system
###################
structure complete.psf
coordinates complete.pdb

## Continue a saved session if $in is defined
if { [info exists in] } {
        print "MYINFO: Attempting to continue from out/$in"
        bincoordinates out/$in.coor
        binVelocities out/$in.vel
        extendedSystem out/$in.xsc
}

## Timestep
###########

# If the variable startts is undefined try and use what is in the file
if { [info exists startts] == 0 } {
        print "MYINFO: \$startts is undefined; trying timestep.txt"
        if { [file exists "timestep.txt"] } {
                set f [open "timestep.txt" r]
                if { [ gets $f line ] != 0 } {
                        set startts $line
                        print "MYINFO: timestep in file is $line"
                        firsttimestep $startts
                } else {
                        print "MYERROR: Cannot read timestep.txt"
                }
                close $f
        } else {
                print "MYERROR: timestep.txt does not exists or is unreadable"
        }
} else {
        print "MYINFO: Setting FIRSTTIMESTEP from variable: $startts"
        firsttimestep $startts
}

set TS $startts
#############################################################
## SIMULATION PARAMETERS
##
#############################################################

## force field
##############
paratypecharmm on
parameters ../par/par_all27_prot_lipid.inp
parameters ../par/par_unbonded_zincs.inp

exclude scaled1-4
1-4scaling 1.0

## approximations
#################
switching on
switchdist 8
cutoff 12
pairlistdist 13.5
margin 1

## Temperature
##############
if {![info exist in]} {
        temperature $temperature
}
# Integrator Parameters
#######################
nonbondedFreq 1
fullElectFrequency 2
stepspercycle 20

# Output
########
outputEnergies 100
outputTiming 1000
dcdfreq 1000
binaryOutput on
outputname out/$out

# Periodic Boundary Conditions
##############################
cellBasisVector1 58. 0. 0.
cellBasisVector2 0. 49. 0.
cellBasisVector3 0. 0 84.
cellOrigin 3. 0.5 19.

wrapAll on

# PME (for full-system periodic electrostatics)
PME yes
PMEGridSizeX 32
PMEGridSizeY 32
PMEGridSizeZ 32

# Constant Pressure Control (variable volume)

if {$CPC} {
useGroupPressure yes ;# needed for rigidBonds
useFlexibleCell no
useConstantArea no

langevinPiston on
langevinPistonTarget 1.01325 ;# in bar -> 1 atm
langevinPistonPeriod 100.
langevinPistonDecay 50.
langevinPistonTemp $temperature
}

## Allow for Langevin temp control
if {$LDAMP} {
langevin on
langevinDamping $LDAMP ## High damping needed for heating
                           ## reduce to 1 for simulation
langevinTemp $temperature
langevinHydrogen no
}

## Some TCL procedures
######################
        
# A subroutine to write the last timestep to timestep.txt
proc writets {} {
        global TS
        set f [open "timestep.txt" w]
        puts $f $TS
        close $f
        }

rename minimize ominimize
rename run orun

proc minimize {steps} {
        global TS
        ominimize $steps
        incr TS $steps
        writets
}

proc run {steps} {
        global TS
        orun $steps
        incr TS $steps
        writets
}


# NAMD configuration file

## The temperature
set temperature 0

## The prefix of the input files if resuming a run
#set in xxx

## The output prefix
set out equil_water

## Starting TIMESTEP
#set startts 0

## Pressure control flag
set CPC 0

## Langevin temp ctrl
set LDAMP 0

source common.namd

# Integrator Parameters
#######################
timestep 0.1

## Fixed protein
#################
fixedAtoms on
fixedAtomsForces on
fixedAtomsFile backbone.pdb
fixedAtomsCol O

#############################################################
## EXECUTION SCRIPT
##
#############################################################

## 10000 steps with fixed backbone to equilibrate water
minimize 1000
run 9000


# NAMD configuration file

## The temperature
set temperature 0

## The prefix of the input files if resuming a run
set in equil_all

## The output prefix
set out heat

## Starting TIMESTEP
#set startts 0

## Pressure control flag
set CPC 0

set LDAMP 10

source common.namd

# Integrator Parameters
#######################
timestep 0.5

#############################################################
## EXECUTION SCRIPT
##
#############################################################

## 10000 steps with fixed backbone to equilibrate water
minimize 1000
run 9000

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:37:25 CST