!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!! !!!!! !!!!! 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 : LJ_Shifted_Bernardes_1958LowCutoff_Kr__MO_995724792024_004 Supported species : Kr Model computes energy : True Model computes forces : True Model native length unit : A Model native energy unit : eV Influence distance : 9.91 Angstroms Model cutoffs : [9.91] Angstroms Smallest model cutoff : 9.91 Angstroms Parameters for random cluster generation Random seed: 11 Min. distance between atoms (dmin) : 9.9100000000000010e-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 Kr atoms with a diameter 8.919000 Angstroms and a minimum separation of 0.991000 Angstroms between all atoms Cluster positions (Angstroms): [[-7.8203119531208749e+00 2.4123220451866123e+00 9.8541164522367941e-01] [-5.1167118728445189e+00 1.1217970250060616e+00 8.2159060178278426e-02] [ 2.2415088074049621e+00 5.1496412215508638e+00 1.3380365772267913e-01] [ 4.2157112512270650e-01 -1.5230599083667311e+00 -2.1966329654475483e+00] [ 4.0891074533732619e+00 2.6192576740964681e+00 3.8301653000594755e+00]] Calling Model compute... Model returned energy of 2.0352298996273269e-01 eV Model returned forces (eV/Angstrom): [[-9.4405095971161179e-01 4.5062927695345251e-01 3.1539595062720521e-01] [ 9.4559672219028634e-01 -4.5112641849757723e-01 -3.1593139788980651e-01] [ 2.6561596446592036e-03 -4.9646958253608646e-03 5.9081263324047813e-03] [-9.9371297075365270e-04 1.4251354719727548e-03 9.9469589191433826e-04] [-3.2082091525800095e-03 4.0367018975128038e-03 -6.3673749617178341e-03]] Cumulative norm of all forces: 1.5464126772573197e+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: [[-1.4778247800012988e+01 4.5586279896385689e+00 1.8621581294237830e+00] [-9.6691840979551369e+00 2.1198891446064421e+00 1.5525812238810202e-01] [ 4.2358377517820882e+00 9.7314115484702288e+00 2.5285226756008800e-01] [ 7.9665396850407999e-01 -2.8781660981089421e+00 -4.1510347008735859e+00] [ 7.7272931807680898e+00 4.9496796536915557e+00 7.2379634289014838e+00]] Calling Model compute... Model returned energy of 7.4793324541569568e-03 Hartree Model returned forces (Hartree/Bohr): [[-1.8358869498097390e-02 8.7633448200059704e-03 6.1334751458354004e-03] [ 1.8388929794450150e-02 -8.7730126844753377e-03 -6.1438879379798134e-03] [ 5.1654084751216682e-05 -9.6547968960692901e-05 1.1489477257459328e-04] [-1.9324641917853636e-05 2.7714474391350424e-05 1.9343756692464406e-05] [-6.2389739186124530e-05 7.8501359038709665e-05 -1.2382573712264481e-04]] Cumulative norm of all forces: 3.0072940702950197e-02 Hartree/Bohr Converting energy and forces returned by model back to Angstroms and eV... Converted energy is 2.0352298994190707e-01 eV Converted forces (eV/Angstrom): [[-9.4405095961501129e-01 4.5062927690734156e-01 3.1539595059493214e-01] [ 9.4559672209352752e-01 -4.5112641845141538e-01 -3.1593139785747865e-01] [ 2.6561596443874101e-03 -4.9646958248528508e-03 5.9081263318002302e-03] [-9.9371297065196994e-04 1.4251354718269283e-03 9.9469589181255618e-04] [-3.2082091522517282e-03 4.0367018970997462e-03 -6.3673749610662902e-03]] Cumulative norm of converted forces: 1.5464126770990820e+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.0825619007069918e-11 eV Cumulative norm of difference in initial forces and converted forces: 1.5823763108833666e-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