marrink-lab / vermouth-martinize

Describe and apply transformation on molecular structures and topologies
Apache License 2.0
86 stars 38 forks source link

Writers and parsers should accept file handles rather than path. #435

Open pckroon opened 2 years ago

pckroon commented 2 years ago

434 quick-fixes #433, but @fgrunewald raised the good point that the true solution is to have all writers accept a file handle rather than a path. This way you could even have martinize2 write your pdb/itp/whatevers to stdout, network, or tar.

I'd argue that at the same point we want the same for all readers/parsers. Having different APIs for readers and writer is a needless complication, plus, you'd be able to do clever things with compressed files.