Skip to content

Commit

Permalink
qe build script using gnu libs, remove unused pseudos
Browse files Browse the repository at this point in the history
  • Loading branch information
pranabdas committed Sep 3, 2023
1 parent 27aaeef commit 0040964
Show file tree
Hide file tree
Showing 13 changed files with 564 additions and 37,361 deletions.
12 changes: 9 additions & 3 deletions docs/welcome.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Density Functional Theory using Quantum Espresso
sidebar_label: Welcome
slug: /
keywords: ["DFT", "first principles calculation", "Angstrom to Bohr converter", "Angstrom to Bohr conversion"]
keywords: ["DFT", "first principles calculation", "Angstrom to Bohr converter"]
---

This tutorial is result of my personal notes while trying (which I still do) to
Expand All @@ -13,16 +13,22 @@ find this tutorial helpful.

The quantum espresso input files, jupyter notebooks (containing python code for
visualizations), and other source files related to this tutorial can be found on
GitHub: [pranabdas/espresso](https://github.com/pranabdas/espresso/). You may clone
the repository to your local machine:
GitHub: [pranabdas/espresso](https://github.com/pranabdas/espresso/). You may
clone the repository to your local machine:

```bash
git clone https://github.com/pranabdas/espresso.git
```

Or, if you do not have git installed, download zipped copy of the repository
[here](https://github.com/pranabdas/espresso/archive/refs/heads/main.zip).

## Filename conventions

Lately, I decided to follow specific pattern for the filenames, but you can
choose whatever works best for you. Note that all example files in this
tutorial does not follow this convention yet.

```
{program}.{calculation}.{system}.{in, out}
{program}.{calculation}.{system_description}.{in, out}
Expand Down
874 changes: 484 additions & 390 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
```console
cwebp [-q 80] input_file -o output_file.webp
```

The `cwebp` binary stored in this repo is a `linux-x86-64` build. For other OS,
please download from the above url.
Binary file modified scripts/cwebp
Binary file not shown.
2 changes: 1 addition & 1 deletion scripts/pbs_job.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ source /etc/profile.d/rec_modules.sh
module load espresso6.5-intel_18
## module load espresso6.5-Centos6_Intel
cd $PBS_O_WORKDIR;
np=$( cat ${PBS_NODEFILE} |wc -l );
np=$( cat ${PBS_NODEFILE} | wc -l );
mpirun -np $np -f ${PBS_NODEFILE} pw.x -inp qe-scf.in > qe-scf.out
67 changes: 67 additions & 0 deletions scripts/qe_gnu_libxc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
#!/bin/bash
# bash qe_gnu_libxc.sh

# exit upon any command failure
set -e

QE_VER="7.2"
LIBXC_VER="6.2.0"
INSTALL_PATH="/workspaces/applications"
NUM_PROCS=4
export LIBXCROOT="/opt/libxc"
export OMP_NUM_THREADS=1
BUILD_DIR="/tmp"
CWD=${PWD}

cd ${BUILD_DIR}

if [ ! -d ${INSTALL_PATH} ]; then
sudo mkdir -p ${INSTALL_PATH}
fi

sudo apt update && sudo apt upgrade -y
sudo apt install --no-install-recommends -y \
autoconf \
build-essential \
ca-certificates \
gfortran \
libblas3 \
libopenblas-dev \
libc6 \
libfftw3-dev \
libgcc-s1 \
liblapack-dev \
libopenmpi-dev \
libscalapack-openmpi-dev \
libelpa17 \
wget

wget http://www.tddft.org/programs/libxc/down.php?file=${LIBXC_VER}/libxc-${LIBXC_VER}.tar.gz -O libxc-${LIBXC_VER}.tar.gz
tar -zxf libxc-${LIBXC_VER}.tar.gz
rm libxc-${LIBXC_VER}.tar.gz
cd libxc-${LIBXC_VER}
./configure --prefix=${LIBXCROOT} CC=gcc FC=gfortran
make -j${NUM_PROCS}
sudo make install
cd ..
rm -rf libxc-${LIBXC_VER}

wget https://gitlab.com/QEF/q-e/-/archive/qe-${QE_VER}/q-e-qe-${QE_VER}.tar.gz
tar -zxf q-e-qe-${QE_VER}.tar.gz
rm q-e-qe-${QE_VER}.tar.gz
cd q-e-qe-${QE_VER}

./configure CC=mpicc FC=mpifort F77=mpifort F90=mpifort \
MPIF90=mpif90 --prefix=${INSTALL_PATH}/qe-${QE_VER} --with-libxc --with-libxc-prefix=${LIBXCROOT} --enable-openmp
# there is race condition affecting parallel builds, retrying once seems to work
make -j${NUM_PROCS} all || { echo "Retrying..."; make clean; make -j$NUM_PROCS all; }
sudo make install
cd ..
rm -rf q-e-qe-${QE_VER}

cat << EOF | tee -a ~/.bashrc > /dev/null
export OMP_NUM_THREADS=1
export PATH="${INSTALL_PATH}/qe-${QE_VER}/bin:\$PATH"
EOF

cd ${CWD}
18,458 changes: 0 additions & 18,458 deletions src/pseudos/Al.pbe-n-kjpaw_psl.1.0.0.UPF

This file was deleted.

1,078 changes: 0 additions & 1,078 deletions src/pseudos/As.pz-bhs.UPF

This file was deleted.

6,061 changes: 0 additions & 6,061 deletions src/pseudos/O.pbe-rrkjus.UPF

This file was deleted.

1,229 changes: 0 additions & 1,229 deletions src/pseudos/O_ONCV_PBE-1.2.upf

This file was deleted.

2,042 changes: 0 additions & 2,042 deletions src/pseudos/Si.pbe-rrkj.UPF

This file was deleted.

895 changes: 0 additions & 895 deletions src/pseudos/Si.vbc.UPF

This file was deleted.

7,204 changes: 0 additions & 7,204 deletions src/pseudos/Zn.pbe-van.UPF

This file was deleted.

0 comments on commit 0040964

Please sign in to comment.