Re: restart file - langevin options removed?

From: Maxim Belkin (mbelkin_at_ks.uiuc.edu)
Date: Thu Apr 28 2016 - 15:36:52 CDT

No, your restart file has several issues.

1. As Josh pointed out, "set temperature 310" is for TCL only, this is not a NAMD command. You have to uncomment this line in order to use it in "thermostat" lines (e.g. in langevinTemp $temperature).

2. You switch off PME in the restart file. Change 0 to 1 so that you have :

if {1} {
PME yes
pmeGridSize 1.0
}

Now, I don’t know if you want to run NPT or NVT so I can’t comment on the lanveginPiston part. Currently, it is set to do constant volume simulations (i.e. NVT).

- Maxim

> On Apr 28, 2016, at 15:28, Olya Kravchenko <ovkrav_at_gmail.com> wrote:
>
> 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 : Tue Dec 27 2016 - 23:22:05 CST