Model Extended KIM ID = === Verification check vc-unit-conversion start (2021-08-05 18:54:57) === !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! !!!!! !!!!! 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 1.7763568394002505e-15 Bohr, which is below tolerance 1e-06. Creating Model object with Angstrom and eV as simulator registered units ------------------------------------------------------------------------------------------------------------------------ Results for KIM Model : MEAM_LAMMPS_KimJeonLee_2015_MgCa__MO_611309973581_000 Supported species : Mg Ca Model computes energy : True Model computes forces : True Model native length unit : A Model native energy unit : eV Influence distance : 7.0 Angstroms Model cutoffs : [7.] Angstroms Smallest model cutoff : 7.0 Angstroms Parameters for random cluster generation Random seed: 11 Min. distance between atoms (dmin) : 7.0000000000000007e-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 Mg atoms with a diameter 6.300000 Angstroms and a minimum separation of 0.700000 Angstroms between all atoms Cluster positions (Angstroms): [[-5.5239337711247343e+00 1.7039610813628947e+00 6.9605262528413270e-01] [-3.6142263481242813e+00 7.9238942230498788e-01 5.8033644929157302e-02] [ 1.5833059184495186e+00 3.6374862311660991e+00 9.4513179017028617e-02] [ 2.9777980583844049e-01 -1.0758243550521813e+00 -1.5516075437066432e+00] [ 2.8883705523322734e+00 1.8501315558703608e+00 2.7054648940884287e+00]] Calling Model compute... Model returned energy of 5.2715641044203814e+00 eV Model returned forces (eV/Angstrom): [[-1.7294857598410928e+01 8.2909157801071238e+00 5.7938866199783323e+00] [ 1.7567655380714307e+01 -8.3305680833076767e+00 -5.8696705873621147e+00] [-3.3520319412466987e-01 2.6565001895580087e-01 -4.6369275966969309e-01] [-8.4589669519147495e-02 1.8667641199991963e-01 2.1410962201040776e-01] [ 1.4699508134043718e-01 -4.1267412775516638e-01 3.2536710504306782e-01]] Cumulative norm of all forces: 2.8542564333199493e+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: [[-1.0438721957627740e+01 3.2200197706831468e+00 1.3153488300672533e+00] [-6.8298979501196726e+00 1.4973989921538942e+00 1.0966769492600544e-01] [ 2.9920145572628263e+00 6.8738527587579812e+00 1.7860402350359389e-01] [ 5.6272227845898681e-01 -2.0330133891788691e+00 -2.9321133104051555e+00] [ 5.4582292901490028e+00 3.4962419349990808e+00 5.1125876894359630e+00]] Calling Model compute... Model returned energy of 1.9372642126366146e-01 Hartree Model returned forces (Hartree/Bohr): [[-3.3633145580871199e-01 1.6123265302670439e-01 1.1267316371931133e-01] [ 3.4163652841433573e-01 -1.6200376760719346e-01 -1.1414692734714796e-01] [-6.5186647319972974e-03 5.1660707295570398e-03 -9.0173891297024127e-03] [-1.6450072823020910e-03 3.6302784834063855e-03 4.1637695172485577e-03] [ 2.8585994086756357e-03 -8.0252346324743585e-03 6.3273832402904852e-03]] Cumulative norm of all forces: 5.5506454216661771e-01 Hartree/Bohr Converting energy and forces returned by model back to Angstroms and eV... Converted energy is 5.2715641038809764e+00 eV Converted forces (eV/Angstrom): [[-1.7294857596641979e+01 8.2909157792591106e+00 5.7938866193857219e+00] [ 1.7567655378917483e+01 -8.3305680824556276e+00 -5.8696705867617665e+00] [-3.3520319409037364e-01 2.6565001892860418e-01 -4.6369275962225021e-01] [-8.4589669510527973e-02 1.8667641198085203e-01 2.1410962198852171e-01] [ 1.4699508132539491e-01 -4.1267412771293999e-01 3.2536710500977301e-01]] Cumulative norm of converted forces: 2.8542564330280129e+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: 5.394049651386013e-10 eV Cumulative norm of difference in initial forces and converted forces: 2.9193628210269512e-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:57) ===