当前位置: 首页 > 图灵资讯 > 技术篇> 在Linux上安装和使用免费版本的PyMol

在Linux上安装和使用免费版本的PyMol

来源:图灵教育
时间:2023-07-02 17:13:09

在Linux上安装和使用免费版本的PyMol_h5

本文主要介绍了在Linux平台下安装开源版Pymol的简单方法。由于官方主要提供商业版本的安装方法,只有Windows系统下的编译包才能提供whl安装包平台。事实上,在Anaconda库中有一个开源版本的pymol。顺便说一句,借这篇文章来推广它。

技术背景

PyMol是一种类似VMD的分子可视化工具,也是在PyQT的基础上开发的。但由于其商业运营,软件分为三个版本:教育版、开源版和商业版。教育版会有水印,商业版会收费,但官方不会提供开源版的安装方法。根据参考链接1的内容,可以在Windows系统上安装开源版Pymol,但发行版只有Windows平台的编译包。因此,如果需要在Linux上安装PyMol,只能在Github上下载源码进行编译和构建。

然而,经过几次尝试,在编译过程中会遇到很多问题,尤其是在手动构建netcdf时,这些问题总是表明它们无法构建。经过多个平台的搜索,我们最终发现anaconda的库中有一个名为pymol-open-source详见参考链接2。这个包是PyMol的开源版,但是在网上很难找到这个包的相关信息。它不仅是开源版,而且几乎支持整个平台的使用。本文主要简要介绍了包的安装和简单使用。

安装pymol-open-source

直接执行本地conda环境下的下列指令,即可自动完成安装:

$ conda install -c conda-forge pymol-open-sourceCollecting package metadata (current_repodata.json): doneSolving environment: done==> WARNING: A newer version of conda exists. <==  current version: 23.1.0  latest version: 23.5.0Please update conda by running    $ conda update -n base -c defaults condaOr to minimize the number of packages updated during conda update use     conda install conda=23.5.0## Package Plan ##  environment location: /home/dechin/Anaconda3//envs/mindsponge  added / updated specs:    - pymol-open-sourceThe following packages will be downloaded:    package                    |            build    ---------------------------|-----------------    glm-0.9.9.8                |       h00ab1b0_0         213 KB  conda-forge    hdf5-1.12.2                |nompi_h4df4325_101         3.2 MB  conda-forge    libnetcdf-4.8.1            |nompi_h21705cb_104         1.5 MB  conda-forge    pymol-open-source-2.5.0    |   py39hc95a48e         6.8 MB  conda-forge    xorg-libxau-1.0.11         |       hd590300_0          14 KB  conda-forge    ------------------------------------------------------------                                           Total:        11.7 MBThe following NEW packages will be INSTALLED:  c-ares             conda-forge/linux-64::c-ares-1.19.1-hd590300_0   curl               conda-forge/linux-64::curl-8.1.2-h409715c_0   dbus               anaconda/pkgs/main/linux-64::dbus-1.13.18-hb2f20db_00   expat              conda-forge/linux-64::expat-2.5.0-hcb278e6_1   fontconfig         conda-forge/linux-64::fontconfig-2.14.2-h14ed4e7_   gettext            conda-forge/linux-64::gettext-0.21.1-h2707fc_   glew               conda-forge/linux-64::glew-2.1.0-h9c3ff4c_2   glib               conda-forge/linux-64::glib-2.76.3-hfc55251_000   glib-tools         conda-forge/linux-64::glib-tools-2.76.3-hfc55251_000   glm                conda-forge/linux-64::glm-0.9.9.8-h00ab1b0   gst-plugins-base   anaconda/pkgs/main/linux-64::gst-plugins-base-1.14.1-h6a678d_   gstreamer          anaconda/pkgs/main/linux-64::gstreamer-1.14.1-h5eee18b_   hdf4               conda-forge/linux-64::hdf4-4.2.15-h9772cbc_5   hdf5               conda-forge/linux-64::hdf5-1.12.2-nompi_h4df4325_101   icu                conda-forge/linux-64::icu-58.2-hf44d3e_10000   keyutils           conda-forge/linux-64::keyutils-1.6.-h166bdaf_00   krb5               conda-forge/linux-64::krb5-1.20.1-h81ceb04   libaec             conda-forge/linux-64::libaec-1.0.6-hcb278e6_1   libclang           anaconda/pkgs/main/linux-64::libclang-10.0.1-default_hb85057a_2   libcurl            conda-forge/linux-64::libcurl-8.1.2-h409715c_0   libedit            conda-forge/linux-64::libedit-3.1.20191231-he28a2e2_2   libev              conda-forge/linux-64::libev-4.33-h516909a_1   libevent           conda-forge/linux-64::libevent-2.1.12-hf998b51_1   libexpat           conda-forge/linux-64::libexpat-2.5.0-hcb278e6_1   libglib            conda-forge/linux-64::libglib-2.76.3-hebfc3b9_00   libglu             conda-forge/linux-64::libglu-9.0.0-hac7e632_1002   libiconv           conda-forge/linux-64::libiconv-1.17-h16bdaf_00   libllvm10          conda-forge/linux-64::liblvm10-10.0.1-he513fc3_3   libnetcdf          conda-forge/linux-64::libnetcdf-4.8.1-nompi_h21705cb_104   libnghttp2         conda-forge/linux-64::libnghttp2-1.52.0-h61bc06f_00   libpq              anaconda/pkgs/main/linux-64::libpq-12.15-hdbd6064_   libsh2            conda-forge/linux-64::libsh2-1.11.0-h0841786_0   libxcb             conda-forge/linux-64::libxcb-1.15-h0b41bf4_00   libxkbcommon       anaconda/pkgs/main/linux-64::libxkbcommon-1.0.1-hfa300c1_0   libxml2            anaconda/pkgs/main/linux-64::libxml2-9.9.14-h74e7548_0   libxslt            anaconda/pkgs/main/linux-64::libxslt-1.1.35-h4e12654_0   libzip             conda-forge/linux-64::libzip-1.9.2-hc929e4a_1   nspr               conda-forge/linux-64::nspr-4.35-h27087fc_0   nss                conda-forge/linux-64::nss-3.89-he45b914_0   pcre2              conda-forge/linux-64::pcre2-10.40-hc3806b_00   ply                conda-forge/noarch::ply-3.11-py_1   pmw                conda-forge/linux-64::pmw-2.0.1-py39hf3d152e_   pthread-stubs      conda-forge/linux-64::pthread-stubs-0.4-h36c2ea0_1000   pymol-open-source  conda-forge/linux-64::pymol-open-source-2.5.py39hc95a48e   pyqt               anaconda/pkgs/main/linux-64::pyqt-5.15.7-py39h6a678d_   pyqt5-sip          anaconda/pkgs/main/linux-64::pyqt5-sip-12.11.0-py39h6a678d_   qt-main            anaconda/pkgs/main/linux-64::qt-main-5.15.2-h327a75a_7   qt-webengine       anaconda/pkgs/main/linux-64::qt-webengine-5.15.9-hd2092_4   qtwebkit           anaconda/pkgs/main/linux-64::qtwebkit-5.212-h4eab89a_4   sip                conda-forge/linux-64::sip-6.6.2-py39h5a03fae_00   sqlite             anaconda/pkgs/main/linux-64::sqlite-3.41.2-h5eee18b_   toml               conda-forge/noarch::toml-0.10.2-pyhd8ed1ab_0   xorg-kbproto       conda-forge/linux-64::xorg-kbproto-1.0.7-h7f98852_1002   xorg-libx11        conda-forge/linux-64::xorg-libx11-1.8.6-h8ee46fc_00   xorg-libxau        conda-forge/linux-64::xorg-libxau-1.0.11-hd590300_0   xorg-libxdmcp      conda-forge/linux-64::xorg-libxdmcp-1.1.3-h7f98852_0   xorg-libxext       conda-forge/linux-64::xorg-libxext-1.3.4-h0b41bf4_2   xorg-xextproto     conda-forge/linux-64::xorg-xextproto-7.3.0-h0b41bf4_1003   xorg-xproto        conda-forge/linux-64::xorg-xproto-7.0.31-h7f98852_1007 The following packages will be SUPERSEDED by a higher-priority channel:  ca-certificates    anaconda/pkgs/main::ca-certificates-2~ --> conda-forge::ca-certificates-2023.5.7-hbcca054_00   certifi            anaconda/pkgs/main/linux-64::certifi-~ --> conda-forge/noarch::certifi-2023.5.7-pyhd8ed1ab_0 Proceed ([y]/n)? yDownloading and Extracting Packages                                                                                  Preparing transaction: done                                                       Verifying transaction: done                                                       Executing transaction: done

安装完成后,直接输入终端命令行窗口pymol您可以打开Pymol界面。点击File->Open导入pdb文件等相关分子构象输入文件,如下图所示,是导入pdb文件后的效果图。

在Linux上安装和使用免费版本的PyMol_h5_02

总结概要

本文主要介绍了在Linux平台下安装开源版Pymol的简单方法。由于官方主要提供商业版本的安装方法,只有Windows系统下的编译包才能提供whl安装包平台。事实上,在Anaconda库中有一个开源版本的pymol。顺便说一句,借这篇文章来推广它。

版权声明

作者ID:DechinPhy

腾讯云专栏同步:https://cloud.tencent.com/developer/column/91958

51CTO同步链接:https://blog.51cto.com/u_15561675

参考链接
  1. https://anaconda.org/conda-forge/pymol-open-source