Model Extended KIM ID = === Verification check vc-unit-conversion start (2021-08-05 18:43:50) === !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! !!!!! !!!!! 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_HaleWongZimmerman_2008PairMorse_PdAgH__MO_108983864770_005 Supported species : H Pd Ag Model computes energy : True Model computes forces : True Model native length unit : A Model native energy unit : eV Influence distance : 6.0 Angstroms Model cutoffs : [6.] Angstroms Smallest model cutoff : 6.0 Angstroms Parameters for random cluster generation Random seed: 11 Min. distance between atoms (dmin) : 6.0000000000000009e-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 5.400000 Angstroms and a minimum separation of 0.600000 Angstroms between all atoms Cluster positions (Angstroms): [[-4.7348003752497716e+00 1.4605380697396240e+00 5.9661653595782804e-01] [-3.0979082983922410e+00 6.7919093340427528e-01 4.9743124224991969e-02] [ 1.3571193586710160e+00 3.1178453409995135e+00 8.1011296300310245e-02] [ 2.5523983357580615e-01 -9.2213516147329821e-01 -1.3299493231771229e+00] [ 2.4757461877133768e+00 1.5858270478888805e+00 2.3189699092186529e+00]] Calling Model compute... Model returned energy of 3.8843656067115498e-02 eV Model returned forces (eV/Angstrom): [[-2.1421209641902172e+00 1.0225109551920806e+00 7.1566660783165181e-01] [ 2.2048501450610147e+00 -1.0323644792542197e+00 -7.3326922102670422e-01] [ 3.2721686346050764e-02 -1.1552246893618268e-01 1.0930109417666960e-01] [-3.1048079553070082e-02 5.0899012310896039e-02 3.5184916303629618e-02] [-6.4402787663778077e-02 7.4476980687425726e-02 -1.2688339728524681e-01]] Cumulative norm of all forces: 3.5592363491356918e+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: [[-8.9474759636809189e+00 2.7600169462998401e+00 1.1274418543433600e+00] [-5.8541982429597192e+00 1.2834848504176235e+00 9.4000881365147504e-02] [ 2.5645839062252795e+00 5.8918737932211265e+00 1.5308916300308048e-01] [ 4.8233338153627442e-01 -1.7425829050104591e+00 -2.5132399803472767e+00] [ 4.6784822486991446e+00 2.9967788014277832e+00 4.3822180195165386e+00]] Calling Model compute... Model returned energy of 1.4274781316552256e-03 Hartree Model returned forces (Hartree/Bohr): [[-4.1657623273557605e-02 1.9884673590587591e-02 1.3917500662613606e-02] [ 4.2877511705937697e-02 -2.0076294138707616e-02 -1.4259817012328641e-02] [ 6.3633553168394278e-04 -2.2465544994999791e-03 2.1255680144657975e-03] [-6.0378905907313275e-04 9.8982826613856420e-04 6.8423773110419972e-04] [-1.2524349049909031e-03 1.4483467814814391e-03 -2.4674893958549619e-03]] Cumulative norm of all forces: 6.9216131792957478e-02 Hartree/Bohr Converting energy and forces returned by model back to Angstroms and eV... Converted energy is 3.8843656063140684e-02 eV Converted forces (eV/Angstrom): [[-2.1421209639710281e+00 1.0225109550874540e+00 7.1566660775842239e-01] [ 2.2048501448354068e+00 -1.0323644791485849e+00 -7.3326922095167368e-01] [ 3.2721686342702706e-02 -1.1552246892436220e-01 1.0930109416548595e-01] [-3.1048079549893207e-02 5.0899012305687739e-02 3.5184916300029311e-02] [-6.4402787657188321e-02 7.4476980679805280e-02 -1.2688339727226403e-01]] Cumulative norm of converted forces: 3.5592363487714991e+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: 3.9748135338690815e-12 eV Cumulative norm of difference in initial forces and converted forces: 3.6419311012857877e-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:43:50) ===