You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, writing many molecules to a file requires (1) conversion to JSON as a string, then (2) writing the string to a file.
Describe the solution you'd like Molecule supports the from_file() method, but its argument currently only accepts filename strings. Adding support for file-like objects would make it much more flexible in being able to flush its serialized contents to a file that is already open, or gzipped, etc.
Describe alternatives you've considered
This would purely be a convenience feature.
The text was updated successfully, but these errors were encountered:
Writing many molecules to a JSON file should involve getting the dictionary form of the molecule, appending to a dict or list, and writing the JSON once. Continuous JSON appending doesn’t make sense as it cannot be read back in easily.
We currently do not have any stream based formats so continuous appending would prevent multi molecule reading. I might be misunderstanding, can you provide a small use case snippet.
Is your feature request related to a problem? Please describe.
Currently, writing many molecules to a file requires (1) conversion to JSON as a string, then (2) writing the string to a file.
Describe the solution you'd like
Molecule
supports thefrom_file()
method, but its argument currently only accepts filename strings. Adding support for file-like objects would make it much more flexible in being able to flush its serialized contents to a file that is already open, or gzipped, etc.Describe alternatives you've considered
This would purely be a convenience feature.
The text was updated successfully, but these errors were encountered: