General Information

CRYSTAL is a quantum chemistry ab initio program, the first which has been distributed publicly and is designed primarily for calculations on crystals (3 dimensions), slabs (2 dimensions) and polymers (1 dimension) using translational symmetry, but it can also be used for single molecules.

The CRYSTAL program computes the electronic structure of periodic systems within Hartree Fock, density functional or various hybrid approximations (global and range-separated hybrids). The Bloch functions of the periodic systems are expanded as linear combinations of atom centred Gaussian functions. Powerful screening techniques are used to exploit real space locality. Restricted (Closed Shell) and Unrestricted (Spin-polarized) calculations can be performed with all-electron and valence-only basis sets with effective core pseudo-potentials. 

The program is built of two modules: crystal and properties. The crystal program is dedicated to perform the SCF calculations, the geometry optimizations, and the frequency calculations for the structures given in input. At the end of the SCF process, the program crystal writes information on the crystalline system and its wave function as unformatted sequential data in Fortran unit 9, and as formatted data in Fortran unit 98. One-electron properties and wave function analysis can be computed from the SCF wave function by running the program properties. 


License Restrictions

  • CRYSTAL may only be used by users or groups holding a valid license.
  • CRYSTAL may only be used for academic and teaching purposes. Commercial use is prohibited.
  • All scientific articles based on the usage of CRYSTAL must contain suitible citations.
  • CRYSTAL software installed on the HPC systems may only be used on these systems. It is strictly forbidden to copy any files or folders from the software installation folder.

Obtaining Access

The Insitut of Physics currently holds a site license of

  • CRYSTAL23 version 1.0.1 including the MPP extension
  • CRYSTAL17 version 1.0.2 (currently not installed)

According to the License Agreement, CRYSTAL is restricted to users located at the Physics Insitute. Contact the team of IT-Physik to get access.

Running CRYSTAL

Lmod modules

Obtaining a list of available CRYSTAL versions
module spider crystal
Loading CRYSTAL23
module load intel/2021.4 openmpi crystal23

CRYSTAL23 modules may only be loaded by users or groups holding a valid license and being part of the granting IdM-group itphy-sw-crystal23.

No C-shell scripts available

The distributed C-shell scripts (e.g. runcry23 , runPcry23 , runMPPcry23 etc..) are not available. Instead these scripts have been unified to a single bash file called run23, and adapted to play nice with our cluster environment.

General purpose sbatch template

CRYSTAL23 Slurm Job template
#!/usr/bin/env bash

#SBATCH --job-name=demo
#SBATCH --partition=epyc
#SBATCH --ntasks-per-node=120
#SBATCH --cpus-per-task=1
#SBATCH --nodes=1
#SBATCH --mem-per-cpu=4G
#SBATCH --time=7-0

module purge
module load intel/2021.4 openmpi crystal23

# XNAME: Executable to run.
# example: name of the input-file without file extension
XNAME=MPPcrystal run23 example
XNAMEDescription
crystalserial verion
PcrystalMPI version (MPPcrystal will be faster, no need to use this)
MPPcrystalMPI version with distributed memory (Recommended!), also the DEFAULT
crystalOMPOpenMP version
PcrystalOMPHybrid MPI + OpenMP version (MPPcrystalOMP will be faster, no need to use this)
MPPcrystalOMPHybrid MPI + OpenMP version with distributed memory
propertiesserial version
PpropertiesMPI version
propertiesOMPOpenMP version
PpropertiesOMP

Hybrid MPI + OpenMP version


OpenMP version will only be available if --cpus-per-task > 1, otherwise yield an error.


Tipps & Tricks

DIIS in MPP-Mode

Starting from CRYSTAL23, DIIS is disabled by default in MPP-Mode and enabled by default in serial or parallel mode. DIIS needs additional RAM (and sometimes disk I/O), but allows the calculation to converge in fewer cycles.

Recommendation: Try turning it on first, then use HISTDIIS keyword to limit number historic SCF cycles considered for DIIS mixing, and only turn it off if you still run out of RAM.

Number of Tasks for MPP-Mode

When running MPPcrystal or MPPcrystalOMP , it is very important to select a matching number of tasks for optimal parallelism. If you select the number correctly, you will find the following line in your crystal output file:

INFORMATION **** MPP **** MPP running in k point/spin parallel mode

The optimal number is depending on your k-mesh and crystal symmetry, but CRYSTAL is nice enough to hand out optimal numbers if you select a wrong number of tasks. Unfortunately it is not straight-forward to calculate this number based on the input file alone. Recommendation: run with just 1 task to get this output, then cancel the Job):

slurm-$JOBID.out
 *******************************************************************************
 *******************************************************************************
   Please, consider that for this calculation a double level of parallelism
   can be exploited by using a number of processors given by:

       N_proc =    120 x a_non_prime_integer (as 4, or 6, or 8, or 9, ...)

   For instance, N_proc =      480, or      720, or      960, or     1080, or ...
                 N_proc =     7680, or    15360, or    30720, or    61440, or ...
                 N_proc =   122880, or   245760, or ...
 *******************************************************************************
 *******************************************************************************

 Also, you will get a WARNING when running with a wrong number of tasks:

  WARNING **** MPP **** ALL K POINTS DONE BY ALL PROCESSORS

ProTIP: always check for WARNINGS when starting to work on a new system/structure using

grep WARNING *.out

Taking care of WARNINGS

Some other WARNING messages shoud not be ignored as well:

Ignoring this WARNING will cause CRYSTAL to write intermediate results to disk, slowing down the calculation
 WARNING **** GENPOG **** COULOMB BIPO BUFFER TOO SMALL - TO AVOID I/O SET BIPOSIZE =     7336400
Ignoring this WARNING will cause CRYSTAL to discard intermediate results and recalculate them when needed, slowing down the calculation
 WARNING **** EXCBUF **** EXCH. BIPO BUFFER TOO SMALL - TO AVOID RECALC SET EXCHSIZE =     6332670

Support

If you have any problems with CRYSTAL please contact the team of IT-Physik (preferred) or the HPC-Servicedesk.