chfl_cell type

type chfl_cell

A chfl_cell represent the box containing the atoms, and its periodicity.

An unit cell is fully represented by three lengths (a, b, c); and three angles (alpha, beta, gamma). The angles are stored in degrees, and the lengths in Angstroms.

The initialization routine for chfl_cell are:

Type fields:
subroutine chfl_cell%init(lengths[, status])

Initialize this unit cell with an unit cell having the given lengths. The unit cell shape is CHFL_CELL_ORTHORHOMBIC.

Parameters:lengths (3) [real] :: cell lengths, in angstroms
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%triclinic(lengths, angles[, status])

Initialize this unit cell with an unit cell having the given lengths and angles. The unit cell shape is CHFL_CELL_TRICLINIC.

Parameters:
  • lengths (3) [real] :: cell lengths, in angstroms
  • angles (3) [real] :: cell angles, in degrees
Options:

status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.

subroutine chfl_cell%copy(cell[, status])

Initialize this unit cell with a copy of cell.

Parameters:cell [chfl_cell] :: cell to copy
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%from_frame(frame[, status])

Initialize this topology with a copy of the chfl_cell of a frame.

Parameters:frame [chfl_frame] :: the frame
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%volume(volume[, status])

Get the volume of the unit cell in volume.

Parameters:volume [real] :: volume of the unit cell
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%lengths(lengths[, status])

Get the unit cell lengths in lengths.

Parameters:lengths (3) [real] :: cell lengths, in angstroms
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%set_lengths(lengths[, status])

Set the unit cell lengths to lengths.

Parameters:lengths (3) [real] :: new cell lengths, in angstroms
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%angles(angles[, status])

Get the unit cell angles in angles.

Parameters:angles (3) [real] :: cell angles, in degrees
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%set_angles(alpha, beta, gamma[, status])

Set the cell angles to angles. Trying to set cell angles on a cell which is not triclinic (does not have the CHFL_CELL_TRICLINIC shape) is an error.

Parameters:angles (3) [real] :: new cell angles, in degrees
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%matrix(matrix[, status])

Get the unit cell matricial representation in matrix.

The unit cell representation is obtained by aligning the a vector along the x axis and putting the b vector in the xy plane. This make the matrix an upper triangular matrix:

| a_x b_x c_x |
|  0  b_y c_y |
|  0   0  c_z |
Parameters:matrix (3, 3) [real] :: unit cell matrix
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%shape(shape[, status])

Get the unit cell shape in shape.

Parameters:type [integer,kind=chfl_cellshape] :: the shape of the cell
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.

The cell shapes are integers which kind is the chfl_cellshape parameter:

integer(chfl_cellshape) :: CHFL_CELL_ORTHORHOMBIC

The three angles are 90°

integer(chfl_cellshape) :: CHFL_CELL_TRICLINIC

The three angles may not be 90°

integer(chfl_cellshape) :: CHFL_CELL_INFINITE

Cell type when there is no periodic boundary conditions

subroutine chfl_cell%set_shape(shape[, status])

Set the unit cell shape to shape

Parameters:type [integer,kind=chfl_cellshape] :: the new type of the cell
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%wrap(vector[, status])

Wrap a vector in this unit cell so that all its components are beteen -L/2 and L/2.

Parameters:vector (3) [real] :: new cell angles, in degrees
Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.
subroutine chfl_cell%free([status])

Destroy an unit cell, and free the associated memory

Options:status [integer,optional, kind=chfl_status] :: status code of the operation. If it is not equal to CHFL_SUCCESS, you can learn more about the error by using chfl_last_error.