haddocking / pdb-tools

A dependency-free cross-platform swiss army knife for PDB files.
https://haddocking.github.io/pdb-tools/
Apache License 2.0
372 stars 113 forks source link

Using pdb-tools as a lib (also) #106

Closed joaomcteixeira closed 2 years ago

joaomcteixeira commented 3 years ago

Hi @haddocking/pdb-tools

I have encounter already three to four cases where independent projects wanted to import pdb-tools as library. Despite pdb-tools was not initially designed to be imported and used, it is actually not hard to modify the code to have a reasonably nice lib interface. The most important change is not standardize the names of the functions within each tool. Namely, the functions that perform the logic should have all the same name. run or exec are good names for that. When using pdb-tools as lib, the functions main and check_input will likely not be used.

I will propose a PR with those changes. I will not break any backwards compatibility, I will keep a reference to the old names.

Let me know your thoughts, Cheers,