Documentation for module cell_types

Handles all functions related to the CELL

source: cell_types.F
Loading...

public Types:

cell_type
Type defining parameters related to the simulation cell
cell_p_type
...

Generic procedures:

pbc
pbc1
pbc2
pbc3
pbc4

public Subroutines/Functions:

...
SUBROUTINE
cell_copy (cell_in, cell_out)
...
SUBROUTINE
cell_create (cell, hmat, periodic)
allocates and initializes a cell
SUBROUTINE
cell_release (cell)
releases the given cell (see doc/ReferenceCounting.html)
SUBROUTINE
cell_retain (cell)
retains the given cell (see doc/ReferenceCounting.html)
Get informations about a simulation cell.
Access internal type variables
SUBROUTINE
init_cell (cell, hmat, periodic)
Initialise/readjust a simulation cell after hmat has been changed
Read cell info from a line (parsed from a file)
FUNCTION
REAL(dp)
plane_distance (h, k, l, cell)
Calculate the distance between two lattice planes as defined by a triple of Miller indices (hkl).
SUBROUTINE
real_to_scaled (s, r, cell)
Transform real to scaled cell coordinates. s=h_inv*r
SUBROUTINE
scaled_to_real (r, s, cell)
Transform scaled cell coordinates real coordinates. r=h*s
Sets the cell using the internal parameters (a,b,c) (alpha,beta,gamma) using the convention: a parallel to the x axis, b in the x-y plane and and c univoquely determined; gamma is the angle between a and b; beta is the angle between c and a and alpha is the angle between c and b

Parameters:

INTEGER
:: cell_sym_cubic = 9
INTEGER
:: cell_sym_hexagonal = 8
INTEGER
:: cell_sym_monoclinic = 2
INTEGER
:: cell_sym_none = 0
INTEGER
:: cell_sym_orthorhombic = 3
INTEGER
:: cell_sym_rhombohedral = 7
INTEGER
:: cell_sym_tetragonal_ab = 4
INTEGER
:: cell_sym_tetragonal_ac = 5
INTEGER
:: cell_sym_tetragonal_bc = 6
INTEGER
:: cell_sym_triclinic = 1
INTEGER
:: use_perd_none = 7
INTEGER
:: use_perd_x = 0
INTEGER
:: use_perd_xy = 3
INTEGER
:: use_perd_xyz = 6
INTEGER
:: use_perd_xz = 4
INTEGER
:: use_perd_y = 1
INTEGER
:: use_perd_yz = 5
INTEGER
:: use_perd_z = 2

public Types:

TYPE :: cell_p_type

...


TYPE(cell_type),
POINTER :: cell ...

TYPE :: cell_type

Type defining parameters related to the simulation cell


INTEGER
:: ref_count ...
INTEGER
:: id_nr ...
INTEGER
:: symmetry_id ...
LOGICAL
:: orthorhombic ...
REAL(dp)
:: deth ...
INTEGER,
DIMENSION(3) :: perd ...
REAL(dp),
DIMENSION(3,3) :: hmat ...
REAL(dp),
DIMENSION(3,3) :: h_inv ...


Generic procedure pbc

...

REAL(dp),
INTENT(in)
:: r(3) × × ×
TYPE(cell_type),
POINTER
:: cell × × × ×
INTEGER,
INTENT(in)
:: nl(3) ×
REAL(dp),
INTENT(in)
:: ra(3) ×
REAL(dp),
INTENT(in)
:: rb(3) ×
LOGICAL
:: positive_range ×

SUBROUTINEcell_clone(cell_in, cell_out)

...

Arguments:
TYPE(cell_type),
POINTER
:: cell_in ...
TYPE(cell_type),
POINTER
:: cell_out ...

SUBROUTINEcell_copy(cell_in, cell_out)

...

Arguments:
TYPE(cell_type),
POINTER
:: cell_in ...
TYPE(cell_type),
POINTER
:: cell_out ...

SUBROUTINEcell_create(cell, hmat, periodic)

allocates and initializes a cell

Arguments:
TYPE(cell_type),
POINTER
:: cell the cell to initialize
REAL(dp),
INTENT(in),
OPTIONAL
:: hmat(3,3) the h matrix that defines the cell
INTEGER,
INTENT(in),
OPTIONAL
:: periodic(3) periodicity of the cell

SUBROUTINEcell_release(cell)

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

Arguments:
TYPE(cell_type),
POINTER
:: cell the cell to release

SUBROUTINEcell_retain(cell)

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

Arguments:
TYPE(cell_type),
POINTER
:: cell the cell to retain

SUBROUTINEget_cell(cell, alpha, beta, gamma, deth, orthorhombic, abc, periodic, h, h_inv, id_nr, symmetry_id)

Get informations about a simulation cell.

Arguments:
TYPE(cell_type),
POINTER
:: cell ...
REAL(dp),
INTENT(out),
OPTIONAL
:: alpha ...
REAL(dp),
INTENT(out),
OPTIONAL
:: beta ...
REAL(dp),
INTENT(out),
OPTIONAL
:: gamma ...
REAL(dp),
INTENT(out),
OPTIONAL
:: deth ...
LOGICAL,
INTENT(out),
OPTIONAL
:: orthorhombic ...
REAL(dp),
INTENT(out),
OPTIONAL
:: abc(3) ...
INTEGER,
INTENT(out),
OPTIONAL
:: periodic(3) ...
REAL(dp),
INTENT(out),
OPTIONAL
:: h(3,3) ...
REAL(dp),
INTENT(out),
OPTIONAL
:: h_inv(3,3) ...
INTEGER,
INTENT(out),
OPTIONAL
:: id_nr ...
INTEGER,
INTENT(out),
OPTIONAL
:: symmetry_id ...

SUBROUTINEget_cell_param(cell, cell_length, cell_angle, units_angle, periodic)

Access internal type variables

Arguments:
TYPE(cell_type),
POINTER
:: cell ...
REAL(dp),
INTENT(out)
:: cell_length(3) ...
REAL(dp),
INTENT(out),
OPTIONAL
:: cell_angle(3) ...
INTEGER,
INTENT(in),
OPTIONAL
:: units_angle ...
INTEGER,
INTENT(out),
OPTIONAL
:: periodic(3) ...

SUBROUTINEinit_cell(cell, hmat, periodic)

Initialise/readjust a simulation cell after hmat has been changed

Arguments:
TYPE(cell_type),
POINTER
:: cell ...
REAL(dp),
INTENT(in),
OPTIONAL
:: hmat(3,3) ...
INTEGER,
INTENT(in),
OPTIONAL
:: periodic(3) ...

SUBROUTINEparse_cell_line(input_line, cell_itimes, cell_time, h, vol)

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

Arguments:
CHARACTER(*),
INTENT(in)
:: input_line ...
INTEGER,
INTENT(out)
:: cell_itimes ...
REAL(dp),
INTENT(out)
:: cell_time ...
REAL(dp),
INTENT(out)
:: h(3,3) ...
REAL(dp),
INTENT(out)
:: vol ...

FUNCTIONplane_distance(h, k, l, cell)

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

Return Value ::
REAL(dp)
Arguments:
INTEGER,
INTENT(in)
:: h ...
INTEGER,
INTENT(in)
:: k ...
INTEGER,
INTENT(in)
:: l ...
TYPE(cell_type),
POINTER
:: cell ...

SUBROUTINEreal_to_scaled(s, r, cell)

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

Arguments:
REAL(dp),
INTENT(out)
:: s(3) ...
REAL(dp),
INTENT(in)
:: r(3) ...
TYPE(cell_type),
POINTER
:: cell ...

SUBROUTINEscaled_to_real(r, s, cell)

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

Arguments:
REAL(dp),
INTENT(out)
:: r(3) ...
REAL(dp),
INTENT(in)
:: s(3) ...
TYPE(cell_type),
POINTER
:: cell ...

SUBROUTINEset_cell_param(cell, cell_length, cell_angle, periodic, do_init_cell)

Sets the cell using the internal parameters (a,b,c) (alpha,beta,gamma) using the convention: a parallel to the x axis, b in the x-y plane and and c univoquely determined; gamma is the angle between a and b; beta is the angle between c and a and alpha is the angle between c and b

Arguments:
TYPE(cell_type),
POINTER
:: cell ...
REAL(dp),
INTENT(in)
:: cell_length(3) ...
REAL(dp),
INTENT(in)
:: cell_angle(3) ...
INTEGER,
INTENT(in),
OPTIONAL
:: periodic(3) ...
LOGICAL,
INTENT(in)
:: do_init_cell ...

FUNCTIONpbc1(r, cell)

Apply the periodic boundary conditions defined by a simulation cell to a position vector r.

Return Value ::
REAL(dp)
Arguments:
REAL(dp),
INTENT(in)
:: r(3) ...
TYPE(cell_type),
POINTER
:: cell ...

FUNCTIONpbc2(r, cell, nl)

Apply the periodic boundary conditions defined by a simulation cell to a position vector r subtracting nl from the periodic images

Return Value ::
REAL(dp)
Arguments:
REAL(dp),
INTENT(in)
:: r(3) ...
TYPE(cell_type),
POINTER
:: cell ...
INTEGER,
INTENT(in)
:: nl(3) ...

FUNCTIONpbc3(ra, rb, cell)

Apply the periodic boundary conditions defined by the simulation cell cell to the vector pointing from atom a to atom b.

Return Value ::
REAL(dp)
Arguments:
REAL(dp),
INTENT(in)
:: ra(3) ...
REAL(dp),
INTENT(in)
:: rb(3) ...
TYPE(cell_type),
POINTER
:: cell ...

FUNCTIONpbc4(r, cell, positive_range)

...

Return Value ::
REAL(dp)
Arguments:
REAL(dp),
INTENT(in)
:: r(3) ...
TYPE(cell_type),
POINTER
:: cell ...
LOGICAL
:: positive_range ...