(git:f7b9015)
Loading...
Searching...
No Matches
cell_opt_utils Module Reference

Parse CELL_OPT constraints, build symmetry constraint rows, and compute the cell enthalpy gradient. More...

Functions/Subroutines

subroutine, public read_external_press_tensor (geo_section, cell, pres_ext, mtrx, input_to_opt)
 Reads the external pressure tensor.
subroutine, public parse_cell_constraint (constraint_tokens, cell, explicit, mask)
 Parses the tokens of the CONSTRAINT keyword into a cell component mask.
pure character(len=default_string_length) function, public cell_opt_constraint_label (mask)
 Returns the label of the cell constraint mask.
subroutine, public symmetry_constraint_rows (symmetry_id, mask, lin_w, n_lin_rows, eq_pair, n_eq_rows)
 Translate a crystal system into cell constraint rows.
integer function, public spgr_point_group_symmetry_id (spgr, cell)
 Identify the canonical crystal system preserved by a space group's point group.
pure subroutine, public parse_token (token, accepted, token_mask, reject_reason)
 Classify one CONSTRAINT token without aborting (decision half of the parser).
subroutine, public get_dg_dh (gradient, av_ptens, pres_ext, cell, mtrx, pres_int)
 Computes the derivatives for the cell.

Detailed Description

Parse CELL_OPT constraints, build symmetry constraint rows, and compute the cell enthalpy gradient.

History
03.2008 - Teodoro Laino [tlaino] - University of Zurich - Cell Optimization

Function/Subroutine Documentation

◆ read_external_press_tensor()

subroutine, public cell_opt_utils::read_external_press_tensor ( type(section_vals_type), pointer geo_section,
type(cell_type), pointer cell,
real(kind=dp), intent(out) pres_ext,
real(kind=dp), dimension(3, 3), intent(out) mtrx,
real(kind=dp), dimension(3, 3), intent(in) input_to_opt )

Reads the external pressure tensor.

Parameters
geo_section...
cell...
pres_ext...
mtrx...
input_to_optrotation from the input Cartesian frame to the optimization frame
Author
Teodoro Laino [tlaino] - University of Zurich - 03.2008

Definition at line 63 of file cell_opt_utils.F.

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

◆ parse_cell_constraint()

subroutine, public cell_opt_utils::parse_cell_constraint ( character(len=*), dimension(:), intent(in) constraint_tokens,
type(cell_type), pointer cell,
logical, intent(in) explicit,
integer, intent(out) mask )

Parses the tokens of the CONSTRAINT keyword into a cell component mask.

Parameters
constraint_tokensvalue tokens of the CONSTRAINT keyword (char_t list)
cellsimulation cell (only the periodicity is used)
explicitwhether the CONSTRAINT keyword was given explicitly
maskunion of the fixed cell components (comp_* and mask_* bits)

Definition at line 122 of file cell_opt_utils.F.

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

◆ cell_opt_constraint_label()

pure character(len=default_string_length) function, public cell_opt_utils::cell_opt_constraint_label ( integer, intent(in) mask)

Returns the label of the cell constraint mask.

Parameters
maskbit mask of fixed cell components (comp_*, mask_*)
Returns
4-character legacy label or space-separated component names

Definition at line 209 of file cell_opt_utils.F.

Here is the caller graph for this function:

◆ symmetry_constraint_rows()

subroutine, public cell_opt_utils::symmetry_constraint_rows ( integer, intent(in) symmetry_id,
integer, intent(out) mask,
real(kind=dp), dimension(n_slot, n_slot), intent(out) lin_w,
integer, intent(out) n_lin_rows,
integer, dimension(2, n_geom), intent(out) eq_pair,
integer, intent(out) n_eq_rows )

Translate a crystal system into cell constraint rows.

Parameters
symmetry_idcrystal system of the canonical cell
maskcomp_* bits for canonical entries fixed to zero by symmetry
lin_wlinear coupling normals, one normal per column
n_lin_rowsnumber of active columns in lin_w
eq_pairindex pairs [m, n] in 1..6 for geometric equalities, one pair per column
n_eq_rowsnumber of active columns in eq_pair
Note
Rhombohedral (a = b = c, alpha = beta = gamma) and monoclinic_gamma_ab (a = b with free gamma) produce curved geometric equalities. All other crystal systems produce constant linear rows with zero curvature.

Definition at line 257 of file cell_opt_utils.F.

Here is the caller graph for this function:

◆ spgr_point_group_symmetry_id()

integer function, public cell_opt_utils::spgr_point_group_symmetry_id ( type(spgr_type), intent(in), pointer spgr,
type(cell_type), pointer cell )

Identify the canonical crystal system preserved by a space group's point group.

Parameters
spgrspace group with integer lattice rotations in rotations_subset
cellsymmetric start cell in the canonical frame
Returns
symmetry_id of the invariant metric form, or cell_sym_triclinic when the setting adds no canonical cell constraints
Note
Averaging the metric G = hmat^T hmat over the point group produces the invariant metric form {G : R G R^T = G for all R}. Classifying the lengths and angles of this averaged metric maps the point group to the row sets of symmetry_constraint_rows. Non-canonical settings (such as a monoclinic unique axis along a or c) return cell_sym_triclinic and add zero cell rows.

Definition at line 345 of file cell_opt_utils.F.

Here is the caller graph for this function:

◆ parse_token()

pure subroutine, public cell_opt_utils::parse_token ( character(len=*), intent(in) token,
logical, intent(out) accepted,
integer, intent(out) token_mask,
character(len=default_string_length), intent(out) reject_reason )

Classify one CONSTRAINT token without aborting (decision half of the parser).

Parameters
tokenone upper-case token of the CONSTRAINT value line
accepted.TRUE. when the token contributes a mask
token_maskthe constraint mask contributed by an accepted token
reject_reasonempty for accepted tokens, or the abort message otherwise
Note
parse_cell_constraint applies this classification and turns a rejection into a cp_abort. Keeping the decision here keeps it unit-testable: the unit test checks the classification table without triggering aborts.

Definition at line 426 of file cell_opt_utils.F.

Here is the caller graph for this function:

◆ get_dg_dh()

subroutine, public cell_opt_utils::get_dg_dh ( real(kind=dp), dimension(n_slot), intent(out) gradient,
real(kind=dp), dimension(3, 3), intent(in) av_ptens,
real(kind=dp), intent(in) pres_ext,
type(cell_type), pointer cell,
real(kind=dp), dimension(3, 3), intent(in) mtrx,
real(kind=dp), intent(out) pres_int )

Computes the derivatives for the cell.

Parameters
gradiententhalpy gradient +d(E + pres_ext*V)/dq in the six canonical components
av_ptens...
pres_ext...
cell...
mtrx...
pres_int...
Author
Teodoro Laino [tlaino] - University of Zurich - 03.2008

Definition at line 492 of file cell_opt_utils.F.

Here is the caller graph for this function: