-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem GNM DEmo: AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count' #2049
Comments
install prody from source in development mode and build the C extensions in place |
git clone https://github.com/prody/ProDy.git |
Hi @jamesmkrieger I actually ran into this on a fresh 2.5.0 conda install yesterday. Installing from source works fine. I noticed that in the install from source, my ProDy/prody/kdtree directory looks like this:
while in the conda install (where KDTree doesn't fully work) it looks like this:
Is there something going on with the c extension compilation at install? |
Thanks Anthony. I am still working on the conda build. Maybe we need to make sure it packages more files. Where is the .so file in the install from source? Is it in the main prody directory? |
It is located here: |
Hi Any ideas abot this problem?
In [4]: from matplotlib.pylab import *
In [5]: ion() # turn interactive mode on
...:
Out[5]: <contextlib.ExitStack at 0x1080f1ae0>
In [6]: ubi = parsePDB('1aar')
...:
@> Connecting wwPDB FTP server RCSB PDB (USA).
@> Downloading PDB files via FTP failed, trying HTTP.
@> 1aar downloaded (1aar.pdb.gz)
@> PDB download via HTTP completed (1 downloaded, 0 failed).
@> 1218 atoms and 1 coordinate set(s) were parsed in 0.01s.
In [7]: ubi
Out[7]: <AtomGroup: 1aar (1218 atoms)>
In [8]: ubi = parsePDB('1aar')
...:
@> Connecting wwPDB FTP server RCSB PDB (USA).
@> Downloading PDB files via FTP failed, trying HTTP.
@> 1aar downloaded (1aar.pdb.gz)
@> PDB download via HTTP completed (1 downloaded, 0 failed).
@> 1218 atoms and 1 coordinate set(s) were parsed in 0.01s.
In [9]: calphas = ubi.select('calpha and chain A and resnum < 71')
In [10]: calphas
Out[10]: <Selection: 'calpha and chai...and resnum < 71' from 1aar (70 atoms)>
In [11]: In [8]: gnm = GNM('Ubiquitin')
In [12]: gnm.buildKirchhoff(calphas)
AttributeError Traceback (most recent call last)
Cell In[12], line 1
----> 1 gnm.buildKirchhoff(calphas)
File /opt/miniconda3/envs/prody_env_py310/lib/python3.10/site-packages/prody/dynamics/gnm.py:156, in GNMBase.buildKirchhoff(self, coords, cutoff, gamma, **kwargs)
154 kdtree = KDTree(coords)
155 kdtree.search(cutoff)
--> 156 dist2 = kdtree.getDistances() ** 2
157 r = 0
158 for i, j in kdtree.getIndices():
File /opt/miniconda3/envs/prody_env_py310/lib/python3.10/site-packages/prody/kdtree/kdtree.py:273, in KDTree.getDistances(self)
270 def getDistances(self):
271 """Returns array of distances."""
--> 273 if self.getCount():
274 if self._unitcell is None:
275 if self._neighbors is None:
File /opt/miniconda3/envs/prody_env_py310/lib/python3.10/site-packages/prody/kdtree/kdtree.py:291, in KDTree.getCount(self)
289 return self._kdtree.get_count()
290 else:
--> 291 return self._kdtree.neighbor_get_count()
292 else:
293 return len(self._pbcdict)
AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
In [13]:
The text was updated successfully, but these errors were encountered: