37 "Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu", &SM);
41 std::cout <<
"Can't create SM." << std::endl;
46 std::string
const * pSimulatorName;
47 std::string
const * pSimulatorVersion;
49 std::cout <<
"Simulator name : " << *pSimulatorName << std::endl
50 <<
"Simulator version : " << *pSimulatorVersion << std::endl
57 std::cout <<
"SM supports " << extent <<
" species:" << std::endl;
58 for (
int i = 0; i < extent; ++i)
60 std::string
const * pSpecies;
64 std::cout <<
"Unable to get species." << std::endl;
69 std::cout <<
"\t" << std::setw(2) << i <<
" " << *pSpecies << std::endl;
72 std::cout << std::endl;
79 std::cout <<
"Unable to add template map." << std::endl;
85 std::cout <<
"SM has " << std::setw(2) << numberFields
86 <<
" fields :" << std::endl;
88 for (
int i = 0; i < numberFields; ++i)
91 std::string
const * pFieldName;
93 std::cout <<
" Field " << std::setw(2) << i <<
" is " << *pFieldName
94 <<
" and has " << std::setw(2) << extent
95 <<
" lines:" << std::endl;
96 for (
int j = 0; j < extent; ++j)
98 std::string
const * pFieldLine;
102 std::cout <<
"Unable to get field line." << std::endl;
105 else { std::cout <<
"\t" << *pFieldLine << std::endl; }
108 std::cout << std::endl;
112 std::string
const * pDirName;
114 std::cout <<
"SM param dir name is " << *pDirName << std::endl;
116 std::string
const * pSpecName;
118 std::cout <<
"SM spec file name is " << *pSpecName << std::endl
121 = system((std::string(
"cat ") + *pDirName +
"/" + *pSpecName).c_str());
122 std::cout << std::endl;
124 int numberParamFiles;
126 std::cout <<
"SM has " << numberParamFiles
127 <<
" parameter files:" << std::endl;
128 for (
int i = 0; i < numberParamFiles; ++i)
130 std::string
const * pParamFileBasename;
134 std::cout <<
"Unable to get parameter file basename." << std::endl;
139 std::cout <<
"Parameter file " << std::setw(2) << i
140 <<
" has basename : " << *pParamFileBasename << std::endl;
142 (std::string(
"cat ") + *pDirName +
"/" + *pParamFileBasename)
144 std::cout << std::endl;
Provides the primary interface to a KIM API SimulatorModel object and is meant to be used by simulato...
void GetNumberOfSimulatorFields(int *const numberOfSimulatorFields) const
Get the number of simulator fields provided by the SimulatorModel.
static void Destroy(SimulatorModel **const simulatorModel)
Destroy a previously SimulatorModel::Create'd object.
int GetSimulatorFieldLine(int const fieldIndex, int const lineIndex, std::string const **const lineValue) const
Get a line for the simulator field of interest with all template substitutions performed (Requires th...
void GetSpecificationFileName(std::string const **const specificationFileName) const
Get the SimulatorModel's specification file basename (file name without path). The file is located in...
int GetParameterFileBasename(int const index, std::string const **const parameterFileBasename) const
Get the basename (file name without path) of a particular parameter file. The file is located in the ...
void GetNumberOfParameterFiles(int *const numberOfParameterFiles) const
Get the number of parameter files provided by the SimulatorModel.
int GetSimulatorFieldMetadata(int const fieldIndex, int *const extent, std::string const **const fieldName) const
Get the metadata for the simulator field of interest.
int GetSupportedSpecies(int const index, std::string const **const speciesName) const
Get a species name supported by the SimulatorModel.
void GetSimulatorNameAndVersion(std::string const **const simulatorName, std::string const **const simulatorVersion) const
Get the SimulatorModel's simulator name and version.
void GetParameterFileDirectoryName(std::string const **const directoryName) const
Get absolute path name of the temporary directory where parameter files provided by the simulator mod...
void CloseTemplateMap()
Close the template map and perform template substitutions.
void GetNumberOfSupportedSpecies(int *const numberOfSupportedSpecies) const
Get the number of species supported by the SimulatorModel.
int AddTemplateMap(std::string const &key, std::string const &value)
Add a new key-value entry to the template map.
static int Create(std::string const &simulatorModelName, SimulatorModel **const simulatorModel)
Create a new KIM API SimulatorModel object.