diff --git a/Dockerfile b/Dockerfile index 4f1503d..c104994 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,6 +16,8 @@ RUN cp /home/${NB_USER}/opt/lammps/src/lmp_serial /usr/bin/lmp_serial USER ${NB_USER} +ENV JUPYTER_TERMINAL_IDLE_TIMEOUT=3600 + RUN rm -rf /home/${NB_USER}/opt/lammps/ RUN pip install --user skmatter @@ -28,6 +30,10 @@ RUN pip install --user aiida-cp2k RUN pip install --user spglib +RUN pip install pythtb + +RUN conda install -c conda-forge mpi4py + COPY configs /home/${NB_USER}/configs COPY before-notebook.d/* /usr/local/bin/before-notebook.d/ diff --git a/before-notebook.d/71_setup_stm.sh b/before-notebook.d/71_setup_stm.sh new file mode 100755 index 0000000..912e157 --- /dev/null +++ b/before-notebook.d/71_setup_stm.sh @@ -0,0 +1,12 @@ + +#!/bin/bash -e + +# Debugging. +set -x + +if verdi code list | grep -q 'stm@localhost'; then + echo "STM code found" +else + echo "STM code not found, creating" + verdi code create core.code.installed --config /home/${NB_USER}/configs/stm.yaml +fi diff --git a/before-notebook.d/72_setup_stm_tools.sh b/before-notebook.d/72_setup_stm_tools.sh new file mode 100755 index 0000000..3c0f6b9 --- /dev/null +++ b/before-notebook.d/72_setup_stm_tools.sh @@ -0,0 +1,21 @@ + +#!/bin/bash -e + +# Debugging. +set -x + + +if [ -d "/home/jovyan/soft/" ]; then + echo "Directory /home/jovyan/soft/ exists." +else + echo "Directory does not exist. Creating" + mkdir /home/jovyan/soft + mkdir /home/jovyan/soft/cp2k-spm-tools +fi + +if [ -f "/home/jovyan/soft/cp2k-spm-tools/cube_from_wfn.py" ]; then + echo "cp2k-spm-tools found" +else + echo "cp2k-spm-tools not found, installing" + git clone https://github.com/nanotech-empa/cp2k-spm-tools.git /home/jovyan/soft/cp2k-spm-tools +fi diff --git a/configs/stm.yml b/configs/stm.yml new file mode 100644 index 0000000..84260d4 --- /dev/null +++ b/configs/stm.yml @@ -0,0 +1,8 @@ +label: "stm" +description: "stm code from https://github.com/nanotech-empa/cp2k-spm-tools.git" +default_calc_job_plugin: "nanotech_empa.stm" +filepath_executable: "/home/jovyan/soft/cp2k-spm-tools/stm_sts_from_wfn.py" +computer: "localhost" +prepend_text: " " +append_text: " " +use_double_quotes: "False"