The archive of Environ can be downloaded from the QE-Forge portal. After extraction of the archive (e.g. 'tar -xzf Environ-0.1.tgz'), the Environ/ directory needs to be placed inside the main directory of the Qauntum-ESPRESSO (QE) distribution that requires to be patched. In the following such a directory will be referred to as QE-main-dir.
Installation instructions are summarized in the README file inside the main Environ/ directory and reported in the following:
-1. Configure QE following the standard procedure (running './configure' from QE-main-dir should be enough in most cases).
0. Compile QE without the Environ module (running 'make pw' from QE-main-dir).
If there are problems with the preliminary steps, look up for solutions on the PW forum or Quantum-Espresso webpage.
For PW and NEB:
1. In QE-main-dir/ run the script addsonpatch.sh
./install/addsonpatch.sh Environ Environ/src Modules -patch
2. In QE-main-dir/PW/src dir run
3. In QE-main-dir/install/ dir run
./makedeps.sh -addson Modules Modules
4. In QE-main-dir re-compile pw.x and neb.x
5. Run pw.x (or neb.x) with -environ flag, e.g.
pw.x -environ < pwinput > pwoutput
6. In the QE-main-dir/make.sys file generated by ./configure add -D__ENVIRON to the MANUAL_DFLAGS variable.
7. In QE-main-dir/install/ dir run
8. In QE-main-dir compile tddfpt
9. Run the executables with -environ flag.
For CP (only starting from QE-5.3.0):
10. In CPV/src dir run
11. In install dir run
12. In QE main dir re-compile cp
13. Run cp.x with argument cp.x -environ
It is possible to revert the Quantum-ESPRESSO package to a pristine (Environ-free) state by following these steps:
1. In QE main dir run the script addsonpatch.sh
./install/addsonpatch.sh Environ Environ/src Modules -revert
2. In PW/src dir run
3. In CPV/src dir run
4. Be sure to remove objects, modules and executables