isayevlab / pka-ani Goto Github PK
View Code? Open in Web Editor NEWAccurate prediction of protein pKa with representation learning
License: Other
Accurate prediction of protein pKa with representation learning
License: Other
Following the instructions but got this...
~> conda install -c conda-forge torchani=2.2.0 cudatoolkit=11.2
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
Current channels:
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
Say you have a list of titratable residues [3, 4, 1, 2, 3, 1, 2] out of a list of 4 residues each (1, 2, 3, 4) for 3 separate chains. In such a case, the current code will try to compute a pKa prediction for residues 1 and 2 for chain 1, even though they are not listed. This is because the list of titratable residues will be [3, 4, 1, 3, 1, 2] and in the current code it only checks if 1 and 2 are in the titratable list, doesn't check for chain ID.
See the response of the program to the test PDB files that I have given. The first one gives a pKa prediction of a bunch of extraneous residues (simply copying the previous titratable residue's descriptors and model). The second one runs into a runtime error because it tries to find a prediction/model when none has been assigned yet (because the "if titratable" clause gets triggered by a future residue with the same number on a different chain).
1brs.pdb.txt
6oge_clean.pdb.txt
I will shortly make a pull request where I tweak the storage of titratable residues to also include chain, so now the pKa prediction will only happen if the residue is one of the titratable residues, and the check for the exact residue and chain is more precise. You can check the output log for the difference in pKa prediction list new vs. old version of the calculate_pkaani() function.
During the first run, the script complained about missing sklearn
module:
(pka-ani) user@machine /path/pKa-ANI $ pkaani -i XXX.pdb
Loading pKa-ANI Models and ANI-2x...
Traceback (most recent call last):
File "/path/miniconda3/envs/pka-ani/bin/pkaani", line 33, in <module>
sys.exit(load_entry_point('pkaani==0.1.0', 'console_scripts', 'pkaani')())
File "/path/miniconda3/envs/pka-ani/lib/python3.10/site-packages/pkaani-0.1.0-py3.10.egg/pkaani/run.py", line 131, in main
pkadict=calculate_pka(pdbfiles,writefile=True)
File "/path/miniconda3/envs/pka-ani/lib/python3.10/site-packages/pkaani-0.1.0-py3.10.egg/pkaani/pkaani.py", line 30, in calculate_pka
asp_model=joblib.load(os.path.join(os.path.dirname(__file__),'models/ASP_ani2x_FINAL_MODEL_F100.joblib'))
File "/path/miniconda3/envs/pka-ani/lib/python3.10/site-packages/joblib/numpy_pickle.py", line 587, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/path/miniconda3/envs/pka-ani/lib/python3.10/site-packages/joblib/numpy_pickle.py", line 506, in _unpickle
obj = unpickler.load()
File "/path/miniconda3/envs/pka-ani/lib/python3.10/pickle.py", line 1213, in load
dispatch[key[0]](self)
File "/path/miniconda3/envs/pka-ani/lib/python3.10/pickle.py", line 1538, in load_stack_global
self.append(self.find_class(module, name))
File "/path/miniconda3/envs/pka-ani/lib/python3.10/pickle.py", line 1580, in find_class
__import__(module, level=0)
ModuleNotFoundError: No module named 'sklearn'
After the installation, it also complains about possible sklearn
version conflicts.
Loading pKa-ANI Models and ANI-2x...
/path/miniconda3/envs/pka-ani/lib/python3.10/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator DecisionTreeRegressor from version 1.0.2 when using version 1.1.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
warnings.warn(
/path/miniconda3/envs/pka-ani/lib/python3.10/site-packages/sklearn/base.py:329: UserWarning: Trying to unpickle estimator RandomForestRegressor from version 1.0.2 when using version 1.1.1. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
warnings.warn(
Downloading ANI model parameters ...
Finished Loading.
Maybe it would be more convenient to provide the full .yml
file with hardcoded versions.
Hello developers, the version of scikit-learn required for pKa-ANI to run is rather old (1.0.2). The present version is 1.4.2 with 1.5.0 on the way. I wonder if there is any plan on updating that dependency at all. If I run pKa-ANI with the latest scikit-learn I'm getting the following exception:
/Users/lpravda/mambaforge/envs/fresh/lib/python3.11/site-packages/sklearn/base.py:376: InconsistentVersionWarning: Trying to unpickle estimator DecisionTreeRegressor from version 1.0.2 when using version 1.4.2. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
warnings.warn(
Traceback (most recent call last):
File "/Users/lpravda/mambaforge/envs/fresh/bin/pkaani", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/lpravda/mambaforge/envs/fresh/lib/python3.11/site-packages/pkaani/run.py", line 111, in main
pkadict=calculate_pka(pdbfiles,writefile=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lpravda/mambaforge/envs/fresh/lib/python3.11/site-packages/pkaani/pkaani.py", line 30, in calculate_pka
asp_model=joblib.load(os.path.join(os.path.dirname(__file__),'models/ASP_ani2x_FINAL_MODEL_F100.joblib'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lpravda/mambaforge/envs/fresh/lib/python3.11/site-packages/joblib/numpy_pickle.py", line 658, in load
obj = _unpickle(fobj, filename, mmap_mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/lpravda/mambaforge/envs/fresh/lib/python3.11/site-packages/joblib/numpy_pickle.py", line 577, in _unpickle
obj = unpickler.load()
^^^^^^^^^^^^^^^^
File "/Users/lpravda/mambaforge/envs/fresh/lib/python3.11/pickle.py", line 1213, in load
dispatch[key[0]](self)
File "/Users/lpravda/mambaforge/envs/fresh/lib/python3.11/site-packages/joblib/numpy_pickle.py", line 402, in load_build
Unpickler.load_build(self)
File "/Users/lpravda/mambaforge/envs/fresh/lib/python3.11/pickle.py", line 1718, in load_build
setstate(state)
File "sklearn/tree/_tree.pyx", line 865, in sklearn.tree._tree.Tree.__setstate__
File "sklearn/tree/_tree.pyx", line 1571, in sklearn.tree._tree._check_node_ndarray
ValueError: node array from the pickle has an incompatible dtype:
- expected: {'names': ['left_child', 'right_child', 'feature', 'threshold', 'impurity', 'n_node_samples', 'weighted_n_node_samples', 'missing_go_to_left'], 'formats': ['<i8', '<i8', '<i8', '<f8', '<f8', '<i8', '<f8', 'u1'], 'offsets': [0, 8, 16, 24, 32, 40, 48, 56], 'itemsize': 64}
- got : [('left_child', '<i8'), ('right_child', '<i8'), ('feature', '<i8'), ('threshold', '<f8'), ('impurity', '<f8'), ('n_node_samples', '<i8'), ('weighted_n_node_samples', '<f8')]
- ```
Thank you!
Hello everyone. Pkaani does not support mmcif files issued by wwPDB. With the PDB format being obsolete for quite some time now, it would be great if the package supports the wwPDB standard format. I wonder if you will be adding the mmcif read support any time soon.
Cheers!
Hi guys again,
I've noticed that the pkaani modifies the structure (minimization, atom addition, ligand removal), I wonder if you could add a mode to make pkaani computation more configurable and flexible. What I'm thinking of is:
Would you consider a PR with the modified behaviour?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.