Re: restart file - langevin options removed?

From: Olya Kravchenko (ovkrav_at_gmail.com)
Date: Thu Apr 28 2016 - 15:28:57 CDT

Right, this is exactly why I am confused. The temperature is set in my
initial configuration file and commented out in the restart file - as
suggested by NAMD manual (because it is saved in the velocity restart
file). Am I missing something?

I.e. my initial configuration file is this:

# Minimization and Equilibration of Ferritin in a Water Box

structure ionized.psf
coordinates ionized.pdb

set temperature 300
set outputname test

firsttimestep 0

paraTypeCharmm on
parameters my_parameters.prm
temperature $temperature

exclude scaled1-4
1-4scaling 1.0
cutoff 12.0
switching on
switchdist 10.0
pairlistdist 14.0

timestep 2.0
rigidBonds all
nonbondedFreq 1
fullElectFrequency 2
stepspercycle 10

langevin on
langevinDamping 1
langevinTemp $temperature
langevinHydrogen off

cellBasisVector1 137.423 0.0 0.0
cellBasisVector2 0.0 149.649 0.0
cellBasisVector3 0.0 0.0 135.472
cellOrigin 80.695 112.752 63.497

wrapAll on

PME yes
PMEGridSpacing 1.0

useGroupPressure yes
useFlexibleCell no
useConstantArea no

langevinPiston on
langevinPistonTarget 1.01325
langevinPistonPeriod 100.0
langevinPistonDecay 50.0
langevinPistonTemp $temperature

outputName $outputname

restartfreq 500
dcdfreq 250
xstFreq 250
outputEnergies 100
outputPressure 100

minimize 200
reinitvels $temperature

run 10000000

And here is what I think should be my restart file (with temperature
options commented out):

# Restarts ferritin simulation from 26500 step

structure ionized.psf
coordinates ionized.pdb
outputName test_1

#set temperature 310

# Continuing a job from the restart files
if {1} {
set inputname test
binCoordinates $inputname.restart.coor
binVelocities $inputname.restart.vel ;# remove the "temperature"
entry if you use this!
extendedSystem $inputname.xsc
}

firsttimestep 26500

paraTypeCharmm on
parameters my_parameters.prm

#temperature $temperature

wrapWater on
wrapAll on

exclude scaled1-4
1-4scaling 1.0
cutoff 12.0
switching on
switchdist 10.0
pairlistdist 14.0

timestep 2.0
rigidBonds all
nonbondedFreq 1
fullElectFrequency 2
stepspercycle 10

if {0} {
PME yes
PMEGridSpacing 1.0
}

langevin on ;
langevinDamping 1 ;
langevinTemp $temperature
langevinHydrogen no ;

if {0} {
useGroupPressure yes ;
useFlexibleCell no ;
useConstantArea no ;

langevinPiston on
langevinPistonTarget 1.01325 ;# in bar -> 1 atm
langevinPistonPeriod 100.0
langevinPistonDecay 50.0
langevinPistonTemp $temperature
}

restartfreq 500
dcdfreq 250
xstFreq 250
outputEnergies 100
outputPressure 100

commotion yes

run 10000000

