Code Monkey home page Code Monkey logo

Comments (11)

pgrinaway avatar pgrinaway commented on June 19, 2024

This is the problem that @jchodera is observing with the lack of bond. Parmed does not perceive constraints, and so there is just no bond. I'm going to add the constraint stuff in the next PR.

from perses.

pgrinaway avatar pgrinaway commented on June 19, 2024

Discussed in here.

from perses.

pgrinaway avatar pgrinaway commented on June 19, 2024

Constraint tolerance is a context parameter in OpenMM, no? Is there a good way to deal with this in GeometryEngine?

from perses.

jchodera avatar jchodera commented on June 19, 2024

Constraint tolerance is an integrator parameter!
http://docs.openmm.org/6.3.0/api-python/classsimtk_1_1openmm_1_1openmm_1_1Integrator.html#a311f37a6d317055063bd8b390ba47737

from perses.

pgrinaway avatar pgrinaway commented on June 19, 2024

Oops. Thanks! Still not accessible to GeometryEngine as written, though. Should GeometryEngine accept constraint tolerance as a parameter? Should it be in the constructor?

from perses.

jchodera avatar jchodera commented on June 19, 2024

Oops. Thanks! Still not accessible to GeometryEngine as written, though. Should GeometryEngine accept constraint tolerance as a parameter? Should it be in the constructor?

Are we talking about constraint tolerance or what kind of bond constraints to use?

We definitely want to specify what kind of bond constraints to use, but that is permitted already. See this example. Note that these are all changed to constraints=None in my PR #109

from perses.

pgrinaway avatar pgrinaway commented on June 19, 2024

Constraint tolerance. GeometryEngine can figure out whether all bonds or H bonds are constrained (but not whether there are angle constraints) in the current code. I assume that bond_length-constraint will not always be exactly 0, and I assumed that the constraint_tolerance would be a good tolerance.

if np.abs(bond_length-constraint)<constraint_tolerance:
    logp_bond = 0.0
else:
    logp_bond = -np.inf

from perses.

jchodera avatar jchodera commented on June 19, 2024

I'm confused. Doesn't GeometryEngine take a System as input? The System allows you to enumerate which bonds are constrained via

for index in range(system.getNumConstraints()):
   [atom1, atom2, r] = system.getConstraint(index)

from perses.

pgrinaway avatar pgrinaway commented on June 19, 2024

Yes, I know that. I can tell which bonds are constrained. The problem is comparing the constraint to the actual bond length, and determining whether that difference is within the tolerance.

from perses.

pgrinaway avatar pgrinaway commented on June 19, 2024

if we did something like

if np.abs(bond_length-constraint)==0.0:
    logp_bond = 0.0
else:
    logp_bond = -np.inf

it would probably fail every time.

from perses.

pgrinaway avatar pgrinaway commented on June 19, 2024

Concluded that we will assume constraints are iterated to convergence, so if there is a bond constraint, we will use a logp of 0.0.

Resolved in #113

from perses.

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.