(git:7b94146)
Loading...
Searching...
No Matches
cell_methods Module Reference

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

Functions/Subroutines

subroutine, public cell_create (cell, hmat, periodic, tag)
 allocates and initializes a cell
 
subroutine, public init_cell (cell, hmat, periodic)
 Initialise/readjust a simulation cell after hmat has been changed.
 
recursive subroutine, public read_cell (cell, cell_ref, use_ref_cell, cell_section, topology_section, check_for_ref, para_env)
 ...
 
subroutine, public set_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.
 
subroutine, public read_cell_cif (cif_file_name, cell, para_env)
 Reads cell information from CIF file.
 
subroutine, public read_cell_extxyz (extxyz_file_name, cell, para_env)
 Reads cell information from comment line of extended xyz file.
 
subroutine, public read_cell_pdb (pdb_file_name, cell, para_env)
 Reads cell information from CRYST1 record of PDB file.
 
subroutine, public read_cell_cp2k (cp2k_file_name, cell, para_env)
 Reads cell information from cp2k file.
 
subroutine, public read_cell_xsc (xsc_file_name, cell, para_env)
 Reads cell information from xsc file.
 
subroutine, public write_cell (cell, subsys_section, tag)
 Write the cell parameters to the output unit.
 
subroutine, public write_cell_low (cell, unit_str, output_unit, label)
 Write the cell parameters to the output unit.
 

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 to cell_types.F.
Author
Matthias KracK (16.01.2002, based on a earlier version of CJM, JGH)

Function/Subroutine Documentation

◆ cell_create()

subroutine, public cell_methods::cell_create ( type(cell_type), pointer  cell,
real(kind=dp), dimension(3, 3), intent(in), optional  hmat,
integer, dimension(3), intent(in), optional  periodic,
character(len=*), intent(in), optional  tag 
)

allocates and initializes a cell

Parameters
cellthe cell to initialize
hmatthe h matrix that defines the cell
periodicperiodicity of the cell
tag...
History
09.2003 created [fawzi]
Author
Fawzi Mohamed

Definition at line 90 of file cell_methods.F.

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

◆ init_cell()

subroutine, public cell_methods::init_cell ( type(cell_type), pointer  cell,
real(kind=dp), dimension(3, 3), intent(in), optional  hmat,
integer, dimension(3), intent(in), optional  periodic 
)

Initialise/readjust a simulation cell after hmat has been changed.

Parameters
cell...
hmat...
periodic...
Date
16.01.2002
Author
Matthias Krack
Version
1.0

Definition at line 122 of file cell_methods.F.

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

◆ read_cell()

recursive subroutine, public cell_methods::read_cell ( type(cell_type), pointer  cell,
type(cell_type), pointer  cell_ref,
logical, intent(inout), optional  use_ref_cell,
type(section_vals_type), optional, pointer  cell_section,
type(section_vals_type), optional, pointer  topology_section,
logical, intent(in), optional  check_for_ref,
type(mp_para_env_type), pointer  para_env 
)

...

Parameters
cell...
cell_ref...
use_ref_cell...
cell_section...
topology_section...
check_for_ref...
para_env...
History
03.2005 created [teo] 03.2026 revamped logic with pdb and extxyz parsers
Author
Teodoro Laino

Definition at line 278 of file cell_methods.F.

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

◆ set_cell_param()

