Crystal
In this section:
Description
According to the page of CRYSTAL, the CRYSTAL program calculates the electronic structure of periodic systems within the Hartree-Fock, density functional, or various hybrid approximations. The Bloch functions are expanded as linear combinations of Gaussian functions centered on atoms.
Available Versions
crystal/17_v1.0.2
crystal/17_v1.0.2_v2 (default)
Serial Job Submission
#!/bin/bash
#SBATCH -J crystal_serial
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 24:00:00
#SBATCH --mem=8G
export INPUT="crystal.inp"
export OUTPUT="*.out *.f9"
module load crystal
job-nanny crystal < crystal.inp
MPI Job Submission
#!/bin/bash
#SBATCH -J crystal_mpi
#SBATCH -N 2
#SBATCH --ntasks-per-node=14
#SBATCH -t 48:00:00
#SBATCH --mem-per-cpu=4G
export INPUT="crystal.inp"
export OUTPUT="*.out *.f9"
module load crystal
# Copy input file to INPUT (required for the executable)
cp crystal.inp INPUT
job-nanny srun -n $SLURM_NTASKS Pcrystal
MPI Job Submission with Multiple Nodes
#!/bin/bash
#SBATCH -J crystal_large
#SBATCH -N 4
#SBATCH --ntasks-per-node=28
#SBATCH -t 72:00:00
#SBATCH --mem-per-cpu=4G
export INPUT="crystal_large.inp"
export OUTPUT="*.out *.f9 *.f28"
module load crystal
cp crystal_large.inp INPUT
job-nanny srun -n $SLURM_NTASKS Pcrystal
Example Input File
Graphene
CRYSTAL
0 0 0
2
6 2.0 1.0 2.0
HEXAGONAL
2.468 2.468 10.0 90.0 90.0 120.0
1
1 0 2 0.0 0.0 0.0
2 0 2 0.667 0.667 0.0
END
DFT
BECKE
END
SHRINK
12 12
TOLDEE
6
END
Note
CRYSTAL requires the input file to be named INPUT for execution. In the submission script, we copy the original file to this name.
Job Array for Multiple Systems
#!/bin/bash
#SBATCH -J crystal_array
#SBATCH --array=1-5
#SBATCH -N 1
#SBATCH -n 1
#SBATCH -t 24:00:00
#SBATCH --mem=8G
SYSTEMS=(
"graphene"
"bn"
"mos2"
"sio2"
"tio2"
)
SYSTEM=${SYSTEMS[$SLURM_ARRAY_TASK_ID-1]}
export INPUT="${SYSTEM}.inp"
export OUTPUT="${SYSTEM}/"
module load crystal
mkdir -p $SYSTEM
cd $SYSTEM
cp ../${SYSTEM}.inp INPUT
job-nanny crystal < INPUT
Results Analysis
After execution, CRYSTAL generates several output files:
# Main output file
crystal.out
# Electronic properties
f9 - bands
f28 - density of states
f31 - bonding properties
# Geometry
f23 - optimized geometry
To extract specific information:
# Total energy
grep "TOTAL ENERGY" crystal.out
# Energy gap
grep "BAND GAP" crystal.out
# Forces
grep "ATOMIC FORCES" crystal.out
References
CRYSTAL documentation: http://www.crystal.unito.it/documentation.html
Tutorials: http://www.crystal.unito.it/tutorials.html
Input manual: http://www.crystal.unito.it/Manuals/crystal17.pdf
See also
Quantum ESPRESSO - Alternative for DFT
CP2K - Alternative for atomistic simulations
Running Simulations - How to submit jobs