Abstract base class of all potentials.
SuperCell * superCell
A pointer to the supercell.
int GetNumberOfImages() const
Get the number of images. Used by the neighbor list.
int GetChangeCounter() const
Get the change counter.
Vec * GetPositionsPtr()
Return a non-const pointer to the Cartesian positions. DANGEROUS!
Atoms(const Vec *p, int n, SuperCell *s)
Construct Atoms from array of positions, number of elements and a SuperCell.
int * GetAtomicNumbersPtr()
Return a non-const pointer to the atomic numbers. DANGEROUS!
virtual void NormalizePosition(Vec &pos, Vec &scaled_translation) const
Normalize a position which is not owned by the atoms.
int GetNumberOfRealAtoms() const
Get the number of atoms (excluding nodes in a QC simulation).
virtual void SetUnwrappedPositions(const Vec *p)
Set the positions from an array of positions not taking any wrapping into account.
virtual SuperCell * GetSuperCell() const
Return a pointer to the SuperCell object.
virtual void NormalizeDifference(Vec &diff) const
Apply periodic boundary conditions to difference in positions.
AsapPotential * GetPotential() const
Get a pointer to the Potential.
virtual const Vec * GetUnitCell() const
Return the unitcell vectors.
virtual void GetCartesianPositions(Vec *p) const
Return a copy of the Cartesian positions.
virtual void NormalizeDifferences(Vec *diff) const
Apply periodic boundary conditions to differences in positions.
virtual void SetUnitCell(const Vec newbasis[3], bool fix)
Set a new unit cell, rescaling the positions unless fix is true.
vector< int > types
Contains the atomic numbers.
virtual int GetNumberOfAtoms() const
Get the number of atoms (including nodes in a QC simulation).
int nImages
The number of image atoms used by NeighborList.
void SetNumberOfImages(int i)
Set the number of images. Used by the neighbor list.
int nAtoms
The number of atoms in the list.
virtual void SetAtomicNumbers(const int *z)
Set the atomic numbers. Should be done right after construction.
virtual const Vec * GetCartesianPositions() const
Return a const pointer to the Cartesian positions.
vector< Vec > pos_translations
Translations applied to the positions to conform with the periodic boundary conditions.
int counter
Used to track changes.
vector< Vec > positions
Contains the Cartesian positions.
virtual void NormalizePositions()
Apply periodic boundary conditions to the positions.
virtual const int * GetAtomicNumbers() const
Return a const pointer to the atomic numbers.
virtual void SetNumberOfAtoms(int n)
Change the number of atoms.
void MarkChanged()
Update the change pointer.
virtual ~Atoms()
Deletes the atoms. Does not delete Potential or SuperCell.
virtual void ReNormalizePosition(Vec &pos, Vec &scaled_translation) const
Repeat a normalization. See NormalizePosition(a,b).
virtual void SetCalculator(AsapPotential *potential)
Set a Potential. An eventual old Potential is not deallocated.
virtual void NormalizePosition(Vec &pos) const
Normalize a position which is not owned by the atoms.
virtual void GetUnwrappedPositions(vector< Vec > &p) const
Return the positions, hiding that they may have been wrapped due to the boundary conditions.
AsapPotential * potential
A pointer to the potential.
virtual void GetListOfElements(set< int > &elements) const
Get a set of all elements present in the simulations.
virtual void SetCartesianPositions(const Vec *p)
Set the Cartesian positions.
The SuperCell defines the size, shape and boundary condx of a simulation.
A 3-vector useful for postions etc.