Model Extended KIM ID = === Verification check vc-unit-conversion start (2021-08-05 18:42:44) === !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! !!!!! !!!!! 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 0.0 Bohr, which is below tolerance 1e-06. Creating Model object with Angstrom and eV as simulator registered units ------------------------------------------------------------------------------------------------------------------------ Results for KIM Model : EAM_Dynamo_BonnyGrigorevTerentyev_2014EAM2_WHHe__MO_626183701337_000 Supported species : H He W Model computes energy : True Model computes forces : True Model native length unit : A Model native energy unit : eV Influence distance : 5.4604375 Angstroms Model cutoffs : [5.4604375] Angstroms Smallest model cutoff : 5.4604375 Angstroms Parameters for random cluster generation Random seed: 11 Min. distance between atoms (dmin) : 5.4604375000000005e-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 H atoms with a diameter 4.914394 Angstroms and a minimum separation of 0.546044 Angstroms between all atoms Cluster positions (Angstroms): [[-4.3090135873379891e+00 1.3291961410306432e+00 5.4296455101070384e-01] [-2.8193224406836976e+00 6.1811327373678482e-01 4.5269870147550781e-02] [ 1.2350775730105279e+00 2.8374666031990055e+00 7.3726186706970898e-02] [ 2.3228685979184852e-01 -8.3921023596289235e-01 -1.2103508595626638e+00] [ 2.2531095539786943e+00 1.4432182468011236e+00 2.1104317089448550e+00]] Calling Model compute... Model returned energy of 9.2772951439195214e-02 eV Model returned forces (eV/Angstrom): [[-1.4687632947378149e-01 7.0109325503061065e-02 4.9070284191444560e-02] [ 1.4687632947378149e-01 -7.0109325503061065e-02 -4.9070284191444560e-02] [-6.4564560481786349e-03 8.8424562308614865e-03 -1.2916980933060497e-02] [ 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00] [ 6.4564560481786349e-03 -8.8424562308614865e-03 1.2916980933060497e-02]] Cumulative norm of all forces: 2.4158886450387540e-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: [[-8.1428555470719903e+00 2.5118166723685222e+00 1.0260542967543369e+00] [-5.3277472697152284e+00 1.1680648013170474e+00 8.5547656273217143e-02] [ 2.3339583555748340e+00 5.3620347676286482e+00 1.3932230108427221e-01] [ 4.3895854734041345e-01 -1.5858775068963418e+00 -2.2872316391979224e+00] [ 4.2577599856468575e+00 2.7272872244202211e+00 3.9881379344906409e+00]] Calling Model compute... Model returned energy of 3.4093433213326818e-03 Hartree Model returned forces (Hartree/Bohr): [[-2.8562900523848998e-03 1.3634094052544720e-03 9.5426516380056029e-04] [ 2.8562900523848998e-03 -1.3634094052544720e-03 -9.5426516380056029e-04] [-1.2555808856433057e-04 1.7195840787515658e-04 -2.5119530341021959e-04] [ 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00] [ 1.2555808856433057e-04 -1.7195840787515658e-04 2.5119530341021959e-04]] Cumulative norm of all forces: 4.6981557404221575e-03 Hartree/Bohr Converting energy and forces returned by model back to Angstroms and eV... Converted energy is 9.2772951429702294e-02 eV Converted forces (eV/Angstrom): [[-1.4687632945875148e-01 7.0109325495886707e-02 4.9070284186423160e-02] [ 1.4687632945875148e-01 -7.0109325495886707e-02 -4.9070284186423160e-02] [-6.4564560475179030e-03 8.8424562299565801e-03 -1.2916980931738618e-02] [ 0.0000000000000000e+00 0.0000000000000000e+00 0.0000000000000000e+00] [ 6.4564560475179030e-03 -8.8424562299565801e-03 1.2916980931738618e-02]] Cumulative norm of converted forces: 2.4158886447915331e-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: 9.492920338693978e-12 eV Cumulative norm of difference in initial forces and converted forces: 2.472204321838734e-11 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:42:44) ===