41#define IGNORE_RESULT(fn) \
52#undef KIM_LOGGER_OBJECT_NAME
53#define KIM_LOGGER_OBJECT_NAME modelDriverCreate
63 numberModelSpecies_(0),
64 numberUniqueSpeciesPairs_(0),
69 influenceDistance_(0.0),
71 modelWillNotRequestNeighborsOfNoncontributingParticles_(1),
72 fourEpsilonSigma6_2D_(NULL),
73 fourEpsilonSigma12_2D_(NULL),
74 twentyFourEpsilonSigma6_2D_(NULL),
75 fortyEightEpsilonSigma12_2D_(NULL),
76 oneSixtyEightEpsilonSigma6_2D_(NULL),
77 sixTwentyFourEpsilonSigma12_2D_(NULL),
79 cachedNumberOfParticles_(0)
82 int numberParameterFiles;
84 *ier = OpenParameterFiles(
85 modelDriverCreate, numberParameterFiles, parameterFilePointers);
88 *ier = ProcessParameterFiles(
89 modelDriverCreate, numberParameterFiles, parameterFilePointers);
90 CloseParameterFiles(numberParameterFiles, parameterFilePointers);
93 *ier = ConvertUnits(modelDriverCreate,
97 requestedTemperatureUnit,
101 *ier = SetRefreshMutableValues(modelDriverCreate);
104 *ier = RegisterKIMModelSettings(modelDriverCreate);
107 *ier = RegisterKIMParameters(modelDriverCreate);
110 *ier = RegisterKIMFunctions(modelDriverCreate);
137#undef KIM_LOGGER_OBJECT_NAME
138#define KIM_LOGGER_OBJECT_NAME modelRefresh
145 ier = SetRefreshMutableValues(modelRefresh);
163 bool isComputeProcess_dEdr =
false;
164 bool isComputeProcess_d2Edr2 =
false;
167 bool isComputeEnergy =
false;
168 bool isComputeForces =
false;
169 bool isComputeParticleEnergy =
false;
170 bool isComputeVirial =
false;
171 bool isComputeParticleVirial =
false;
174 int const * particleSpeciesCodes = NULL;
175 int const * particleContributing = NULL;
179 double * energy = NULL;
180 double * particleEnergy = NULL;
184 ier = SetComputeMutableValues(modelComputeArguments,
185 isComputeProcess_dEdr,
186 isComputeProcess_d2Edr2,
189 isComputeParticleEnergy,
191 isComputeParticleVirial,
192 particleSpeciesCodes,
193 particleContributing,
207 bool const isShift = (1 == shift_);
219 ier = RegisterKIMComputeArgumentsSettings(modelComputeArgumentsCreate);
250void LennardJones612Implementation::AllocatePrivateParameterMemory()
256void LennardJones612Implementation::AllocateParameterMemory()
258 cutoffs_ =
new double[numberUniqueSpeciesPairs_];
260 cutoffsSq2D_, numberModelSpecies_, numberModelSpecies_);
262 epsilons_ =
new double[numberUniqueSpeciesPairs_];
263 sigmas_ =
new double[numberUniqueSpeciesPairs_];
265 fourEpsilonSigma6_2D_, numberModelSpecies_, numberModelSpecies_);
267 fourEpsilonSigma12_2D_, numberModelSpecies_, numberModelSpecies_);
269 twentyFourEpsilonSigma6_2D_, numberModelSpecies_, numberModelSpecies_);
271 fortyEightEpsilonSigma12_2D_, numberModelSpecies_, numberModelSpecies_);
273 oneSixtyEightEpsilonSigma6_2D_, numberModelSpecies_, numberModelSpecies_);
276 numberModelSpecies_);
279 shifts2D_, numberModelSpecies_, numberModelSpecies_);
283#undef KIM_LOGGER_OBJECT_NAME
284#define KIM_LOGGER_OBJECT_NAME modelDriverCreate
286int LennardJones612Implementation::OpenParameterFiles(
288 int const numberParameterFiles,
296 LOG_ERROR(
"LennardJones612 given too many parameter files");
300 std::string
const * paramFileDirName;
302 for (
int i = 0; i < numberParameterFiles; ++i)
304 std::string
const * paramFileName;
308 LOG_ERROR(
"Unable to get parameter file name");
311 std::string filename = *paramFileDirName +
"/" + *paramFileName;
312 parameterFilePointers[i] = fopen(filename.c_str(),
"r");
313 if (parameterFilePointers[i] == 0)
317 "LennardJones612 parameter file number %d cannot be opened",
321 for (
int j = i - 1; j >= 0; --j) { fclose(parameterFilePointers[j]); }
332#undef KIM_LOGGER_OBJECT_NAME
333#define KIM_LOGGER_OBJECT_NAME modelDriverCreate
335int LennardJones612Implementation::ProcessParameterFiles(
341 int endOfFileFlag = 0;
344 int iIndex, jIndex, indx, iiIndex, jjIndex;
345 double nextCutoff, nextEpsilon, nextSigma;
347 nextLinePtr = nextLine;
350 parameterFilePointers[0], nextLinePtr,
MAXLINE, &endOfFileFlag);
351 ier = sscanf(nextLine,
"%d %d", &N, &shift_);
354 sprintf(nextLine,
"unable to read first line of the parameter file");
357 fclose(parameterFilePointers[0]);
360 numberModelSpecies_ =
N;
361 numberUniqueSpeciesPairs_
362 = ((numberModelSpecies_ + 1) * numberModelSpecies_) / 2;
363 AllocateParameterMemory();
366 for (
int i = 0; i < ((
N + 1) *
N / 2); i++)
375 std::map<KIM::SpeciesName const, int, KIM::SPECIES_NAME::Comparator>
377 std::vector<KIM::SpeciesName> speciesNameVector;
382 parameterFilePointers[0], nextLinePtr,
MAXLINE, &endOfFileFlag);
383 while (endOfFileFlag == 0)
385 ier = sscanf(nextLine,
394 sprintf(nextLine,
"error reading lines of the parameter file");
400 KIM::SpeciesName
const specName1(spec1);
401 KIM::SpeciesName
const specName2(spec2);
404 std::map<KIM::SpeciesName const, int, KIM::SPECIES_NAME::Comparator>::
406 = modelSpeciesMap.find(specName1);
407 if (iIter == modelSpeciesMap.end())
409 modelSpeciesMap[specName1] = index;
410 modelSpeciesCodeList_.push_back(index);
411 speciesNameVector.push_back(specName1);
418 else { iIndex = modelSpeciesMap[specName1]; }
419 std::map<KIM::SpeciesName const, int, KIM::SPECIES_NAME::Comparator>::
421 = modelSpeciesMap.find(specName2);
422 if (jIter == modelSpeciesMap.end())
424 modelSpeciesMap[specName2] = index;
425 modelSpeciesCodeList_.push_back(index);
426 speciesNameVector.push_back(specName2);
433 else { jIndex = modelSpeciesMap[specName2]; }
435 if (iIndex >= jIndex)
437 indx = jIndex *
N + iIndex - (jIndex * jIndex + jIndex) / 2;
439 else { indx = iIndex *
N + jIndex - (iIndex * iIndex + iIndex) / 2; }
440 cutoffs_[indx] = nextCutoff;
441 epsilons_[indx] = nextEpsilon;
442 sigmas_[indx] = nextSigma;
445 parameterFilePointers[0], nextLinePtr,
MAXLINE, &endOfFileFlag);
449 std::stringstream ss;
450 ss <<
"There are not values for like-like pairs of:";
451 for (
int i = 0; i <
N; i++)
453 if (cutoffs_[(i * N + i - (i * i + i) / 2)] == -1)
456 ss << (speciesNameVector[i].ToString()).c_str();
467 for (
int jIndex = 0; jIndex <
N; jIndex++)
469 jjIndex = (jIndex *
N + jIndex - (jIndex * jIndex + jIndex) / 2);
470 for (
int iIndex = (jIndex + 1); iIndex <
N; iIndex++)
472 indx = jIndex *
N + iIndex - (jIndex * jIndex + jIndex) / 2;
473 if (cutoffs_[indx] == -1)
475 iiIndex = (iIndex *
N + iIndex - (iIndex * iIndex + iIndex) / 2);
476 epsilons_[indx] = sqrt(epsilons_[iiIndex] * epsilons_[jjIndex]);
477 sigmas_[indx] = (sigmas_[iiIndex] + sigmas_[jjIndex]) / 2.0;
478 cutoffs_[indx] = (cutoffs_[iiIndex] + cutoffs_[jjIndex]) / 2.0;
489void LennardJones612Implementation::getNextDataLine(FILE *
const filePtr,
495 if (fgets(nextLinePtr, maxSize, filePtr) == NULL)
500 while ((nextLinePtr[0] ==
' ' || nextLinePtr[0] ==
'\t')
501 || (nextLinePtr[0] ==
'\n' || nextLinePtr[0] ==
'\r'))
503 nextLinePtr = (nextLinePtr + 1);
505 }
while ((strncmp(
"#", nextLinePtr, 1) == 0) || (strlen(nextLinePtr) == 0));
509void LennardJones612Implementation::CloseParameterFiles(
510 int const numberParameterFiles,
513 for (
int i = 0; i < numberParameterFiles; ++i)
514 fclose(parameterFilePointers[i]);
518#undef KIM_LOGGER_OBJECT_NAME
519#define KIM_LOGGER_OBJECT_NAME modelDriverCreate
521int LennardJones612Implementation::ConvertUnits(
539 double convertLength = 1.0;
548 requestedTemperatureUnit,
558 LOG_ERROR(
"Unable to convert length unit");
561 if (convertLength !=
ONE)
563 for (
int i = 0; i < numberUniqueSpeciesPairs_; ++i)
565 cutoffs_[i] *= convertLength;
566 sigmas_[i] *= convertLength;
570 double convertEnergy = 1.0;
579 requestedTemperatureUnit,
589 LOG_ERROR(
"Unable to convert energy unit");
592 if (convertEnergy !=
ONE)
594 for (
int i = 0; i < numberUniqueSpeciesPairs_; ++i)
596 epsilons_[i] *= convertEnergy;
601 ier = modelDriverCreate->
SetUnits(requestedLengthUnit,
608 LOG_ERROR(
"Unable to set units to requested values");
618int LennardJones612Implementation::RegisterKIMModelSettings(
628#undef KIM_LOGGER_OBJECT_NAME
629#define KIM_LOGGER_OBJECT_NAME modelComputeArgumentsCreate
631int LennardJones612Implementation::RegisterKIMComputeArgumentsSettings(
669 static_cast<std::ostringstream const &>(std::ostringstream() \
673#undef KIM_LOGGER_OBJECT_NAME
674#define KIM_LOGGER_OBJECT_NAME modelDriverCreate
676int LennardJones612Implementation::RegisterKIMParameters(
686 "If (shift == 1), all LJ potentials are shifted to zero energy "
687 "at their respective cutoff distance. Otherwise, no shifting is "
696 numberUniqueSpeciesPairs_,
699 "Lower-triangular matrix (of size N=" +
SNUM(numberModelSpecies_)
701 "in row-major storage. Ordering is according to SpeciesCode "
703 "For example, to find the parameter related to SpeciesCode 'i' and "
704 "SpeciesCode 'j' (i >= j), use (zero-based) "
705 "index = (j*N + i - (j*j + j)/2).");
712 numberUniqueSpeciesPairs_,
715 "Lower-triangular matrix (of size N=" +
SNUM(numberModelSpecies_)
717 "in row-major storage. Ordering is according to SpeciesCode "
719 "For example, to find the parameter related to SpeciesCode 'i' and "
720 "SpeciesCode 'j' (i >= j), use (zero-based) "
721 "index = (j*N + i - (j*j + j)/2).");
728 numberUniqueSpeciesPairs_,
731 "Lower-triangular matrix (of size N=" +
SNUM(numberModelSpecies_)
733 "in row-major storage. Ordering is according to SpeciesCode "
735 "For example, to find the parameter related to SpeciesCode 'i' and "
736 "SpeciesCode 'j' (i >= j), use (zero-based) "
737 "index = (j*N + i - (j*j + j)/2).");
750int LennardJones612Implementation::RegisterKIMFunctions(
794template<
class ModelObj>
795int LennardJones612Implementation::SetRefreshMutableValues(
796 ModelObj *
const modelObj)
804 for (
int i = 0; i < numberModelSpecies_; ++i)
806 for (
int j = 0; j <= i; ++j)
808 int const index = j * numberModelSpecies_ + i - (j * j + j) / 2;
809 cutoffsSq2D_[i][j] = cutoffsSq2D_[j][i]
810 = (cutoffs_[index] * cutoffs_[index]);
811 fourEpsilonSigma6_2D_[i][j] = fourEpsilonSigma6_2D_[j][i]
812 = 4.0 * epsilons_[index] * pow(sigmas_[index], 6.0);
813 fourEpsilonSigma12_2D_[i][j] = fourEpsilonSigma12_2D_[j][i]
814 = 4.0 * epsilons_[index] * pow(sigmas_[index], 12.0);
815 twentyFourEpsilonSigma6_2D_[i][j] = twentyFourEpsilonSigma6_2D_[j][i]
816 = 6.0 * fourEpsilonSigma6_2D_[i][j];
817 fortyEightEpsilonSigma12_2D_[i][j] = fortyEightEpsilonSigma12_2D_[j][i]
818 = 12.0 * fourEpsilonSigma12_2D_[i][j];
819 oneSixtyEightEpsilonSigma6_2D_[i][j]
820 = oneSixtyEightEpsilonSigma6_2D_[j][i]
821 = 7.0 * twentyFourEpsilonSigma6_2D_[i][j];
822 sixTwentyFourEpsilonSigma12_2D_[i][j]
823 = sixTwentyFourEpsilonSigma12_2D_[j][i]
824 = 13.0 * fortyEightEpsilonSigma12_2D_[i][j];
829 influenceDistance_ = 0.0;
831 for (
int i = 0; i < numberModelSpecies_; i++)
833 int indexI = modelSpeciesCodeList_[i];
835 for (
int j = 0; j < numberModelSpecies_; j++)
837 int indexJ = modelSpeciesCodeList_[j];
839 if (influenceDistance_ < cutoffsSq2D_[indexI][indexJ])
841 influenceDistance_ = cutoffsSq2D_[indexI][indexJ];
846 influenceDistance_ = sqrt(influenceDistance_);
847 modelObj->SetInfluenceDistancePointer(&influenceDistance_);
848 modelObj->SetNeighborListPointers(
851 &modelWillNotRequestNeighborsOfNoncontributingParticles_);
855 double const *
const *
const constFourEpsSig6_2D = fourEpsilonSigma6_2D_;
856 double const *
const *
const constFourEpsSig12_2D = fourEpsilonSigma12_2D_;
860 for (
int iSpecies = 0; iSpecies < numberModelSpecies_; iSpecies++)
862 for (
int jSpecies = 0; jSpecies <= iSpecies; jSpecies++)
864 int const index = jSpecies * numberModelSpecies_ + iSpecies
865 - (jSpecies * jSpecies + jSpecies) / 2;
866 double const rij2 = cutoffs_[index] * cutoffs_[index];
867 double const r2iv = 1.0 / rij2;
868 double const r6iv = r2iv * r2iv * r2iv;
870 shifts2D_[iSpecies][jSpecies] = shifts2D_[jSpecies][iSpecies] = phi;
881#undef KIM_LOGGER_OBJECT_NAME
882#define KIM_LOGGER_OBJECT_NAME modelComputeArguments
884int LennardJones612Implementation::SetComputeMutableValues(
886 bool & isComputeProcess_dEdr,
887 bool & isComputeProcess_d2Edr2,
888 bool & isComputeEnergy,
889 bool & isComputeForces,
890 bool & isComputeParticleEnergy,
891 bool & isComputeVirial,
892 bool & isComputeParticleVirial,
893 int const *& particleSpeciesCodes,
894 int const *& particleContributing,
897 double *& particleEnergy,
905 int compProcess_dEdr;
906 int compProcess_d2Edr2;
913 isComputeProcess_dEdr = compProcess_dEdr;
914 isComputeProcess_d2Edr2 = compProcess_d2Edr2;
921 &particleSpeciesCodes)
924 &particleContributing)
927 (
double const **) &coordinates)
934 (
double const **) &forces)
937 (
double const **) &virial)
940 (
double const **) &particleVirial);
947 isComputeEnergy = (energy != NULL);
948 isComputeParticleEnergy = (particleEnergy != NULL);
949 isComputeForces = (forces != NULL);
950 isComputeVirial = (virial != NULL);
951 isComputeParticleVirial = (particleVirial != NULL);
962#undef KIM_LOGGER_OBJECT_NAME
963#define KIM_LOGGER_OBJECT_NAME modelCompute
964int LennardJones612Implementation::CheckParticleSpeciesCodes(
966 int const *
const particleSpeciesCodes)
const
969 for (
int i = 0; i < cachedNumberOfParticles_; ++i)
971 if ((particleSpeciesCodes[i] < 0)
972 || (particleSpeciesCodes[i] >= numberModelSpecies_))
975 LOG_ERROR(
"unsupported particle species codes detected");
986int LennardJones612Implementation::GetComputeIndex(
987 const bool & isComputeProcess_dEdr,
988 const bool & isComputeProcess_d2Edr2,
989 const bool & isComputeEnergy,
990 const bool & isComputeForces,
991 const bool & isComputeParticleEnergy,
992 const bool & isComputeVirial,
993 const bool & isComputeParticleVirial,
994 const bool & isShift)
const
997 const int processd2E = 2;
998 const int energy = 2;
1000 const int particleEnergy = 2;
1001 const int virial = 2;
1002 const int particleVirial = 2;
1003 const int shift = 2;
1009 index += (int(isComputeProcess_dEdr)) * processd2E * energy * force
1010 * particleEnergy * virial * particleVirial * shift;
1013 index += (int(isComputeProcess_d2Edr2)) * energy * force * particleEnergy
1014 * virial * particleVirial * shift;
1017 index += (int(isComputeEnergy)) * force * particleEnergy * virial
1018 * particleVirial * shift;
1021 index += (int(isComputeForces)) * particleEnergy * virial * particleVirial
1025 index += (int(isComputeParticleEnergy)) * virial * particleVirial * shift;
1028 index += (int(isComputeVirial)) * particleVirial * shift;
1031 index += (int(isComputeParticleVirial)) * shift;
1034 index += (int(isShift));
1040void LennardJones612Implementation::ProcessVirialTerm(
1041 const double & dEidr,
1043 const double *
const r_ij,
1048 double const v = dEidr / rij;
1050 virial[0] += v * r_ij[0] * r_ij[0];
1051 virial[1] += v * r_ij[1] * r_ij[1];
1052 virial[2] += v * r_ij[2] * r_ij[2];
1053 virial[3] += v * r_ij[1] * r_ij[2];
1054 virial[4] += v * r_ij[0] * r_ij[2];
1055 virial[5] += v * r_ij[0] * r_ij[1];
1059void LennardJones612Implementation::ProcessParticleVirialTerm(
1060 const double & dEidr,
1062 const double *
const r_ij,
1067 double const v = dEidr / rij;
1070 vir[0] = 0.5 * v * r_ij[0] * r_ij[0];
1071 vir[1] = 0.5 * v * r_ij[1] * r_ij[1];
1072 vir[2] = 0.5 * v * r_ij[2] * r_ij[2];
1073 vir[3] = 0.5 * v * r_ij[1] * r_ij[2];
1074 vir[4] = 0.5 * v * r_ij[0] * r_ij[2];
1075 vir[5] = 0.5 * v * r_ij[0] * r_ij[1];
1077 for (
int k = 0; k < 6; ++k)
1079 particleVirial[i][k] += vir[k];
1080 particleVirial[j][k] += vir[k];
1092 int const extentZero,
1093 int const extentOne)
1095 arrayPtr =
new double *[extentZero];
1096 arrayPtr[0] =
new double[extentZero * extentOne];
1097 for (
int i = 1; i < extentZero; ++i)
1099 arrayPtr[i] = arrayPtr[i - 1] + extentOne;
1103 for (
int i = 0; i < extentZero; ++i)
1105 for (
int j = 0; j < extentOne; ++j) { arrayPtr[i][j] = 0.0; }
1112 if (arrayPtr != NULL)
delete[] arrayPtr[0];
#define LOG_ERROR(message)
Convenience macro for ERROR Log entries with compile-time optimization.
#define LOG_INFORMATION(message)
Convenience macro for INFORMATION Log entries with compile-time optimization.
void AllocateAndInitialize2DArray(double **&arrayPtr, int const extentZero, int const extentOne)
void Deallocate2DArray(double **&arrayPtr)
void AllocateAndInitialize2DArray(double **&arrayPtr, int const extentZero, int const extentOne)
double VectorOfSizeDIM[DIMENSION]
#define MAX_PARAMETER_FILES
void Deallocate2DArray(double **&arrayPtr)
#define LENNARD_JONES_PHI(exshift)
double VectorOfSizeSix[6]
An Extensible Enumeration for the ChargeUnit's supported by the KIM API.
An Extensible Enumeration for the EnergyUnit's supported by the KIM API.
An Extensible Enumeration for the LengthUnit's supported by the KIM API.
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
int SetCallbackSupportStatus(ComputeCallbackName const computeCallbackName, SupportStatus const supportStatus)
Set the SupportStatus of a ComputeCallbackName.
int SetArgumentSupportStatus(ComputeArgumentName const computeArgumentName, SupportStatus const supportStatus)
Set the SupportStatus of a ComputeArgumentName.
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
Provides the interface to a KIM API ComputeArguments object for use by models within their MODEL_ROUT...
int GetArgumentPointer(ComputeArgumentName const computeArgumentName, int const **const ptr) const
Get the data pointer for a ComputeArgumentName.
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...
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 Model object for use by models within their MODEL_ROUTINE_NAME::C...
void GetNumberOfParameterFiles(int *const numberOfParameterFiles) const
Get the number of parameter files provided by the parameterized model.
int SetModelNumbering(Numbering const numbering)
Set the Model's particle Numbering.
void GetParameterFileDirectoryName(std::string const **const directoryName) const
Get absolute path name of the temporary directory where parameter files provided by the model are wri...
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 SetRoutinePointer(ModelRoutineName const modelRoutineName, LanguageName const languageName, int const required, Function *const fptr)
Set the function pointer for the ModelRoutineName of interest.
int GetParameterFileBasename(int const index, std::string const **const parameterFileBasename) const
Get a particular parameter file basename. The file is located in the Model's parameter file directory...
int SetSpeciesCode(SpeciesName const speciesName, int const code)
Set integer code for supported SpeciesName.
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.
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 ...
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.
An Extensible Enumeration for the TimeUnit's supported by the KIM API.
static int ComputeArgumentsCreate(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArgumentsCreate *const modelComputeArgumentsCreate)
static int Destroy(KIM::ModelDestroy *const modelDestroy)
static int Refresh(KIM::ModelRefresh *const modelRefresh)
static int Compute(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArguments const *const modelComputeArguments)
static int ComputeArgumentsDestroy(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy)
~LennardJones612Implementation()
int Refresh(KIM::ModelRefresh *const modelRefresh)
int ComputeArgumentsCreate(KIM::ModelComputeArgumentsCreate *const modelComputeArgumentsCreate) const
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 Compute(KIM::ModelCompute const *const modelCompute, KIM::ModelComputeArguments const *const modelComputeArguments)
int ComputeArgumentsDestroy(KIM::ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy) const
ChargeUnit const e
The standard electron unit of charge.
ChargeUnit const unused
Indicates that a ChargeUnit is not used.
ComputeArgumentName const partialParticleEnergy
The standard partialParticleEnergy argument.
ComputeArgumentName const coordinates
The standard coordinates argument.
ComputeArgumentName const numberOfParticles
The standard numberOfParticles argument.
ComputeArgumentName const particleSpeciesCodes
The standard particleSpeciesCodes argument.
ComputeArgumentName const partialEnergy
The standard partialEnergy argument.
ComputeArgumentName const partialParticleVirial
The standard partialParticleVirial argument.
ComputeArgumentName const partialForces
The standard partialForces argument.
ComputeArgumentName const particleContributing
The standard particleContributing argument.
ComputeArgumentName const partialVirial
The standard partialVirial argument.
ComputeCallbackName const ProcessDEDrTerm
The standard ProcessDEDrTerm callback.
ComputeCallbackName const ProcessD2EDr2Term
The standard ProcessD2EDr2Term callback.
EnergyUnit const eV
The standard electronvolt unit of energy.
LanguageName const cpp
The standard cpp language.
LengthUnit const A
The standard angstrom unit of length.
LogVerbosity const error
The standard error verbosity.
ModelRoutineName const Destroy
The standard Destroy routine.
ModelRoutineName const Compute
The standard Compute routine.
ModelRoutineName const Refresh
The standard Refresh routine.
ModelRoutineName const ComputeArgumentsDestroy
The standard ComputeArgumentsDestroy routine.
ModelRoutineName const ComputeArgumentsCreate
The standard ComputeArgumentsCreate routine.
Numbering const zeroBased
The standard zeroBased numbering.
SpeciesName const N
The standard Nitrogen species.
SupportStatus const optional
The standard optional status.
TemperatureUnit const unused
Indicates that a TemperatureUnit is not used.
TemperatureUnit const K
The standard Kelvin unit of temperature.
TimeUnit const unused
Indicates that a TimeUnit is not used.
TimeUnit const ps
The standard picosecond unit of time.
int ModelComputeFunction(ModelCompute const *const modelCompute, ModelComputeArguments const *const modelComputeArgumentsCreate)
Prototype for MODEL_ROUTINE_NAME::Compute routine.
int ModelComputeArgumentsCreateFunction(ModelCompute const *const modelCompute, ModelComputeArgumentsCreate *const modelComputeArgumentsCreate)
Prototype for MODEL_ROUTINE_NAME::ComputeArgumentsCreate routine.
void Function(void)
Generic function type.
int ModelDestroyFunction(ModelDestroy *const modelDestroy)
Prototype for MODEL_ROUTINE_NAME::Destroy routine.
int ModelRefreshFunction(ModelRefresh *const modelRefresh)
Prototype for MODEL_ROUTINE_NAME::Refresh routine.
int ModelComputeArgumentsDestroyFunction(ModelCompute const *const modelCompute, ModelComputeArgumentsDestroy *const modelComputeArgumentsDestroy)
Prototype for MODEL_ROUTINE_NAME::ComputeArgumentsDestroy routine.
recursive subroutine, public refresh(model_refresh_handle, ierr)
recursive subroutine, public destroy(model_destroy_handle, ierr)