Acellera / moleculekit

MoleculeKit: Your favorite molecule manipulation kit
Other
198 stars 37 forks source link

Avoid multiple, redundant queries to PDB #88

Closed alejandrovr closed 2 years ago

alejandrovr commented 2 years ago

Molecule('3PTB') should download once, write to a pdb in working directory and check if f'{pdb_code}.pdb' exists before querying again.

stefdoerr commented 2 years ago

I don't think it's a good idea. It's shady behaviour since the user is not notified and it will fill up random directories full of files and leave it up to the user to clean them up. The user can just specify to save the file if they want to use it multiple times with mol.write

On Thu, Dec 23, 2021, 21:22 Alejandro Varela Rial @.***> wrote:

Molecule('3PTB') should download once, write to a pdb in working directory and check if f'{pdb_code}.pdb' exists before querying again.

— Reply to this email directly, view it on GitHub https://github.com/Acellera/moleculekit/issues/88, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB4RLAT2W3MHH2VAVDOJNFDUSNZIDANCNFSM5KVLSESA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

alejandrovr commented 2 years ago

what about a Molecule('3PTB', cache=True) or specify it in a config file, like the number of cpus?

stefdoerr commented 2 years ago

I'm not a fan. I don't see the point since you can save the file as I said. This is only an issue if you write some script processing hundreds of PDB codes at which point you should just save them manually.

alejandrovr commented 2 years ago

ok, i see your point... closing!