17#ifndef INTERFACELAMMPS_H
18#define INTERFACELAMMPS_H
55 char const*
const&
emap,
78 int const*
const atomType);
169 void getForces(
double*
const*
const& atomF)
const;
181 double*
const*
const& atomF)
const;
244 double*
const& atomJ,
245 double*
const& sigmaSqrtPi,
246 double *
const *
const& gammaSqrt2,
253 void getdEdQ(
double*
const& dEtotdQ)
const;
267 double*
const& dChidx,
268 double*
const& dChidy,
269 double*
const& dChidz)
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.
void addCharge(int index, double Q)
Read atomic charges from LAMMPS into n2p2.
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.
void setElecDone()
Set isElecDone true after running the first NN in 4G-HDNNPs.
std::map< int, std::size_t > mapTypeToElement
Map from LAMMPS type to n2p2 element index.
void addElectrostaticEnergy(double energy)
Adds electrostatic energy contribution to the total structure energy.
void add3DVecToArray(double *const &arr, Vec3D const &v) const
Add a Vec3D vector to a 3D array in place.
void processDevelop()
Calculate symmetry functions, atomic neural networks and sum of local energy contributions (developme...
void getQEqParams(double *const &atomChi, double *const &atomJ, double *const &sigmaSqrtPi, double *const *const &gammaSqrt2, double &qRef) const
Write QEq arrays from n2p2 to LAMMPS.
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.
bool isElecDone
True if first NN is calculated.
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 getScreeningInfo(double *const &rScreen) const
Read screening function information from n2p2 into LAMMPS.
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.
double getEwaldPrec() const
Get Ewald precision parameter.
void getForcesDevelop(double *const *const &atomF) const
Calculate forces and add to LAMMPS atomic force arrays (development version for "hdnnp/develop" pair ...
void clearExtrapolationWarnings()
Clear extrapolation warnings storage.
void getForcesChi(double const *const &lambda, double *const *const &atomF) const
Calculate chi-term for forces and add to LAMMPS atomic force arrays.
std::map< std::size_t, int > mapElementToType
Map from n2p2 element index to LAMMPS type.
void getdEdQ(double *const &dEtotdQ) const
Write the derivative of total energy with respect to atomic charges from n2p2 into LAMMPS.
double getMaxCutoffRadius() const
Get largest cutoff of symmetry functions.
void getdChidxyz(int tag, double *const &dChidx, double *const &dChidy, double *const &dChidz) const
Transfer spatial derivatives of atomic electronegativities.
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.
void initialize()
Write welcome message with version information.
Storage for one atomic configuration.
Vector in 3 dimensional real space.