Skip to content

Extended dynamics for harmonic restraints#900

Open
fhh2626 wants to merge 2 commits intoColvars:masterfrom
fhh2626:harmonicDynamics2
Open

Extended dynamics for harmonic restraints#900
fhh2626 wants to merge 2 commits intoColvars:masterfrom
fhh2626:harmonicDynamics2

Conversation

@fhh2626
Copy link
Copy Markdown
Contributor

@fhh2626 fhh2626 commented Dec 14, 2025

As mentioned in issues #874 and #649, this PR enables the use of a harmonic restraint as a collective variable (CV). This allows enhanced sampling algorithms to calculate the free-energy change associated with creating or removing such a harmonic restraint. Specifically, I reimplemented the algorithm and adapted the interface suggested by Jerome:

colvarsTrajFrequency      500              
colvarsRestartFrequency   50000            

colvar {
  name d
  distance {
    group1 {
      atomnumbers   4759
    }
    group2 {
      dummyAtom (-2.543, 1.510, 0.364)    
    }
  }
}

colvar {
  name k_cv

  extendedLagrangian on
  extendedMass 1500000
  extendedLangevinDamping 5000

  lowerBoundary      0.0
  upperBoundary      1.0
  width 0.05
  
  reflectinglowerboundary  on
  reflectingupperboundary  on
  
  subtractAppliedForce     on
  
  harmonicForceConstant {
  }
}

harmonic {
  name       harm
  colvars       d
  centers       0
  forceConstant 10
  dynamicForceConstantLambda k_cv
  dynamicForceConstantExponent 4.0
}


 abf {
   colvars k_cv
   fullSamples 1000
   outputFreq  100000
   historyFreq 100000
}
metadynamics {
    colvars             k_cv
    hillWeight          0.05
    hillWidth           3.0
    wellTempered        on
    biasTemperature     3000
    keepFreeEnergyFiles on
    outputFreq   100000
}


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant