43 #define IGNORE_RESULT(fn) \ 54 #undef KIM_LOGGER_OBJECT_NAME 55 #define KIM_LOGGER_OBJECT_NAME modelDriverCreate 65 numberModelSpecies_(0),
66 numberUniqueSpeciesPairs_(0),
71 influenceDistance_(0.0),
73 modelWillNotRequestNeighborsOfNoncontributingParticles_(1),
74 fourEpsilonSigma6_2D_(NULL),
75 fourEpsilonSigma12_2D_(NULL),
76 twentyFourEpsilonSigma6_2D_(NULL),
77 fortyEightEpsilonSigma12_2D_(NULL),
78 oneSixtyEightEpsilonSigma6_2D_(NULL),
79 sixTwentyFourEpsilonSigma12_2D_(NULL),
81 cachedNumberOfParticles_(0)
84 int numberParameterFiles;
86 *ier = OpenParameterFiles(
87 modelDriverCreate, numberParameterFiles, parameterFilePointers);
90 *ier = ProcessParameterFiles(
91 modelDriverCreate, numberParameterFiles, parameterFilePointers);
92 CloseParameterFiles(numberParameterFiles, parameterFilePointers);
95 *ier = ConvertUnits(modelDriverCreate,
99 requestedTemperatureUnit,
103 *ier = SetRefreshMutableValues(modelDriverCreate);
106 *ier = RegisterKIMModelSettings(modelDriverCreate);
109 *ier = RegisterKIMParameters(modelDriverCreate);
112 *ier = RegisterKIMFunctions(modelDriverCreate);
139 #undef KIM_LOGGER_OBJECT_NAME 140 #define KIM_LOGGER_OBJECT_NAME modelRefresh 147 ier = SetRefreshMutableValues(modelRefresh);
165 bool isComputeProcess_dEdr =
false;
166 bool isComputeProcess_d2Edr2 =
false;
169 bool isComputeEnergy =
false;
170 bool isComputeForces =
false;
171 bool isComputeParticleEnergy =
false;
172 bool isComputeVirial =
false;
173 bool isComputeParticleVirial =
false;
181 double * energy = NULL;
182 double * particleEnergy = NULL;
186 ier = SetComputeMutableValues(modelComputeArguments,
187 isComputeProcess_dEdr,
188 isComputeProcess_d2Edr2,
191 isComputeParticleEnergy,
193 isComputeParticleVirial,
194 particleSpeciesCodes,
195 particleContributing,
209 bool const isShift = (1 == shift_);
221 ier = RegisterKIMComputeArgumentsSettings(modelComputeArgumentsCreate);
238 (void) modelComputeArgumentsDestroy;
254 void LennardJones612Implementation::AllocatePrivateParameterMemory()
260 void LennardJones612Implementation::AllocateParameterMemory()
262 cutoffs_ =
new double[numberUniqueSpeciesPairs_];
264 cutoffsSq2D_, numberModelSpecies_, numberModelSpecies_);
266 epsilons_ =
new double[numberUniqueSpeciesPairs_];
267 sigmas_ =
new double[numberUniqueSpeciesPairs_];
269 fourEpsilonSigma6_2D_, numberModelSpecies_, numberModelSpecies_);
271 fourEpsilonSigma12_2D_, numberModelSpecies_, numberModelSpecies_);
273 twentyFourEpsilonSigma6_2D_, numberModelSpecies_, numberModelSpecies_);
275 fortyEightEpsilonSigma12_2D_, numberModelSpecies_, numberModelSpecies_);
277 oneSixtyEightEpsilonSigma6_2D_, numberModelSpecies_, numberModelSpecies_);
280 numberModelSpecies_);
283 shifts2D_, numberModelSpecies_, numberModelSpecies_);
287 #undef KIM_LOGGER_OBJECT_NAME 288 #define KIM_LOGGER_OBJECT_NAME modelDriverCreate 290 int LennardJones612Implementation::OpenParameterFiles(
292 int const numberParameterFiles,
297 if (numberParameterFiles > MAX_PARAMETER_FILES)
300 LOG_ERROR(
"LennardJones612 given too many parameter files");
304 for (
int i = 0; i < numberParameterFiles; ++i)
306 std::string
const * paramFileName;
310 LOG_ERROR(
"Unable to get parameter file name");
313 parameterFilePointers[i] = fopen(paramFileName->c_str(),
"r");
314 if (parameterFilePointers[i] == 0)
318 "LennardJones612 parameter file number %d cannot be opened",
322 for (
int j = i - 1; i <= 0; --i) { fclose(parameterFilePointers[j]); }
333 #undef KIM_LOGGER_OBJECT_NAME 334 #define KIM_LOGGER_OBJECT_NAME modelDriverCreate 336 int LennardJones612Implementation::ProcessParameterFiles(
338 int const numberParameterFiles,
342 int endOfFileFlag = 0;
345 int iIndex, jIndex, indx, iiIndex, jjIndex;
346 double nextCutoff, nextEpsilon, nextSigma;
348 (void) numberParameterFiles;
350 nextLinePtr = nextLine;
353 parameterFilePointers[0], nextLinePtr,
MAXLINE, &endOfFileFlag);
354 ier = sscanf(nextLine,
"%d %d", &N, &shift_);
357 sprintf(nextLine,
"unable to read first line of the parameter file");
360 fclose(parameterFilePointers[0]);
363 numberModelSpecies_ =
N;
364 numberUniqueSpeciesPairs_
365 = ((numberModelSpecies_ + 1) * numberModelSpecies_) / 2;
366 AllocateParameterMemory();
369 for (
int i = 0; i < ((N + 1) * N / 2); i++)
378 std::map<KIM::SpeciesName const, int, KIM::SPECIES_NAME::Comparator>
380 std::vector<KIM::SpeciesName> speciesNameVector;
385 parameterFilePointers[0], nextLinePtr,
MAXLINE, &endOfFileFlag);
386 while (endOfFileFlag == 0)
388 ier = sscanf(nextLine,
397 sprintf(nextLine,
"error reading lines of the parameter file");
407 std::map<KIM::SpeciesName const, int, KIM::SPECIES_NAME::Comparator>::
409 = modelSpeciesMap.find(specName1);
410 if (iIter == modelSpeciesMap.end())
412 modelSpeciesMap[specName1] = index;
413 modelSpeciesCodeList_.push_back(index);
414 speciesNameVector.push_back(specName1);
423 iIndex = modelSpeciesMap[specName1];
425 std::map<KIM::SpeciesName const, int, KIM::SPECIES_NAME::Comparator>::
427 = modelSpeciesMap.find(specName2);
428 if (jIter == modelSpeciesMap.end())
430 modelSpeciesMap[specName2] = index;
431 modelSpeciesCodeList_.push_back(index);
432 speciesNameVector.push_back(specName2);
441 jIndex = modelSpeciesMap[specName2];
444 if (iIndex >= jIndex)
445 { indx = jIndex * N + iIndex - (jIndex * jIndex + jIndex) / 2; }
448 indx = iIndex * N + jIndex - (iIndex * iIndex + iIndex) / 2;
450 cutoffs_[indx] = nextCutoff;
451 epsilons_[indx] = nextEpsilon;
452 sigmas_[indx] = nextSigma;
455 parameterFilePointers[0], nextLinePtr,
MAXLINE, &endOfFileFlag);
459 sprintf(nextLine,
"There are not values for like-like pairs of:");
460 for (
int i = 0; i <
N; i++)
462 if (cutoffs_[(i * N + i - (i * i + i) / 2)] == -1)
464 strcat(nextLine,
" ");
465 strcat(nextLine, (speciesNameVector[i].ToString()).c_str());
476 for (
int jIndex = 0; jIndex <
N; jIndex++)
478 jjIndex = (jIndex * N + jIndex - (jIndex * jIndex + jIndex) / 2);
479 for (
int iIndex = (jIndex + 1); iIndex <
N; iIndex++)
481 indx = jIndex * N + iIndex - (jIndex * jIndex + jIndex) / 2;
482 if (cutoffs_[indx] == -1)
484 iiIndex = (iIndex * N + iIndex - (iIndex * iIndex + iIndex) / 2);
485 epsilons_[indx] = sqrt(epsilons_[iiIndex] * epsilons_[jjIndex]);
486 sigmas_[indx] = (sigmas_[iiIndex] + sigmas_[jjIndex]) / 2.0;
487 cutoffs_[indx] = (cutoffs_[iiIndex] + cutoffs_[jjIndex]) / 2.0;
498 void LennardJones612Implementation::getNextDataLine(FILE *
const filePtr,
505 if (fgets(nextLinePtr, maxSize, filePtr) == NULL)
510 while ((nextLinePtr[0] ==
' ' || nextLinePtr[0] ==
'\t')
511 || (nextLinePtr[0] ==
'\n' || nextLinePtr[0] ==
'\r'))
512 { nextLinePtr = (nextLinePtr + 1); }
513 }
while ((strncmp(
"#", nextLinePtr, 1) == 0) || (strlen(nextLinePtr) == 0));
517 void LennardJones612Implementation::CloseParameterFiles(
518 int const numberParameterFiles,
521 for (
int i = 0; i < numberParameterFiles; ++i)
522 fclose(parameterFilePointers[i]);
526 #undef KIM_LOGGER_OBJECT_NAME 527 #define KIM_LOGGER_OBJECT_NAME modelDriverCreate 529 int LennardJones612Implementation::ConvertUnits(
547 double convertLength = 1.0;
556 requestedTemperatureUnit,
566 LOG_ERROR(
"Unable to convert length unit");
569 if (convertLength !=
ONE)
571 for (
int i = 0; i < numberUniqueSpeciesPairs_; ++i)
573 cutoffs_[i] *= convertLength;
574 sigmas_[i] *= convertLength;
578 double convertEnergy = 1.0;
587 requestedTemperatureUnit,
597 LOG_ERROR(
"Unable to convert energy unit");
600 if (convertEnergy !=
ONE)
602 for (
int i = 0; i < numberUniqueSpeciesPairs_; ++i)
604 epsilons_[i] *= convertEnergy;
609 ier = modelDriverCreate->
SetUnits(requestedLengthUnit,
616 LOG_ERROR(
"Unable to set units to requested values");
626 int LennardJones612Implementation::RegisterKIMModelSettings(
636 #undef KIM_LOGGER_OBJECT_NAME 637 #define KIM_LOGGER_OBJECT_NAME modelComputeArgumentsCreate 639 int LennardJones612Implementation::RegisterKIMComputeArgumentsSettings(
677 static_cast<std::ostringstream &>(std::ostringstream() << std::dec << x).str() 679 #undef KIM_LOGGER_OBJECT_NAME 680 #define KIM_LOGGER_OBJECT_NAME modelDriverCreate 682 int LennardJones612Implementation::RegisterKIMParameters(
692 "If (shift == 1), all LJ potentials are shifted to zero energy " 693 "at their respective cutoff distance. Otherwise, no shifting is " 702 numberUniqueSpeciesPairs_,
705 "Lower-triangular matrix (of size N=" +
SNUM(numberModelSpecies_)
707 "in row-major storage. Ordering is according to SpeciesCode " 709 "For example, to find the parameter related to SpeciesCode 'i' and " 710 "SpeciesCode 'j' (i >= j), use (zero-based) " 711 "index = (j*N + i - (j*j + j)/2).");
718 numberUniqueSpeciesPairs_,
721 "Lower-triangular matrix (of size N=" +
SNUM(numberModelSpecies_)
723 "in row-major storage. Ordering is according to SpeciesCode " 725 "For example, to find the parameter related to SpeciesCode 'i' and " 726 "SpeciesCode 'j' (i >= j), use (zero-based) " 727 "index = (j*N + i - (j*j + j)/2).");
734 numberUniqueSpeciesPairs_,
737 "Lower-triangular matrix (of size N=" +
SNUM(numberModelSpecies_)
739 "in row-major storage. Ordering is according to SpeciesCode " 741 "For example, to find the parameter related to SpeciesCode 'i' and " 742 "SpeciesCode 'j' (i >= j), use (zero-based) " 743 "index = (j*N + i - (j*j + j)/2).");
756 int LennardJones612Implementation::RegisterKIMFunctions(
775 reinterpret_cast<KIM::Function *>(destroy))
780 reinterpret_cast<KIM::Function *>(refresh))
785 reinterpret_cast<KIM::Function *>(compute))
790 reinterpret_cast<KIM::Function *>(CACreate))
795 reinterpret_cast<KIM::Function *>(CADestroy));
800 template<
class ModelObj>
801 int LennardJones612Implementation::SetRefreshMutableValues(
802 ModelObj *
const modelObj)
810 for (
int i = 0; i < numberModelSpecies_; ++i)
812 for (
int j = 0; j <= i; ++j)
814 int const index = j * numberModelSpecies_ + i - (j * j + j) / 2;
815 cutoffsSq2D_[i][j] = cutoffsSq2D_[j][i]
816 = (cutoffs_[index] * cutoffs_[index]);
817 fourEpsilonSigma6_2D_[i][j] = fourEpsilonSigma6_2D_[j][i]
818 = 4.0 * epsilons_[index] * pow(sigmas_[index], 6.0);
819 fourEpsilonSigma12_2D_[i][j] = fourEpsilonSigma12_2D_[j][i]
820 = 4.0 * epsilons_[index] * pow(sigmas_[index], 12.0);
821 twentyFourEpsilonSigma6_2D_[i][j] = twentyFourEpsilonSigma6_2D_[j][i]
822 = 6.0 * fourEpsilonSigma6_2D_[i][j];
823 fortyEightEpsilonSigma12_2D_[i][j] = fortyEightEpsilonSigma12_2D_[j][i]
824 = 12.0 * fourEpsilonSigma12_2D_[i][j];
825 oneSixtyEightEpsilonSigma6_2D_[i][j]
826 = oneSixtyEightEpsilonSigma6_2D_[j][i]
827 = 7.0 * twentyFourEpsilonSigma6_2D_[i][j];
828 sixTwentyFourEpsilonSigma12_2D_[i][j]
829 = sixTwentyFourEpsilonSigma12_2D_[j][i]
830 = 13.0 * fortyEightEpsilonSigma12_2D_[i][j];
835 influenceDistance_ = 0.0;
837 for (
int i = 0; i < numberModelSpecies_; i++)
839 int indexI = modelSpeciesCodeList_[i];
841 for (
int j = 0; j < numberModelSpecies_; j++)
843 int indexJ = modelSpeciesCodeList_[j];
845 if (influenceDistance_ < cutoffsSq2D_[indexI][indexJ])
846 { influenceDistance_ = cutoffsSq2D_[indexI][indexJ]; }
850 influenceDistance_ = sqrt(influenceDistance_);
851 modelObj->SetInfluenceDistancePointer(&influenceDistance_);
852 modelObj->SetNeighborListPointers(
855 &modelWillNotRequestNeighborsOfNoncontributingParticles_);
859 double const *
const *
const constFourEpsSig6_2D = fourEpsilonSigma6_2D_;
860 double const *
const *
const constFourEpsSig12_2D = fourEpsilonSigma12_2D_;
864 for (
int iSpecies = 0; iSpecies < numberModelSpecies_; iSpecies++)
866 for (
int jSpecies = 0; jSpecies <= iSpecies; jSpecies++)
868 int const index = jSpecies * numberModelSpecies_ + iSpecies
869 - (jSpecies * jSpecies + jSpecies) / 2;
870 double const rij2 = cutoffs_[index] * cutoffs_[index];
871 double const r2iv = 1.0 / rij2;
872 double const r6iv = r2iv * r2iv * r2iv;
874 shifts2D_[iSpecies][jSpecies] = shifts2D_[jSpecies][iSpecies] = phi;
885 #undef KIM_LOGGER_OBJECT_NAME 886 #define KIM_LOGGER_OBJECT_NAME modelComputeArguments 888 int LennardJones612Implementation::SetComputeMutableValues(
890 bool & isComputeProcess_dEdr,
891 bool & isComputeProcess_d2Edr2,
892 bool & isComputeEnergy,
893 bool & isComputeForces,
894 bool & isComputeParticleEnergy,
895 bool & isComputeVirial,
896 bool & isComputeParticleVirial,
901 double *& particleEnergy,
909 int compProcess_dEdr;
910 int compProcess_d2Edr2;
917 isComputeProcess_dEdr = compProcess_dEdr;
918 isComputeProcess_d2Edr2 = compProcess_d2Edr2;
938 (
double const **) &forces)
941 (
double const **) &virial)
944 (
double const **) &particleVirial);
951 isComputeEnergy = (energy != NULL);
952 isComputeParticleEnergy = (particleEnergy != NULL);
953 isComputeForces = (forces != NULL);
954 isComputeVirial = (virial != NULL);
955 isComputeParticleVirial = (particleVirial != NULL);
966 #undef KIM_LOGGER_OBJECT_NAME 967 #define KIM_LOGGER_OBJECT_NAME modelCompute 968 int LennardJones612Implementation::CheckParticleSpeciesCodes(
973 for (
int i = 0; i < cachedNumberOfParticles_; ++i)
975 if ((particleSpeciesCodes[i] < 0)
976 || (particleSpeciesCodes[i] >= numberModelSpecies_))
979 LOG_ERROR(
"unsupported particle species codes detected");
990 int LennardJones612Implementation::GetComputeIndex(
991 const bool & isComputeProcess_dEdr,
992 const bool & isComputeProcess_d2Edr2,
993 const bool & isComputeEnergy,
994 const bool & isComputeForces,
995 const bool & isComputeParticleEnergy,
996 const bool & isComputeVirial,
997 const bool & isComputeParticleVirial,
998 const bool & isShift)
const 1001 const int processd2E = 2;
1002 const int energy = 2;
1003 const int force = 2;
1004 const int particleEnergy = 2;
1005 const int virial = 2;
1006 const int particleVirial = 2;
1007 const int shift = 2;
1013 index += (int(isComputeProcess_dEdr)) * processd2E * energy * force
1014 * particleEnergy * virial * particleVirial * shift;
1017 index += (int(isComputeProcess_d2Edr2)) * energy * force * particleEnergy
1018 * virial * particleVirial * shift;
1021 index += (int(isComputeEnergy)) * force * particleEnergy * virial
1022 * particleVirial * shift;
1025 index += (int(isComputeForces)) * particleEnergy * virial * particleVirial
1029 index += (int(isComputeParticleEnergy)) * virial * particleVirial * shift;
1032 index += (int(isComputeVirial)) * particleVirial * shift;
1035 index += (int(isComputeParticleVirial)) * shift;
1038 index += (int(isShift));
1044 void LennardJones612Implementation::ProcessVirialTerm(
1045 const double & dEidr,
1047 const double *
const r_ij,
1055 double const v = dEidr / rij;
1057 virial[0] += v * r_ij[0] * r_ij[0];
1058 virial[1] += v * r_ij[1] * r_ij[1];
1059 virial[2] += v * r_ij[2] * r_ij[2];
1060 virial[3] += v * r_ij[1] * r_ij[2];
1061 virial[4] += v * r_ij[0] * r_ij[2];
1062 virial[5] += v * r_ij[0] * r_ij[1];
1066 void LennardJones612Implementation::ProcessParticleVirialTerm(
1067 const double & dEidr,
1069 const double *
const r_ij,
1074 double const v = dEidr / rij;
1077 vir[0] = 0.5 * v * r_ij[0] * r_ij[0];
1078 vir[1] = 0.5 * v * r_ij[1] * r_ij[1];
1079 vir[2] = 0.5 * v * r_ij[2] * r_ij[2];
1080 vir[3] = 0.5 * v * r_ij[1] * r_ij[2];
1081 vir[4] = 0.5 * v * r_ij[0] * r_ij[2];
1082 vir[5] = 0.5 * v * r_ij[0] * r_ij[1];
1084 for (
int k = 0; k < 6; ++k)
1086 particleVirial[i][k] += vir[k];
1087 particleVirial[j][k] += vir[k];
1099 int const extentZero,
1100 int const extentOne)
1102 arrayPtr =
new double *[extentZero];
1103 arrayPtr[0] =
new double[extentZero * extentOne];
1104 for (
int i = 1; i < extentZero; ++i)
1105 { arrayPtr[i] = arrayPtr[i - 1] + extentOne; }
1108 for (
int i = 0; i < extentZero; ++i)
1110 for (
int j = 0; j < extentOne; ++j) { arrayPtr[i][j] = 0.0; }
1117 if (arrayPtr != NULL)
delete[] arrayPtr[0];
~LennardJones612Implementation()
Numbering const zeroBased
The standard zeroBased numbering.
TimeUnit const ps
The standard picosecond unit of time.
#define LOG_ERROR(message)
Convenience macro for ERROR Log entries with compile-time optimization.
TimeUnit const unused
Indicates that a TimeUnit is not used.
int SetSpeciesCode(SpeciesName const speciesName, int const code)
Set integer code for supported SpeciesName.
EnergyUnit const eV
The standard electronvolt unit of energy.
ComputeCallbackName const ProcessD2EDr2Term
The standard ProcessD2EDr2Term callback.
recursive subroutine, public destroy(model_destroy_handle, ierr)
An Extensible Enumeration for the ChargeUnit's supported by the KIM API.
ComputeArgumentName const partialParticleEnergy
The standard partialParticleEnergy argument.
An Extensible Enumeration for the LengthUnit's supported by the KIM API.
int Refresh(KIM::ModelRefresh *const modelRefresh)
SupportStatus const optional
The standard optional status.
void AllocateAndInitialize2DArray(double **&arrayPtr, int const extentZero, int const extentOne)
int SetArgumentSupportStatus(ComputeArgumentName const computeArgumentName, SupportStatus const supportStatus)
Set the SupportStatus of a ComputeArgumentName.
int ComputeArgumentsDestroy(KIM::ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy) const
TemperatureUnit const K
The standard Kelvin unit of temperature.
static int Refresh(KIM::ModelRefresh *const modelRefresh)
recursive subroutine, public refresh(model_refresh_handle, ierr)
#define LENNARD_JONES_PHI(exshift)
static int Compute(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArguments const *const modelComputeArguments)
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::C...
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
ChargeUnit const unused
Indicates that a ChargeUnit is not used.
TemperatureUnit const unused
Indicates that a TemperatureUnit is not used.
int Compute(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArguments const *const modelComputeArguments)
ComputeArgumentName const partialVirial
The standard partialVirial argument.
void GetNumberOfParameterFiles(int *const numberOfParameterFiles) const
Get the number of parameter files provided by the parameterized model.
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
An Extensible Enumeration for the EnergyUnit's supported by the KIM API.
int IsCallbackPresent(ComputeCallbackName const computeCallbackName, int *const present) const
Determine if the Simulator has provided a non-NULL function pointer for a ComputeCallbackName of inte...
void Deallocate2DArray(double **&arrayPtr)
ModelRoutineName const Destroy
The standard Destroy routine.
int SetParameterPointer(int const extent, int *const ptr, std::string const &name, std::string const &description)
Set the next parameter data pointer to be provided by the model.
double VectorOfSizeSix[6]
static int Destroy(KIM::ModelDestroy *const modelDestroy)
int ComputeArgumentsCreate(KIM::ModelComputeArgumentsCreate *const modelComputeArgumentsCreate) const
int SetUnits(LengthUnit const lengthUnit, EnergyUnit const energyUnit, ChargeUnit const chargeUnit, TemperatureUnit const temperatureUnit, TimeUnit const timeUnit)
Set the Model's base unit values.
int ModelComputeArgumentsCreateFunction(ModelCompute const *const modelCompute, ModelComputeArgumentsCreate *const modelComputeArgumentsCreate)
Prototype for MODEL_ROUTINE_NAME::ComputeArgumentsCreate routine.
ComputeCallbackName const ProcessDEDrTerm
The standard ProcessDEDrTerm callback.
An Extensible Enumeration for the TimeUnit's supported by the KIM API.
static int ComputeArgumentsDestroy(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy)
ModelRoutineName const Refresh
The standard Refresh routine.
ModelRoutineName const ComputeArgumentsDestroy
The standard ComputeArgumentsDestroy routine.
ModelRoutineName const ComputeArgumentsCreate
The standard ComputeArgumentsCreate routine.
ComputeArgumentName const coordinates
The standard coordinates argument.
LengthUnit const A
The standard angstrom unit of length.
int GetParameterFileName(int const index, std::string const **const parameterFileName) const
Get a particular parameter file name.
ComputeArgumentName const partialEnergy
The standard partialEnergy argument.
ModelRoutineName const Compute
The standard Compute routine.
ComputeArgumentName const particleSpeciesCodes
The standard particleSpeciesCodes argument.
ComputeArgumentName const numberOfParticles
The standard numberOfParticles argument.
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::C...
ComputeArgumentName const partialParticleVirial
The standard partialParticleVirial argument.
LanguageName const cpp
The standard cpp language.
int ModelDestroyFunction(ModelDestroy *const modelDestroy)
Prototype for MODEL_ROUTINE_NAME::Destroy routine.
int GetArgumentPointer(ComputeArgumentName const computeArgumentName, int const **const ptr) const
Get the data pointer for a ComputeArgumentName.
SpeciesName const N
The standard Nitrogen species.
Provides the interface to a KIM API Model object for use by models within their MODEL_ROUTINE_NAME::R...
An Extensible Enumeration for the TemperatureUnit's supported by the KIM API.
static int ComputeArgumentsCreate(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArgumentsCreate *const modelComputeArgumentsCreate)
LogVerbosity const error
The standard error verbosity.
#define LOG_INFORMATION(message)
Convenience macro for INFORMATION Log entries with compile-time optimization.
An Extensible Enumeration for the SpeciesName's supported by the KIM API.
ChargeUnit const e
The standard electron unit of charge.
double VectorOfSizeDIM[DIMENSION]
LennardJones612Implementation(KIM::ModelDriverCreate *const modelDriverCreate, KIM::LengthUnit const requestedLengthUnit, KIM::EnergyUnit const requestedEnergyUnit, KIM::ChargeUnit const requestedChargeUnit, KIM::TemperatureUnit const requestedTemperatureUnit, KIM::TimeUnit const requestedTimeUnit, int *const ier)
int SetModelNumbering(Numbering const numbering)
Set the Model's particle Numbering.
int ModelComputeArgumentsDestroyFunction(ModelCompute const *const modelCompute, ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy)
Prototype for MODEL_ROUTINE_NAME::ComputeArgumentsDestroy routine.
int SetRoutinePointer(ModelRoutineName const modelRoutineName, LanguageName const languageName, int const required, Function *const fptr)
Set the function pointer for the ModelRoutineName of interest.
int ModelRefreshFunction(ModelRefresh *const modelRefresh)
Prototype for MODEL_ROUTINE_NAME::Refresh routine.
ComputeArgumentName const particleContributing
The standard particleContributing argument.
ComputeArgumentName const partialForces
The standard partialForces argument.
static int ConvertUnit(LengthUnit const fromLengthUnit, EnergyUnit const fromEnergyUnit, ChargeUnit const fromChargeUnit, TemperatureUnit const fromTemperatureUnit, TimeUnit const fromTimeUnit, LengthUnit const toLengthUnit, EnergyUnit const toEnergyUnit, ChargeUnit const toChargeUnit, TemperatureUnit const toTemperatureUnit, TimeUnit const toTimeUnit, double const lengthExponent, double const energyExponent, double const chargeExponent, double const temperatureExponent, double const timeExponent, double *const conversionFactor)
Get the multiplicative factor to convert between a derived unit represented in two different sets of ...
int ModelComputeFunction(ModelCompute const *const modelCompute, ModelComputeArguments const *const modelComputeArgumentsCreate)
Prototype for MODEL_ROUTINE_NAME::Compute routine.
#define MAX_PARAMETER_FILES
int SetCallbackSupportStatus(ComputeCallbackName const computeCallbackName, SupportStatus const supportStatus)
Set the SupportStatus of a ComputeCallbackName.