Re: changing harmonic restraints (colvars)

From: Jérôme Hénin (jhenin_at_ifr88.cnrs-mrs.fr)
Date: Thu Apr 05 2012 - 11:17:56 CDT

Well, it looks like my job here is done. Thanks, Aron!

Jerome

On 5 April 2012 17:01, Aron Broom <broomsday_at_gmail.com> wrote:
> I don't know about the margin thing, but in terms of the new colvar, you'll
> need to manually edit the .colvars.state file you are using for restarting
> in order to add that new colvar.  Basically, your colvars config file no
> longer matches the restart file.  The .colvars.state file is human readable,
> you just need to add in a few lines saying what your colvar is, and what
> it's current value is, then it should work.  I've done it before when I've
> run metadynamics and then later stopped the metadynamics and used umbrella
> sampling to smooth the PMF.  If you can't figure out what the text should
> look like, just start a fresh run with those colvars and run for 1 step and
> then have a look at the new state file.
>
> ~Aron
>
>
> On Thu, Apr 5, 2012 at 7:52 AM, Jon Phillips <pcxjp3_at_nottingham.ac.uk>
> wrote:
>>
>> Hi,
>>
>> I'm trying to create a homology model of a protein bound to a ligand.
>> I've generated a (bad) starting structure, and am trying to use harmonic
>> restraints to pull the ligand into a more realistic configuration.
>>
>> First I added one restraint in which I dropped a distance (d) from
>> 6.695159 to 2.0, but now when I try to restart the run and add a new
>> colvar (f) namd throws errors at me.
>>
>> If I just add an extra colvar to the file, I get this:
>>
>> colvars: Restarting from file "res/play2_res.colvars.state".
>> colvars:   Restarting collective variable "d" from value: 2.09068
>> colvars:   Error: in reading restart configuration for collective
>> variable "f".
>> colvars:   If this error message is unclear, try recompile with
>> -DCOLVARS_DEBUG.
>> FATAL ERROR: Error in the collective variables module: exiting.
>>
>> If I try to ignore the restart, so comment out the line containing
>> colvarsInput from my configuration file, I get:
>>
>> FATAL ERROR: Periodic cell has become too small for original patch grid!
>> Possible solutions are to restart from a recent checkpoint,
>> increase margin, or disable useFlexibleCell for liquid simulation.
>>
>> This happens almost immediately (if I tell it to write to the dcd at
>> every step I get one frame).
>>
>> Before anybody starts telling me about margins and sizes of box, I don't
>> get either errors if I:
>>
>> a) turn colvars off entirely
>> b) use the original restraints
>> c) don't add the new colvar (f) and use colvarsInput
>>
>> I do still get the error if I turn margins up to 75 (which is roughly
>> the size of my box), and a quick inspection shows that the box shouldn't
>> change much - it's the same size as it's contents and I can't see any
>> gaps.
>>
>> My configuration file is:
>>
>>
>> ###############################################################################
>> set temperature 298
>> # Input
>> paraTypeCharmm on
>> parameters
>> /mnt/beagle.tmp/jp.beagle/computations/toppar/par_all22_prot_cmap_mas_namd.inp
>> parameters
>> /mnt/beagle.tmp/jp.beagle/computations/toppar/cgenff2b7/par_all36_cgenff_namd.prm
>> # Force-Field Parameters
>> exclude scaled1-4
>> 1-4scaling 1.0
>> cutoff 12.
>> switching on
>> switchdist 10.
>> pairlistdist 13.5
>> # Integrator Parameters
>> timestep 2.0 ;# 2fs/step
>> rigidBonds all ;# SHAKE on all H-containing bonds incl. both O-H water
>> bonds - needed for 2fs steps
>> nonbondedFreq 1
>> fullElectFrequency 2
>> stepspercycle 10
>> # Constant Temperature Control
>>
>> #temperature $temperature
>> langevin on ;# do langevin dynamics
>> langevinDamping 5 ;# damping coefficient (gamma) of 5/ps
>> langevinTemp $temperature
>> langevinHydrogen off ;# don't couple langevin bath to hydrogens
>> # Output
>> restartsave yes
>> binaryrestart yes
>> restartfreq 50000 ;# 250=0.5ps, 2500=5ps, 25,000=50ps, 250,000=0.5ns
>> dcdfreq 1000
>> outputEnergies 500
>> outputPressure 500
>> # Setting up PBC for an octahdron box with NAMD
>> set a 75.334
>> set b [expr $a/2]
>> cellBasisVector1 $a 0 0
>> cellBasisVector2 $b $b $b
>> cellBasisVector3 $b -$b $b
>> cellOrigin 0 0 0
>> wrapAll on
>> wrapNearest on
>> PME yes
>> PMEGridSpacing 1
>> useGroupPressure yes
>> useFlexibleCell no
>> useConstantArea no
>> langevinPistonTarget 1.01325 ;# in bar -> 1 atm
>> langevinPistonPeriod 100.
>> langevinPistonDecay 50.
>> langevinPistonTemp $temperature
>> binaryoutput no
>> structure rabbit_2gdc_struct3fh_molprob_pdbv3_solv-octa_xplor.psf
>> bincoordinates res/play2_res.50000.coor
>> binvelocities res/play2_res.50000.vel
>> coordinates eqm/play2.coor
>> extendedSystem res/play2_res.50000.xsc #eqm/play2.xsc
>> set outputname eqm/play2more2
>> firsttimestep 0
>> colvars on
>> colvarsConfig distance_restraint2.in
>> colvarsInput res/play2_res.colvars.state
>> #temperature $temperature
>> # Output
>> outputName $outputname
>> restartName res/play2more2.res
>> margin 5 #Allows volume to change when moving from NVT to NPT
>> langevinPiston on
>> constraints off
>> run 50000 ;#1000ps equilibration
>> puts [format "STATUS: Heating stage complete"]
>>
>>
>> ###############################################################################
>>
>>
>> The colvars file on my last run was:
>>
>> #TrajFrequency 100
>> colvarsRestartFrequency 10000
>> colvar {
>> name d
>> distance {
>> group1 {
>> atomNumbers 1608
>> }
>> group2 {
>> atomNumbers 2025
>> }
>> }
>> }
>> harmonic {
>> colvars d
>> centers 6.695159
>> targets 2.0
>> targetsnumsteps 50000
>> forceConstant 25.0
>> forceConstantTarget 25.0
>> }
>>
>>
>> And this time I'm aiming for:
>>
>> #TrajFrequency 100
>> colvarsRestartFrequency 10000
>> colvar {
>> name d
>> distance {
>> group1 {
>> atomNumbers 1608
>> }
>> group2 {
>> atomNumbers 2025
>> }
>> }
>> }
>> colvar {
>> name f
>> distance {
>> group1 {
>> atomNumbers 2096
>> }
>> group2 {
>> atomNumbers 1237
>> }
>> }
>> }
>> harmonic {
>> colvars d
>> centers 2.0
>> targets 2.0
>> targetsnumsteps 50000
>> forceConstant 25.0
>> forceConstantTarget 25.0
>> }
>> harmonic {
>> colvars f
>> centers 13.81
>> targets 2.0
>> targetsnumsteps 50000
>> forceConstant 25.0
>> forceConstantTarget 25.0
>> }
>>
>> Any help would be appreciated.
>>
>> Jon Phillips
>>
>>
>>
>> This message and any attachment are intended solely for the addressee and
>> may contain confidential information. If you have received this message in
>> error, please send it back to me, and immediately delete it.   Please do not
>> use, copy or disclose the information contained in this message or in any
>> attachment.  Any views or opinions expressed by the author of this email do
>> not necessarily reflect the views of the University of Nottingham.
>>
>> This message has been checked for viruses but the contents of an
>> attachment
>> may still contain software viruses which could damage your computer
>> system:
>> you are advised to perform your own checks. Email communications with the
>> University of Nottingham may be monitored as permitted by UK legislation.
>>
>
>
>
> --
> Aron Broom M.Sc
> PhD Student
> Department of Chemistry
> University of Waterloo
>

This archive was generated by hypermail 2.1.6 : Mon Dec 31 2012 - 23:21:24 CST