mosdef-hub / gmso

Flexible storage of chemical topology for molecular simulation
https://gmso.mosdef.org
MIT License
52 stars 32 forks source link

Standardize file readers and writers #461

Open uppittu11 opened 3 years ago

uppittu11 commented 3 years ago

There should be a standard format for file readers and writers so that they can be consistent and extensible. Standardization could be enforced by defining an abstract class that each reader/writer inherits from (pydantic could help with this). But before we get started on this we should agree on what components need to be in the abstract class. @mosdef-hub/mosdef-contributors, what are everyone's thoughts on this?

Related to #51

rsdefever commented 3 years ago

Standardization sounds good. I'll edit this comment later and add as needed.

justinGilmer commented 3 years ago

Possible ideas:

RainierBarrett commented 3 years ago

Correct me if I misremember these: Warnings should be issued for when writing a file type that would incur some information loss. An example mentioned was "standard" .xyz files vs cassandra .xyz, or writing .gro files from fully-parametrized FFs.

uppittu11 commented 3 years ago

So here are the components of a file reader/writer mentioned yesterday and in the comments above:

Also we would want to include intermediate abstract classes for writers with many styles (i.e. cassandra xyz vs standard xyz, or GOMC psf vs CHARMM psf, etc.)

I think this is enough to get started on a PR, but feel free to keep posting suggestions.