Comments (3)
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.
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.
I think this is now handled with WrappedPotential
from openff-interchange.
Related Issues (20)
- Expose ``SMIRNOFFXXX`` classes through public API HOT 2
- Virtual Site Parameters Don't Store Type HOT 4
- OpenMM v-site ordering does not match ``virtual_site_key_topology_index_map`` HOT 5
- `scale_12` attr missing from non-bonded handlers HOT 3
- Example view selection water HOT 3
- Hard-coded Ewald tolerance HOT 2
- Incorrect v-site positions HOT 7
- to_openmm `combine_nonbonded_forces` docstring default out-of-date HOT 1
- Charge caching doesn't check atom ordering HOT 13
- Bond information missing from water forcefields HOT 13
- Poor error handling in `Interchange.minimize` when positions are missing
- `Interchange.minimize` adds virtual sites to `Interchange.positions
- Support LJPME in OpenMM export HOT 1
- Support LJPME in GROMACS export
- Support LJPME in LAMMPS export
- Time value in inpcrd is messing up VMD visualization HOT 3
- from_openmm GAFF molecule cannt write to AMBER HOT 2
- `Interchange.to_pdb` does not work with `_SimpleAtom`s HOT 1
- Change installation instructions to recommend `mamba create` instead of `conda install`
- Allow electrostatics in single force + plugins HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openff-interchange.