Open james-vincent opened 1 year ago
Irrelevant comment removed
It's scipy.spatial, no scipy.special:
pairwise_dist = scipy.spatial.distance.cdist(a, b, metric='euclidean')
Both scipy.spatial
and scipy.special
are required by confidence.py. The installation of AF2 requires scripy
.
I don't understand the comment. The issue I am reporting is that confidence.py does not import scipy.spatial. Should it?
If you have installed the scipy module as required by AF2, see this file, the error message should be gone. Scipy.spatial was not explicitly imported in confidence.py as you correctly pointed out, but the spatial module will be imported in other part of the code before confidence.py.
It seems after installing AF2 I have two copies of scipy, one in regular site-packages and one that comes with jax:
find ./ -name scipy -type d ./lib/python3.7/site-packages/jax/_src/scipy ./lib/python3.7/site-packages/jax/_src/third_party/scipy ./lib/python3.7/site-packages/jax/scipy ./lib/python3.7/site-packages/scipy
The one that comes with jax does not contain the spatial module:
ls ./lib/python3.7/site-packages/jax/scipy cluster interpolate ndimage.py signal.py special.py init.py fft.py linalg.py optimize sparse stats pycache
Forgot to add, jax is correct version also:
python.af2complex -c 'import jax;print(jax.version)' 0.3.25
The numpy version after instalaltion of AF2 2.3.1 did not match the version listed in af2complex requirements.txt. I reinstalled and set numpy==1.21.6. Now the example job runs correctly.
From af2complex/src/alphafold/common/confidence.py
pairwise_dist = scipy.spatial.distance.cdist(a, b, metric='euclidean') AttributeError: module 'scipy' has no attribute 'spatial'
when running example1.sh. There does not appear to be an import statement for scipy.spatial.