prody / ProDy

A Python Package for Protein Dynamics Analysis
http://prody.csb.pitt.edu
Other
431 stars 156 forks source link

AttributeError: 'EMDMAP' object has no attribute 'numAtoms' #989

Closed 0xDBFB7 closed 4 years ago

0xDBFB7 commented 4 years ago

This isn't important, but: when running the CryoEM parseEMD tutorial with make_nodes set,

emd = parseEMD('3mkb.ccp4', cutoff=1.2, n_nodes=50, num_iter=30, map=True, make_nodes=True) I get:

  File "/usr/local/lib/python3.5/dist-packages/prody/proteins/emdfile.py", line 91, in parseEMD
    result = parseEMDStream(emdStream, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/prody/proteins/emdfile.py", line 189, in parseEMDStream
    atomgroup.numAtoms(), atomgroup.numCoordsets()))
AttributeError: 'EMDMAP' object has no attribute 'numAtoms'

map=False works fine.

The order of return values for parseEMDLine has recently been swapped twice; it looks like a bug might have crept in? I'm not sure what the desired order is.

Thanks so much! Great software.

jamesmkrieger commented 4 years ago

Thanks for spotting this. Yes, I've swapped the order over to try and make something more intuitive and consistent with the rest of ProDy. _parseEMDLines had emd, atomgroup like parsePDB has header, atomgroup but parseEMD didn't match. I just made a fix so now it does again.

Best wishes James

jamesmkrieger commented 4 years ago

I'll merge my bug fix and then you should be able to use it again