pydft_qmmm.utils.lattice¶
Helper functions for operations involving periodic lattices.
Functions
Calculate the length and angle constants from lattice vectors. |
|
|
Calculate the lattice vectors from length and angle constants. |
|
Calculate the least mirror vector. |
- pydft_qmmm.utils.lattice.compute_lattice_constants(box)[source]¶
Calculate the length and angle constants from lattice vectors.
Returns the lattice constants a, b, c, \(\mathrm{\alpha}\), \(\mathrm{\beta}\), and \(\mathrm{\gamma}\) using a set of box vectors for a periodic triclinic system.
- pydft_qmmm.utils.lattice.compute_lattice_vectors(a, b, c, alpha, beta, gamma)[source]¶
Calculate the lattice vectors from length and angle constants.
- Parameters:
a (
float
) – The first characteristic length (\(\mathrm{\mathring{A}}\)) of an arbitrary triclinic box.b (
float
) – The second characteristic length (\(\mathrm{\mathring{A}}\)) of an arbitrary triclinic box.b – The third characteristic length (\(\mathrm{\mathring{A}}\)) of an arbitrary triclinic box.
alpha (
float
) – The first characteristic angle (\(\mathrm{^{\circ}}\)), \(\mathrm{\alpha}\), of an arbitrary triclinic box.beta (
float
) – The second characteristic angle (\(\mathrm{^{\circ}}\)), \(\mathrm{\beta}\), of an arbitrary triclinic box.gamma (
float
) – The third characteristic angle (\(\mathrm{^{\circ}}\)), \(\mathrm{\gamma}\), of an arbitrary triclinic box.c (float)
- Return type:
- Returns:
The lattice vectors (\(\mathrm{\mathring{A}}\)) of an arbitrary triclinic box.
- pydft_qmmm.utils.lattice.compute_least_mirror(i_vector, j_vector, box)[source]¶
Calculate the least mirror vector.
- Parameters:
i_vector (
ndarray
[tuple
[Any
,...
],dtype
[float64
]]) – The position vector (\(\mathrm{\mathring{A}}\)).j_vector (
ndarray
[tuple
[Any
,...
],dtype
[float64
]]) – The reference vector (\(\mathrm{\mathring{A}}\)).box (
ndarray
[tuple
[Any
,...
],dtype
[float64
]]) – The lattice vectors (\(\mathrm{\mathring{A}}\)) of an arbitrary triclinic box.
- Return type:
- Returns:
Returns the least mirror coordinates of i_vector with respect to j_vector given a set of lattice vectors from a periodic triclinic system.