-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON roundtrip doesn't work with from_openmm
generated system
#1003
Comments
Note: it's not isolated to SystemGenerator from openff.interchange import Interchange
from openff.toolkit import Molecule, ForceField
from openff.units import unit
import numpy as np
import os
os.environ['INTERCHANGE_EXPERIMENTAL'] = "1"
mol = Molecule.from_smiles("CC")
mol.generate_conformers()
sage = ForceField("openff-2.0.0.offxml")
cubic_box = unit.Quantity(30 * np.eye(3), unit.angstrom)
interchange = Interchange.from_smirnoff(topology=[mol], force_field=sage, box=cubic_box)
interchange.positions = mol.conformers[0]
interchange2 = Interchange.from_openmm(interchange.to_openmm(), interchange.to_openmm_topology())
Interchange.parse_raw(interchange2.json()) |
This looks similar to openforcefield/openff-toolkit#1783 ... which in that thread I insist was fixed in the version you're using ... hmm The issue here is with the toolkit / how information is passed between Interchange and the toolkit since |
This is unlikely to land before 0.4.0 but I hope to take a closer look at this soon. I assume the use case is simple on the surface (save state out to JSON, trust that it'll be loaded back and represent the same state) but I anticipate the work will mostly be in gathering up and testing various corner cases. |
Description
Interchange.parse_raw()
yields aKeyError: 'name'
when passing a JSON generated from an Interchange object that was created from an OpenMM System & Topology (viaInterchange.from_openmm
).Note: the openmm System & Topology were created using SystemGenerator.
Reproduction
Output
Click me
Software versions
conda list
?Click me
The text was updated successfully, but these errors were encountered: