Octopus
kpoints_oct_m Module Reference

Data Types

type  kpoints_grid_t
 
type  kpoints_t
 

Functions/Subroutines

subroutine, public kpoints_grid_init (dim, this, npoints, nshifts)
 
subroutine, public kpoints_grid_end (this)
 
subroutine kpoints_grid_copy (bb, aa)
 
subroutine kpoints_grid_addto (this, that)
 
integer function kpoints_set_method (namespace, use_symmetries, only_gamma)
 Determine the k-point input method bitmask from the parsed input settings. More...
 
subroutine, public kpoints_allocate_and_init (this, symm, dim, latt)
 Allocate and initialise attributes that do not depend on parsed quantities. More...
 
subroutine, public kpoints_init (this, namespace, symm, dim, periodic_dim, latt)
 
subroutine, public kpoints_read_mp (this, namespace, symm, dim, gamma_only)
 Read a Monkhorst-Pack k-point grid and initialize the base k-point data. More...
 
subroutine, public kpoints_read_path (this, namespace, dim)
 Read the k-points path information and generate the k-points list. More...
 
subroutine, public kpoints_read_user_kpoints (this, namespace, dim)
 Read explicit user-defined k-points and append them to the current grids. More...
 
subroutine, public kpoints_end (this)
 
subroutine kpoints_print_info (this, namespace)
 
subroutine, public kpoints_to_absolute (latt, kin, kout)
 
subroutine, public kpoints_to_reduced (latt, kin, kout)
 
subroutine, public kpoints_copy (kin, kout)
 
integer pure function, public kpoints_number (this)
 
pure real(real64) function, dimension(1:this%full%dim) kpoints_get_point (this, ik, absolute_coordinates)
 
real(real64) pure function kpoints_get_weight (this, ik)
 
integer pure function kpoints_get_equiv (this, ik)
 
subroutine, public kpoints_grid_generate (dim, naxis, nshifts, shift, kpoints, lk123)
 Generates the k-points grid. More...
 
subroutine, public kpoints_deterministic_sort (nik_axis, kpoints, nshifts, indices)
 Reorder a Monkhorst-Pack grid into a reproducible shell-based ordering. More...
 
subroutine, public kpoints_path_generate (dim, latt, nkpoints, nsegments, resolution, highsympoints, kpoints, coord)
 Generate the k-point along a path. More...
 
subroutine kpoints_grid_reduce (symm, time_reversal, nkpoints, dim, kpoints, weights, equiv, symm_ops, num_symm_ops)
 
subroutine, public kpoints_fold_to_1bz (grid, latt)
 
subroutine kpoints_write_info (this, iunit, namespace, absolute_coordinates)
 
logical pure function, public kpoints_point_is_gamma (this, ik)
 
integer pure function, public kpoints_get_num_symmetry_ops (this, ik)
 
integer pure function, public kpoints_get_symmetry_ops (this, ik, index)
 
logical pure function, public kpoints_is_valid_symmetry (this, ik, index)
 
integer function, public kpoints_kweight_denominator (this)
 
logical pure function kpoints_have_zero_weight_path (this)
 
integer pure function kpoints_get_kpoint_method (this)
 
real(real64) pure function, public kpoints_get_path_coord (this, ind)
 
subroutine kpoints_check_symmetries (grid, symm, dim, time_reversal, namespace)
 
logical function, public kpoints_is_compatible_downsampling (kpt, ik, iq)
 
integer function, public kpoints_nkpt_in_path (this)
 
logical function kpoints_gamma_only (this)
 
subroutine, public kpoints_lattice_vectors_update (this, new_latt)
 

Variables

integer, parameter, public kpoints_gamma = 2
 
integer, parameter, public kpoints_monkh_pack = 4
 
integer, parameter, public kpoints_user = 8
 
integer, parameter, public kpoints_path = 16
 

Function/Subroutine Documentation

◆ kpoints_grid_init()

subroutine, public kpoints_oct_m::kpoints_grid_init ( integer, intent(in)  dim,
type(kpoints_grid_t), intent(out)  this,
integer, intent(in)  npoints,
integer, intent(in)  nshifts 
)

Definition at line 229 of file kpoints.F90.

◆ kpoints_grid_end()

subroutine, public kpoints_oct_m::kpoints_grid_end ( type(kpoints_grid_t), intent(inout)  this)

