Giter Site home page Giter Site logo

Comments (2)

jchodera avatar jchodera commented on August 22, 2024

In order to support the additional GB models implemented via CustomGBForce, we need to rewrite the computed value and energy expressions using these rules:

  • lambda_electrostatics is added as a global parameter:
custom_force.addGlobalParameter("lambda_electrostatics", 1.0)
  • alchemical is added as a per-particle parameter:
custom_force.addPerParticleParameter("alchemical");

All atoms in the alchemical group have this parameter set to 1; otherwise 0.

  • Any single-particle energy term (CustomGBForce.SingleParticle) is scaled by (lambda_electrostatics*alchemical+(1-alchemical))
  • Any two-particle energy term (CustomGBForce.ParticlePairNoExclusions) has charge 1 (q1) replaced by (lambda_electrostatics*alchemical1+(1-alchemical1))*q1 and charge 2 (q2) replaced by (lambda_electrostatics*alchemical2+(1-alchemical2))*q2.
  • Any single-particle computed value (CustomGBForce.SingleParticle) remains unmodified
  • Any two-particle computed value (CustomGBForce.ParticlePairNoExclusions) is scaled by (lambda_electrostatics*alchemical2 + (1-alchemical2))

Scaling of a term should always prepend and capture the value with an intermediate variable. For example, this complex expression

        self.addComputedValue("I", "Ivdw+neckScale*Ineck;"
                                   "Ineck=step(radius1+radius2+neckCut-r)*getm0(radindex1,radindex2)/(1+100*(r-getd0(radindex1,radindex2))^2+"
                                   "0.3*1000000*(r-getd0(radindex1,radindex2))^6);"
                                   "Ivdw=select(step(r+sr2-or1), 0.5*(1/L-1/U+0.25*(r-sr2^2/r)*(1/(U^2)-1/(L^2))+0.5*log(L/U)/r), 0);"
                                   "U=r+sr2;"
                                   "L=max(or1, D);"
                                   "D=abs(r-sr2);"
                                   "radius1=or1+offset; radius2=or2+offset;"
                                   "neckScale=0.361825; neckCut=0.68; offset=0.009", CustomGBForce.ParticlePairNoExclusions)

can be scaled by prependingscaling * unscaled; unscaled =

from alchemy.

jchodera avatar jchodera commented on August 22, 2024

openmm/openmm#1641 has been merged, so I can move ahead with implementing this.

from alchemy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.