28#include <gsl/gsl_rng.h>
50 void setupMPI(MPI_Comm* communicator);
97 bool excludeRank0 =
false,
98 std::string
const& fileName
134 std::string fileNameFormat
135 =
"sf.%03zu.%04zu.histo");
151 std::string
const& fileNameStructure
161 =
"neighbor-list.data");
172 std::vector<std::vector<
173 std::size_t> > neighCutoff,
175 std::string
const & fileNamePrefix
184 std::map<std::string, double>& error,
185 std::size_t& count)
const;
Collect and process large data sets.
std::size_t numStructures
Total number of structures in dataset.
void writeSymmetryFunctionScaling(std::string const &fileName="scaling.data")
Write symmetry function scaling values to file.
void collectSymmetryFunctionStatistics()
Collect symmetry function statistics from all processors.
gsl_rng * rng
GSL random number generator (different seed for each MPI process).
int distributeStructures(bool randomize, bool excludeRank0=false, std::string const &fileName="input.data")
Read data file and distribute structures among processors.
Dataset()
Constructor, initialize members.
int recvStructure(Structure *structure, int src)
Receive one structure from source process.
void sortNeighborLists()
Sort all neighbor lists according to element and distance.
void writeAtomicEnvironmentFile(std::vector< std::vector< std::size_t > > neighCutoff, bool derivatives, std::string const &fileNamePrefix="atomic-env")
Write atomic environment file.
void writeNeighborLists(std::string const &fileName="neighbor-list.data")
Write neighbor list file.
int calculateBufferSize(Structure const &structure) const
Calculate buffer size required to communicate structure via MPI.
MPI_Comm comm
Global MPI communicator.
void setupMPI()
Initialize MPI with MPI_COMM_WORLD.
int numProcs
Total number of MPI processors.
std::vector< Structure > structures
All structures in this dataset.
void writeSymmetryFunctionFile(std::string fileName="function.data")
Write symmetry function legacy file ("function.data").
std::size_t prepareNumericForces(Structure &original, double delta)
Prepare numeric force check for a single structure.
void toPhysicalUnits()
Switch all structures to physical units.
void writeSymmetryFunctionHistograms(std::size_t numBins, std::string fileNameFormat="sf.%03zu.%04zu.histo")
Calculate and write symmetry function histograms.
std::size_t writeNeighborHistogram(std::string const &fileNameHisto="neighbors.histo", std::string const &fileNameStructure="neighbors.out")
Calculate and write neighbor histogram and per-structure statistics.
void setupRandomNumberGenerator()
Initialize random number generator.
int sendStructure(Structure const &structure, int dest) const
Send one structure to destination process.
std::string myName
My processor name.
void combineFiles(std::string filePrefix) const
Combine individual MPI proc files to one.
gsl_rng * rngGlobal
Global GSL random number generator (equal seed for each MPI process).
std::size_t getNumStructures(std::ifstream &dataFile)
Get number of structures in data file.
void collectError(std::string const &property, std::map< std::string, double > &error, std::size_t &count) const
Collect error metrics of a property over all MPI procs.
void toNormalizedUnits()
Switch all structures to normalized units.
Base class for all NNP applications.
Storage for one atomic configuration.