Hi! When you prepare input files (.namd extension), you can set the appropriate restart information.
Important things to set are:
- restart options (restartfreq - parameter that specifies how frequently the program writes restart files during the simulation; dcdfreq and xstfreq that do the same action, but on different output files)
- binaryrestart (binary format file that contains the complete state of a simulation at a specific point in time)
- outputname (name you want for your files)
Basically you have a input.namd like this (it's an example):
----------------------
# NAMD input file
# Structure and parameter files
structure protein.psf
coordinates protein.pdb
parameters par_all36m_prot.prm
# Output
restartfreq 1000
dcdfreq 1000
xstfreq 1000
outputEnergies 1000
binaryoutput yes
binaryrestart yes
outputname simulation
dcdfile simulation.dcd
xstfile simulation.xst
# Force field and integrator
timestep 2.0
exclude scaled1-4
1-4scaling 1.0
switching on
switchdist 10.0
cutoff 12.0
# Temperature and pressure control
temperature 300
langevin on
langevinDamping 5.0
langevinTemp 300
# Run parameters
numsteps 10000
rigidBonds all
rigidTolerance 0.00001
nonbondedFreq 1
# Periodic boundary conditions
cellBasisVector1 80.0 0.0 0.0
cellBasisVector2 0.0 80.0 0.0
cellBasisVector3 0.0 0.0 80.0
cellOrigin 0.0 0.0 0.0
wrapAll on
# PME (Particle Mesh Ewald) for long-range electrostatics
PME on
PMEGridSpacing 1
----------------------
Of course you have to modify this file according to your molecule and to your purposes. Hope this helps!
Kumar Pratyush as Davide Pietrafesa mentioned, assume that your first input file, file1.namd contains the above parameters. After the successful completion of the file1.namd or from wherever you want to continue the simulation in the new file, file2.namd add the below parameters
set inputname simulation #outputname given in file1.namd
binCoordinates $inputname.restart.coor
binVelocities $inputname.restart.vel # remove the "temperature"
extendedSystem $inputname.xsc
firsttimestep 4000000 #Mention the timestep from where you want to continue the simulation.