incorporating pKa-ANI into pdb2pqr#435
Conversation
|
@kiyoon @sobolevnrm @seankhl Has anyone been able to take a look at this? I was very excited to share this with the community and I'm bummed it was met with radio silence, but I understand people are busy. Would one of you be able to start the CI testing workflows so I can test the code if necessary? It would be best to start the CI workflows now so I can get started as early as possible on changing anything that breaks in the CI workflows. |
|
It looks like two linting tests failed. Can you please fix those and then I will review? This code is now a hobby for me, so I maintain it when I have time—which is less than I’d like. Sorry for the delays. |
|
How to fix those formatting issues is described here: https://github.com/Electrostatics/pdb2pqr/blob/master/CONTRIBUTING.md#do-not-submit-messy-code |
|
Made the changes, should pass the tests now hopefully! |
|
@sobolevnrm CI checks have now passed - I wrote some test code that should hopefully make review easier, comparing the protonation state assignment of pKa-ANI with that of propka on a couple of PDB files |
|
@sobolevnrm Have you been able to take a look? |
No. |
|
After installing with Full example: @sobolevnrm ➜ /workspaces/pdb2pqr (pka-ani_py310) $ pdb2pqr
/usr/local/python/3.12.1/lib/python3.12/site-packages/torchani/aev.py:16: UserWarning: cuaev not installed
warnings.warn("cuaev not installed")
/usr/local/python/3.12.1/lib/python3.12/site-packages/torchani/__init__.py:61: UserWarning: Dependency not satisfied, torchani.data will not be available
warnings.warn("Dependency not satisfied, torchani.data will not be available")
usage: pdb2pqr [-h] [--ff {AMBER,CHARMM,PARSE,TYL06,PEOEPB,SWANSON}] [--userff USERFF] [--clean] [--nodebump] [--noopt] [--keep-chain] [--assign-only]
[--ffout {AMBER,CHARMM,PARSE,TYL06,PEOEPB,SWANSON}] [--usernames USERNAMES] [--apbs-input APBS_INPUT] [--pdb-output PDB_OUTPUT] [--ligand LIGAND]
[--whitespace] [--neutraln] [--neutralc] [--drop-water] [--include-header] [--titration-state-method {propka,pkaani}] [--with-ph PH] [-f FILENAMES]
[-r REFERENCE] [-c CHAINS] [-i TITRATE_ONLY] [-t THERMOPHILES] [-a ALIGNMENT] [-m MUTATIONS] [-p PARAMETERS]
[--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-o PH] [-w WINDOW WINDOW WINDOW] [-g GRID GRID GRID] [--mutator MUTATOR]
[--mutator-option MUTATOR_OPTIONS] [-d] [-l] [-k] [-q] [--protonate-all] [--version]
input_path output_pqr
pdb2pqr: error: the following arguments are required: input_path, output_pqr |
sobolevnrm
left a comment
There was a problem hiding this comment.
Please see my requested changes. I'd also recommend adding some documentation on usage (including reasons why people should choose pkaANI) -- we can start a conversation thread in the PR about how best to do this.
|
@sobolevnrm In response to your observation of the warnings - The first one: requires a fairly involved installation of The second one: Simply requires installation of |
Added some documentation and a reference to the paper about why people should use pKa-ANI and how the model was built |
In that case, can you suppress the warning with |
|
Yes, just pushed a commit in which I filtered the warnings. Also now the warnings only come up if we actually use pKa-ANI - because of @kiyoon's request to create a separate install like |
|
I haven't taken a close look but at a glance (and as a third party to all of this work) the current implementation looks solid to me. Thanks for your work on this, @sastrys1! |
|
@seankhl Thank you so much! @sobolevnrm Sorry for the delay, reformatted the file with ruff and now everything should be good to go. |
|
Is there anything remaining I need to do to get this pull request merged in and get it released as part of PDB2PQR? |
|
@kiyoon do you want to review before I merge this? |
|
I read the changes briefly, looks good to me, but I haven't gotten a chance to really test it |
|
@sastrys1 it doesn't look like the tests you added are actually running? Otherwise, things seem to be working fine. I'll accept this PR once we get tests working, unless @kiyoon wants to take a closer look at it. |
|
@kiyoon @sobolevnrm Apologies for the long delay in response - was caught up with other research responsibilities. I rewrote the tests to mirror the propka pytest framework with some PDB files, a few local files and one pulling from the Protein Data Bank. I ran the tests using the command |
|
@sobolevnrm @kiyoon Have you been able to see if the tests are working now? |
|
Unfortunately, I have not. It is on my to-do list. Thanks for your patience. |
|
@sastrys1 this has been merged. Thank you for your changes and my apologies for the delays. |
|
Any chance for a release to be made for this very nice feature? |
|
Yes, when I find time. We are always looking for volunteers to help with this effort... |
|
For example, this merge seems to have broken our build pipeline. It would be great to:
|
|
@sobolevnrm I believe the pipeline broke here because the pkaani test cases require I think if we included |
|
We can install with pkaani group dependencies, yes, but make sure you install torch in CPU version because installing GPU version will drastically slow down the pipeline for no reason. We can use We just need to add |
Finally, incorporated pKa-ANI with pdb2pqr and added three test PDBs into the
testsfolder.I thought testing this at pH 5.0 would be a good idea because the vast majority of the histidines should be protonated and vast majority of ASP/GLU should be deprotonated. pKa-ANI is able to do this slightly more consistently than propka.
On my list now is to incorporate energy minimization into pKa-ANI's calculation - @kiyoon @sobolevnrm would you want this feature in PDB2PQR? Energy minimization does have a non-trivial impact on pKa-ANI's results