!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! !!!!! !!!!! 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_YangQi_2019_Nb__MO_360068930164_001 Supported species : Nb Model computes energy : True Model computes forces : True Model native length unit : A Model native energy unit : eV Influence distance : 5.25 Angstroms Model cutoffs : [5.25] Angstroms Smallest model cutoff : 5.25 Angstroms Parameters for random cluster generation Random seed: 11 Min. distance between atoms (dmin) : 5.2500000000000002e-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 Nb atoms with a diameter 4.725000 Angstroms and a minimum separation of 0.525000 Angstroms between all atoms Cluster positions (Angstroms): [[-4.1429503283435505e+00 1.2779708110221708e+00 5.2203946896309950e-01] [-2.7106697610932113e+00 5.9429206672874102e-01 4.3525233696867983e-02] [ 1.1874794388371390e+00 2.7281146733745745e+00 7.0884884262771466e-02] [ 2.2333485437883036e-01 -8.0686826628913599e-01 -1.1637056577799825e+00] [ 2.1662779142492048e+00 1.3875986669027707e+00 2.0290986705663214e+00]] Calling Model compute... Model returned energy of -2.5009008677930389e+00 eV Model returned forces (eV/Angstrom): [[-3.4519520875030176e+00 1.8472802619074942e+00 1.2372458800453416e+00] [ 6.4499258559631469e+00 -2.9762129434394415e+00 -2.3743762621055127e+00] [-4.0977452138476089e-01 -1.2476654609043270e+00 1.5126491769721565e-01] [-2.0059382309721450e+00 2.5563373329061081e+00 2.0706191878888056e+00] [-5.8226101610322334e-01 -1.7973919046983405e-01 -1.0847537235258500e+00]] Cumulative norm of all forces: 9.5445192244475461e+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: [[-7.8290414682208045e+00 2.4150148280123598e+00 9.8651162255043989e-01] [-5.1224234625897553e+00 1.1230492441154207e+00 8.2250771194504094e-02] [ 2.2440109179471199e+00 5.1553895690684861e+00 1.3395301762769540e-01] [ 4.2204170884424008e-01 -1.5247600418841518e+00 -2.1990849828038668e+00] [ 4.0936719676117521e+00 2.6221814512493107e+00 3.8344407670769716e+00]] Calling Model compute... Model returned energy of -9.1906418181743874e-02 Hartree Model returned forces (Hartree/Bohr): [[-6.7129784929737438e-02 3.5923884093217659e-02 2.4060603312929068e-02] [ 1.2543109653551376e-01 -5.7878130904971910e-02 -4.6174270029545363e-02] [-7.9688462623313232e-03 -2.4263231913903560e-02 2.9416345114377483e-03] [-3.9009290573585001e-02 4.9712849719759006e-02 4.0267135009660476e-02] [-1.1323174769860007e-02 -3.4953709941011992e-03 -2.1095102804481927e-02]] Cumulative norm of all forces: 1.8561136034144010e-01 Hartree/Bohr Converting energy and forces returned by model back to Angstroms and eV... Converted energy is -2.5009008675371325e+00 eV Converted forces (eV/Angstrom): [[-3.4519520871497926e+00 1.8472802617184694e+00 1.2372458799187391e+00] [ 6.4499258553031593e+00 -2.9762129431348998e+00 -2.3743762618625546e+00] [-4.0977452134283232e-01 -1.2476654607766586e+00 1.5126491768173631e-01] [-2.0059382307668918e+00 2.5563373326445320e+00 2.0706191876769302e+00] [-5.8226101604364255e-01 -1.7973919045144293e-01 -1.0847537234148510e+00]] Cumulative norm of converted forces: 9.5445192234709033e+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: 2.559064071760986e-10 eV Cumulative norm of difference in initial forces and converted forces: 9.766433431063224e-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