Model Extended KIM ID = === Verification check vc-unit-conversion start (2021-08-05 19:01:55) === !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! !!!!! !!!!! 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 : ThreeBodyCluster_Gong_Gong_1993_Si__MO_407755720412_000 Supported species : Si Model computes energy : True Model computes forces : True Model native length unit : A Model native energy unit : eV Influence distance : 3.77118 Angstroms Model cutoffs : [3.77118] Angstroms Smallest model cutoff : 3.77118 Angstroms Parameters for random cluster generation Random seed: 11 Min. distance between atoms (dmin) : 3.7711800000000006e-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 Si atoms with a diameter 3.394062 Angstroms and a minimum separation of 0.377118 Angstroms between all atoms Cluster positions (Angstroms): [[-2.9759640798557396e+00 9.1799199297344602e-01 3.7499139134557369e-01] [-1.9471283027884756e+00 4.2689187737258927e-01 3.1265045869134214e-02] [ 8.5299023050549372e-01 1.9596593321784244e+00 5.0918030063634004e-02] [ 1.6042589259740148e-01 -5.7958961304081225e-01 -8.3591304809651723e-01] [ 1.5560807513634891e+00 9.9673987440959833e-01 1.4575421570412002e+00]] Calling Model compute... Model returned energy of 3.2805276059400711e+01 eV Model returned forces (eV/Angstrom): [[-1.3208325677942923e+02 6.3168521202301370e+01 4.3529907597202239e+01] [ 1.3149133435255061e+02 -6.1051954863963886e+01 -4.2237272710479836e+01] [-7.0735927945058350e+00 3.0413826920221094e+00 -1.0001332164543520e+01] [ 4.1015826568525480e+00 2.3375165931907800e+00 1.2406397108298073e+00] [ 3.5639325645319166e+00 -7.4954656235503654e+00 7.4680575669913090e+00]] Cumulative norm of all forces: 2.1549987257571291e+02 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.6237570674523694e+00 1.7347534512578386e+00 7.0863102871043204e-01] [-3.6795392216474729e+00 8.0670873303298918e-01 5.9082373964436184e-02] [ 1.6119179225797751e+00 3.7032194352532750e+00 9.6221131622326178e-02] [ 3.0316100029699466e-01 -1.0952656332862241e+00 -1.5796467248476740e+00] [ 2.9405664477748745e+00 1.8835653800614049e+00 2.7543554918067308e+00]] Calling Model compute... Model returned energy of 1.2055717437306852e+00 Hartree Model returned forces (Hartree/Bohr): [[-2.5686105703848754e+00 1.2284322421483642e+00 8.4652198551379265e-01] [ 2.5570995110757671e+00 -1.1872715772606617e+00 -8.2138423744002997e-01] [-1.3755948835292231e-01 5.9145480826228676e-02 -1.9449495827224020e-01] [ 7.9763089013561370e-02 4.5457463543214019e-02 2.4126602818389856e-02] [ 6.9307458648469988e-02 -1.4576360925714515e-01 1.4523060738008756e-01]] Cumulative norm of all forces: 4.1908055881673123e+00 Hartree/Bohr Converting energy and forces returned by model back to Angstroms and eV... Converted energy is 3.2805276056043944e+01 eV Converted forces (eV/Angstrom): [[-1.3208325676591394e+02 6.3168521195837698e+01 4.3529907592748081e+01] [ 1.3149133433909594e+02 -6.1051954857716801e+01 -4.2237272706157952e+01] [-7.0735927937820229e+00 3.0413826917108921e+00 -1.0001332163520122e+01] [ 4.1015826564328428e+00 2.3375165929515962e+00 1.2406397107028642e+00] [ 3.5639325641672319e+00 -7.4954656227833842e+00 7.4680575662271256e+00]] Cumulative norm of converted forces: 2.1549987255366216e+02 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: 3.356767308559938e-09 eV Cumulative norm of difference in initial forces and converted forces: 2.2050788217258603e-08 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 19:01:55) ===