CP2K & phonopy calculation
CP2K & phonopy calculation¶
Supported CP2K configuration options¶
All CP2K input file features like unit prefixes (
[Bohr]) or preprocessor variables are supported,
except for the functionality to load cell information or coordinates from external/referenced files (CIF, XYZ).
The cell information has to be provided using one of the following options.
Either by specifying the
C cell vectors directly:
&FORCE_EVAL &SUBSYS &CELL A 11.452705822048308 0.0 0.0 B 0.0 11.452705822048308 0.0 C 0.0 0.0 11.452705822048308 PERIODIC XYZ &END CELL &END SUBSYS &END FORCE_EVAL
or by using the
ABC scalings and
ALPHA_BETA_GAMMA angles (the latter is optional, the cell is assumed to be orthorombic if no angles are specified):
&FORCE_EVAL &SUBSYS &CELL ALPHA_BETA_GAMMA 11.452705822048308 11.452705822048308 11.452705822048308 ! ALPHA_BETA_GAMMA 90. 90. 90 PERIODIC XYZ &END CELL &END SUBSYS &END FORCE_EVAL
The coordinates have to be specified in a coordinate section and can be either specified as scaled coordinates (in cell vector coordinates) or as absolute coordinates (Angstrom if not otherwise specified):
&FORCE_EVAL &SUBSYS &COORD SCALED Na 0 0 0 Na 0 1/2 1/2 Na 1/2 0 1/2 Na 1/2 1/2 0 Cl 1/2 1/2 1/2 Cl 1/2 0 0 Cl 0 1/2 0 Cl 0 0 1/2 &END COORD &END SUBSYS &END FORCE_EVAL
The cell information in the generated (supercell) configuration files will always be using the
All other configuration options will be forwarded to the generated supercell configurations and all preprocessor options will be resolved prior to it.
&FORCE_EVALsections are not allowed.
&CELL_REFsection and the
MULTIPLE_UNIT_CELLwill not be read or modified but simply forwarded to the generated configurations.
How to run¶
A procedure of CP2K-phonopy calculation is as follows:
Read a CP2K input file and create supercells with the --cp2k option:
% phonopy --cp2k -d --dim="2 2 2" -c NaCl.inp
In this example, 2x2x2 supercells are created.
xxxare numbers) give the perfect supercell and supercells with displacements, respectively. Almost all other options will be copied from the original input
NaCl.inp, except for the following:
PROJECT_NAMEwill be suffixed to avoid name clashes of output files
RUN_TYPEis set to
phonopy_disp.yamlwill also be created containing the Phonopy configuration.
Calculate forces on atoms in the supercells with displacements.
In this example there are two supercells with displacements to run. Using
mpirunand an MPI-enabled
CP2Kthis would simply be:
% mpirun -np 16 cp2k.popt NaCl-supercell-001.inp % mpirun -np 16 cp2k.popt NaCl-supercell-002.inp
Please do not change any options in the
NaCl-supercell-002.inpwhich would require a re-relaxation of the cell parameters/structure. Also do not relax the generated supercells with displacements, because atomic forces induced by a small atomic displacement are what is need for phonon calculation.
% phonopy --cp2k -f NaCl-supercell-001-forces-1_0.xyz NaCl-supercell-002-forces-1_0.xyz ...
To run this command,
phonopy_disp.yamlhas to be located in the current directory. More information about the configuration options can be found in CP2K interface. The example outputs are located in
Run post-process of phonopy with the original CP2K main input file for the unit cell used in step 1:
% phonopy --cp2k -c NaCl.inp -p band.conf
% phonopy --cp2k -c NaCl.inp --dim="2 2 2" [other-OPTIONS] [setting-file]