marrink-lab / vermouth-martinize

Describe and apply transformation on molecular structures and topologies
Apache License 2.0
95 stars 43 forks source link

Deferring #394

Closed Tsjerk closed 2 years ago

Tsjerk commented 2 years ago

This PR changes file_writer.open to file_writer.deferred_open and adds defer_writing=TRUE as boolean keyword argument to writing functions, so as to allow both direct as well as deferred writing (e.g. in write_pdb). Overwriting the function 'open' with file_writer.DeferredWriter().open was never a good idea.

Tsjerk commented 2 years ago

Looks good to me. One request though. In bin/martinize2:pdb_to_universal there is some logic involving the write_graph/repair/canon that can/should now be simplified.

Added changes in martinize2.

pckroon commented 2 years ago

The failing test is hypothesis finding a unicorn, pylint failure seems a bug in pylint, since the score should be more than high enough, docs failure seems due to a change in nx. Approved for merging.