Provides realspace cutoff and lattice generation Realspace cutoff and lattice point generator utilities
Periodic directions are selected by a mask over the three lattice vectors, lattice vectors of nonperiodic directions are ignored. A one-element mask, as created for molecular structures, applies to all three directions.
Create lattice points within a given cutoff
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | periodic(:) |
Periodic dimensions |
||
| real(kind=wp), | intent(in) | :: | lat(:,:) |
Lattice parameters |
||
| real(kind=wp), | intent(in) | :: | rthr |
Real space cutoff |
||
| real(kind=wp), | intent(out), | allocatable | :: | trans(:,:) |
Generated lattice points |
|
| type(error_type), | intent(out), | allocatable | :: | error |
Error handling |
Create lattice points within a given cutoff.
Note
Deprecated: pass an explicit error argument instead.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | periodic(:) |
Periodic dimensions |
||
| real(kind=wp), | intent(in) | :: | lat(:,:) |
Lattice parameters |
||
| real(kind=wp), | intent(in) | :: | rthr |
Real space cutoff |
||
| real(kind=wp), | intent(out), | allocatable | :: | trans(:,:) |
Generated lattice points |
Generate lattice points from repetitions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | lat(:,:) |
Lattice vectors |
||
| integer, | intent(in) | :: | rep(:) |
Repeatitions of lattice points to generate |
||
| logical, | intent(in) | :: | origin |
Include the origin in the generated lattice points |
||
| real(kind=wp), | intent(out), | allocatable | :: | trans(:,:) |
Generated lattice points |
|
| type(error_type), | intent(out), | allocatable | :: | error |
Error handling |
Generate lattice points from repetitions.
Note
Deprecated: pass an explicit error argument instead.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(in) | :: | lat(:,:) |
Lattice vectors |
||
| integer, | intent(in) | :: | rep(:) |
Repeatitions of lattice points to generate |
||
| logical, | intent(in) | :: | origin |
Include the origin in the generated lattice points |
||
| real(kind=wp), | intent(out), | allocatable | :: | trans(:,:) |
Generated lattice points |
Lattice vectors of the periodic directions and the inverse metric of the periodic subspace.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | periodic(:) |
Periodic dimensions |
||
| real(kind=wp), | intent(in) | :: | lattice(:,:) |
Lattice vectors |
||
| real(kind=wp), | intent(out) | :: | lat(3,3) |
Lattice vectors of the periodic directions, zero for nonperiodic ones |
||
| real(kind=wp), | intent(out) | :: | ginv(3,3) |
Inverse metric of the periodic subspace, zero for nonperiodic directions |
||
| type(error_type), | intent(out), | allocatable | :: | error |
Error handling |
Extract the number and indices of the periodic lattice directions
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| logical, | intent(in) | :: | periodic(:) |
Periodic dimensions, a one-element mask applies to all directions |
||
| integer, | intent(out) | :: | ndim |
Number of periodic dimensions (0, 1, 2, or 3) |
||
| integer, | intent(out) | :: | p_axes(3) |
Indices of the periodic directions in 1..ndim |
Pairwise size reduction of the lattice vectors, which gives a shorter and more orthogonal basis of the same lattice
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | lat(3,3) |
Lattice vectors, zero for nonperiodic directions |
Wrap Cartesian coordinates into the central cell along the periodic directions, the components perpendicular to the periodic subspace are kept.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=wp), | intent(inout) | :: | xyz(:,:) |
Cartesian atomic coordinates, updated in place |
||
| real(kind=wp), | intent(in) | :: | lattice(:,:) |
Lattice vectors |
||
| logical, | intent(in) | :: | periodic(:) |
Periodic dimensions |