Skip to content

Commit

Permalink
Merge pull request easybuilders#20846 from WilleBell/20240618143525_n…
Browse files Browse the repository at this point in the history
…ew_pr_VASPKIT151

{tools}[foss/2023a] VASPKIT v1.5.1
  • Loading branch information
smoors authored Oct 1, 2024
2 parents 49e4034 + 648b87a commit eb67bbe
Show file tree
Hide file tree
Showing 2 changed files with 108 additions and 0 deletions.
42 changes: 42 additions & 0 deletions easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1-foss-2023a.eb
Original file line number Diff line number Diff line change
@@ -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': '952e2530b53e4632c3f8ab2ec24f88c61d76e263d9a377772c44c3ad071c1970'},
]

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'
66 changes: 66 additions & 0 deletions easybuild/easyconfigs/v/VASPKIT/VASPKIT-1.5.1_fix-envvars.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
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
+++ 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 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
-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/to/LDA/potential> # Path of LDA potential
+PBE_PATH = <path/to/PBE/potential> # Path of PBE potential
+GGA_PATH = <path/to/PW91/potential> # 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.
@@ -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 = '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
@@ -69,12 +71,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
#+------------------------------------------------------------------------------------------------------------------+

0 comments on commit eb67bbe

Please sign in to comment.