autodataming的个人博客分享 http://blog.sciencenet.cn/u/autodataming

博文

VMD 笔记

已有 1508 次阅读 2016-5-28 17:19 |个人分类:软件|系统分类:科研笔记

VMD

查看python解释器路径和版本

import sys
sys.executable

在VMD 中遇到一个奇怪的事

在文本信息窗口,gopython后

发现python的版本是2.5

路径是/usr/bin/python

python的2.7版本。

虽然有点奇怪,但是经过测试发现是可以用的。

--------------------------------

我的安装和配置如下:

step1. WIN10 系统打开子系统 ubuntu

step2. 下载linux 预编译版本vmd

step3.  tar -vxzf vmd1.9.4*tar.gz

step4. cd vmd1.9.4*

step5. ./configure

step6. cd src; make install

默认安装在 /usr/local/bin/vmd

step7 mv /usr/local/bin/vmd /usr/local/bin/vmd194


step8 安装并启动 xming;

step9 ubuntu中设置display端口 export DISPLAY=localhost:0;

step10 启动 vmd1941

测试python 接口

在extension->tkconsole 中是无法调用gopython 启动python接口的

需要在tk 文本模式,也就是ubunbu 终端输入gopython 进入python模式

>>> from molecule import *
>>> from atomsel import atomsel

在tkconsole中输入mol new 4hbk 下载并载入蛋白结构。

>>> ca=atomsel('name CA')
>>> ca
atomsel('name CA', molid=0, frame=-1)
>>> len(ca)
301
>>> ca.get('resname')




Does VMD have any hot keys for changing the mode?Yes, look in the section of the manual describing the hot keys.By default, 'r' changes to rotation, 't' to translation, and 's'to scaling


VMD中的python 接口,

我进行了如下尝试

win下安装预编译的VMD1.9.3, 无法使用python接口,gopython 无法使用。


linux下预编译的VMD1.9.4,可以使用python接口。通过xmanger连接服务器,操作图形界面卡断严重。

内置的python 在/usr/local/lib/vmd194/vmd/scripts/python 路径下面,版本是2.5.1 。

vmd > mol new 4hbk
  The PDB is supported by RCSB, the NSF, US PHS, NIH, NCRP, NIGMS, NLM,
and US DoE, who are not liable for the data.  PDB files shall not be
sold.  See ftp://ftp.rcsb.org/advisory.doc for full details.
Info) Using plugin webpdb for structure file 4hbk
Info) Using plugin webpdb for coordinates from file 4hbk
Info) Determining bond structure from distance search ...
Info) Analyzing structure ...
Info)    Atoms: 2677
Info)    Bonds: 2507
Info)    Angles: 0  Dihedrals: 0  Impropers: 0  Cross-terms: 0
Info)    Bondtypes: 0  Angletypes: 0  Dihedraltypes: 0  Impropertypes: 0
Info)    Residues: 526
Info)    Waters: 225
Info)    Segments: 1
Info)    Fragments: 227   Protein: 2   Nucleic: 0
0
Info) Finished with coordinate file 4hbk.
vmd > gopython
Info) Starting Python...
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ValueError: vmdnumpy module not available.
Info) Text interpreter now Python
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/vmd194/vmd/scripts/python/Tkinter.py", line 59, in <module>
    import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
>>> import sys
>>> print sys.path
['/usr/local/lib/vmd194/vmd', '/usr/local/lib/vmd194/vmd/scripts/python', '/usr/local/lib/vmd194/vmd/plugins/noarch/python', '/home/johns/vmd/lib/python/Python-2.5.1/lib_LINUXAMD64/lib/python25.zip', '/home/johns/vmd/lib/python/Python-2.5.1/lib_LINUXAMD64/lib/python2.5/', '/home/johns/vmd/lib/python/Python-2.5.1/lib_LINUXAMD64/lib/python2.5/plat-linux2', '/home/johns/vmd/lib/python/Python-2.5.1/lib_LINUXAMD64/lib/python2.5/lib-tk', '/home/johns/vmd/lib/python/Python-2.5.1/lib_LINUXAMD64/lib/lib-dynload']
>>> print su
Traceback (most recent call last):
  File "VMD", line 1, in <module>
NameError: name 'su' is not defined
>>> print sys.version
2.5.1 (r251:54863, Sep  7 2007, 15:42:54)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-8)]


编译安装VMD.







https://wap.sciencenet.cn/blog-950202-980863.html

上一篇:VMD 批量下载蛋白
下一篇:各种电荷的计算方法和软件

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2022-1-29 14:32

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部