Definition at line 251 of file kpoints.F90.

◆ kpoints_grid_copy()

subroutine kpoints_oct_m::kpoints_grid_copy ( type(kpoints_grid_t), intent(in)  bb,
type(kpoints_grid_t), intent(inout)  aa 
)
private

Definition at line 267 of file kpoints.F90.

◆ kpoints_grid_addto()

subroutine kpoints_oct_m::kpoints_grid_addto ( type(kpoints_grid_t), intent(inout)  this,
type(kpoints_grid_t), intent(in)  that 
)
private

Definition at line 286 of file kpoints.F90.

◆ kpoints_set_method()

integer function kpoints_oct_m::kpoints_set_method ( type(namespace_t), intent(in)  namespace,
logical, intent(in)  use_symmetries,
logical, intent(in)  only_gamma 
)
private

Determine the k-point input method bitmask from the parsed input settings.

Definition at line 339 of file kpoints.F90.

◆ kpoints_allocate_and_init()

subroutine, public kpoints_oct_m::kpoints_allocate_and_init ( type(kpoints_t), intent(inout)  this,
type(symmetries_t), intent(in), target  symm,
integer, intent(in)  dim,
type(lattice_vectors_t), intent(in)  latt 
)

Allocate and initialise attributes that do not depend on parsed quantities.

Definition at line 391 of file kpoints.F90.

◆ kpoints_init()

subroutine, public kpoints_oct_m::kpoints_init ( type(kpoints_t), intent(out)  this,
type(namespace_t), intent(in)  namespace,
type(symmetries_t), intent(in), target  symm,
integer, intent(in)  dim,
integer, intent(in)  periodic_dim,
type(lattice_vectors_t), intent(in)  latt 
)

Definition at line 416 of file kpoints.F90.

◆ kpoints_read_mp()

