Comments (4)
Do we intend to wrap the periodic box as its own class? Or do we just have the thing that contains it know how to serialize/deserialize that attribute? I don't immediately see a need for a separate class in this case.
How do we want to handle rounding issues in floats/float arrays? I see a few possibilities:
- Equality/hashing of these attributes is based on the serialized form:
serialized = original.to_serialized() deserialized = from_serialized(serialized) reserialized = deserialized.to_serialized() serialized == reserialized # this is true, so use it for the internal equality check # note that we do not require exact equality of deserialized == original
- Equality/hashing based on UUID. If we don't create a wrapper class for boxes, then we only need the UUID in the molecular system container class.
- Use a binary format for serialization.
This issue will be closely tied to #87; it might be best to combine them into one.
from openfe.
Yeah the box is essentially an "item" in the state (see #85) as this can change the energy of the system. Because there's only 6 values which completely define a box (for a triclinic cell which covers most/all? cases) we can just dump 6 doubles (aka 6x8 bytes) of raw bits. This should mean we can get perfect reproduction, I think this is option 3 below.
Yeah serialisation and hashing might end up one and the same.
from openfe.
Still not clear whether this is actually a separate class to create (possibly more a discussion for #85) -- does it have any functionality other than holding data? If not, then it seems like just an attribute of something else (probably the solvent container, otherwise the overall molecular system container).
If we're good with serialization here being non-human-readable, then I assume we'll just do ndarray.tobytes()
?
I've always stored the full 3x3 array just for clarity (I don't think the extra few bytes is a major storage issue here). Relevant information for OpenMM: http://docs.openmm.org/latest/userguide/theory/05_other_features.html#periodic-boundary-conditions. Note the hard requirement on that set of inequalities -- this can be an issue with rounding (solved by passing input vectors through openmm.app.internal.unitcell.reducePeriodicBoxVectors
before going to OpenMM; this is a common problem when setting up from a low-precision format like XTC).
from openfe.
This is part of the gufe.ChemicalSystem.__hash__
, went for box.to_bytes()
to get its hash
from openfe.
Related Issues (20)
- Solvent padding description HOT 3
- Prepare release announcement for social media HOT 1
- Frequent "Should have \sum_n W_nk = 1" errors in analysis HOT 4
- Add a warning/note in the setup that protein inputs may need to be equilibrated before running RBFE? HOT 1
- Get macos-12+, including osx-arm64 (i.e. macos-latest) runners working in CI HOT 1
- [docs] Showcase notebook failing to render HOT 2
- Unpin rdkit on mypy HOT 3
- Run through tutorial using 1.0 release HOT 3
- mark gaff tests as xfail HOT 1
- [docs] find new home for `OpenFE_showcase_1_RBFE_of_T4lysozyme.ipynb` example
- Using customized force field for small molecules HOT 8
- raise a warning if a user supplies an unsupported key in a settings yaml
- CalledProcessError: 9 HOT 2
- Fix OpenFE tests to match main on Lomap
- Validate OpenFE working on latest of our key tools
- Add rever instructions to release instructions in the wiki
- Add install instructions for the conda lock files
- Issue with PyMBAR4
- Using OPC water models for RBFE calculations HOT 3
- Using other versions of small ligand ff (GAFF) instead of the default one HOT 1
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 openfe.