|
TRIQS/TRIQS 4.0.0
Researching Interacting Quantum Systems
|
#include <triqs/lattice/bravais_lattice.hpp>
A Bravais lattice class.
A Bravais lattice in \( d \) dimensions is defined by
Optionally, the atomic orbitals can be named.
The infinite lattice points \( \mathbf{R}^{\mathbf{n}} \) (see bravais_lattice::point_t) are generated by
\[ \mathbf{R}^{\mathbf{n}} = \sum_{i=1}^{d} \mathbf{a}_i n_i = \mathbf{A} \mathbf{n} \; , \]
where \( \mathbf{n} = (n_1, \dots, n_d) \in \mathbb{Z}^d \) is an index vector (or more formally the vector \(\mathbf{R}^{\mathbf{n}} \) in the lattice basis) and \( \mathbf{A} = \big( \mathbf{a}_1 \cdots \mathbf{a}_d \big) \) is the matrix with the basis vectors as its columns.
Definition at line 75 of file bravais_lattice.hpp.
Classes | |
| class | point_t |
| Lattice point of a Bravais lattice. More... | |
Public Types | |
| using | index_t = std::array<long, 3> |
| Index type for lattice points on the Bravais lattice. | |
Public Member Functions | |
| bravais_lattice () | |
| Construct a simple cubic lattice with lattice constant \( a = 1 \). | |
| bravais_lattice (matrix_t const &units, std::vector< r_t > orbital_positions=std::vector< r_t >{{0, 0, 0}}, std::vector< std::string > atom_orb_name={}) | |
| Construct a Bravais Lattice with given basis vectors and positions of atomic orbitals with optional names. | |
| bool | contains (r_t const &) const |
| Check if a given vector \( \mathbf{r} \) is part of the domain. | |
| void | deserialize (auto &ar) |
| Deserialize the Bravais lattice from a generic archive. | |
| template<typename R> | |
| r_t | lattice_to_real_coordinates (R const &v) const |
| Transform a vector \( \mathbf{v} \) from the lattice basis \( \{ \mathbf{a}_1, \dots, \mathbf{a}_d \}
\) to the standard basis \( \{ \mathbf{e}_1, \dots, \mathbf{e}_d \} \). | |
| long | n_orbitals () const |
| Get the number of atomic orbitals in the unit cell. | |
| int | ndim () const |
| Get the number of dimensions of the Bravais lattice. | |
| bool | operator== (bravais_lattice const &bl) const |
| Equal-to comparison operator. | |
| auto const & | orbital_names () const |
| Get the list of orbital names. | |
| auto const & | orbital_positions () const |
| Get the list of atomic orbital positions \( \{\mathbf{r}_1, \dots, \mathbf{r}_m\} \). | |
| template<typename R> | |
| r_t | real_to_lattice_coordinates (R const &v_tilde) const |
| Transform a vector \( \tilde{\mathbf{v}} \) from the standard basis \( \{ \mathbf{e}_1, \dots,
\mathbf{e}_d \} \) to the lattice basis \( \{ \mathbf{a}_1, \dots, \mathbf{a}_d \} \). | |
| void | serialize (auto &ar) const |
| Serialize the Bravais lattice to a generic archive. | |
| point_t | to_point (index_t const &n) const |
| Convert an index vector to a lattice point. | |
| matrix_t const & | units () const |
| Get the matrix \( \mathbf{A}^T \) containing basis vectors as its rows. | |
Static Public Member Functions | |
| static std::string | hdf5_format () |
| Get the HDF5 format tag. | |
Friends | |
| void | h5_read (h5::group g, std::string const &name, bravais_lattice &bl) |
| Read a triqs::lattice::bravais_lattice from HDF5. | |
| void | h5_write (h5::group g, std::string const &name, bravais_lattice const &bl) |
| Write a triqs::lattice::bravais_lattice to HDF5. | |
| std::ostream & | operator<< (std::ostream &sout, bravais_lattice const &bl) |
| Write a triqs::lattice::bravais_lattice to a std::ostream. | |
|
inline |
Construct a simple cubic lattice with lattice constant \( a = 1 \).
The only atomic orbital is placed at the origin with no name.
Definition at line 193 of file bravais_lattice.hpp.
| triqs::lattice::bravais_lattice::bravais_lattice | ( | matrix_t const & | units, |
| std::vector< r_t > | orbital_positions = std::vector<r_t>{{0, 0, 0}}, | ||
| std::vector< std::string > | atom_orb_name = {} ) |
Construct a Bravais Lattice with given basis vectors and positions of atomic orbitals with optional names.
The matrix \( \mathbf{A}^T \) containing the basis vectors as its rows is required to be square. The number of dimensions of the Bravais lattices is determined by the size of the matrix.
| units | Matrix with the basis vectors \( \{ \mathbf{a}_1, \dots, \mathbf{a}_d \} \) as its rows. |
| orbital_positions | Atomic orbital positions \( \{ \mathbf{r}_1, \dots, \mathbf{r}_m \} \) in the unit cell. |
| atom_orb_name | Optional names for the atomic orbitals. |
Definition at line 38 of file bravais_lattice.cpp.
|
inline |
Deserialize the Bravais lattice from a generic archive.
| ar | Archive to deserialize from. |
Definition at line 300 of file bravais_lattice.hpp.
|
inlinenodiscard |
Transform a vector \( \mathbf{v} \) from the lattice basis \( \{ \mathbf{a}_1, \dots, \mathbf{a}_d \} \) to the standard basis \( \{ \mathbf{e}_1, \dots, \mathbf{e}_d \} \).
The transformed vector is given by
\[ \tilde{\mathbf{v}} = \sum_{i=1}^{d} \mathbf{a}_i v_i = A \mathbf{v} \; , \]
where \( A \) is the matrix with the lattice basis vectors as its columns.
| v | Vector \( \mathbf{v} \) to be transformed. |
Definition at line 239 of file bravais_lattice.hpp.
|
inline |
Equal-to comparison operator.
Definition at line 270 of file bravais_lattice.hpp.
|
inlinenodiscard |
Transform a vector \( \tilde{\mathbf{v}} \) from the standard basis \( \{ \mathbf{e}_1, \dots, \mathbf{e}_d \} \) to the lattice basis \( \{ \mathbf{a}_1, \dots, \mathbf{a}_d \} \).
This is the inverse transformation of lattice_to_real_coordinates(). The transformed vector is therefore given by \( \mathbf{v} = A^{-1} \tilde{\mathbf{v}} \).
| v_tilde | Vector \( \tilde{\mathbf{v}} \) in the standard basis. |
Definition at line 253 of file bravais_lattice.hpp.
|
inline |
Serialize the Bravais lattice to a generic archive.
| ar | Archive to serialize to. |
Definition at line 294 of file bravais_lattice.hpp.
Convert an index vector to a lattice point.
| n | Index vector \( \mathbf{n} \). |
Definition at line 263 of file bravais_lattice.hpp.
|
friend |
Read a triqs::lattice::bravais_lattice from HDF5.
| g | h5::group to be read from. |
| name | Name of the subgroup. |
| bl | Bravais lattice object to be read into. |
Definition at line 74 of file bravais_lattice.cpp.
|
friend |
Write a triqs::lattice::bravais_lattice to HDF5.
| g | h5::group to be written to. |
| name | Name of the subgroup. |
| bl | Bravais lattice object to be written. |
Definition at line 65 of file bravais_lattice.cpp.
|
friend |
Write a triqs::lattice::bravais_lattice to a std::ostream.
| sout | std::ostream object. |
| bl | Bravais lattice to be written. |
Definition at line 281 of file bravais_lattice.hpp.