!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! !!!!! !!!!! 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 : MEAM_LAMMPS_ChoiKimSeol_2017_CoMn__MO_808662295149_000 Supported species : Mn Co Model computes energy : True Model computes forces : True Model native length unit : A Model native energy unit : eV Influence distance : 4.5 Angstroms Model cutoffs : [4.5] Angstroms Smallest model cutoff : 4.5 Angstroms Parameters for random cluster generation Random seed: 11 Min. distance between atoms (dmin) : 4.5000000000000001e-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 Mn atoms with a diameter 4.050000 Angstroms and a minimum separation of 0.450000 Angstroms between all atoms Cluster positions (Angstroms): [[-3.5511002814373294e+00 1.0954035523047181e+00 4.4746240196837106e-01] [-2.3234312237941812e+00 5.0939320005320654e-01 3.7307343168743984e-02] [ 1.0178395190032621e+00 2.3383840057496355e+00 6.0758472225232694e-02] [ 1.9142987518185464e-01 -6.9160137110497377e-01 -9.9746199238284228e-01] [ 1.8568096407850327e+00 1.1893702859166606e+00 1.7392274319139898e+00]] Calling Model compute... Model returned energy of 2.4556086609809724e+00 eV Model returned forces (eV/Angstrom): [[-2.0032832297073725e+01 9.5626475470356347e+00 6.6930349437389491e+00] [ 2.0863306939797546e+01 -9.7752688407435855e+00 -6.9181000245405926e+00] [-1.2896030267402783e+00 1.1776308084497216e+00 -2.2671563758266555e+00] [-2.3861483480738716e-01 8.9957819486585777e-01 8.6374680238859691e-01] [ 6.9774321882384105e-01 -1.8645877096076291e+00 1.6284746542397024e+00]] Cumulative norm of all forces: 3.3655110570085228e+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: [[-6.7106069727606901e+00 2.0700127097248804e+00 8.4558139075752003e-01] [-4.3906486822197905e+00 9.6261363781321774e-01 7.0500661023860642e-02] [ 1.9234379296689599e+00 4.4189053449158457e+00 1.1481687225231037e-01] [ 3.6175003615220586e-01 -1.3069371787578445e+00 -1.8849299852604575e+00] [ 3.5088616865243591e+00 2.2475841010708377e+00 3.2866635146374041e+00]] Calling Model compute... Model returned energy of 9.0241960164534882e-02 Hartree Model returned forces (Hartree/Bohr): [[-3.8957659015736623e-01 1.8596390011186925e-01 1.3015881591375375e-01] [ 4.0572675178836953e-01 -1.9009872624974347e-01 -1.3453563519931269e-01] [-2.5078787780174108e-02 2.2901274668340663e-02 -4.4089175067728303e-02] [-4.6403200669137010e-03 1.7494011857074609e-02 1.6797202165119929e-02] [ 1.3568946216084508e-02 -3.6260460387541056e-02 3.1668792188167316e-02]] Cumulative norm of all forces: 6.5448774406094190e-01 Hartree/Bohr Converting energy and forces returned by model back to Angstroms and eV... Converted energy is 2.4556086607297090e+00 eV Converted forces (eV/Angstrom): [[-2.0032832295023407e+01 9.5626475460569225e+00 6.6930349430539318e+00] [ 2.0863306937662284e+01 -9.7752688397431111e+00 -6.9181000238325510e+00] [-1.2896030266083758e+00 1.1776308083291580e+00 -2.2671563755947308e+00] [-2.3861483478297310e-01 8.9957819477387857e-01 8.6374680230022816e-01] [ 6.9774321875247225e-01 -1.8645877094168475e+00 1.6284746540731216e+00]] Cumulative norm of converted forces: 3.3655110566640758e+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: 2.512634544871162e-10 eV Cumulative norm of difference in initial forces and converted forces: 3.4444700756741156e-09 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