On Thu, Apr 28, 2016 at 4:17 PM, Maxim Belkin <mbelkin_at_ks.uiuc.edu> wrote:
> Both errors explicitly say that variable temperature (used as $temperature) is not set. Add the following line at the beginning of the file:
>
> set temperature 310
>
> Also, keep in mind that "temperature $temperature" has nothing to do with thermostats. It only assigns random velocities to all the atoms so that the total kinetic energy corresponds to desired temperature.
>
>> On Apr 28, 2016, at 15:13, Olya Kravchenko <ovkrav_at_gmail.com> wrote:
>>
>> Thank you!
>>
>> I don't quite understand then - if I comment out only the temperature
>> option (i.e. the line that sets certain temperature, f.e. 310) then
>> namd complains about missing variable:
>>
>> Processor 0 Exiting: Called CmiAbort ------------
>> Reason: FATAL ERROR: can't read "temperature": no such variable
>> while executing
>> "temperature $temperature"
>> (file "restart.conf" line 40)
>>
>> And when I comment out that line (i.e. temperature $temperature) it
>> complains about
>> langevin temperature:
>>
>> Processor 0 Exiting: Called CmiAbort ------------
>> Reason: FATAL ERROR: can't read "temperature": no such variable
>> while executing
>> "langevinTemp $temperature"
>> (file "restart.conf" line 68)
>>
>> And when I comment out that one, it says that langevin requires
>> temperature to be specified. And when I comment out the whole routine
>> it runs with no complaints...
>>
>>
>> On Thu, Apr 28, 2016 at 4:00 PM, Maxim Belkin <mbelkin_at_ks.uiuc.edu> wrote:
>>> Hi Olga,
>>>
>>> You should have the same temperature control mechanism throughout the production simulations. So, if you maintain constant temperature using Langevin thermostat, you have to have the langevin thermostat lines in all your NAMD configure files.
>>>
>>> langevinPiston part should be there as long as you want to run NPT (constant P - pressure) rather than NVP (constant V - volume).
>>>
>>> Also, make sure you use "commotion yes", otherwise NAMD will subtract the average velocity of the system when you restart your simulations.
>>>
>>> Maxim
>>>
>>>
>>>
>>>
>>>> On Apr 28, 2016, at 14:49, Olya Kravchenko <ovkrav_at_gmail.com> wrote:
>>>>
>>>> Hi all,
>>>>
>>>> just a quick question, do I understand it correctly that langevin
>>>> section should not be in a restart configuration file at all? I.e. to
>>>> restart my simulation I should remove/comment out this whole section
>>>> (as opposed to only removing the langevinTemp $temperature line):
>>>>
>>>> # Constant Temperature Control
>>>> langevin on
>>>> langevinDamping 1
>>>> langevinTemp $temperature
>>>> langevinHydrogen no
>>>>
>>>> What about langevinPistonTemp $temperature, should that part be
>>>> commented out as well?
>>>>
>>>> Thanks in advance!
>>>>
>>>> Olga
>>>>
>>>> P.S. Does this restart script look right?
>>>>
>>>> structure ionized.psf
>>>> coordinates ionized.pdb
>>>> outputName test_1
>>>>
>>>> if {1} {
>>>> set inputname test
>>>> binCoordinates $inputname.restart.coor
>>>> binVelocities $inputname.restart.vel ;# remove the "temperature"
>>>> entry if you use this!
>>>> extendedSystem $inputname.xsc
>>>> }
>>>>
>>>> firsttimestep 26500
>>>>
>>>> paraTypeCharmm on
>>>> parameters my_parameters.prm
>>>>
>>>> wrapWater on #what about this option, is it needed?
>>>> wrapAll on
>>>>
>>>> exclude scaled1-4
>>>> 1-4scaling 1.0
>>>> cutoff 12.0
>>>> switching on
>>>> switchdist 10.0
>>>> pairlistdist 14.0
>>>>
>>>>
>>>>
>>>> timestep 2.0 ;# 2fs/step
>>>> rigidBonds all
>>>> nonbondedFreq 1
>>>> fullElectFrequency 2
>>>> stepspercycle 10
>>>>
>>>>
>>>> #PME
>>>> if {0} {
>>>> PME yes
>>>> PMEGridSpacing 1.0
>>>> }
>>>>
>>>> if {0} {
>>>> useGroupPressure yes ;
>>>> useFlexibleCell no ;
>>>> useConstantArea no
>>>>
>>>> langevinPiston on
>>>> langevinPistonTarget 1.01325 ;
>>>> langevinPistonPeriod 100.0
>>>> langevinPistonDecay 50.0
>>>> langevinPistonTemp $temperature
>>>> }
>>>>
>>>> restartfreq 500 ;# 500steps = every 1ps
>>>> dcdfreq 250
>>>> xstFreq 250
>>>> outputEnergies 100
>>>> outputPressure 100
>>>>
>>>>
>>>> run 10000000
>>>
>

This archive was generated by hypermail 2.1.6 : Sun Dec 31 2017 - 23:20:23 CST