Loading...
Searching...
No Matches
SuperCell Class Reference

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

Atomsatoms
 A pointer to the atoms associated with this supercell, if any.

Detailed Description

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.

Constructor & Destructor Documentation

◆ SuperCell() [1/2]

SuperCell::SuperCell ( const Vec v[3],
const bool p[3] )

Create a new supercell with basis vectors Vec and periodicity p.

◆ SuperCell() [2/2]

SuperCell::SuperCell ( const SuperCell * original)

Copy constructor.

Member Function Documentation

◆ ClosestLatticeSiteIndices()

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.

◆ GetBasis()

Vec SuperCell::GetBasis ( int a)
inline

Get the basis vectors.

Definition at line 52 of file SuperCell.h.

52{ return vectors[a]; }
Vec vectors[3]
The basis vectors.
Definition SuperCell.h:63

◆ GetVolume()

double SuperCell::GetVolume ( ) const

Get the volume of the supercell.

◆ SetAtoms()

void SuperCell::SetAtoms ( Atoms * a)

Set the atoms associated with the supercell.

◆ SetBasis()

void SuperCell::SetBasis ( const Vec v[3])

Change the basis.

The atoms are not moved. Should only be called from the atoms.

◆ SetPeriodic()

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.

◆ TransformToRealSpace()

void SuperCell::TransformToRealSpace ( Vec * positions,
int nAtoms ) const

In-place transformation of positions from scaled to real space.

◆ TransformToScaledSpace()

void SuperCell::TransformToScaledSpace ( Vec * positions,
int nAtoms ) const

In-place transformation of positions from real to scaled space.

Member Data Documentation

◆ atoms

Atoms* SuperCell::atoms
private

A pointer to the atoms associated with this supercell, if any.

Definition at line 69 of file SuperCell.h.

◆ heights

double SuperCell::heights[3]

The heights of the supercell.

Definition at line 65 of file SuperCell.h.

◆ inverse

Vec SuperCell::inverse[3]

The inverse of the vectors matrix.

Definition at line 64 of file SuperCell.h.

◆ periodic

bool SuperCell::periodic[3]

Periodic boundary conditions along the 3 axes?

Definition at line 62 of file SuperCell.h.

◆ translations

Vec SuperCell::translations[27]

The 27 possible translations due to the periodic boundaries.

Definition at line 66 of file SuperCell.h.

◆ vectors

Vec SuperCell::vectors[3]

The basis vectors.

Definition at line 63 of file SuperCell.h.


The documentation for this class was generated from the following file:
  • /home/runner/work/eOn/eOn/include/eon/potentials/EMT/Asap/SuperCell.h