Main Page
Welcome to VASPwiki hosted by the Electrochemistry group within the Centre for Materials Science and Nanotechnology (SMN) at the University of Oslo, Norway.
The wiki gathers beginner's guides and an overview of methods, software and resources for doing DFT calculations and data processing with specific details related to the high-performance computers within the Norwegian Research Infrastructure Services (NRIS). Disclaimer: use at your own risk.
Contact: Associate Prof. Jonathan Polfus
Contents
- 1 Getting started
- 2 Methods
- 2.1 VASP Wiki and Support Forum
- 2.2 Convergence and Efficiency
- 2.3 General calculations and relaxation
- 2.4 Systems
- 2.5 Defect calculations
- 2.6 Vibrational frequencies
- 2.7 Phonon calculations
- 2.8 Nudged Elastic Band (NEB)
- 2.9 Polaron localization
- 2.10 Bader charge analysis
- 2.11 Error messages
- 2.12 References
- 3 Software and resources
- 4 Getting started with MediaWiki
Getting started
User access
Go to www.metacenter.no > User Login (Passwords) > 1. Request a user account > HPC
Fill in the form with your UiO username and choose the appropriate project. If you already have an account through for instance FYS-MENA41111, the project manager can in principle directly add you to the project without requesting a user account.
The project manager can give you access to the VASP license through the VASP portal and thereafter informing sigma2@uninett.no to give your user the necessary group affiliations (vasp5).
Project | Manager | Group | Resources |
---|---|---|---|
NN4604K | Jonathan M. Polfus | Electrochemistry | Saga |
NN9136K | Lasse Vines | LENS | Saga |
NN9180K | Clas Persson | Structure Physics | Saga |
Login
ssh and scp
ssh can be used to login to the cluster with a terminal app on UNIX, macOS or Windows Subsystem for Linux
ssh [username]@saga.sigma2.no
Hostnames and usernames can be saved by creating or editing the config file using for instance the vim text editor
vim ~/.ssh/config
Press i
to insert text
Host saga HostName = saga.sigma2.no user [username]
Press escape
to exit insert mode, and then :wq
to 'write' and 'quit'.
Login is then simplified
ssh saga
Copy files from cluster to current folder (.
)
scp saga:[path]/[filename] .
Copy files to the home directory on the cluster
scp [filename] saga:
PuTTY and WinSCP
PuTTY is an ssh client for Windows that can be downloaded from www.putty.org.
WinSCP is an scp client for Windows that can be downloaded from winscp.net.
Working in UNIX
Basic commands
Learn to use the TAB key to autocomplete commands, paths and filenames.
Learn to view the manual for any command: man [command]
Command | Description |
---|---|
ls
|
List files and directories in current directory |
mkdir [directoryname]
|
Make a directory |
cd [directoryname]
|
Change current path to another directory |
pwd
|
Display current path |
cd ..
|
Change path to parent directory |
cp [path]/[filename] .
|
Copy file to current directory |
cp [filename] [directoryname]
|
Copy file to another directory |
mv [filename] [path]
|
Move file to another directory |
mv [filename] [newfilename]
|
Change the name of a file |
cp -r [directory] [path]
|
Copy directory and its contents to new location |
rm [filename]
|
Delete file |
rm -r [directoryname]
|
Delete directory and its contents |
Symbol | Description |
---|---|
.
|
Current directory |
..
|
Parent directory |
~
|
Home directory |
/
|
Root directory |
*
|
Any text pattern |
?
|
Any symbol |
Command | Description |
---|---|
less
|
View text file. View live updates to end of file: Shift-F
|
head
|
Display top 10 lines of text file. Specify number of lines: -n [count]
|
tail
|
Display bottom 10 lines of text file. Specify number of lines: -n [count]
|
grep [pattern]
|
Display each line in text file containing text specific text/symbol pattern. |
diff [file1] [file2] | Compare files line by line and display the difference between them. |
cat
|
Concatenate text files sequentially. Write the output to a file: > [filename]
|
Filesystem on Saga
Home directory: mainly for personal files, scripts etc. due to limited storage space
/cluster/home/[username]
Project folder: Run jobs and store output files in a subfolder called your username
/cluster/projects/[project number]/[username]
Check disk usage and storage quota for home directory and project folder
dusage
Check disk usage of current folder and subfolders
du -hs
Find and remove files matching [filename] in current folder and subfolders
find . -name "[filename]" -exec rm {} \;
Logfile
Excel sheet for tracking jobs can be downloaded here: Media:Logfile.xlsx It also includes conversion between supercell size, number of atoms and k-point grid for a given k-point density.
Job script
Sigma2 NRIS HPC clusters use Slurm as workload manager and job scheduler. Documentation is available on documentation.sigma2.no/
Computations are run by submitting a job script to the queue
sbatch jobfile
View the queue for a user or project
squeue -u [username]
squeue -p [project number]
Job scripts for Saga are available in the project folder
/cluster/projects/nn4604k/jobfile
The job script below contains several SBATCH options
Saga has 40 CPUs per node and it is recommended to use all CPUs on a node and a 1-2 nodes for optimal performance documentation.sigma2.no/hpc_machines/saga
The module system is restored to avoid potential conflicts. There exist several compiled versions of VASP and specific versions are compiled for increased performance with gamma K-point grid
module restore system module load VASPModules module load VASP/6.4.1-intel-2022b-std-wannier90-libxc-hdf5-beef-0a928426e459cf2aeab3d0bf8f441c74 # module load VASP/6.4.1-intel-2022b-gam-wannier90-libxc-hdf5-beef-0a928426e459cf2aeab3d0bf8f441c74
Available modules on the cluster can be listed with
module avail
Files are copied to a temporary job folder ($SCRATCH). The WAVECAR file is copied if it is available.
cp [filenames] $SCRATCH if [ -f WAVECAR ] then cp WAVECAR $SCRATCH fi
Output files are copied from the job folder to the submit folder when job completes. Savefile will also copy files if the job crashes.
savefile [filenames]
The job is started from the $SCRATCH folder and the elapsed time is recorded to slurm output
cd $SCRATCH time srun vasp
The progression of the job can be viewed in the slurm output file slurm-[slurm-id] in the submit folder once the job is running.
The working folder can be accessed while the job is running
/cluster/work/jobs/[slurm-id]
Example job script
#!/bin/bash #SBATCH --job-name=jobname #SBATCH --account=nn4604k #SBATCH --time=10:00:00 #SBATCH --mem-per-cpu=4000M #SBATCH --nodes=1 #SBATCH --ntasks-per-node=40 set -o errexit set -o nounset
module restore system module load VASPModules module load VASP/6.4.1-intel-2022b-std-wannier90-libxc-hdf5-beef-0a928426e459cf2aeab3d0bf8f441c74
- module load VASP/6.4.1-intel-2022b-gam-wannier90-libxc-hdf5-beef-0a928426e459cf2aeab3d0bf8f441c74
cp INCAR POSCAR POTCAR KPOINTS $SCRATCH if [ -f WAVECAR ] then cp WAVECAR $SCRATCH fi savefile CONTCAR OUTCAR DOSCAR CHGCAR WAVECAR cd $SCRATCH time srun vasp
Aliases and settings
Define useful shortcuts by adding aliases to ~/.bash_profile
alias l='ls -l' alias la='ls -l -a' alias ..='cd ..' alias nn='cd /cluster/projects/[project number]' alias q='squeue -u [username]'
You can also add commands such as automatically changing directory to the project folder upon login.
Changes will take effect on next login or manually with source ~/.bash_profile
.
vim can be configured in ~/.vimrc
. Turn on line numbers to easily jump to a specific line using :[line number]
set number
Shell scripting
Shell scripting can be used to submit several jobs as exemplified below
#!/bin/bash for i in $(seq 0.0 0.2 1.4); do for j in $(seq 0.0 0.2 1.4); do dir="$i-$j" echo $dir mkdir $dir cp INCAR POTCAR KPOINTS jobfile $dir cp "prefix_$dir.POSCAR.vasp" $dir/POSCAR cd $dir sbatch jobfile cd .. done done
First VASP calculation
File | Description |
---|---|
POSCAR | Structure file that specifies the unit cell vectors, types of atoms and their positions |
POTCAR | Pseudopotentials for the atoms (same order as in POSCAR) |
INCAR | Input parameters for the calculation including relaxation algorithms, functionals, convergence criteria, etc. |
KPOINTS | k-point grid |
jobfile | job script |
Cell volume relaxation of BaZrO3 unit cell
Go to the project folder: cd /cluster/projects/nn4604k
Or if you have defined an alias: nn
Create a subfolder with your username (if you have not done so already)
mkdir [username]
cd [username]
mkdir test
cd test
Copy all the files from the 'vasptest' folder (POSCAR, KPOINTS and INCAR) to your current folder (remember to use TAB to autocomplete the path)
cp ../../vasptest/* .
Copy the necessary POTCAR files (press the UP arrow key to bring up your previous command)
cp ../../potpaw_PBE.54/Ba_sv/POTCAR POTCAR_Ba_sv
cp ../../potpaw_PBE.54/Zr_sv/POTCAR POTCAR_Zr_sv
cp ../../potpaw_PBE.54/O/POTCAR POTCAR_O
Check the order of the atoms in POSCAR file
head POSCAR
Concatenate the POTCAR files in the same order to a file named POTCAR
cat POTCAR_Ba_sv POTCAR_Zr_sv POTCAR_O > POTCAR
Check the order of the POTCAR
grep TITEL POTCAR
Copy job script to current folder
cp ../../jobfile .
Submit the job
sbatch jobfile
Check the queue
squeue -u [username]
Or if you have defined an alias: q
When the job starts you can follow the progress in the slurm log file
less slurm-[slurm-id]
After three ionic relaxation steps, the required accuracy has been reached and the output files defined job script are copied to the current folder.
3 F= -.41724097E+02 E0= -.41724097E+02 d E =-.431449E-02 curvature: -0.24 expect dE=-0.515E-06 dE for cont linesearch -0.515E-06 trial: gam= 0.00000 g(F)= 0.940E-64 g(S)= 0.213E-05 ort =-0.198E-03 (trialstep = 0.895E+00) search vector abs. value= 0.213E-05 reached required accuracy - stopping structural energy minimisation writing wavefunctions
Check the lattice parameter in the POSCAR (input) and output (CONTCAR)
head POSCAR
BaZrO3 1.00000000000000 4.2200000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 4.2200000000000000 0.0000000000000000 0.0000000000000000 0.0000000000000000 4.2200000000000000 ...
head CONTCAR
BaZrO3 1.00000000000000 4.2353879522908331 -0.0000000000000000 -0.0000000000000000 0.0000000000000000 4.2353879522908331 -0.0000000000000000 0.0000000000000000 -0.0000000000000000 4.2353879522908331 ...
The optimized cubic lattice parameter is 4.2354 Å.
Methods
VASP Wiki and Support Forum
The VASP manual contains information on all INCAR tags and tutorials and guides to several types of calculations (www.vasp.at/wiki/).
The VASP Support Forum (www.vasp.at/forum/) allows users to troubleshoot and discuss technical and scientific topics. The VASP developers are also active in answering questions.
Convergence and Efficiency
Convergence tests
How to and relevant examples.
Benchmark
VASP efficiency on Saga (number of nodes/cores)
Computational cost: atoms vs kpoints vs functional etc.
General calculations and relaxation
NELM, NSW
Systems
Supercells
A supercell can be made in VESTA by going into Edit -> Edit data -> Unit Cell...
When the window for the unit cell has opened press Transform, change the numbers in the Transformation matrix to make a supercell of your choice.
Surfaces and slabs
Slabs can be constructed using ASE.
A specific surface can be exposed using VESTA, here is a youtube tutorial for exposing the (110) surface of a TiO2 rutile structure, tutorials for other structures can be found on the same youtube channel.
To make a supercell or a slab from the new unit cell you have just created VESTA you have to export the unit cell in a .vasp format. Open the vasp file in VESTA and then follow the same procedure for the creation of a supercell as has been explained above.
Finite-size correction for slab supercell calculations of materials with spontaneous polarization [1]
Grain boundaries and interfaces
Typically modeled as Coincident Site Lattice (CSL) structures that are optimized by rigid body translation.
Materials project provides a list of matching structures and terminations under the Substrates section for a selected structure.
Special grain boundaries in perovskites [2]
Machine learning sampling to determine rigid body translation [3]
Disordered structures
Site occupancy disorder program: https://github.com/gcmt-group/sod
Special quasirandom structures (SQS) generators: Supercell, TDEP, Icet.
Defect calculations
Charge correction
Self-Consistent Potential Correction for Charged Periodic Systems [4]
CoFFEE: Corrections For Formation Energy and Eigenvalues for charged defect simulations [5]
Limitations of empirical supercell extrapolation for calculations of point defects in bulk, at surfaces, and in two-dimensional materials [6]
Defect configurations
Evolutionary computing and machine learning for discovering of low-energy defect configurations [7]
Vibrational frequencies
Finite displacement method (IBRION=5) can be used to find vibrational frequencies within the harmonic approximation.
- See Phonons from finite differences
- Relax the species that will be displaced to higher force convergance (e.g., EDIFFG=0.0001 or 0.005 eV Å^1)
- Use IBRION=5, NFREE=4, POTIM=0.015. The NCORE-tag may need to be removed from INCAR
- Check the energy profile (energy of each ionic step vs displacement) to make sure that the harmonic fit is satisfactory (2nd order polynomial)
Phonon calculations
Nudged Elastic Band (NEB)
NEB calculations require relaxed CONTCAR files for the initial and final states, and POSCAR files for one or more states along the migration path, which are termed images. The POSCAR files can be generated by linear interpolation between neighboring states using nebmake.pl script which is part of VTST Tools and is available in the folder /cluster/projects/nn4604k/bin/vtstscripts-922).
The following INCAR tags can be used to initiate a NEB calculations with one image and the climbing image method
IMAGES = 1 SPRING = -5 LCLIMB = .TRUE.
POSCAR files for the initial, interpolated and final position must be placed in subfolders named 00, 01 and 02, and the job script must be modified accordingly. VTST Tools offers some improvements to the standard NEB implementation in VASP, and these can be loaded as a separate module with suffix -vtst
module load VASP/5.4.4-intel-2019a-std-vtst cp -r 00 01 02 $SCRATCH savefile 01/CONTCAR 01/OUTCAR 01/DOSCAR 01/CHGCAR 01/WAVECAR
Polaron localization
Normally polarons which are localized at d or p orbitals normally require DFT+U hybrid functionals.
The U value will determine the localization energy.
To determine the proper U value for this calculations, the a piecewise linear method is strongly recommended.
More detail can be found Physical Review B, 90(3), 035204.
To visualize the polaron localization, you can generate the partial charge density, by set:
LPARD = T
IBAND = XX, the band where you localized polaron is.
The PARCHG will be generated after calculation, and it can be visualized in the VESTA.
Bader charge analysis
INCAR
PREC = A
LAECHG = T
The core charge is written to AECCAR0 and the valance charge to AECCAR2. These two charge density files can be summed using the chgsum.pl script;
chgsum.pl AECCAR0 AECCAR2
The bader analysis can then be done on this total charge density file:
bader CHGCAR -ref CHGCAR_sum
Error messages
References
- ↑ Yoo, SH., Todorova, M., Wickramaratne, D. et al. Finite-size correction for slab supercell calculations of materials with spontaneous polarization. npj Comput Mater 7, 58 (2021) http://dx.doi.org/10.1038/s41524-021-00529-1
- ↑ B. M. Darinskiy, N. D. Efanova & D. S. Saiko (2020) Special grain boundaries in perovskite crystals, Ferroelectrics, 567:1, 13-19, https://doi.org/10.1080/00150193.2020.1791582
- ↑ Application of machine learning-based selective sampling to determine BaZrO3 grain boundary structures, Computational Materials Science, 164 (2019) 57-65. https://doi.org/10.1016/j.commatsci.2019.03.054
- ↑ Mauricio Chagas da Silva, Michael Lorke, Bálint Aradi, Meisam Farzalipour Tabriz, Thomas Frauenheim, Angel Rubio, Dario Rocca, and Peter Deák Phys. Rev. Lett. 126, 076401. https://doi.org/10.1103/PhysRevLett.126.076401
- ↑ Naik, Mit H., and Manish Jain. CoFFEE: corrections for formation energy and eigenvalues for charged defect simulations. Computer Physics Communications 226 (2018) 114-126. https://doi-org/10.1016/j.cpc.2018.01.011
- ↑ Christoph Freysoldt, Jörg Neugebauer, Anne Marie Z. Tan, and Richard G. Hennig, Limitations of empirical supercell extrapolation for calculations of point defects in bulk, at surfaces, and in two-dimensional materials, Phys. Rev. B 105, 01410 http://dx.doi.org/10.1103/PhysRevB.105.014103
- ↑ Arrigoni, M., Madsen, G.K.H. Evolutionary computing and machine learning for discovering of low-energy defect configurations. npj Comput Mater 7, 71 (2021). https://doi.org/10.1038/s41524-021-00537-1
Software and resources
Overview of codes from the Materials Design Group at Imperial College London
Installation on Saga
module load Python/3.9.6-GCCcore-11.2.0 pip install sumo pip install --upgrade https://github.com/SUNCAT-Center/catmap/zipball/master
This will install the python packages under .local/lib/python3.9/site-packages/
Structure and crystallography
ICSD database
Automatic login through EZproxy (www.ub.uio.no/english/using/remote-access.html).
Materials project
Contains structures optimized by DFT that can be downloaded in several formats including .cif or POSCAR. Choose 'Conventional Standard' CIF.
Login with a Google account (available with UiO username www.uio.no/english/services/it/store-collaborate/gsuite/).
International Tables for Crystallography
Complete overview of space-group symmetry and more.
Shannon Ionic Radii
Reference [1]
Binding energies of molecules
Todo: Table of binding energies with reference (e.g., NIST)
Catalysis
Catalysis Hub
Database of reaction energies and barriers from DFT calculations.
No entropy found
Visualization
VESTA
jp-minerals.org/vesta/en/ (Windows, macOS, Linux)
View periodic structures, charge densities and more.
Recommended settings for improved figures
Objects > Properties > Atoms/Bonds/Polyhedra Specular: 40 40 40 Shininess (%): 1 View > Overall Appearance... Ambient: 10 Diffuse: 70
Avogadro
avogadro.cc (Windows, macOS, Linux)
View and edit molecular structures and optimize molecular geometry through molecular mechanics.
Diamond
www.crystalimpact.com/diamond/ (Windows: Licence)
View and edit periodic and molecular structures.
VMD
www.ks.uiuc.edu/Research/vmd/ (Windows, macOS, Linux)
View and animate structures from molecular dynamics simulations.
P4vasp
github.com/orest-d/p4vasp (macOS, Linux)
Visualizing periodic structures, density of states and band structures.
OVITO
OVITO is a visualization and analysis software for output data generated in molecular dynamics, atomistic Monte-Carlo and other particle-based simulations.
Escher
http://schooner.chem.dal.ca/wiki/Escher
Escher is a collection of octave and python routines for the visualization and plotting of molecules and crystals. The original idea in escher was to modernize tessel, a program for the representation of crystal structures (and more). Via an interface to POV-Ray, tessel is able to generate very high quality representations of periodic and finite molecular structures.
Code link of a cover art example: https://github.com/heesoopark/Escher-PovRay
Packages
Spyder
www.spyder-ide.org (Windows, macOS, Linux)
Scientific python developer environment.
Atomic Simulation Environment (ASE)
Set of tools and Python modules for setting up, manipulating, running, visualizing and analyzing atomistic simulations.
ASE modules are available on Saga
module avail ase
Example of a script for generating an (1 1 1) surface slab of palladium
#!/opt/local/bin/python from ase.io import read from ase.io import write from ase.build import fcc111 from ase.build import fcc100 from ase.build import fcc111_root
slab = fcc111_root('Pd', 3, size=(1,2,7), a=3.9438731474981594, vacuum=5.0)
write('Pd-111.cif', slab, 'cif')
VASPKIT
VASPKIT provides 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.
- Generate KPOINTS, POTCAR and INCAR for a given POSCAR file;
- Elastic-constants of 2D and bulk materials using stress-strain or energy-strain methods;
- Equation-of-state fitting;
- Suggested k-paths for a given crystal structure;
- Optical adsorption coefficient of 2D and bulk materials;
- Band structure unfolding;
- Fermi surface;
- Density-of-states and band-structure;
- Charge/spin density, Charge density difference;
- Vacuum level and work function;
- Wave-function analysis;
- Molecular-dynamics analysis;
- Effective mass of carrier;
- Symmetry finding and operations;
- 3D band structures;
- Magnetocrystalline anisotropy energy;
- Currently, only VASP raw data are fully supported.
CatMAP
CatMap is a catalyst Micro-kinetic Analysis Package for automated creation of micro-kinetic models used for studying kinetics and screening new catalysts.
https://catmap.readthedocs.io/en/latest/index.html
CatMap can be installed directly via pip:
pip install --upgrade https://github.com/SUNCAT-Center/catmap/zipball/master
You may need to add the install directory to the PYTHONPATH, e.g. in bash shell or .bash_profile
export PYTHONPATH=$HOME/THIS_FOLDER_PATH:$PYTHONPATH
Input File Structure
The TableParser accepts inputs in a tab-separated text file. An example of the header and first few lines are provided below:
The following column titles are required for a functional input file:
- surface_name
- site_name
- species_name
- formation_energy
- frequencies
- reference
Generating input file for formation energy
You can use the python script under /CATMAP/catmap/tutorials/1-generating_input_file/generate_input.py
Creating a Microkinetic Model
Check the example of CO oxidation in the path of /CATMAP/catmap/tutorials/2-creating_microkinetic_model
One of the most important aspects of the “setup file” is the “rxn_expressions” variable which defines the elementary steps in the model. For this simplified CO oxidation model we will specify these as:
rxn_expressions = [ '*_s + CO_g -> CO*', '2*_s + O2_g <-> O-O* + *_s -> 2O*', 'CO* + O* <-> O-CO* + * -> CO2_g + 2*', ]
The first expression includes CO adsorption without any activation barrier. The second includes an activated dissociative chemisorption of the oxygen molecule, and the final is an activated associative desorption of CO2. More complex models for CO oxidation could be imagined, but these elementary steps capture the key features. Note that we have only included “*
” and “*_s
” sites since this is a single-site model for CO oxidation. This means that all intermediates will be adsorbed at a site designated as “s
”. These reaction expressions will be parsed automatically in order to define the adsorbates, transition-states, gasses, and surface sites in the model.
Phonopy and Phono3py
Phonopy is an open source package for phonon calculations at harmonic and quasi-harmonic levels. Phono3py is another open source package for phonon-phonon interaction and lattice thermal conductivity calculations.
Features
- Phonon band structure, phonon DOS and partial-DOS
- Phonon thermal properties: Free energy, heat capacity (Cv), and entropy
- Phonon group velocity
- Thermal ellipsoids / Mean square displacements
- Irreducible representations of normal modes
- Dynamic structure factor for INS and IXS
- Non-analytical-term correction: LO-TO splitting (Born effective charges and dielectric constant are required.)
- Mode Grüneisen parameters
- Quasi-harmonic approximation: Thermal expansion, heat capacity at constant pressure (Cp)
- Interfaces to calculators: VASP, VASP DFPT, ABINIT, Quantu ESPRESSO, SIESTA, Elk, WIEN2k, CRYSTAL, DFTB+, TURBOMOLE, CP2K, FHI-aims, CASTEP, Fleur, LAMMPS (external)
- Phonopy API for Python
TDEP
Extract force constants, phonon dispersion relations, thermal conductivity, and generate special quasirandom structures (SQS)
Available on Saga (/cluster/shared/tdep/bin). Use the following modules
module purge module load Anaconda3/2019.03 module load intel/2018b module load imkl/2018.3.222-iimpi-2018b module load HDF5/1.10.2-intel-2018b
Generate SQS supercell from from a unit cell POSCAR file named 'infile.ucposcar'
Example of 'infile.ucposcar' for a A-site doped SrTiO3 unit cell where the disordered site is designated 'ALLOY' (2 elements: 52% Sr and 48% Ca)
Sr1 Ti1 O3 1.0 3.945130 0.000000 0.000000 0.000000 3.945130 0.000000 0.000000 0.000000 3.945130 ALLOY Ti O 1 1 3 direct 0.000000 0.000000 0.000000 2 Sr 0.52 Ca 0.48 0.500000 0.500000 0.500000 0.500000 0.000000 0.500000 0.500000 0.500000 0.000000 0.000000 0.500000 0.500000
Generate 2x2x2 SQS supercells (five supercells will be generated outfile.sqs_001-005)
generate_structure -d 2 2 2
Supercell
https://orex.github.io/supercell/
Supercell is a combinatorial structure-generation approach for the local-level modeling of atomic substitutions and partial occupancies in crystals.
Supercell can generate special quasirandom structures (SQS).
Icet
Icet is a module in Python that can generate special quasirandom structures. [1]
Here is an example of a script to generate an SQS structure of a 3x3x3 supercell of a rocksalt structure ( TiN ) with several H atoms on the N sites (TiN0.75H0.25)
from ase import Atom from ase.build import bulk from icet import ClusterSpace from icet.tools.structure_generation import (generate_sqs, generate_sqs_from_supercells, generate_sqs_by_enumeration, generate_target_structure) from ase.io import write #makes a TiN cell primitive_structure = bulk('TiN', cubic=True, crystalstructure='rocksalt', a=4.2570) #makes a 3x3x3 supercell supercells = [primitive_structure.repeat(3)] # defines a cluster space. There are 8 brackets because we have 8 atoms in the cell defined earlier (Ti_4N_4). Several aloms in the same bracket mean that they are allowed on the same site cs = ClusterSpace(primitive_structure, [7.0,4.5],chemical_symbols=[['Ti'], ['N','H'],['Ti'], ['N','H'],['Ti'], ['N','H'],['Ti'], ['N','H']]) # x in TiNx x = 0.75 # In this case we want TiN_{0.75}H_{0.25}. We only act on sublattice A because we do not want to change the concentration of Ti. The target concentration has to be compatible with the supercell (i.e. it should correspond to an integer number of atoms in the cell) target_concentrations = {'A': {'N': x, 'H': 1-x}} #here we use “generate_sqs_from_supercells” because it allows us to make a supercell that has the same geometry as the one in the input # With more steps, we generate better structures, it also takes longer sqs=generate_sqs_from_supercells(cluster_space=cs, supercells=supercells, target_concentrations=target_concentrations, n_steps=50000 ) write('TiNH.cif', sqs)
Spinney
Python package dedicated to the study of point defects in solids. Can be used to calculate the correction energy due to electrostatic finite-size-effects in charged supercells, defect formation energies and transition levels, and defects concentrations.
SUMO
Sumo is a Python toolkit for plotting and analysis of ab initio solid-state calculation data, built on existing Python packages from the solid-state chemistry/physics community. SUMO can plot projected DOS directly from DOSCAR and vasprun.xml
Installation on Saga works with the following python module (consider loading it in ~/.bash_profile)
module load Python/3.9.6-GCCcore-11.2.0
pip install sumo
The installation folder will be ~/.local/lib/python3.9/site-packages/
Pymatgen
Pymatgen (Python Materials Genomics) is a robust, open-source Python library for materials analysis.
Generate a POTCAR with symbols Li_sv O and the PBE functional in a termial
pmg potcar --symbols Li_sv O --functional PBE
Python code quick examples:
1) to generate NEB images by using IDPP method (image dependent pair potential: J. Chem. Phys. 140, 214106 (2014))
from pymatgen.core import Structure from pymatgen.analysis.diffusion.neb.pathfinder import IDPPSolver init_struct = Structure.from_file("POSCAR_start.vasp") final_struct =Structure.from_file("POSCAR_end.vasp") obj = IDPPSolver.from_endpoints(endpoints=[init_struct, final_struct], nimages=5, sort_tol=1.0)new_path = obj.run(maxiter=5000, tol=1e-5, gtol=1e-3, species=["Na"]) for i in range(len(new_path)): print(new_path[i]) new_path[i].to(fmt="poscar",filename="POSCAR-"+str(i)+".vasp")
2) to analyze NEB results
from pymatgen.analysis.transition_state import NEBAnalysis neb = NEBAnalysis.from_dir("./") nebplot = neb.get_plot() nebplot.savefig("NEB.png")
Atomsk
Atomsk creates, manipulates, and converts data files for atomic-scale simulations in the field of computational materials sciences in CLI. Atomsk can generate common lattice types such as fcc, bcc, hcp, and perform elementary transformations: duplicate, rotate, deform, insert dislocations, merge several systems, create twins, bicrystals and polycrystals, and so on. These elementary tools can be combined to construct and shape a wide variety of atomic systems.
To compile on Saga by using Intel fort/MLK,
git clone https://github.com/pierrehirel/atomsk.git
cd atomsk/src
module load intel-compilers/2022.1.0
module load imkl/2022.1.0
make -f Makefile.ifort atomsk
References
- ↑ R.D. Shannon, Revised Effective Ionic Radii and Systematic Studies of Interatomic Distances in Halides and Chalcogenides, Acta Cryst. 1976 (A32) 751-767
Getting started with MediaWiki
Consult the User's Guide for information on using the wiki software.