17#ifndef INTERFACELAMMPS_H
18#define INTERFACELAMMPS_H
54 char const*
const&
emap,
77 int const*
const atomType);
158 void getForces(
double*
const*
const& atomF)
const;
Structure structure
Structure containing local atoms.
long getEWBufferSize() const
Calculate buffer size for extrapolation warning communication.
bool initialized
Initialization state.
void process()
Calculate symmetry functions, atomic neural networks and sum of local energy contributions.
void extractEWBuffer(char const *const &buf, int bs)
Extract given buffer to symmetry function statistics class.
std::map< int, bool > ignoreType
True if atoms of this LAMMPS type will be ignored.
void setLocalTags(int const *const atomTag)
Set atom tags (int version, -DLAMMPS_SMALLBIG).
void allocateNeighborlists(int const *const numneigh)
Allocate neighbor lists.
std::map< int, std::size_t > mapTypeToElement
Map from LAMMPS type to n2p2 element index.
void add3DVecToArray(double *const &arr, Vec3D const &v) const
Add a Vec3D vector to a 3D array in place.
double getMaxCutoffRadiusOverall()
Get largest cutoff including structure specific cutoff and screening cutoff.
bool hasGlobalStructure
Whether n2p2 knows about the global structure or only a local part.
void setLocalAtomPositions(double const *const *const atomPos)
Set absolute atom positions from LAMMPS (nnp/develop only).
double getEnergy() const
Return sum of local energy contributions.
void fillEWBuffer(char *const &buf, int bs) const
Fill provided buffer with extrapolation warning entries.
double getAtomicEnergy(int index) const
Return energy contribution of one atom.
void getForces(double *const *const &atomF) const
Calculate forces and add to LAMMPS atomic force arrays.
bool resetew
Corresponds to LAMMPS resetew keyword.
bool isInitialized() const
Check if this interface is correctly initialized.
void writeExtrapolationWarnings()
Write extrapolation warnings to log.
void setBoxVectors(double const *boxlo, double const *boxhi, double const xy, double const xz, double const yz)
Set box vectors of structure stored in LAMMPS (nnp/develop only).
std::vector< size_t > indexMap
Map from LAMMPS index to n2p2 atom index.
bool getGlobalStructureStatus()
Check if n2p2 knows about global structure.
double cfenergy
Corresponds to LAMMPS cfenergy keyword.
void setLocalAtoms(int numAtomsLocal, int const *const atomType)
(Re)set structure to contain only local LAMMPS atoms.
bool showew
Corresponds to LAMMPS showew keyword.
void writeToFile(std::string const fileName, bool const append)
Write current structure to file in units used in training data.
void getCharges(double *const &atomQ) const
Transfer charges (in units of e) to LAMMPS atomic charge vector.
int showewsum
Corresponds to LAMMPS showewsum keyword.
void setGlobalStructureStatus(bool const status)
Specify whether n2p2 knows about global structure or only local structure.
void finalizeNeighborList()
Sorts neighbor list and creates cutoff map if necessary.
void clearExtrapolationWarnings()
Clear extrapolation warnings storage.
std::map< std::size_t, int > mapElementToType
Map from n2p2 element index to LAMMPS type.
double getMaxCutoffRadius() const
Get largest cutoff of symmetry functions.
int maxew
Corresponds to LAMMPS maxew keyword.
void addNeighbor(int i, int j, int64_t tag, int type, double dx, double dy, double dz, double d2)
Add one neighbor to atom (int64_t version, -DLAMMPS_BIGBIG).
double cflength
Corresponds to LAMMPS cflength keyword.
std::string emap
Corresponds to LAMMPS map keyword.
Base class for all NNP applications.
void initialize()
Write welcome message with version information.
Storage for one atomic configuration.
Vector in 3 dimensional real space.