Code Monkey home page Code Monkey logo

Comments (3)

mattwthompson avatar mattwthompson commented on May 28, 2024

Thinking about this a little more, the only purpose the SMIRKS strings serve is means to point to the actual parameters/potentials/data. To enable non-1:1 mapping, this could be a dict, array, or something else. Breaking 1:1, however, makes it much more difficult for a user to get a simple answer from the slot map and take it to the potential map to get the actual parameter values.

If bonds.slot_map[(0, 1)] returned something dict-like ({'[#6X4:1]-[#6X4:2]': 0.7, '[#6:1]-[#8:2]': 0.3}) it would be more instructive, but would require a method near bonds.potentials that can gobble up that dict and return the relevant data.

I don't think hiding the mapping from the user is a good path to do down. Yes, most use cases only require filling out the system with the parametrized data. But the mapping between force field and system parameters must be transparent, and only returning data, lacking a clear source, would not be acceptable.

An in-between approach could involve storing the dict/array/etc in the PotentialHandler object and exposing some methods for the convenience of the user, i.e. as described by the bullet points above.

from openff-interchange.

mattwthompson avatar mattwthompson commented on May 28, 2024

Another thought: it might be inevitable that the current models' use of built-in types (dict, str, etc.) is not the eventual solution, which may include subclasses of those types with some custom behavior. Therefore, it may be worth exploring that option now.

from openff-interchange.

mattwthompson avatar mattwthompson commented on May 28, 2024

I think this is now handled with WrappedPotential

from openff-interchange.

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.