python-gaussian网络模型

pygnm的Python项目详细描述


用于高斯网络模型计算的python模块,具有集成的绘图功能。

python是一种面向对象的脚本语言,具有强大的标准和丰富的第三方库。它适合于快速灵活的代码开发。如果您不熟悉python,但知道编程,那么您可以按照python教程在几个小时内学会使用这个包。

pygnm是纯pyton代码,依赖于广泛使用的数字和图形包。所有GNM便利性和绘图功能都在本教程中进行了记录和说明。pygnm可用于分析单个蛋白质结构(参见教程)和执行多个结构的自动分析(当然还有一些python代码)。

参考文献

  • 用单参数调和势直接评价蛋白质的热涨落 I.Bahar,A.R.Atilgan和B.Erman Folding&Design 21973-1811997年。
  • 折叠蛋白质的高斯动力学 Haliloglu、T.Bahar、I.和Erman、B.Phys。修订版利特。793090-30931997年。
  • Wikipedia article

许可证

这个python包是在gnu通用公共许可下发布的。

依赖关系

生物疗法 纽比 短发 matplotlib(可选,但绘图功能需要)

安装

Linux

提取tarball内容并运行setup.py,如下所示: 焦油-xzf ppygnm-0.x.tar.gz 光盘Pygnm-0.x python setup.py安装 最后一步可能需要根访问权限。

窗口

使用可执行文件安装pygnm。

教程

本教程也包含在pygnm包中。

"""This is an example use of PyGNM, and is distributed with PyGNM package.

This example assumes that you have installed Matplotlib.
A ubiquitin structureis used in this example.
(PDB id 2BWF, Lowe et al., 2006 Acta Crystallogr., Sect. D 62:177)

"""
# Import plotting library
>>> import matplotlib.pyplot as pl

# Import GNM module from pygnm package
>>> from pygnm import GNM

# Initialize a GNM object
# Please make sure that the PDB file is in the current working directory
# You may need to download this, or another, PDB file
# Both .pdb and pdb.gz extensions are handled
>>> gnm = GNM('2BWF.pdb.gz')

# Select residues to be included in the model
# Some examples are
#      "*" and "*:*"
#        select all chains and residues
#
#      "A:x,y-z,w D:k-l G:*"
#        select residues x, y to z (inclusive),
#                     and w in chain A
#        and residues k to l (inclusive) in chain D
#        and all residues in chain G
#
#      "A B"
#        select all residues in chains A and B
#
#      "*:5-25,50-100"
#        select same set of residues in all chains
>>> gnm.select_residues('A:1-70')

# Build Kirchhoff matrix
#   cutoff=10., gamma=1.0 are default values, and may be omitted
>>> gnm.set_kirchhoff(cutoff=10., gamma=1.0)

# Calculate GNM modes
#   An optional parameter is n_modes
#   If you want to see only 20 nonzero modes, you can set n_modes=20
#   gnm.calculate_modes(n_modes=20)
>>> gnm.calculate_modes()

# CONVENIENCE FUNCTIONS
# Get first 20 eigenvalues, including the zero eigenvalue
>>> gnm.get_eigenvalues( range(20) )
# Get first eigenvector with a nonzero eigenvalue
>>> gnm.get_eigenvectors(1)
# Get first and second modes (eigenvector^2) with nonzero eigenvalues
>>> gnm.get_modes( [1, 2] )
# Get covariance matrix (pseudo-inverse of Kirchhoff)
>>> gnm.get_covariance()
# Get cross-correlations calclated using first 9 modes (w/ nonzero eigenvalues)
>>> gnm.get_cross_correlations( range(1, 10))

# PLOTTING FUNCTIONS
# Note that before each plot command, pl.figure() function is called
# to prevent plotting over the previous figure.
# Plot eigenvector shape
>>> pl.figure()
>>> gnm.plot_eigenvector(1)

# Plot mode shape
>>> pl.figure()
>>> gnm.plot_mode(1)

# Plot bfactors from PDB file
>>> pl.figure()
>>> gnm.plot_bfactors()

# Plot GNM square-fluctuations
>>> pl.figure()
>>> gnm.plot_square_fluctuations()

# Plot GNM square-fluctuations for low frequence nonzero 10 modes
>>> pl.figure()
>>> gnm.plot_square_fluctuations(indices=range(1, 11))

# Plot GNM cross-correlations
>>> pl.figure()
>>> gnm.show_cross_correlations()

# Plot GNM cross-correlations for low frequence nonzero 10 modes
>>> pl.figure()
>>> gnm.show_cross_correlations(indices=range(1, 11))

# WRITE PDB
# Write a PDB file with square fluctuations on beta column
>>> gnm.write_pdb( bfactors=gnm.get_square_fluctuations(indices=range(1, 11)) )

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java如何将springboot war部署到debian jetty8   java破坏了函数,即使它看起来是正确的   当MockMvc不可自动编译时,java会有选择地从Spring Security向其应用单个过滤器   java AndroidStudio每秒播放n次生成的声音   JavaJBossSeam:继承的方法被拦截了吗?   ScheduledExecutorService中线程默认名称中池号的java含义   在Java中用递归方法实现类Fibonacci的递归   java虚拟路径/文件夹   java即时与ZoneDateTime。转换到另一时区   用GaussLegendre算法在java中逼近Pi   java RecyclerView findFirstVisibleItemPosition()返回1   java根据当前经过身份验证的用户的角色返回不同的JSON对象   java从内部类访问扩展类的方法   Android程序中的Java语法WRT静态方法   可选参数初始化Java字符串文字时出错