(git:f6c7e1d)
Loading...
Searching...
No Matches
cell_types Module Reference

Handles all functions related to the CELL. More...

Data Types

type  cell_type
 Type defining parameters related to the simulation cell. More...
type  cell_p_type
interface  pbc

Functions/Subroutines

subroutine, public cell_clone (cell_in, cell_out, tag)
 Clone cell variable.
subroutine, public cell_copy (cell_in, cell_out, tag)
 Copy cell variable.
subroutine, public parse_cell_line (input_line, cell_itimes, cell_time, h, vol)
 Read cell info from a line (parsed from a file).
subroutine, public get_cell (cell, alpha, beta, gamma, deth, orthorhombic, abc, periodic, h, h_inv, symmetry_id, tag)
 Get informations about a simulation cell.
subroutine, public cell_transform_input_cartesian (cell, vector)
 Transform a Cartesian real-space vector from the user input cell frame into CP2K's canonical internal cell frame.
subroutine, public cell_transform_input_reciprocal (cell, vector)
 Transform a Cartesian reciprocal-space vector from the user input cell frame into CP2K's canonical internal cell frame.
real(kind=dp) function, public plane_distance (h, k, l, cell)
 Calculate the distance between two lattice planes as defined by a triple of Miller indices (hkl).
subroutine, public minimum_image_weights (ra, rb, cell, index_to_cell, weights)
 Distribute an atom-pair contribution equally among its nearest candidate images. Images within 1.0E-6 of the minimum distance receive normalized equal weights.
real(kind=dp) function, dimension(3), public pbc_stable (r, cell)
 Apply a stable periodic-image convention for k-point Bloch gauges.
subroutine, public real_to_scaled (s, r, cell)
 Transform real to scaled cell coordinates. s=h_inv*r.
subroutine, public scaled_to_real (r, s, cell)
 Transform scaled cell coordinates real coordinates. r=h*s.
subroutine, public cell_retain (cell)
 retains the given cell (see doc/ReferenceCounting.html)
subroutine, public cell_release (cell)
 releases the given cell (see doc/ReferenceCounting.html)

Variables

integer, parameter, public cell_sym_none = 0
integer, parameter, public cell_sym_triclinic = 1
integer, parameter, public cell_sym_monoclinic = 2
integer, parameter, public cell_sym_monoclinic_gamma_ab = 3
integer, parameter, public cell_sym_orthorhombic = 4
integer, parameter, public cell_sym_tetragonal_ab = 5
integer, parameter, public cell_sym_tetragonal_ac = 6
integer, parameter, public cell_sym_tetragonal_bc = 7
integer, parameter, public cell_sym_rhombohedral = 8
integer, parameter, public cell_sym_hexagonal_gamma_60 = 9
integer, parameter, public cell_sym_hexagonal_gamma_120 = 10
integer, parameter, public cell_sym_cubic = 11
integer, parameter, public use_perd_none = 0
integer, parameter, public use_perd_x = 1
integer, parameter, public use_perd_y = 2
integer, parameter, public use_perd_z = 3
integer, parameter, public use_perd_xy = 4
integer, parameter, public use_perd_xz = 5
integer, parameter, public use_perd_yz = 6
integer, parameter, public use_perd_xyz = 7
character(len=3), dimension(7), parameter, public periodicity_string = [" X", " Y", " Z", " XY", " XZ", " YZ", "XYZ"]

Detailed Description

Handles all functions related to the CELL.

History
11.2008 Teodoro Laino [tlaino] - deeply cleaning cell_type from units 10.2014 Moved many routines from cell_types.F here.
Author
Matthias KracK (16.01.2002, based on a earlier version of CJM, JGH)

Function/Subroutine Documentation

◆ cell_clone()

subroutine, public cell_types::cell_clone ( type(cell_type), pointer cell_in,
type(cell_type), pointer cell_out,
character(len=*), intent(in), optional tag )

Clone cell variable.

Parameters
cell_inCell variable to be clone
cell_outCloned cell variable
tagOptional new tag for cloned cell variable
History
  • Optional tag added (17.05.2023, MK)

Definition at line 141 of file cell_types.F.

Here is the caller graph for this function:

◆ cell_copy()

subroutine, public cell_types::cell_copy ( type(cell_type), pointer cell_in,
type(cell_type), pointer cell_out,
character(len=*), intent(in), optional tag )

Copy cell variable.

Parameters
cell_inCell variable to be copied
cell_outCopy of cell variable
tagOptional new tag
History
  • Optional tag added (17.05.2023, MK)

