Install pARTn for Quantum ESPRESSO

Using make

  1. First configure QE. For QE-7.2 or newer, you have to enable the plugins:

    cd /path/to/QE
    ./configure --enable-legacy_plugins
    
  2. Run the configure of pARTn, giving the flag --with-qe and the path QE_PATH= to the root directory of QE:

    cd /path/to/artn-plugin
    ./configure --with-qe QE_PATH=/path/to/qe
    

    At the end of configure, you should get all further instructions printed on the screen. They should be pretty much as follows:

  3. Compile the pARTn library:

    make lib
    
  4. If this is the first time you are compiling pARTn for QE, you will need to execute a patch command. This command will patch the QE file plugin_ext_forces.f90 with a call to pARTn, and add the pARTn library to QE libraries.

    make patch-qe
    
  5. Then you will most likely need to re-compile pw of QE:

    cd /path/to/QE
    make pw -j2
    

Now you are ready to launch QE, perhaps test your compilation by running the example examples/QE.Al-vacancy.d, which should run quite fast even in a serial calculation:

cd /path/to/artn-plugin/examples/QE.Al-vacancy.d
./path/to/QE/bin/pw.x -partn < relax.Al-vacancy.in

Note

  • QE versions < 7.1: the configure of QE in step 1) is done without --enable-legacy_plugins;

  • QE version 7.1 is not supported;

  • QE version 7.2 needs a minor modification in the code to work properly.

Using cmake

  • If you already have a version of QE on the computer, then execute the following. Replace <my_builddir> with the name of desired build directory of pARTn, and insert a valid absolute path </path/to/qe>.

    cd /path/to/artn-plugin
    
    # configure; replace <my_builddir> and </path/to/qe>
    cmake -B <my_builddir> -DWITH_QE=yes -DQE_PATH=</path/to/qe>
    
    # build, optionally with <N> processes
    cmake --build <my_builddir>  -j <N>
    

    Note

    If QE was built with cmake, then QE_PATH should point to the build directory.
    If QE was built with make, then QE_PATH should point to the root directory.
  • If you do not have a QE version on the computer, and wish to fetch it from git, then you can skip the argument -D QE_PATH=..., as:

    cd /path/to/artn-plugin
    
    # this will clone QE/master from git; replace <my_builddir>
    cmake -B <my_builddir> -DWITH_QE=yes
    
    # compile pw with pARTn; insert <N> for number of processes
    cmake --build <my_builddir> --target pw -j <N>
    

    The pw binary should be then located in <my_builddir> path.