subroutine, public cell_methods::set_cell_param ( type(cell_type), pointer  cell,
real(kind=dp), dimension(3), intent(in)  cell_length,
real(kind=dp), dimension(3), intent(in)  cell_angle,
integer, dimension(3), intent(in), optional  periodic,
logical, intent(in)  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.

Parameters
cell...
cell_length...
cell_angle...
periodic...
do_init_cell...
Date
03.2008
Author
Teodoro Laino

Definition at line 581 of file cell_methods.F.

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

◆ read_cell_cif()

subroutine, public cell_methods::read_cell_cif ( character(len=*)  cif_file_name,
type(cell_type), pointer  cell,
type(mp_para_env_type), pointer  para_env 
)

Reads cell information from CIF file.

Parameters
cif_file_name...
cell...
para_env...
Date
12.2008
Format Information implemented:
_cell_length_a (_cell.length_a) _cell_length_b (_cell.length_b) _cell_length_c (_cell.length_c) _cell_angle_alpha (_cell.length_alpha) _cell_angle_beta (_cell.length_beta) _cell_angle_gamma (_cell.length_gamma)
Author
Teodoro Laino [tlaino] moved from topology_cif (1/2019 JHU)

Definition at line 668 of file cell_methods.F.

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

◆ read_cell_extxyz()

subroutine, public cell_methods::read_cell_extxyz ( character(len=*)  extxyz_file_name,
type(cell_type), pointer  cell,
type(mp_para_env_type), pointer  para_env 
)

Reads cell information from comment line of extended xyz file.

Parameters
extxyz_file_name...
cell...
para_env...
Date
03.2026
Extended xyz format has comment on the second line in the form as
Lattice="Ax Ay Az Bx By Bz Cx Cy Cz" where Ax, Ay, Az are three Cartesian components of cell vector A, Bx, By, Bz are components of B, Cx, Cy, Cz are components of C, all in the unit of angstrom.

Definition at line 806 of file cell_methods.F.

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

◆ read_cell_pdb()

subroutine, public cell_methods::read_cell_pdb ( character(len=*)  pdb_file_name,
type(cell_type), pointer  cell,
type(mp_para_env_type), pointer  para_env 
)

Reads cell information from CRYST1 record of PDB file.

Parameters
pdb_file_name...
cell...
para_env...
Date
03.2026
CRYST1 record may contain space group and Z value at the end,
but here only the first entries are read:

COLUMNS DATA TYPE FIELD DEFINITION

1 - 6 Record name "CRYST1" 7 - 15 Real(9.3) a a (Angstroms). 16 - 24 Real(9.3) b b (Angstroms). 25 - 33 Real(9.3) c c (Angstroms). 34 - 40 Real(7.2) alpha alpha (degrees). 41 - 47 Real(7.2) beta beta (degrees). 48 - 54 Real(7.2) gamma gamma (degrees).

Definition at line 865 of file cell_methods.F.

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

◆ read_cell_cp2k()

subroutine, public cell_methods::read_cell_cp2k ( character(len=*)  cp2k_file_name,
type(cell_type), pointer  cell,
type(mp_para_env_type), pointer  para_env 
)

Reads cell information from cp2k file.

Parameters
cp2k_file_name...
cell...
para_env...
Date
03.2026
Isolated from former read_cell_from_external_file

Definition at line 913 of file cell_methods.F.

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

◆ read_cell_xsc()

subroutine, public cell_methods::read_cell_xsc ( character(len=*)  xsc_file_name,
type(cell_type), pointer  cell,
type(mp_para_env_type), pointer  para_env 
)

Reads cell information from xsc file.

Parameters
xsc_file_name...
cell...
para_env...
Date
03.2026
Isolated from former read_cell_from_external_file

Definition at line 958 of file cell_methods.F.

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

◆ write_cell()

subroutine, public cell_methods::write_cell ( type(cell_type), pointer  cell,
type(section_vals_type), pointer  subsys_section,
character(len=*), intent(in), optional  tag 
)

Write the cell parameters to the output unit.

Parameters
cell...
subsys_section...
tag...
Date
02.06.2000
History
  • 11.2008 Teodoro Laino [tlaino] - rewrite and enabling user driven units
Author
Matthias Krack
Version
1.0

Definition at line 1034 of file cell_methods.F.

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

◆ write_cell_low()

subroutine, public cell_methods::write_cell_low ( type(cell_type), pointer  cell,
character(len=*), intent(in)  unit_str,
integer, intent(in)  output_unit,
character(len=*), intent(in), optional  label 
)

Write the cell parameters to the output unit.

Parameters
cell...
unit_str...
output_unit...
label...
Date
17.05.2023
History
  • Extracted from write_cell (17.05.2023, MK)
Version
1.0

Definition at line 1070 of file cell_methods.F.

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