Definition at line 160 of file cell_types.F.

Here is the caller graph for this function:

◆ parse_cell_line()

subroutine, public cell_types::parse_cell_line ( character(len=*), intent(in) input_line,
integer, intent(out) cell_itimes,
real(kind=dp), intent(out) cell_time,
real(kind=dp), dimension(3, 3), intent(out) h,
real(kind=dp), intent(out) vol )

Read cell info from a line (parsed from a file).

Parameters
input_line...
cell_itimes...
cell_time...
h...
vol...
Date
19.02.2008
Author
Teodoro Laino [tlaino] - University of Zurich
Version
1.0

Definition at line 194 of file cell_types.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_cell()

subroutine, public cell_types::get_cell ( type(cell_type), pointer cell,
real(kind=dp), intent(out), optional alpha,
real(kind=dp), intent(out), optional beta,
real(kind=dp), intent(out), optional gamma,
real(kind=dp), intent(out), optional deth,
logical, intent(out), optional orthorhombic,
real(kind=dp), dimension(3), intent(out), optional abc,
integer, dimension(3), intent(out), optional periodic,
real(kind=dp), dimension(3, 3), intent(out), optional h,
real(kind=dp), dimension(3, 3), intent(out), optional h_inv,
integer, intent(out), optional symmetry_id,
character(len=*), intent(out), optional tag )

Get informations about a simulation cell.

Parameters
cell...
alpha...
beta...
gamma...
deth...
orthorhombic...
abc...
periodic...
h...
h_inv...
symmetry_id...
tag...
Date
16.01.2002
Author
Matthias Krack
Version
1.0

Definition at line 232 of file cell_types.F.

Here is the call graph for this function:

◆ cell_transform_input_cartesian()

subroutine, public cell_types::cell_transform_input_cartesian ( type(cell_type), pointer cell,
real(kind=dp), dimension(3), intent(inout) vector )

Transform a Cartesian real-space vector from the user input cell frame into CP2K's canonical internal cell frame.

Parameters
cell...
vector...

Definition at line 284 of file cell_types.F.

Here is the caller graph for this function:

◆ cell_transform_input_reciprocal()

subroutine, public cell_types::cell_transform_input_reciprocal ( type(cell_type), pointer cell,
real(kind=dp), dimension(3), intent(inout) vector )

Transform a Cartesian reciprocal-space vector from the user input cell frame into CP2K's canonical internal cell frame.

Parameters
cell...
vector...

Definition at line 301 of file cell_types.F.

Here is the caller graph for this function:

◆ plane_distance()

real(kind=dp) function, public cell_types::plane_distance ( integer, intent(in) h,
integer, intent(in) k,
integer, intent(in) l,
type(cell_type), pointer cell )

Calculate the distance between two lattice planes as defined by a triple of Miller indices (hkl).

Parameters
h...
k...
l...
cell...
Returns
...
Date
18.11.2004
Author
Matthias Krack
Version
1.0

Definition at line 324 of file cell_types.F.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ minimum_image_weights()

subroutine, public cell_types::minimum_image_weights ( real(kind=dp), dimension(3), intent(in) ra,
real(kind=dp), dimension(3), intent(in) rb,
type(cell_type), intent(in), pointer cell,
integer, dimension(:, :), intent(in) index_to_cell,
real(kind=dp), dimension(:), intent(out) weights )

Distribute an atom-pair contribution equally among its nearest candidate images. Images within 1.0E-6 of the minimum distance receive normalized equal weights.

Parameters
raPosition of the first atom.
rbPosition of the second atom.
cellSimulation cell used to wrap the positions and translate the images.
index_to_cellCandidate lattice translations, indexed (direction, image).
weightsNormalized image weights; non-nearest images receive zero.

Definition at line 425 of file cell_types.F.

Here is the caller graph for this function:

◆ pbc_stable()

real(kind=dp) function, dimension(3), public cell_types::pbc_stable ( real(kind=dp), dimension(3), intent(in) r,
type(cell_type), pointer cell )

Apply a stable periodic-image convention for k-point Bloch gauges.

Parameters
r...
cell...
Returns
r_pbc ...

Definition at line 457 of file cell_types.F.

Here is the caller graph for this function:

◆ real_to_scaled()

subroutine, public cell_types::real_to_scaled ( real(kind=dp), dimension(3), intent(out) s,
real(kind=dp), dimension(3), intent(in) r,
type(cell_type), pointer cell )

Transform real to scaled cell coordinates. s=h_inv*r.

Parameters
s...
r...
cell...
Date
16.01.2002
Author
Matthias Krack
Version
1.0

