安装包下载:
2021年11月安装的Relion,github的版本是3.1.3
Relion3.13tar.gz包下载
链接:https://pan.baidu.com/s/1W2iCyXH0W2INKGaWAkmbqQ
提取码:kuxn
github源下载地址 这都是加速版的 可以直接 git clone 下来
v_4.0_Beat | https://github.com.cnpmjs.org/3dem/relion.git |
v_3.1.3 | GitHub - 3dem/relion: Image-processing software for cryo-electron microscopy |
历史版本下载地址 | Releases · 3dem/relion · GitHub |
码云版: https://gitee.com/YongPeng_Li/relion.git (这个是我fork过来的,境内会快一点)
用户安装手册--官网推荐:
V_4.0_Beat 安装文档:
Installation — RELION documentation ——打不开看下面英文 重要的我都标粗了
V_3.13 安装文档:
我本地用的是虚拟机安装(系统Ubuntu),不过理论都一样
安装过程中注意用户-Ubuntu的用户及用户组。不然各种测试发现安装了怎么又找不到。
这是我安装过程中遇到的两个问题
问题1:
Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
解决办法:
sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev
问题2:Package xft was not found in the pkg-config search path. Perhaps you should add the directory contai
解决办法:
sudo apt-get -y install libxft-dev
首先说下每个人的电脑环境,硬件各不相同,所以我们可能遇到各种各样的问题;不用怕问题。
步骤
首先声明 Relion 编译安装三个重要依赖库MPI、 gcc 、g++
Installation
The sections below explain how to download and install relion on your computer.
Note that relion depends on and uses several external programs and libraries.
C++ compiler:
RELION 4.0 requires a C++ compiler that fully supports the C++11 standard. For GCC, this means version 4.8.1 or later. Note that GCC 4.4, which comes with RedHat Enterprise Linux or CentOS 6.x, is too old.
To use Torch related features, you need C++14 support. For GCC, this means version 5.0 or later.
MPI: ---这个relion安装依赖,必须安装,可以看哔哩哔哩视频安装步骤
GCC、G++ 检查是否安装成功
gcc -v
g++ -v
Your system will need MPI runtime (most flavours will do). If you don’t have an MPI installation already on your system, we recommend installing OpenMPI.
CUDA:
If you have a modern GPU from nvidia with compute capability 3.5+, you can accelerate many jobs considerably. In order to compile relion with GPU-acceleration support, you’ll need to install cuda. Download it from NVIDIA website.
Note that CUDA toolkits support only a limited range of C compilers. Also note that a newer CUDA toolkit requires a newer GPU driver. Carefully read the release note and make sure you have a compatible set of GPU driver, C compiler and CUDA toolkit.
CTFFIND-4.1:
CTF estimation is not part of relion. Instead, relion provides a wrapper to Alexis Rohou and Niko Grigorieff’s ctffind 4 [RG15]. Alternatively, you may also use (the closed-source) gctf by Kai Zhang [Zha16], which may be downloaded from Kai’s website.
FLTK (only for GUI):
RELION uses FLTK as a GUI tool kit. This can be installed automatically (see below).
FFT libraries:
RELION needs an FFT library. The default is FFTW. This can be installed automatically (see below). Depending on your CPU, Intel MKL FFT or AMD optimised FFTW might run faster. See below how to use them.
libtiff:
RELION needs libtiff version >= 4.0. Most Linux distributions have packages called libtiff-dev
or libtiff-devel
. Note that you need a developer package.
libpng:
RELION needs libpng. Most Linux distributions have packages called libpng-dev
or libpng-devel
. Note that you need a developer package.
UCSF MotionCor2 (optional):
relion implements its own (CPU-only) implementation of the UCSF motioncor2 algorithm for whole-frame micrograph movie-alignment [ZPA+17]. If you want, you can still use the (GPU-accelerated) UCSF program. You can download it from David Agard’s page and follow his installation instructions. Note that using the UCSF program does not make full advantage of the opportunities provided in Bayesian polishing.
ResMap (optional):
Local-resolution estimation may be performed inside relion’s own postprocessing program. Alternatively, one can also use Alp Kucukelbir’s resmap [KST14]. Download it from Alp’s ResMap website and follow his installation instructions.
In practice, most of these dependencies can be installed by system’s package manager if you have the root priviledge.
In Debian or Ubuntu: 系统安装,下载安装MPI、gcc、g++库
sudo apt install cmake git build-essential mpi-default-bin mpi-default-dev libfftw3-dev libtiff-dev libpng-dev
In RHEL, Cent OS, Scientific Linux系统,下载安装MPI、gcc、g++库
sudo yum install cmake git gcc gcc-c++ openmpi-devel fftw-devel libtiff-devel libpng-devel
Download RELION
We store the public release versions of relion on GitHub, a site that provides code-development with version control and issue tracking through the use of git
. We will not describe the use of git in general, as you will not need more than very basic features. Below we outline the few commands needed on a UNIX-system, please refer to general git descriptions and tutorials to suit your system. To get the code, you clone or download the repository. We recommend cloning, because it allows you very easily update the code when new versions are released. To do so, use the shell command-line:
git clone https://github.com/3dem/relion.git
This will create a local Git repository. All subsequent git-commands should be run inside this directory.
Note that the beta-release of relion-4.0 is stored on a separate branch until it becomes the latest stable release. To switch to relion-4.0-beta, just type:
这个是切换版本
git checkout ver3.1.3
The code will be intermittently updated to amend issues. To incorporate these changes, use the command-line:
inside you local repository (the source-code directory downloaded). If you have changed the code in some way, this will force you to commit a local merge. You are free to do so, but we will assume you have not changed the code. Refer to external instructions regarding git and merging so-called conflicts if you have changed the code an need to keep those changes.
Compilation
relion has an installation procedure which relies on cmake
. You will need to have this program installed, but most UNIX-systems have this by default. You will need to make a build-directory in which the code will be compiled. This can be placed inside the repository:
cd relion
mkdir build
cd build
You then invoke cmake
inside the build-directoy, but point to the source-directoy to configure the installation. This will not install relion, just configure the build:
默认的编译这是关键步骤也是容易出问题的地方。根据自己电脑情况选择 后面的编译配置
cmake ..
The output will notify you of what was detected and what type of build will be installed. Because relion is rich in terms of the possible configurations, it is important to check this output. For instance:
-
The path to the MPI library.
-
GPU-capability will only be included if a CUDA SDK is detected. If not, the program will install, but without support for GPUs.
-
If FFTW is not detected, instructions are included to download and install it in a local directory known to the relion installation.
-
As above, regarding FLTK (required for GUI). If a GUI is not desired, this can be escaped as explained in the following section.
The MPI library must be the one you intend to use relion with. Compiling relion with one version of MPI and running the resulting binary with mpirun
from another version can cause crash. Note that some software packages (e.g. CCPEM, crYOLO, EMAN2) come with their own MPI runtime. Sourcing/activating their environment might update PATH
and LD_LIBRARY_PATH
environmental variables and put their MPI runtime into the highest priority.
The MPI C++ compiler (mpicxx
) and CUDA compiler (nvcc
) internally calls a C++ compiler. This must match the compiler cmake
picked up. Otherwise, the compilation might fail at the linking step.
Following the completion of cmake-configuration without errors, make
is used to install the program:
make -j N 代表编译时用CPU几个线程 数字越大越快
make -j N
make install
检查bin 目录下看是否有 relion * 如果有则编译成功,没有则编译失败。检查编译过程的的错误,根据错误日志进行查找问题。
where N
is the number of processes to use during installation. Using a higher number simply means that it will compile faster.
Take note of any warnings or errors reported. relion will be installed in the build
directory’s sub-directory called bin
. To make the installation system-wide, see below.
Wherever you install relion, make sure your PATH
environmental variable points to the directory containing relion binaries. Launching relion with a path like /path/to/relion
is not the right way; this starts the right GUI, but the GUI might invoke other versions of relion in the PATH
.
Configuration options 这是编译配置选项,
CMake allows configuration of many aspects of the installation, some of which are outlined here. Most options can be set by adding options to the cmake
configuration. Under the below subheadings, some example replacement commands are given to substitute the original configuration command. It is also recommended to clean or purge your build-directory between builds, since CMake caches some of previous configurations:
就是如果编译错误删除 build目录下的所有文档
cd build
rm -fr *
And of course, any of the below options can be combined.
Omitting the GUI: .. (default is ON)
cmake -DGUI=OFF
With this option, GUI programs (e.g. relion
, relion_manualpick
, relion_display
) are not be built and FLTK becomes unnecessary.
Using single-precision on the CPU:(default is ON)
cmake -DDoublePrec_CPU=OFF ..
This will reduce (CPU but not GPU) memory consumption to about half. This is useful when memory hungry tasks such as motion correction and Polishing run out of memory. This is safe in most cases but please use the default double precision build if CtfRefine produces NaNs.
Using double-precision on the GPU: (default is OFF)
cmake -DDoublePrec_GPU=ON ..
This will slow down GPU-execution considerably, while this does NOT improve the resolution. Thus, this option is not recommended.
Compiling GPU-code for your architecture:
cmake -DCUDA_ARCH=52 ..
(default is 35, meaning compute capability 3.5, which is the lowest supported by relion)
CUDA-capable devices have a so-called compute capability, which code can be compiled against for optimal performance. The compute capability of your card can be looked up at the table in NVIDIA website. WARNING: If you use a wrong number, compilation might succeed but the resulting binary can fail at the runtime.
Forcing build and use of local FFTW:
cmake -DFORCE_OWN_FFTW=ON ..
This will download, verify and install FFTW during the installation process.
Forcing build and use of AMD optimized FFTW:
cmake -DFORCE_OWN_FFTW=ON -DAMDFFTW=ON ..
This will download, verify and install AMD optimized version of FFTW during the installation process. This is recommended for AMD CPUs (e.g. Ryzen, Threadripper, EPYC).
Forcing build and use of Intel MKL FFT:
cmake -DMKLFFT=ON ..
This will use FFT library from Intel MKL. In contrast to the FFTW options above, this will not download MKL automatically. You have to install MKL and set relevants paths (usually by sourcing the mkl_vars.sh
script).
Forcing build and use of local FLTK:
cmake -DFORCE_OWN_FLTK=ON ..
This will download, verify and install FLTK during the installation process. If any of these are not detected during configuration, this will happen automatically anyway, and you should not have to specify the below options manually.
Specify location of libtiff:
cmake -DTIFF_INCLUDE_DIR=/path/to/include -DTIFF_LIBRARY=/path/to/libtiff.so.5
This option is to use libtiff installed in non-standard location.
Specifying an installation location:
To allow relion a system-wide installation use:
最后编译成功如果在 relion的bin目录有 relion *说明安装成功
最后就是环境变量的配置, 这个要看你的relion安装路径--
我的环境变量设置,仅供参考
vim /etc/profile
vim ~/.bashrc
启动relion
参考安装网站:
冷冻电镜图象处理初学篇-ReliOn
ASC18三维重构软件Relion的测试安装
如果没有安装上,可以邮箱发我312331378@qq.com。