39 "Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu", &SM);
43 std::cout <<
"Can't create SM." << std::endl;
48 char const * pSimulatorName;
49 char const * pSimulatorVersion;
51 SM, &pSimulatorName, &pSimulatorVersion);
52 std::cout <<
"Simulator name : " << pSimulatorName << std::endl
53 <<
"Simulator version : " << pSimulatorVersion << std::endl
60 std::cout <<
"SM supports " << extent <<
" species:" << std::endl;
61 for (
int i = 0; i < extent; ++i)
63 char const * pSpecies;
67 std::cout <<
"Unable to get species." << std::endl;
72 std::cout <<
"\t" << std::setw(2) << i <<
" " << pSpecies << std::endl;
75 std::cout << std::endl;
80 SM,
"atom-type-sym-list",
"Pb Pb Au Pb");
83 std::cout <<
"Unable to add template map." << std::endl;
89 std::cout <<
"SM has " << std::setw(2) << numberFields
90 <<
" fields :" << std::endl;
92 for (
int i = 0; i < numberFields; ++i)
95 char const * pFieldName;
97 SM, i, &extent, &pFieldName);
98 std::cout <<
" Field " << std::setw(2) << i <<
" is " << pFieldName
99 <<
" and has " << std::setw(2) << extent
100 <<
" lines:" << std::endl;
101 for (
int j = 0; j < extent; ++j)
103 char const * pFieldLine;
107 std::cout <<
"Unable to get field line." << std::endl;
112 std::cout <<
"\t" << pFieldLine << std::endl;
116 std::cout << std::endl;
120 char const * pDirName;
122 std::cout <<
"SM param dir name is " << pDirName << std::endl;
124 char const * pSpecName;
126 std::cout <<
"SM spec file name is " << pSpecName << std::endl << std::endl;
127 error =
system((std::string(
"cat ") + pDirName +
"/" + pSpecName).c_str());
128 std::cout << std::endl;
130 int numberParamFiles;
132 std::cout <<
"SM has " << numberParamFiles
133 <<
" parameter files:" << std::endl;
134 for (
int i = 0; i < numberParamFiles; ++i)
136 char const * pParamFileBasename;
138 SM, i, &pParamFileBasename);
141 std::cout <<
"Unable to get parameter file basename." << std::endl;
146 std::cout <<
"Parameter file " << std::setw(2) << i
147 <<
" has basename : " << pParamFileBasename << std::endl;
149 =
system((std::string(
"cat ") + pDirName +
"/" + pParamFileBasename)
151 std::cout << std::endl;
void KIM_SimulatorModel_CloseTemplateMap(KIM_SimulatorModel const *const simulatorModel)
Close the template map and perform template substitutions.
struct KIM_SimulatorModel KIM_SimulatorModel
Provides the primary interface to a KIM API SimulatorModel object and is meant to be used by simulato...
void KIM_SimulatorModel_GetParameterFileDirectoryName(KIM_SimulatorModel const *const simulatorModel, char const **const directoryName)
Get absolute path name of the temporary directory where parameter files provided by the simulator mod...
int KIM_SimulatorModel_GetSimulatorFieldMetadata(KIM_SimulatorModel const *const simulatorModel, int const fieldIndex, int *const extent, char const **const fieldName)
Get the metadata for the simulator field of interest.
void KIM_SimulatorModel_GetNumberOfSimulatorFields(KIM_SimulatorModel const *const simulatorModel, int *const numberOfSimulatorFields)
Get the number of simulator fields provided by the SimulatorModel.
void KIM_SimulatorModel_GetSimulatorNameAndVersion(KIM_SimulatorModel const *const simulatorModel, char const **const simulatorName, char const **const simulatorVersion)
Get the SimulatorModel's simulator name and version.
void KIM_SimulatorModel_GetNumberOfSupportedSpecies(KIM_SimulatorModel const *const simulatorModel, int *const numberOfSupportedSpecies)
Get the number of species supported by the SimulatorModel.
int KIM_SimulatorModel_GetParameterFileBasename(KIM_SimulatorModel const *const simulatorModel, int const index, char const **const parameterFileBasename)
Get the basename (file name without path) of a particular parameter file. The file is located in the ...
void KIM_SimulatorModel_Destroy(KIM_SimulatorModel **const simulatorModel)
Destroy a previously SimulatorModel::Create'd object.
void KIM_SimulatorModel_GetNumberOfParameterFiles(KIM_SimulatorModel const *const simulatorModel, int *const numberOfParameterFiles)
Get the number of parameter files provided by the SimulatorModel.
void KIM_SimulatorModel_GetSpecificationFileName(KIM_SimulatorModel const *const simulatorModel, char const **const specificationFileName)
Get the SimulatorModel's specification file basename (file name without path). The file is located in...
int KIM_SimulatorModel_AddTemplateMap(KIM_SimulatorModel const *const simulatorModel, char const *const key, char const *const value)
Add a new key-value entry to the template map.
int KIM_SimulatorModel_Create(char const *const simulatorModelName, KIM_SimulatorModel **const simulatorModel)
Create a new KIM API SimulatorModel object.
int KIM_SimulatorModel_GetSimulatorFieldLine(KIM_SimulatorModel const *const simulatorModel, int const fieldIndex, int const lineIndex, char const **const lineValue)
Get a line for the simulator field of interest with all template substitutions performed (Requires th...
int KIM_SimulatorModel_GetSupportedSpecies(KIM_SimulatorModel const *const simulatorModel, int const index, char const **const speciesName)
Get a species name supported by the SimulatorModel.
Collection const system
The standard system Collection.