subroutine, public kpoints_oct_m::kpoints_read_mp ( type(kpoints_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
type(symmetries_t), intent(in)  symm,
integer, intent(in)  dim,
logical, intent(in)  gamma_only 
)

Read a Monkhorst-Pack k-point grid and initialize the base k-point data.

Definition at line 495 of file kpoints.F90.

◆ kpoints_read_path()

subroutine, public kpoints_oct_m::kpoints_read_path ( type(kpoints_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  dim 
)

Read the k-points path information and generate the k-points list.

Definition at line 771 of file kpoints.F90.

◆ kpoints_read_user_kpoints()

subroutine, public kpoints_oct_m::kpoints_read_user_kpoints ( type(kpoints_t), intent(inout)  this,
type(namespace_t), intent(in)  namespace,
integer, intent(in)  dim 
)

Read explicit user-defined k-points and append them to the current grids.

Definition at line 918 of file kpoints.F90.

◆ kpoints_end()

subroutine, public kpoints_oct_m::kpoints_end ( type(kpoints_t), intent(inout)  this)

Definition at line 1051 of file kpoints.F90.

◆ kpoints_print_info()

subroutine kpoints_oct_m::kpoints_print_info ( type(kpoints_t), intent(in)  this,
type(namespace_t), intent(in)  namespace 
)
private

Definition at line 1071 of file kpoints.F90.

◆ kpoints_to_absolute()

subroutine, public kpoints_oct_m::kpoints_to_absolute ( type(lattice_vectors_t), intent(in)  latt,
real(real64), dimension(:), intent(in)  kin,
real(real64), dimension(:), intent(out)  kout 
)

Definition at line 1128 of file kpoints.F90.

◆ kpoints_to_reduced()

subroutine, public kpoints_oct_m::kpoints_to_reduced ( type(lattice_vectors_t), intent(in)  latt,
real(real64), dimension(:), intent(in)  kin,
real(real64), dimension(:), intent(out)  kout 
)

Definition at line 1141 of file kpoints.F90.

◆ kpoints_copy()

subroutine, public kpoints_oct_m::kpoints_copy ( type(kpoints_t), intent(in)  kin,
type(kpoints_t), intent(inout)  kout 
)

Definition at line 1155 of file kpoints.F90.

◆ kpoints_number()

integer pure function, public kpoints_oct_m::kpoints_number ( type(kpoints_t), intent(in)  this)

Definition at line 1196 of file kpoints.F90.

◆ kpoints_get_point()

pure real(real64) function, dimension(1:this%full%dim) kpoints_oct_m::kpoints_get_point ( class(kpoints_t), intent(in)  this,
integer, intent(in)  ik,
logical, intent(in), optional  absolute_coordinates 
)
private
Parameters
[in]absolute_coordinates.true. by default

Definition at line 1205 of file kpoints.F90.

◆ kpoints_get_weight()

real(real64) pure function kpoints_oct_m::kpoints_get_weight ( class(kpoints_t), intent(in)  this,
integer, intent(in)  ik 
)
private

Definition at line 1221 of file kpoints.F90.

◆ kpoints_get_equiv()

integer pure function kpoints_oct_m::kpoints_get_equiv ( class(kpoints_t), intent(in)  this,
integer, intent(in)  ik 
)
private

Definition at line 1231 of file kpoints.F90.

◆ kpoints_grid_generate()

subroutine, public kpoints_oct_m::kpoints_grid_generate ( integer, intent(in)  dim,
integer, dimension(1:dim), intent(in)  naxis,
integer, intent(in)  nshifts,
real(real64), dimension(:, :), intent(in)  shift,
real(real64), dimension(:, :), intent(out)  kpoints,
integer, dimension(:, :), intent(out), optional  lk123 
)

Generates the k-points grid.

Sets up a uniform array of k-points. Use a modification of the normal Monkhorst-Pack scheme, which is equivalent to the normal MP scheme in the case of even number of kpoints (i.e. naxis (i) even) used with a shift of (1/2, 1/2, 1/2). naxis(i) are the number of points in the three directions determined by the lattice vectors. shift(i) and sz shift the grid of integration points from the origin.

Parameters
[out]lk123lk123(1:nkpt,1:3): maps ik to a triplet of indices on a cube

Definition at line 1248 of file kpoints.F90.

◆ kpoints_deterministic_sort()

subroutine, public kpoints_oct_m::kpoints_deterministic_sort ( integer, dimension(:), intent(in)  nik_axis,
real(real64), dimension(:, :), intent(inout)  kpoints,
integer, intent(in), optional  nshifts,
integer, dimension(:), intent(out), optional  indices 
)

Reorder a Monkhorst-Pack grid into a reproducible shell-based ordering.

The input grid is sorted in place by increasing squared radius in index space, using \(\sum_i (k_i / \Delta k_i)^2\) with \(\Delta k_i = 1 / (2 N_i)\) and N_i taken from nik_axis. This groups points by distance from \(\Gamma\) while keeping a deterministic ordering for points that belong to the same shell.

Parameters
[in]nik_axisk-sampling per dimension
[in,out]kpointsk-point grid
[in]nshiftsNumber of k-grid shifts
[out]indicesindices(ik_sorted) gives the

Definition at line 1322 of file kpoints.F90.

◆ kpoints_path_generate()

subroutine, public kpoints_oct_m::kpoints_path_generate ( integer, intent(in)  dim,
type(lattice_vectors_t), intent(in)  latt,
integer, intent(in)  nkpoints,
integer, intent(in)  nsegments,
integer, dimension(:), intent(in)  resolution,
real(real64), dimension(:,:), intent(in)  highsympoints,
real(real64), dimension(1:dim, 1:nkpoints), intent(out)  kpoints,
real(real64), dimension(1:nkpoints), intent(out)  coord 
)

Generate the k-point along a path.

Definition at line 1374 of file kpoints.F90.

◆ kpoints_grid_reduce()

subroutine kpoints_oct_m::kpoints_grid_reduce ( type(symmetries_t), intent(in)  symm,
logical, intent(in)  time_reversal,
integer, intent(inout)  nkpoints,
integer, intent(in)  dim,
real(real64), dimension(1:dim,1:nkpoints), intent(inout)  kpoints,
real(real64), dimension(1:nkpoints), intent(out)  weights,
integer, dimension(1:nkpoints), intent(out)  equiv,
integer, dimension(:, :), intent(out)  symm_ops,
integer, dimension(:), intent(out)  num_symm_ops 
)
private

Definition at line 1436 of file kpoints.F90.

◆ kpoints_fold_to_1bz()

subroutine, public kpoints_oct_m::kpoints_fold_to_1bz ( type(kpoints_grid_t), intent(inout)  grid,
type(lattice_vectors_t), intent(in)  latt 
)

Definition at line 1557 of file kpoints.F90.

◆ kpoints_write_info()

subroutine kpoints_oct_m::kpoints_write_info ( class(kpoints_t), intent(in)  this,
integer, intent(in), optional  iunit,
type(namespace_t), intent(in), optional  namespace,
logical, intent(in), optional  absolute_coordinates 
)
private

Definition at line 1600 of file kpoints.F90.

◆ kpoints_point_is_gamma()

logical pure function, public kpoints_oct_m::kpoints_point_is_gamma ( class(kpoints_t), intent(in)  this,
integer, intent(in)  ik 
)

Definition at line 1687 of file kpoints.F90.

◆ kpoints_get_num_symmetry_ops()

integer pure function, public kpoints_oct_m::kpoints_get_num_symmetry_ops ( type(kpoints_t), intent(in)  this,
integer, intent(in)  ik 
)

Definition at line 1697 of file kpoints.F90.

◆ kpoints_get_symmetry_ops()

integer pure function, public kpoints_oct_m::kpoints_get_symmetry_ops ( type(kpoints_t), intent(in)  this,
integer, intent(in)  ik,
integer, intent(in)  index 
)

Definition at line 1710 of file kpoints.F90.

◆ kpoints_is_valid_symmetry()

logical pure function, public kpoints_oct_m::kpoints_is_valid_symmetry ( type(kpoints_t), intent(in)  this,
integer, intent(in)  ik,
integer, intent(in)  index 
)

Definition at line 1724 of file kpoints.F90.

◆ kpoints_kweight_denominator()

integer function, public kpoints_oct_m::kpoints_kweight_denominator ( type(kpoints_t), intent(in)  this)

Definition at line 1747 of file kpoints.F90.

◆ kpoints_have_zero_weight_path()

logical pure function kpoints_oct_m::kpoints_have_zero_weight_path ( class(kpoints_t), intent(in)  this)
private

Definition at line 1775 of file kpoints.F90.

◆ kpoints_get_kpoint_method()

integer pure function kpoints_oct_m::kpoints_get_kpoint_method ( class(kpoints_t), intent(in)  this)
private

Definition at line 1787 of file kpoints.F90.

◆ kpoints_get_path_coord()

real(real64) pure function, public kpoints_oct_m::kpoints_get_path_coord ( type(kpoints_t), intent(in)  this,
integer, intent(in)  ind 
)

Definition at line 1794 of file kpoints.F90.

◆ kpoints_check_symmetries()

subroutine kpoints_oct_m::kpoints_check_symmetries ( type(kpoints_grid_t), intent(in)  grid,
type(symmetries_t), intent(in)  symm,
integer, intent(in)  dim,
logical, intent(in)  time_reversal,
type(namespace_t), intent(in)  namespace 
)
private

Definition at line 1804 of file kpoints.F90.

◆ kpoints_is_compatible_downsampling()

logical function, public kpoints_oct_m::kpoints_is_compatible_downsampling ( type(kpoints_t), intent(in)  kpt,
integer, intent(in)  ik,
integer, intent(in)  iq 
)

Definition at line 1889 of file kpoints.F90.

◆ kpoints_nkpt_in_path()

integer function, public kpoints_oct_m::kpoints_nkpt_in_path ( class(kpoints_t), intent(in)  this)

Definition at line 1926 of file kpoints.F90.

◆ kpoints_gamma_only()

logical function kpoints_oct_m::kpoints_gamma_only ( class(kpoints_t), intent(in)  this)
private

Definition at line 1937 of file kpoints.F90.

◆ kpoints_lattice_vectors_update()

subroutine, public kpoints_oct_m::kpoints_lattice_vectors_update ( class(kpoints_t), intent(inout)  this,
type(lattice_vectors_t), intent(in)  new_latt 
)

Definition at line 1948 of file kpoints.F90.

Variable Documentation

◆ kpoints_gamma

integer, parameter, public kpoints_oct_m::kpoints_gamma = 2

Definition at line 220 of file kpoints.F90.

◆ kpoints_monkh_pack

integer, parameter, public kpoints_oct_m::kpoints_monkh_pack = 4

Definition at line 220 of file kpoints.F90.

◆ kpoints_user

integer, parameter, public kpoints_oct_m::kpoints_user = 8

Definition at line 220 of file kpoints.F90.

◆ kpoints_path

integer, parameter, public kpoints_oct_m::kpoints_path = 16

Definition at line 220 of file kpoints.F90.