Best way to serialize an Interchange to JSON? #328
-
Can an Interchange object be serialized without choosing an application-specific representation? It would be convenient for my application to be able to serialize to JSON or a dictionary, like is possible with Molecule and Topology). I could use the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Use |
Beta Was this translation helpful? Give feedback.
-
Follow up on this, mostly a question for @mattwthompson. I am developing a MD workflow that will put
|
Beta Was this translation helpful? Give feedback.
Use
Interchange.json()
. This is supported sinceInterchange
is inherited fromBaseModel
of pydantic. Though it is not very well tested