2018年4月3日 星期二

用Python-3.6.5安裝ProDy-1.9.4

ProDy是一套分析蛋白質動態的軟體。首先《安裝Python-3.6.5到macOS Sierra》。然後用PyPI安裝一些ProDy需要的套件:
  • sudo pip3 install numpy
  • sudo pip3 install scipy
  • sudo pip3 install matplotlib
  • sudo pip3 install biopython
都安裝好以後,然後開始安裝ProDy-1.9.4:
  1. wget https://files.pythonhosted.org/packages/fe/c8/5c8642fd6630f6fe8d3bbca13c3d5f899732893762fa0d114fe863b90cf1/ProDy-1.9.4.tar.gz
  2. shasum -a 256 ProDy-1.9.4.tar.gz
    37a9777c36f49afad1842a59df20f7d5cd735b5500273d42c2988fdbf5391cb7  ProDy-1.9.4.tar.gz
  3. tar zxf ProDy-1.9.4.tar.gz && cd ProDy-1.9.4
  4. python3 setup.py build
  5. sudo python3 setup.py install
通通都安裝好以後參考ProDy的Gaussian Network Model,用下面指令打開python3:
  • /Library/Frameworks/Python.framework/Versions/3.6/bin/python3
輸入下面的程式碼,看結果
from prody import *
from matplotlib.pylab import *
ion() # turn interactive mode on

ubi = parsePDB('1aar')
ubi
calphas = ubi.select('calpha and chain A and resnum < 71')
calphas

gnm = GNM('Ubiquitin')
gnm.buildKirchhoff(calphas)
gnm.getKirchhoff()

gnm.getCutoff()
gnm.getGamma()

gnm.calcModes()
gnm.getEigvals().round(3)
gnm.getEigvecs().round(3)
gnm.getCovariance().round(2)
 
slowest_mode = gnm[0]
slowest_mode.getEigval().round(3)
slowest_mode.getEigvec().round(3)

hinges = gnm.getHinges()
hinges[:5]
gnm.getHinges(0)
gnm[0].getHinges()
gnm[:2].getHinges()

showContactMap(gnm);
showCrossCorr(gnm);
showMode(gnm[0], hinge=True, zero=True);
grid();

showSqFlucts(gnm[0], hinge=True);
showProtein(calphas, mode=gnm[0]); 

_EOF_

沒有留言:

張貼留言