The SuperCell defines the size, shape and boundary condx of a simulation. More...
#include <SuperCell.h>
Public Member Functions | |
| SuperCell (const Vec v[3], const bool p[3]) | |
| Create a new supercell with basis vectors Vec and periodicity p. | |
| SuperCell (const SuperCell *original) | |
| Copy constructor. | |
| void | SetAtoms (Atoms *a) |
| Set the atoms associated with the supercell. | |
| void | TransformToScaledSpace (Vec *positions, int nAtoms) const |
| In-place transformation of positions from real to scaled space. | |
| void | TransformToRealSpace (Vec *positions, int nAtoms) const |
| In-place transformation of positions from scaled to real space. | |
| void | ClosestLatticeSiteIndices (int intVector[3], Vec &diff) const |
| Quasicontinuum only: convert position to closest lattice site. | |
| double | GetVolume () const |
| Get the volume of the supercell. | |
| void | SetBasis (const Vec v[3]) |
| Change the basis. | |
| Vec | GetBasis (int a) |
| Get the basis vectors. | |
| void | SetPeriodic (const bool newperiodic[3]) |
| Set the periodicity. USE WITH CAUTION! | |
Public Attributes | |
| bool | periodic [3] |
| Periodic boundary conditions along the 3 axes? | |
| Vec | vectors [3] |
| The basis vectors. | |
| Vec | inverse [3] |
| The inverse of the vectors matrix. | |
| double | heights [3] |
| The heights of the supercell. | |
| Vec | translations [27] |
| The 27 possible translations due to the periodic boundaries. | |
Private Attributes | |
| Atoms * | atoms |
| A pointer to the atoms associated with this supercell, if any. | |
The SuperCell defines the size, shape and boundary condx of a simulation.
The SuperCell serves two purposes. The most important is the computational box of a simulation: it defines the size, shape and boundary conditions of the simulation. A second use is for the unit cell of the lattice in the elements of a Quasicontinuum simulation.
Definition at line 20 of file SuperCell.h.
| SuperCell::SuperCell | ( | const Vec | v[3], |
| const bool | p[3] ) |
Create a new supercell with basis vectors Vec and periodicity p.
| SuperCell::SuperCell | ( | const SuperCell * | original | ) |
Copy constructor.
| void SuperCell::ClosestLatticeSiteIndices | ( | int | intVector[3], |
| Vec & | diff ) const |
Quasicontinuum only: convert position to closest lattice site.
When the supercell is used in a QC simulation to represent the crystal lattice of an element, this function is used to convert the position of an atom into lattice coordinates.
|
inline |
| double SuperCell::GetVolume | ( | ) | const |
Get the volume of the supercell.
| void SuperCell::SetAtoms | ( | Atoms * | a | ) |
Set the atoms associated with the supercell.
| void SuperCell::SetBasis | ( | const Vec | v[3] | ) |
Change the basis.
The atoms are not moved. Should only be called from the atoms.
| void SuperCell::SetPeriodic | ( | const bool | newperiodic[3] | ) |
Set the periodicity. USE WITH CAUTION!
Change the periodicity of the supercell. Other classes may not notice that this has happened. This cannot be done after the atoms have been assigned a Potential.
| void SuperCell::TransformToRealSpace | ( | Vec * | positions, |
| int | nAtoms ) const |
In-place transformation of positions from scaled to real space.
| void SuperCell::TransformToScaledSpace | ( | Vec * | positions, |
| int | nAtoms ) const |
In-place transformation of positions from real to scaled space.
|
private |
A pointer to the atoms associated with this supercell, if any.
Definition at line 69 of file SuperCell.h.
| double SuperCell::heights[3] |
The heights of the supercell.
Definition at line 65 of file SuperCell.h.
| Vec SuperCell::inverse[3] |
The inverse of the vectors matrix.
Definition at line 64 of file SuperCell.h.
| bool SuperCell::periodic[3] |
Periodic boundary conditions along the 3 axes?
Definition at line 62 of file SuperCell.h.
| Vec SuperCell::translations[27] |
The 27 possible translations due to the periodic boundaries.
Definition at line 66 of file SuperCell.h.
| Vec SuperCell::vectors[3] |
The basis vectors.
Definition at line 63 of file SuperCell.h.