Model Extended KIM ID = === Verification check vc-unit-conversion start (2021-08-05 18:54:51) === !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! !!!!! !!!!! VERIFICATION CHECK: vc-unit-conversion !!!!! !!!!! !!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Description: This verification check ensures that a model can properly convert units of length and energy. Working in one unit system, a random cluster of atoms is generated based on the smallest cutoff of the model such that the energy and/or forces (depending on what the model actually reports) are sizeable. Next, the model is reinitialized with a different set of registered units. The coordinates of the atoms in the cluster are rescaled to correspond to the new length units and the energy and/or forces are requested from the model once again. The energy and/or force returned by the model are then compared to a manual conversion of those originally returned (in the first set of units). Author: Daniel S. Karls Checking if model properly converts its cutoffs from Angstrom to Bohr SUCCESS: Absolute difference in smallest cutoff is 8.881784197001252e-16 Bohr, which is below tolerance 1e-06. Creating Model object with Angstrom and eV as simulator registered units ------------------------------------------------------------------------------------------------------------------------ Results for KIM Model : MEAM_LAMMPS_KangEunJun_2014_SiC__MO_477506997611_000 Supported species : C Si Model computes energy : True Model computes forces : True Model native length unit : A Model native energy unit : eV Influence distance : 4.0 Angstroms Model cutoffs : [4.] Angstroms Smallest model cutoff : 4.0 Angstroms Parameters for random cluster generation Random seed: 11 Min. distance between atoms (dmin) : 4.0000000000000002e-01 Angstroms ------------------------------------------------------------------------------------------------------------------------ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ STEP I: Cluster generation Attempting to find a species supported by the Model for which a random cluster can be generated that has significant energy and/or forces (depending on what the Model is able to compute). We construct the cluster by first placing a single atom at the origin and then generating additional atom positions that fall within a distance 'rball' of the origin; no atoms are allowed to fall within a distance of 'dmin' of one another. Note that 'rball' is chosen to be 0.9 * the smallest cutoff reported by the Model in Angstroms. In the event that the Model's native length unit is not Angstroms and the cutoffs it reports are improperly converted to Angstroms, it's possible that the cluster generated may actually be far too large for atomic interactions to occur. Accordingly, if the energy and/or forces are not sizable using the initial value of 'rball', we regenerate the cluster positions iteratively using smaller and smaller values of 'rball' (while keeping 'dmin' fixed); if the energy and/or forces still aren't sizeable when generating a cluster using rball = 0.2 * the smallest cutoff reported by the Model, that species is skipped and the process is repeated for the next species. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Creating random cluster of 5 C atoms with a diameter 3.600000 Angstroms and a minimum separation of 0.400000 Angstroms between all atoms Cluster positions (Angstroms): [[-3.1565335834998485e+00 9.7369204649308272e-01 3.9774435730521873e-01] [-2.0652721989281608e+00 4.5279395560285024e-01 3.3162082816661317e-02] [ 9.0474623911401064e-01 2.0785635606663422e+00 5.4007530866873502e-02] [ 1.7015988905053742e-01 -6.1475677431553211e-01 -8.8663288211808189e-01] [ 1.6504974584755849e+00 1.0572180319259206e+00 1.5459799394791023e+00]] Calling Model compute... Model returned energy of -1.5096633522583085e+01 eV Model returned forces (eV/Angstrom): [[-1.2138330439072016e+01 5.7995578180400678e+00 4.0428763506763179e+00] [ 1.3783347836796612e+01 -6.4288293436565942e+00 -4.6487680808558158e+00] [ 3.1929077227062499e+00 -5.6010901007443925e+00 6.8300163075469369e+00] [-1.3048562595614810e+00 1.3921059744252124e+00 8.4411709242451360e-01] [-3.5330688608693643e+00 4.8382556519357065e+00 -7.0682416697919530e+00]] Cumulative norm of all forces: 2.5073109578044701e+01 eV/Angstrom SUCCESS: Absolute value of energy exceeds tolerance 0.001 eV and cumulative norm of forces on all atoms exceeds tolerance 0.001 eV/Angstrom. Proceeding with unit conversion... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ STEP II: Convert units and ask model to recompute energy and/or forces Take the set of coordinates that was found to have sizeable energy/forces from Step I and change the units from Angstroms to Bohr ourselves. Next, create a new Model object wherein we've registered Bohr and Hartree as the unit set. Ask the model for its neighbor list cutoffs and influence once more and use them to create a new neighbor list using the coordinates we converted to Bohr. Finally, have the Model compute the energy and/or forces once more and compare the results to our own conversion of the energy and/or forces the model returned in Step I. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Creating Model object with Bohr and Hartree as simulator registered units Cluster positions converted to Bohr: [[-5.9649839757872805e+00 1.8400112975332268e+00 7.5162790289557335e-01] [-3.9027988286398130e+00 8.5565656694508241e-01 6.2667254243431683e-02] [ 1.7097226041501865e+00 3.9279158621474175e+00 1.0205944200205365e-01] [ 3.2155558769084958e-01 -1.1617219366736393e+00 -1.6754933202315176e+00] [ 3.1189881657994309e+00 1.9978525342851892e+00 2.9214786796776933e+00]] Calling Model compute... Model returned energy of -5.5479108809596989e-01 Hartree Model returned forces (Hartree/Bohr): [[-2.3605296108565579e-01 1.1278345097025416e-01 7.8621433043906619e-02] [ 2.6804345843778388e-01 -1.2502083466105932e-01 -9.0404152069732263e-02] [ 6.2092173730259867e-02 -1.0892386809083346e-01 1.3282267950708596e-01] [-2.5375415952530178e-02 2.7072152884419439e-02 1.6415465056748926e-02] [-6.8707255129857814e-02 9.4089098897219170e-02 -1.3745542553800921e-01]] Cumulative norm of all forces: 4.8759438451861042e-01 Hartree/Bohr Converting energy and forces returned by model back to Angstroms and eV... Converted energy is -1.5096633521038326e+01 eV Converted forces (eV/Angstrom): [[-1.2138330437828582e+01 5.7995578174459661e+00 4.0428763502621674e+00] [ 1.3783347835384996e+01 -6.4288293429981769e+00 -4.6487680803797291e+00] [ 3.1929077223795663e+00 -5.6010901001713060e+00 6.8300163068481128e+00] [-1.3048562594281099e+00 1.3921059742828448e+00 8.4411709233820387e-01] [-3.5330688605078722e+00 4.8382556514406714e+00 -7.0682416690687537e+00]] Cumulative norm of converted forces: 2.5073109575477368e+01 eV/Angstrom ======================================================================================================================== To pass this verification check, the Model must be able to compute the energy and/or forces for a random cluster of atoms in two different sets of units. If energies are computed, the results must match within 1e-06 eV. If forces are computed, the cumulative norm of the difference between the forces computed in one set of units and the other must be less than 1e-06 eV/Angstrom. Absolute difference between initial energy and converted energy: 1.5447589873929246e-09 eV Cumulative norm of difference in initial forces and converted forces: 2.567333364765029e-09 eV/Angstrom SUCCESS: Absolute difference in energy is below tolerance 1e-06 and cumulative norm of difference in forces on all atoms is below tolerance 1e-06. Grade: P Comment: Unit conversion successful === Verification check vc-unit-conversion end (2021-08-05 18:54:51) ===