Definition at line 630 of file cell_types.F.

Here is the caller graph for this function:

◆ scaled_to_real()

subroutine, public cell_types::scaled_to_real ( real(kind=dp), dimension(3), intent(out) r,
real(kind=dp), dimension(3), intent(in) s,
type(cell_type), pointer cell )

Transform scaled cell coordinates real coordinates. r=h*s.

Parameters
r...
s...
cell...
Date
16.01.2002
Author
Matthias Krack
Version
1.0

Definition at line 660 of file cell_types.F.

Here is the caller graph for this function:

◆ cell_retain()

subroutine, public cell_types::cell_retain ( type(cell_type), pointer cell)

retains the given cell (see doc/ReferenceCounting.html)

Parameters
cellthe cell to retain
History
09.2003 created [fawzi]
Author
Fawzi Mohamed

Definition at line 686 of file cell_types.F.

Here is the caller graph for this function:

◆ cell_release()

subroutine, public cell_types::cell_release ( type(cell_type), pointer cell)

releases the given cell (see doc/ReferenceCounting.html)

Parameters
cellthe cell to release
History
09.2003 created [fawzi]
Author
Fawzi Mohamed

Definition at line 703 of file cell_types.F.

Here is the caller graph for this function:

Variable Documentation

◆ cell_sym_none

integer, parameter, public cell_types::cell_sym_none = 0

Definition at line 29 of file cell_types.F.

◆ cell_sym_triclinic

integer, parameter, public cell_types::cell_sym_triclinic = 1

Definition at line 29 of file cell_types.F.

◆ cell_sym_monoclinic

integer, parameter, public cell_types::cell_sym_monoclinic = 2

Definition at line 29 of file cell_types.F.

◆ cell_sym_monoclinic_gamma_ab

integer, parameter, public cell_types::cell_sym_monoclinic_gamma_ab = 3

Definition at line 29 of file cell_types.F.

◆ cell_sym_orthorhombic

integer, parameter, public cell_types::cell_sym_orthorhombic = 4

Definition at line 29 of file cell_types.F.

◆ cell_sym_tetragonal_ab

integer, parameter, public cell_types::cell_sym_tetragonal_ab = 5

Definition at line 29 of file cell_types.F.

◆ cell_sym_tetragonal_ac

integer, parameter, public cell_types::cell_sym_tetragonal_ac = 6

Definition at line 29 of file cell_types.F.

◆ cell_sym_tetragonal_bc

integer, parameter, public cell_types::cell_sym_tetragonal_bc = 7

Definition at line 29 of file cell_types.F.

◆ cell_sym_rhombohedral

integer, parameter, public cell_types::cell_sym_rhombohedral = 8

Definition at line 29 of file cell_types.F.

◆ cell_sym_hexagonal_gamma_60

integer, parameter, public cell_types::cell_sym_hexagonal_gamma_60 = 9

Definition at line 29 of file cell_types.F.

◆ cell_sym_hexagonal_gamma_120

integer, parameter, public cell_types::cell_sym_hexagonal_gamma_120 = 10

Definition at line 29 of file cell_types.F.

◆ cell_sym_cubic

integer, parameter, public cell_types::cell_sym_cubic = 11

Definition at line 29 of file cell_types.F.

◆ use_perd_none

integer, parameter, public cell_types::use_perd_none = 0

Definition at line 42 of file cell_types.F.

◆ use_perd_x

integer, parameter, public cell_types::use_perd_x = 1

Definition at line 42 of file cell_types.F.

◆ use_perd_y

integer, parameter, public cell_types::use_perd_y = 2

Definition at line 42 of file cell_types.F.

◆ use_perd_z

integer, parameter, public cell_types::use_perd_z = 3

Definition at line 42 of file cell_types.F.

◆ use_perd_xy

integer, parameter, public cell_types::use_perd_xy = 4

Definition at line 42 of file cell_types.F.

◆ use_perd_xz

integer, parameter, public cell_types::use_perd_xz = 5

Definition at line 42 of file cell_types.F.

◆ use_perd_yz

integer, parameter, public cell_types::use_perd_yz = 6

Definition at line 42 of file cell_types.F.

◆ use_perd_xyz

integer, parameter, public cell_types::use_perd_xyz = 7

Definition at line 42 of file cell_types.F.

◆ periodicity_string

character(len=3), dimension(7), parameter, public cell_types::periodicity_string = [" X", " Y", " Z", " XY", " XZ", " YZ", "XYZ"]

Definition at line 51 of file cell_types.F.