!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! !!!!!
!!!!! 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 3.552713678800501e-15 Bohr, which is below
tolerance 1e-06.
Creating Model object with Angstrom and eV as simulator registered units
------------------------------------------------------------------------------------------------------------------------
Results for KIM Model : Morse_Shifted_GirifalcoWeizer_1959HighCutoff_Cr__MO_859700307573_002
Supported species : Cr
Model computes energy : True
Model computes forces : True
Model native length unit : A
Model native energy unit : eV
Influence distance : 9.05351 Angstroms
Model cutoffs : [9.05351] Angstroms
Smallest model cutoff : 9.05351 Angstroms
Parameters for random cluster generation
Random seed: 11
Min. distance between atoms (dmin) : 9.0535100000000002e-01 Angstroms
------------------------------------------------------------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
STEP I: Cluster generation
Attempting to find a species supported by the Model for which a random cluster can be generated
which 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 addtional
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 Cr atoms with a diameter 8.148159 Angstroms and a minimum separation of
0.905351 Angstroms between all atoms
Cluster positions (Angstroms):
[[-7.1444270908879259e+00 2.2038326699613968e+00 9.0024562907659245e-01]
[-4.6744906264295230e+00 1.0248436512474901e+00 7.5058312100367841e-02]
[ 2.0477822808202713e+00 4.7045739955320833e+00 1.2223943019463697e-01]
[ 3.8513606427948271e-01 -1.3914266509583533e+00 -2.0067849161462186e+00]
[ 3.7356988113208223e+00 2.3928835060554094e+00 3.4991362104683605e+00]]
Calling Model compute...
Model returned energy of -5.0066514003878282e-01 eV
Model returned forces (eV/Angstrom):
[[ 1.5433185212894690e-01 -7.3668125625039910e-02 -5.1565447637059371e-02]
[-1.4640102369033628e-01 7.0435121930704350e-02 4.8530696849000500e-02]
[ 3.4124815105255182e-02 -5.1472849576268125e-02 6.9878652855605100e-02]
[-6.2827938697230532e-03 6.6435753998566899e-03 4.5912804717257267e-03]
[-3.5772849674142730e-02 4.8062277870747003e-02 -7.1435182539271960e-02]]
Cumulative norm of all forces: 2.7955007035645391e-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 sizeableenergy/forces from Step I and change
the units from Angstroms to Bohrourselves. Next, create a new Model object wherein we've
registeredBohr and Hartree as the unit set. Ask the model for its neighbor listcutoffs and
influence once more and use them to create a new neighborlist using the coordinates we converted
to Bohr. Finally, have theModel compute the energy and/or forces once more and compare
theresults to our own conversion of the energy and/or forces the modelreturned in Step I.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Creating Model object with Bohr and Hartree as simulator registered units
Cluster positions converted to Bohr:
[[-1.3501010518657472e+01 4.1646401705825102e+00 1.7012176837860251e+00]
[-8.8335070557697080e+00 1.9366738213507433e+00 1.4183965324136277e-01]
[ 3.8697476734749379e+00 8.8903563842775650e+00 2.3099904469000318e-01]
[ 7.2780168217874586e-01 -2.6294152927235399e+00 -3.7922738824123110e+00]
[ 7.0594476372366994e+00 4.5218944744190743e+00 6.6124091103121954e+00]]
Calling Model compute...
Model returned energy of -1.8399105827026186e-02 Hartree
Model returned forces (Hartree/Bohr):
[[ 3.0012768945233003e-03 -1.4326170537792848e-03 -1.0027883707347134e-03]
[-2.8470468258830124e-03 1.3697451374906715e-03 9.4377185991601723e-04]
[ 6.6362204361877157e-04 -1.0009876250267010e-03 1.3589235361519065e-03]
[-1.2218089664664636e-04 1.2919698085365864e-04 8.9286195985992882e-05]
[-6.9567121561241304e-04 9.3466256046165566e-04 -1.3891932213192031e-03]]
Cumulative norm of all forces: 5.4363837111355510e-03 Hartree/Bohr
Converting energy and forces returned by model back to Angstroms and eV...
Converted energy is -5.0066513998755202e-01 eV
Converted forces (eV/Angstrom):
[[ 1.5433185211315523e-01 -7.3668125617501981e-02 -5.1565447631783043e-02]
[-1.4640102367535615e-01 7.0435121923497226e-02 4.8530696844034708e-02]
[ 3.4124815101763344e-02 -5.1472849571001143e-02 6.9878652848454736e-02]
[-6.2827938690801595e-03 6.6435753991768839e-03 4.5912804712559220e-03]
[-3.5772849670482255e-02 4.8062277865829013e-02 -7.1435182531962321e-02]]
Cumulative norm of converted forces: 2.7955007032784929e-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: 5.1230797382118e-11 eV
Cumulative norm of difference in initial forces and converted forces: 2.860449850153397e-11
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