Object to store the information on the crystal unit cell, such as atomic positions, crystal lattice vectors, etc...
More...
|
| | Crystal (Context &context, Eigen::Matrix3d &directUnitCell_, Eigen::MatrixXd &atomicPositions_, Eigen::VectorXi &atomicSpecies_, std::vector< std::string > &speciesNames_, Eigen::VectorXd &speciesMasses_, Eigen::Tensor< double, 3 > &bornCharges_, Eigen::Matrix3d &dielectricMatrix) |
| | Class containing the information on the crystal structure Note: a number of important quantities used throughout the code are referenced here, so check if it does go out of scope. More...
|
| |
|
| Crystal () |
| | Empty constructor.
|
| |
|
| Crystal (const Crystal &obj) |
| | Copy constructor.
|
| |
|
Crystal & | operator= (const Crystal &obj) |
| | Copy assignment operator.
|
| |
|
void | print () const |
| | Print the crystal information.
|
| |
| const Eigen::Matrix3d & | getDirectUnitCell () |
| | Returns the crystal unit cell in real space, in Bohr. More...
|
| |
| const Eigen::Matrix3d & | getReciprocalUnitCell () |
| | Returns the reciprocal lattice vectors, in units of Bohr^-1/tpi. More...
|
| |
|
const int & | getNumAtoms () |
| | get the number of atoms in the unit cell
|
| |
|
const Eigen::Tensor< double, 3 > | getBornEffectiveCharges () |
| | Return the born effective charges for the crystal object.
|
| |
| const Eigen::Matrix3d | getDielectricMatrix () |
| | Return the dielectric matrix for the crystal object. More...
|
| |
| double | getVolumeUnitCell (int dimensionality_=3) const |
| | get the volume of the crystal unit cell in Bohr^3 More...
|
| |
| const std::vector< SymmetryOperation > & | getSymmetryOperations () |
| | get the symmetry operations of the crystal, in cartesian coordinates. More...
|
| |
| int | getNumSymmetries () const |
| | get the number of symmetries operations that are used by phoebe. More...
|
| |
|
const Eigen::MatrixXd & | getAtomicPositions () |
| | get the atomic positions, in cartesian coordinates we return an array of size (numAtoms,3)
|
| |
| const Eigen::VectorXi & | getAtomicSpecies () |
| | get the species of each atom in the unit cell. More...
|
| |
|
const std::vector< std::string > & | getAtomicNames () |
| | get the vector of atomic names vector has size (numAtoms)
|
| |
|
const Eigen::VectorXd & | getAtomicMasses () |
| | get the vector of atomic masses the vector has size (numAtoms)
|
| |
|
const std::vector< std::string > & | getSpeciesNames () |
| | get the vector of names of atomic species the vector has size (numSpecies)
|
| |
|
const Eigen::VectorXd & | getSpeciesMasses () |
| | get the vector of masses of atomic species, in rydberg the vector has size (numSpecies)
|
| |
| int | getDimensionality () const |
| | return the dimensionality of the crystal, i.e. More...
|
| |
|
int | getNumSpecies () const |
| | Return the number of atomic species present in the crystal.
|
| |
|
const Eigen::VectorXd & | getAtomicIsotopeCouplings () |
| |
| Eigen::Vector3d | crystalToCartesian (const Eigen::Vector3d &point) |
| | Change of basis method to convert crystal wavevector to cartesian coordinates. More...
|
| |
| Eigen::Vector3d | cartesianToCrystal (const Eigen::Vector3d &point) |
| | Change of basis method to convert crystal wavevector to cartesian coordinates. More...
|
| |
| std::tuple< Eigen::MatrixXd, Eigen::VectorXd > | buildWignerSeitzVectors (const Eigen::Vector3i &grid, const int &superCellFactor=2) |
| | Build the list of Bravais lattice vectors (real space) that live within the Wigner Seitz zone of a super cell which is grid(0) x grid(1) x grid(2) bigger than the unitCell. More...
|
| |
| std::tuple< Eigen::MatrixXd, Eigen::Tensor< double, 3 > > | buildWignerSeitzVectorsWithShift (const Eigen::Vector3i &grid, const Eigen::MatrixXd &shift, const int &superCellFactor=2) |
| | Similar to buildWignerSeitzVectors, we build the list of Bravais lattice vectors (real space) that live within the Wigner Seitz zone of a super cell which is grid(0) x grid(1) x grid(2) bigger than the unitCell. More...
|
| |
|
void | generateSymmetryInformation (Context &context) |
| | A function to set up the symmetry rotation matrices for a crystal, which are then stored in this object.
|
| |
Note that fractional occupancies are not supported.
| std::tuple< Eigen::MatrixXd, Eigen::Tensor< double, 3 > > Crystal::buildWignerSeitzVectorsWithShift |
( |
const Eigen::Vector3i & |
grid, |
|
|
const Eigen::MatrixXd & |
shift, |
|
|
const int & |
superCellFactor = 2 |
|
) |
| |
However, the vectors are slightly shifted. For example, for phonons, we want the vectors R+tau(3,na)-tau(3,nb), where tau are atomic positions. A similar transform may be used for the Wannier transformation, where the WS is centered on the Wannier-functions' centers.
Note: for a well-converged calculation, the difference between with and without shift shouldn't make a difference when used in Fourier transforms. This is because the interactions should decay quickly.
- Parameters
-
| grid | size of the super cell for the WS construction. |
| shift | a shift in cartesian coordinates of shape(3,nDim). |
| superCellFactor | in order to do the correct folding of wavevectors, we look for wavevectors in a slightly bigger super cell. A factor 2 should be enough, but could be increased if the code fails to find all vectors. |
- Returns
- : a tuple with bravaisLatticeVectors(3,numVectors) in cartesian coordinates and their degeneracies(numVectors,nDim,nDim), where the last two indices must be used in conjunction with the meaning of shift. Some weights might be set to zero if they don't fall in the WS zone. Note: the weights to be used for integrations are 1/degeneracies.