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");
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);
420 iIndex = modelSpeciesMap[specName1];
422 std::map<KIM::SpeciesName const, int, KIM::SPECIES_NAME::Comparator>::
424 = modelSpeciesMap.find(specName2);
425 if (jIter == modelSpeciesMap.end())
427 modelSpeciesMap[specName2] = index;
428 modelSpeciesCodeList_.push_back(index);
429 speciesNameVector.push_back(specName2);
438 jIndex = modelSpeciesMap[specName2];
441 if (iIndex >= jIndex)
443 indx = jIndex *
N + iIndex - (jIndex * jIndex + jIndex) / 2;
447 indx = iIndex *
N + jIndex - (iIndex * iIndex + iIndex) / 2;
449 cutoffs_[indx] = nextCutoff;
450 epsilons_[indx] = nextEpsilon;
451 sigmas_[indx] = nextSigma;
454 parameterFilePointers[0], nextLinePtr,
MAXLINE, &endOfFileFlag);
458 std::stringstream ss;
459 ss <<
"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)
465 ss << (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;
498void LennardJones612Implementation::getNextDataLine(FILE *
const filePtr,
504 if (fgets(nextLinePtr, maxSize, filePtr) == NULL)
509 while ((nextLinePtr[0] ==
' ' || nextLinePtr[0] ==
'\t')
510 || (nextLinePtr[0] ==
'\n' || nextLinePtr[0] ==
'\r'))
512 nextLinePtr = (nextLinePtr + 1);
514 }
while ((strncmp(
"#", nextLinePtr, 1) == 0) || (strlen(nextLinePtr) == 0));
518void LennardJones612Implementation::CloseParameterFiles(
519 int const numberParameterFiles,
522 for (
int i = 0; i < numberParameterFiles; ++i)
523 fclose(parameterFilePointers[i]);
527#undef KIM_LOGGER_OBJECT_NAME
528#define KIM_LOGGER_OBJECT_NAME modelDriverCreate
530int LennardJones612Implementation::ConvertUnits(
548 double convertLength = 1.0;
557 requestedTemperatureUnit,
567 LOG_ERROR(
"Unable to convert length unit");
570 if (convertLength !=
ONE)
572 for (
int i = 0; i < numberUniqueSpeciesPairs_; ++i)
574 cutoffs_[i] *= convertLength;
575 sigmas_[i] *= convertLength;
579 double convertEnergy = 1.0;
588 requestedTemperatureUnit,
598 LOG_ERROR(
"Unable to convert energy unit");
601 if (convertEnergy !=
ONE)
603 for (
int i = 0; i < numberUniqueSpeciesPairs_; ++i)
605 epsilons_[i] *= convertEnergy;
610 ier = modelDriverCreate->
SetUnits(requestedLengthUnit,
617 LOG_ERROR(
"Unable to set units to requested values");
627int LennardJones612Implementation::RegisterKIMModelSettings(
637#undef KIM_LOGGER_OBJECT_NAME
638#define KIM_LOGGER_OBJECT_NAME modelComputeArgumentsCreate
640int LennardJones612Implementation::RegisterKIMComputeArgumentsSettings(
678 static_cast<std::ostringstream const &>(std::ostringstream() \
682#undef KIM_LOGGER_OBJECT_NAME
683#define KIM_LOGGER_OBJECT_NAME modelDriverCreate
685int LennardJones612Implementation::RegisterKIMParameters(
695 "If (shift == 1), all LJ potentials are shifted to zero energy "
696 "at their respective cutoff distance. Otherwise, no shifting is "
705 numberUniqueSpeciesPairs_,
708 "Lower-triangular matrix (of size N=" +
SNUM(numberModelSpecies_)
710 "in row-major storage. Ordering is according to SpeciesCode "
712 "For example, to find the parameter related to SpeciesCode 'i' and "
713 "SpeciesCode 'j' (i >= j), use (zero-based) "
714 "index = (j*N + i - (j*j + j)/2).");
721 numberUniqueSpeciesPairs_,
724 "Lower-triangular matrix (of size N=" +
SNUM(numberModelSpecies_)
726 "in row-major storage. Ordering is according to SpeciesCode "
728 "For example, to find the parameter related to SpeciesCode 'i' and "
729 "SpeciesCode 'j' (i >= j), use (zero-based) "
730 "index = (j*N + i - (j*j + j)/2).");
737 numberUniqueSpeciesPairs_,
740 "Lower-triangular matrix (of size N=" +
SNUM(numberModelSpecies_)
742 "in row-major storage. Ordering is according to SpeciesCode "
744 "For example, to find the parameter related to SpeciesCode 'i' and "
745 "SpeciesCode 'j' (i >= j), use (zero-based) "
746 "index = (j*N + i - (j*j + j)/2).");
759int LennardJones612Implementation::RegisterKIMFunctions(
803template<
class ModelObj>
804int LennardJones612Implementation::SetRefreshMutableValues(
805 ModelObj *
const modelObj)
813 for (
int i = 0; i < numberModelSpecies_; ++i)
815 for (
int j = 0; j <= i; ++j)
817 int const index = j * numberModelSpecies_ + i - (j * j + j) / 2;
818 cutoffsSq2D_[i][j] = cutoffsSq2D_[j][i]
819 = (cutoffs_[index] * cutoffs_[index]);
820 fourEpsilonSigma6_2D_[i][j] = fourEpsilonSigma6_2D_[j][i]
821 = 4.0 * epsilons_[index] * pow(sigmas_[index], 6.0);
822 fourEpsilonSigma12_2D_[i][j] = fourEpsilonSigma12_2D_[j][i]
823 = 4.0 * epsilons_[index] * pow(sigmas_[index], 12.0);
824 twentyFourEpsilonSigma6_2D_[i][j] = twentyFourEpsilonSigma6_2D_[j][i]
825 = 6.0 * fourEpsilonSigma6_2D_[i][j];
826 fortyEightEpsilonSigma12_2D_[i][j] = fortyEightEpsilonSigma12_2D_[j][i]
827 = 12.0 * fourEpsilonSigma12_2D_[i][j];
828 oneSixtyEightEpsilonSigma6_2D_[i][j]
829 = oneSixtyEightEpsilonSigma6_2D_[j][i]
830 = 7.0 * twentyFourEpsilonSigma6_2D_[i][j];
831 sixTwentyFourEpsilonSigma12_2D_[i][j]
832 = sixTwentyFourEpsilonSigma12_2D_[j][i]
833 = 13.0 * fortyEightEpsilonSigma12_2D_[i][j];
838 influenceDistance_ = 0.0;
840 for (
int i = 0; i < numberModelSpecies_; i++)
842 int indexI = modelSpeciesCodeList_[i];
844 for (
int j = 0; j < numberModelSpecies_; j++)
846 int indexJ = modelSpeciesCodeList_[j];
848 if (influenceDistance_ < cutoffsSq2D_[indexI][indexJ])
850 influenceDistance_ = cutoffsSq2D_[indexI][indexJ];
855 influenceDistance_ = sqrt(influenceDistance_);
856 modelObj->SetInfluenceDistancePointer(&influenceDistance_);
857 modelObj->SetNeighborListPointers(
860 &modelWillNotRequestNeighborsOfNoncontributingParticles_);
864 double const *
const *
const constFourEpsSig6_2D = fourEpsilonSigma6_2D_;
865 double const *
const *
const constFourEpsSig12_2D = fourEpsilonSigma12_2D_;
869 for (
int iSpecies = 0; iSpecies < numberModelSpecies_; iSpecies++)
871 for (
int jSpecies = 0; jSpecies <= iSpecies; jSpecies++)
873 int const index = jSpecies * numberModelSpecies_ + iSpecies
874 - (jSpecies * jSpecies + jSpecies) / 2;
875 double const rij2 = cutoffs_[index] * cutoffs_[index];
876 double const r2iv = 1.0 / rij2;
877 double const r6iv = r2iv * r2iv * r2iv;
879 shifts2D_[iSpecies][jSpecies] = shifts2D_[jSpecies][iSpecies] = phi;
890#undef KIM_LOGGER_OBJECT_NAME
891#define KIM_LOGGER_OBJECT_NAME modelComputeArguments
893int LennardJones612Implementation::SetComputeMutableValues(
895 bool & isComputeProcess_dEdr,
896 bool & isComputeProcess_d2Edr2,
897 bool & isComputeEnergy,
898 bool & isComputeForces,
899 bool & isComputeParticleEnergy,
900 bool & isComputeVirial,
901 bool & isComputeParticleVirial,
902 int const *& particleSpeciesCodes,
903 int const *& particleContributing,
906 double *& particleEnergy,
914 int compProcess_dEdr;
915 int compProcess_d2Edr2;
922 isComputeProcess_dEdr = compProcess_dEdr;
923 isComputeProcess_d2Edr2 = compProcess_d2Edr2;
930 &particleSpeciesCodes)
933 &particleContributing)
936 (
double const **) &coordinates)
943 (
double const **) &forces)
946 (
double const **) &virial)
949 (
double const **) &particleVirial);
956 isComputeEnergy = (energy != NULL);
957 isComputeParticleEnergy = (particleEnergy != NULL);
958 isComputeForces = (forces != NULL);
959 isComputeVirial = (virial != NULL);
960 isComputeParticleVirial = (particleVirial != NULL);
971#undef KIM_LOGGER_OBJECT_NAME
972#define KIM_LOGGER_OBJECT_NAME modelCompute
973int LennardJones612Implementation::CheckParticleSpeciesCodes(
975 int const *
const particleSpeciesCodes)
const
978 for (
int i = 0; i < cachedNumberOfParticles_; ++i)
980 if ((particleSpeciesCodes[i] < 0)
981 || (particleSpeciesCodes[i] >= numberModelSpecies_))
984 LOG_ERROR(
"unsupported particle species codes detected");
995int LennardJones612Implementation::GetComputeIndex(
996 const bool & isComputeProcess_dEdr,
997 const bool & isComputeProcess_d2Edr2,
998 const bool & isComputeEnergy,
999 const bool & isComputeForces,
1000 const bool & isComputeParticleEnergy,
1001 const bool & isComputeVirial,
1002 const bool & isComputeParticleVirial,
1003 const bool & isShift)
const
1006 const int processd2E = 2;
1007 const int energy = 2;
1008 const int force = 2;
1009 const int particleEnergy = 2;
1010 const int virial = 2;
1011 const int particleVirial = 2;
1012 const int shift = 2;
1018 index += (int(isComputeProcess_dEdr)) * processd2E * energy * force
1019 * particleEnergy * virial * particleVirial * shift;
1022 index += (int(isComputeProcess_d2Edr2)) * energy * force * particleEnergy
1023 * virial * particleVirial * shift;
1026 index += (int(isComputeEnergy)) * force * particleEnergy * virial
1027 * particleVirial * shift;
1030 index += (int(isComputeForces)) * particleEnergy * virial * particleVirial
1034 index += (int(isComputeParticleEnergy)) * virial * particleVirial * shift;
1037 index += (int(isComputeVirial)) * particleVirial * shift;
1040 index += (int(isComputeParticleVirial)) * shift;
1043 index += (int(isShift));
1049void LennardJones612Implementation::ProcessVirialTerm(
1050 const double & dEidr,
1052 const double *
const r_ij,
1057 double const v = dEidr / rij;
1059 virial[0] += v * r_ij[0] * r_ij[0];
1060 virial[1] += v * r_ij[1] * r_ij[1];
1061 virial[2] += v * r_ij[2] * r_ij[2];
1062 virial[3] += v * r_ij[1] * r_ij[2];
1063 virial[4] += v * r_ij[0] * r_ij[2];
1064 virial[5] += v * r_ij[0] * r_ij[1];
1068void LennardJones612Implementation::ProcessParticleVirialTerm(
1069 const double & dEidr,
1071 const double *
const r_ij,
1076 double const v = dEidr / rij;
1079 vir[0] = 0.5 * v * r_ij[0] * r_ij[0];
1080 vir[1] = 0.5 * v * r_ij[1] * r_ij[1];
1081 vir[2] = 0.5 * v * r_ij[2] * r_ij[2];
1082 vir[3] = 0.5 * v * r_ij[1] * r_ij[2];
1083 vir[4] = 0.5 * v * r_ij[0] * r_ij[2];
1084 vir[5] = 0.5 * v * r_ij[0] * r_ij[1];
1086 for (
int k = 0; k < 6; ++k)
1088 particleVirial[i][k] += vir[k];
1089 particleVirial[j][k] += vir[k];
1101 int const extentZero,
1102 int const extentOne)
1104 arrayPtr =
new double *[extentZero];
1105 arrayPtr[0] =
new double[extentZero * extentOne];
1106 for (
int i = 1; i < extentZero; ++i)
1108 arrayPtr[i] = arrayPtr[i - 1] + extentOne;
1112 for (
int i = 0; i < extentZero; ++i)
1114 for (
int j = 0; j < extentOne; ++j) { arrayPtr[i][j] = 0.0; }
1121 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 SpeciesName's supported by the KIM API.
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.
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.
int ModelDestroyFunction(ModelDestroy *const modelDestroy)
Prototype for MODEL_ROUTINE_NAME::Destroy routine.
int ModelRefreshFunction(ModelRefresh *const modelRefresh)
Prototype for MODEL_ROUTINE_NAME::Refresh routine.
void() Function(void)
Generic function type.
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)