Skip to content

Commit

Permalink
added mpi4py and stm.yml and cp2k-spm-tools and increased timeout for… (
Browse files Browse the repository at this point in the history
#21)

* added mpi4py and stm.yml and cp2k-spm-tools and increased timeout for terminal

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
cpignedoli and pre-commit-ci[bot] committed Mar 23, 2024
1 parent cdd643c commit 2f25c10
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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/
12 changes: 12 additions & 0 deletions before-notebook.d/71_setup_stm.sh
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions before-notebook.d/72_setup_stm_tools.sh
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions configs/stm.yml
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 2f25c10

Please sign in to comment.