Model Extended KIM ID = === Verification check vc-unit-conversion start (2021-08-05 18:50:15) === !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! !!!!! !!!!! 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 : EAM_Dynamo_ZhouJohnsonWadley_2004NISTretabulation_Mg__MO_894868634445_000 Supported species : Mg Model computes energy : True Model computes forces : True Model native length unit : A Model native energy unit : eV Influence distance : 7.147123951870781 Angstroms Model cutoffs : [7.14712395] Angstroms Smallest model cutoff : 7.147123951870781 Angstroms Parameters for random cluster generation Random seed: 11 Min. distance between atoms (dmin) : 7.1471239518707819e-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.432412 Angstroms and a minimum separation of 0.714712 Angstroms between all atoms Cluster positions (Angstroms): [[-5.6400341948790684e+00 1.7397744368091974e+00 7.1068205570439469e-01] [-3.6901891000230735e+00 8.0904363133786150e-01 5.9253379098220635e-02] [ 1.6165833789841886e+00 3.7139378524810578e+00 9.6499629360008027e-02] [ 3.0403845467019269e-01 -1.0984357165713401e+00 -1.5842187770755916e+00] [ 2.9490774794931758e+00 1.8890170795818586e+00 2.7623275636407079e+00]] Calling Model compute... Model returned energy of -1.5139911486885563e-01 eV Model returned forces (eV/Angstrom): [[-4.9168818310979452e+00 2.3470035398838816e+00 1.6426850881191586e+00] [ 4.9763206461504890e+00 -2.3680333454353892e+00 -1.6641345083741319e+00] [ 1.6280146119924094e-01 -2.7673092326600141e-01 3.4573401589032676e-01] [-3.8957231008850061e-02 6.0140715700401949e-02 4.0481461321629275e-02] [-1.8328304524293457e-01 2.3762001311710709e-01 -3.6476605695698266e-01]] Cumulative norm of all forces: 8.1225463672151150e+00 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.0658119961468667e+01 3.2876972040781398e+00 1.3429944469198394e+00] [-6.9734467468762089e+00 1.5288708860471807e+00 1.1197265845030159e-01] [ 3.0548998437941708e+00 7.0183253848217451e+00 1.8235787061186112e-01] [ 5.7454941066078913e-01 -2.0757426697534700e+00 -2.9937396100565450e+00] [ 5.5729487563466567e+00 3.5697249250238539e+00 5.2200425616010664e+00]] Calling Model compute... Model returned energy of -5.5638152406104167e-03 Hartree Model returned forces (Hartree/Bohr): [[-9.5618134748010661e-02 4.5641955295997544e-02 3.1945141148379284e-02] [ 9.6774035748317402e-02 -4.6050919930500360e-02 -3.2362265990232307e-02] [ 3.1659845790204654e-03 -5.3815600249805390e-03 6.7234566243358418e-03] [-7.5759757748373058e-04 1.1695507956510475e-03 7.8723913984801881e-04] [-3.5642880018434777e-03 4.6209738638323056e-03 -7.0935709223308371e-03]] Cumulative norm of all forces: 1.5795838901906450e-01 Hartree/Bohr Converting energy and forces returned by model back to Angstroms and eV... Converted energy is -1.5139911485336149e-01 eV Converted forces (eV/Angstrom): [[-4.9168818305948436e+00 2.3470035396437328e+00 1.6426850879510766e+00] [ 4.9763206456413043e+00 -2.3680333451930884e+00 -1.6641345082038550e+00] [ 1.6280146118258240e-01 -2.7673092323768483e-01 3.4573401585494973e-01] [-3.8957231004863570e-02 6.0140715694247719e-02 4.0481461317486825e-02] [-1.8328304522418021e-01 2.3762001309279274e-01 -3.6476605691965813e-01]] Cumulative norm of converted forces: 8.1225463663840056e+00 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.5494133753790607e-11 eV Cumulative norm of difference in initial forces and converted forces: 8.311106937806951e-10 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:50:15) ===