Rate This Document
Findability
Accuracy
Completeness
Readability

Installing CTFFIND

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Obtain the CTFFIND installation package.
    wget https://grigoriefflab.umassmed.edu/system/tdf?path=ctffind-4.1.14.tar.gz&file=1&type=node&id=26
  3. Decompress the CTFFIND installation package.
    tar -zxvf  ctffind-4.1.14.tar.gz
  4. Go to the directory generated after the decompression.
    cd ctffind-4.1.14
  5. Modify the src/core/matrix.cpp file.
    1. Open src/core/matrix.cpp.
      vi src/core/matrix.cpp
    2. Press i to enter the insert mode and modify the content in line 7:

      Before the modification:

      7  #define _AL_SINCOS(x, s, c)  __asm__ ("fsincos" : "=t" (c), "=u" (s) : "0" (x))

      After the modification:

      7 #define _AL_SINCOS(x, s, c)   s = sinf(x);  c = cosf(x);

      After performing 5.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Perform the compilation and installation.
    yum install -y libjpeg* libtiff* fftw*
    autoreconf -f -i
    ./configure --prefix=/path/to/ctffind --disable-mkl --enable-openmp --enable-debugmode
  7. Modify the Makefile file.
    1. Open Makefile.
      vi Makefile
    2. Press i to enter the insert mode and change -O2 in CFLAGS CPPFLAGS CXXFLAGS to -O0.

      Before the modification:

      296 CFLAGS = -g -O2
      297 CPP = clang -E
      298 CPPFLAGS = -O2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEBUG
      299 CXX = clang++
      300 CXXCPP = clang++ -E
      301 CXXDEPMODE = depmode=gcc3
      302 CXXFLAGS = -O2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEBUG  -fopenmp

      After the modification:

      296 CFLAGS = -g –O0
      297 CPP = clang -E
      298 CPPFLAGS = -O0 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEBUG
      299 CXX = clang++
      300 CXXCPP = clang++ -E
      301 CXXDEPMODE = depmode=gcc3
      302 CXXFLAGS = -O0 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DDEBUG  -fopenmp
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  8. Perform the compilation and installation.
    make & make install
  9. Set the environment variables.
    export PATH=/path/to/install/ctffind/bin:$PATH