From 707082b3d3ee5ee5310450ed2ec10f5e5709233c Mon Sep 17 00:00:00 2001 From: WilleBell Date: Tue, 18 Jun 2024 14:35:28 +0200 Subject: [PATCH 1/5] adding easyconfigs: VASPKIT-1.5.1-foss-2023a.eb and patches: VASPKIT-1.5.1_fix-envvars.patch --- .../v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb | 42 ++++++++++++++ .../v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch | 55 +++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb create mode 100644 easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch diff --git a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb new file mode 100644 index 00000000000..631de907883 --- /dev/null +++ b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb @@ -0,0 +1,42 @@ +easyblock = 'Tarball' + +name = 'VASPKIT' +version = '1.5.1' + +homepage = 'https://vaspkit.com/' +description = """ +VASPKIT aims at providing a powerful and user-friendly interface to perform high throughput +analysis of various material properties from the raw calculated data using the widely-used +VASP code. +""" + +toolchain = {'name': 'foss', 'version': '2023a'} + +dependencies = [ + ('Python', '3.11.3'), + ('matplotlib', '3.7.2'), +] + +source_urls = [SOURCEFORGE_SOURCE] +sources = ['%(namelower)s.%(version)s.linux.x64.tar.gz'] +patches = ['%(name)s-1.5.1_fix-envvars.patch'] +checksums = [ + {'vaspkit.1.5.1.linux.x64.tar.gz': '41bbdc0759f72cd43ef7e2f541d228a639bd95dba2a549398b28f47d760d72b1'}, + {'VASPKIT-1.5.1_fix-envvars.patch': '029296de0ba7b14177891b58e2f1c635fb1a5f7a1b34f44b5af90e4c578b9b3e'}, +] + +sanity_check_paths = { + 'files': ["bin/vaspkit", "how_to_set_environment_variables"], + 'dirs': ["bin"], +} + +# remove setup.sh to avoid users to run it +postinstallcmds = ['rm %(installdir)s/setup.sh'] + +modloadmsg = """ +When using this module for the first time run: +cp $EBROOTVASPKIT/how_to_set_environment_variables ~/.vaspkit +and modify paths set in ~/.vaspkit as needed. +""" + +moduleclass = 'tools' diff --git a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch new file mode 100644 index 00000000000..b4c5ff129ec --- /dev/null +++ b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch @@ -0,0 +1,55 @@ +Set correct environment variables and translate example job script to slurm +Author: Cintia Willemyns (Vrije Universiteit Brussel) +diff -Naur vaspkit.1.5.1.orig/how_to_set_auto_plot vaspkit.1.5.1/how_to_set_auto_plot +--- vaspkit.1.5.1.orig/how_to_set_auto_plot 2024-06-18 10:57:18.521696013 +0200 ++++ vaspkit.1.5.1/how_to_set_auto_plot 2024-06-18 11:55:12.298424299 +0200 +@@ -1,7 +1,7 @@ + (1) Make sure you have installed python3, numpy, scipy, matplotlib, etc. + (2) Add the following parameters in the ~/.vaspkit file; + ####################################################################### +- PYTHON_BIN ~/anaconda3/bin/python3 ++ PYTHON_BIN $EBROOTPYTHON/bin/python3 + AUTO_PLOT .TRUE. + ####################################################################### + (3) Copy the plot presets from the vaspkit/how_to_set_environment_variable file to the ~/.vaspkit file. Must copy the block from #BEGIN_CUSTOMIZE_PLOT to #END_CUSTOMIZE_PLOT. +diff -Naur vaspkit.1.5.1.orig/how_to_set_environment_variables vaspkit.1.5.1/how_to_set_environment_variables +--- vaspkit.1.5.1.orig/how_to_set_environment_variables 2024-06-18 10:57:17.784058000 +0200 ++++ vaspkit.1.5.1/how_to_set_environment_variables 2024-06-18 11:54:49.187479137 +0200 +@@ -1,11 +1,11 @@ + # cp how_to_set_environment_variables ~/.vaspkit and modify the ~/.vaspkit file based on the settings in your supercomputer! + # All environment variables are case sensitive. + VASP5 = .TRUE. # .TRUE. or .FALSE.; Set .FALSE. if you are using vasp.4.x +-LDA_PATH = ~/POTCAR/LDA # Path of LDA potential +-PBE_PATH = ~/POTCAR/PBE # Path of PBE potential +-GGA_PATH = ~/POTCAR/GGA # Path of PW91 potential +-VASPKIT_UTILITIES_PATH = ~/vaspkit/utilities # Path of VASPKIT +-PYTHON_BIN = ~/anaconda3/bin/python3 # Python executable program with its installation path. Recommend Anaconda package ++LDA_PATH = # Path of LDA potential ++PBE_PATH = # Path of PBE potential ++GGA_PATH = # Path of PW91 potential ++VASPKIT_UTILITIES_PATH = $EBROOTVASPKIT/utilities # Path of VASPKIT ++PYTHON_BIN = $EBROOTPYTHON/bin/python3 # Python executable program with its installation path. Recommend Anaconda package + POTCAR_TYPE = PBE # PBE, PW91 or LDA; Set PBE if you want to make PBE-POTCAR file + GW_POTCAR = .FALSE. # .TRUE. or .FALSE.; For example, H_GW, O_GW will be chose when POTCAR_GW set to .TRUE. + RECOMMENDED_POTCAR = .TRUE. # .TRUE. or .FALSE.; The recommended PAW potential will be chose when RECOMMENDED_POTCAR set to .TRUE. +@@ -69,12 +69,14 @@ + #| Must copy the block from #BEGIN_CUSTOMIZE_JOB_SCRIPT to #END_CUSTOMIZE_JOB_SCRIPT | + #+------------------------------------------------------------------------------------------------------------------+ + #BEGIN_CUSTOMIZE_JOB_SCRIPT +-#PBS -N name +-#PBS -o out +-#PBS -e err +-#PBS -l nodes=2:ppn=4 +-#PBS -r y +-cd $PBS_O_WORKDIR ++#!/bin/bash ++#SBATCH --job-name=name # Job name ++#SBATCH --output=out # Standard output ++#SBATCH --error=err # Standard error ++#SBATCH --nodes=2 # Number of nodes ++#SBATCH --ntasks-per-node=4 # Number of tasks per node ++#SBATCH --requeue # Requeue the job if it fails ++cd $SLURM_SUBMIT_DIR + mpirun -np 8 vasp_std > vasp-out + #END_CUSTOMIZE_JOB_SCRIPT + #+------------------------------------------------------------------------------------------------------------------+ From c6f7855fc7e8d4d46b11beb0e0c888c7ca030f73 Mon Sep 17 00:00:00 2001 From: WilleBell Date: Tue, 18 Jun 2024 14:53:19 +0200 Subject: [PATCH 2/5] Add instructions to set paths --- .../v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb | 4 ---- .../v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch | 19 +++++++++++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb index 631de907883..201dc9f0dbe 100644 --- a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb +++ b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb @@ -20,10 +20,6 @@ dependencies = [ source_urls = [SOURCEFORGE_SOURCE] sources = ['%(namelower)s.%(version)s.linux.x64.tar.gz'] patches = ['%(name)s-1.5.1_fix-envvars.patch'] -checksums = [ - {'vaspkit.1.5.1.linux.x64.tar.gz': '41bbdc0759f72cd43ef7e2f541d228a639bd95dba2a549398b28f47d760d72b1'}, - {'VASPKIT-1.5.1_fix-envvars.patch': '029296de0ba7b14177891b58e2f1c635fb1a5f7a1b34f44b5af90e4c578b9b3e'}, -] sanity_check_paths = { 'files': ["bin/vaspkit", "how_to_set_environment_variables"], diff --git a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch index b4c5ff129ec..c98c98025d9 100644 --- a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch +++ b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch @@ -1,4 +1,4 @@ -Set correct environment variables and translate example job script to slurm +Set correct environment variables, add instructions to set POTCAR paths, translate example job script to slurm Author: Cintia Willemyns (Vrije Universiteit Brussel) diff -Naur vaspkit.1.5.1.orig/how_to_set_auto_plot vaspkit.1.5.1/how_to_set_auto_plot --- vaspkit.1.5.1.orig/how_to_set_auto_plot 2024-06-18 10:57:18.521696013 +0200 @@ -14,9 +14,11 @@ diff -Naur vaspkit.1.5.1.orig/how_to_set_auto_plot vaspkit.1.5.1/how_to_set_auto (3) Copy the plot presets from the vaspkit/how_to_set_environment_variable file to the ~/.vaspkit file. Must copy the block from #BEGIN_CUSTOMIZE_PLOT to #END_CUSTOMIZE_PLOT. diff -Naur vaspkit.1.5.1.orig/how_to_set_environment_variables vaspkit.1.5.1/how_to_set_environment_variables --- vaspkit.1.5.1.orig/how_to_set_environment_variables 2024-06-18 10:57:17.784058000 +0200 -+++ vaspkit.1.5.1/how_to_set_environment_variables 2024-06-18 11:54:49.187479137 +0200 -@@ -1,11 +1,11 @@ ++++ vaspkit.1.5.1/how_to_set_environment_variables 2024-06-18 13:59:20.120174533 +0200 +@@ -1,11 +1,13 @@ # cp how_to_set_environment_variables ~/.vaspkit and modify the ~/.vaspkit file based on the settings in your supercomputer! ++# Modify paths as needed, e.g if you want to make PBE-POTCAR file, use POTCAR_TYPE = PBE and set the PBE_PATH to where you unzipped the VASP PAW_PBE pseudo potentials. ++# Do not modify VASPKIT_UTILITIES_PATH or PYTHON_BIN paths! # All environment variables are case sensitive. VASP5 = .TRUE. # .TRUE. or .FALSE.; Set .FALSE. if you are using vasp.4.x -LDA_PATH = ~/POTCAR/LDA # Path of LDA potential @@ -32,7 +34,16 @@ diff -Naur vaspkit.1.5.1.orig/how_to_set_environment_variables vaspkit.1.5.1/how POTCAR_TYPE = PBE # PBE, PW91 or LDA; Set PBE if you want to make PBE-POTCAR file GW_POTCAR = .FALSE. # .TRUE. or .FALSE.; For example, H_GW, O_GW will be chose when POTCAR_GW set to .TRUE. RECOMMENDED_POTCAR = .TRUE. # .TRUE. or .FALSE.; The recommended PAW potential will be chose when RECOMMENDED_POTCAR set to .TRUE. -@@ -69,12 +69,14 @@ +@@ -42,7 +44,7 @@ + INTERPOLATION_SPACING = 0.04 # Determines the number of interpolation grids, in unit of A in real-space or 1/A in reciprocal space (default: 0.04) + INTERPOLATION_METHOD = 'cubic' # 'linear', 'cubic' (3rd order-spline interpolation), quartic (4th order-spline interpolation), or FFT available only for 2D and 3D grids (default method: 'cubic') + AUTO_SUBMIT_JOB = .FALSE. # .TRUE. or .FALSE. (default: .FASLE.). Whether to auto-submit vaspkit or vasp job or not. +-SUBMIT_JOB_COMMAND = 'qsub job.sh' # The command line to submit job ++SUBMIT_JOB_COMMAND = '' # The command line to submit job + AUTO_PLOT = .FALSE. # TRUE. or .FALSE. (default: .FASLE.). Whether to auto-plot data graphs in the post-processing. + + # New added in Version 1.4.1 +@@ -69,12 +71,14 @@ #| Must copy the block from #BEGIN_CUSTOMIZE_JOB_SCRIPT to #END_CUSTOMIZE_JOB_SCRIPT | #+------------------------------------------------------------------------------------------------------------------+ #BEGIN_CUSTOMIZE_JOB_SCRIPT From 423282fcac7e8784438af1e957273f5de40d4a7e Mon Sep 17 00:00:00 2001 From: WilleBell Date: Tue, 18 Jun 2024 15:00:16 +0200 Subject: [PATCH 3/5] Add checksums --- easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb index 201dc9f0dbe..1ce5a1fcb0d 100644 --- a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb +++ b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb @@ -20,6 +20,10 @@ dependencies = [ source_urls = [SOURCEFORGE_SOURCE] sources = ['%(namelower)s.%(version)s.linux.x64.tar.gz'] patches = ['%(name)s-1.5.1_fix-envvars.patch'] +checksums = [ + {'vaspkit.1.5.1.linux.x64.tar.gz': '41bbdc0759f72cd43ef7e2f541d228a639bd95dba2a549398b28f47d760d72b1'}, + {'VASPKIT-1.5.1_fix-envvars.patch': '1c29a5e25c1308cbbcf6ed5aae456cb57e6cf465a34a09b5fac5cacc473ffbd5'}, +] sanity_check_paths = { 'files': ["bin/vaspkit", "how_to_set_environment_variables"], From 5cf09e73082321800988fdddba29b570268ab99a Mon Sep 17 00:00:00 2001 From: Sam Moors Date: Fri, 27 Sep 2024 16:45:24 +0200 Subject: [PATCH 4/5] update instructions --- easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch index c98c98025d9..d5af158a61f 100644 --- a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch +++ b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch @@ -39,7 +39,7 @@ diff -Naur vaspkit.1.5.1.orig/how_to_set_environment_variables vaspkit.1.5.1/how INTERPOLATION_METHOD = 'cubic' # 'linear', 'cubic' (3rd order-spline interpolation), quartic (4th order-spline interpolation), or FFT available only for 2D and 3D grids (default method: 'cubic') AUTO_SUBMIT_JOB = .FALSE. # .TRUE. or .FALSE. (default: .FASLE.). Whether to auto-submit vaspkit or vasp job or not. -SUBMIT_JOB_COMMAND = 'qsub job.sh' # The command line to submit job -+SUBMIT_JOB_COMMAND = '' # The command line to submit job ++SUBMIT_JOB_COMMAND = 'sbatch job.sh' # The command line to submit job AUTO_PLOT = .FALSE. # TRUE. or .FALSE. (default: .FASLE.). Whether to auto-plot data graphs in the post-processing. # New added in Version 1.4.1 From 648b87a13e3a29738588e8c6688db2ffe23b8a12 Mon Sep 17 00:00:00 2001 From: Cintia Willemyns <115622907+WilleBell@users.noreply.github.com> Date: Mon, 30 Sep 2024 09:46:58 +0200 Subject: [PATCH 5/5] Fix patch checksum --- easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb index 1ce5a1fcb0d..5222a9aba25 100644 --- a/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb +++ b/easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb @@ -22,7 +22,7 @@ sources = ['%(namelower)s.%(version)s.linux.x64.tar.gz'] patches = ['%(name)s-1.5.1_fix-envvars.patch'] checksums = [ {'vaspkit.1.5.1.linux.x64.tar.gz': '41bbdc0759f72cd43ef7e2f541d228a639bd95dba2a549398b28f47d760d72b1'}, - {'VASPKIT-1.5.1_fix-envvars.patch': '1c29a5e25c1308cbbcf6ed5aae456cb57e6cf465a34a09b5fac5cacc473ffbd5'}, + {'VASPKIT-1.5.1_fix-envvars.patch': '952e2530b53e4632c3f8ab2ec24f88c61d76e263d9a377772c44c3ad071c1970'}, ] sanity_check_paths = {