!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! !!!!!
!!!!! 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_KimKoLee_2020_NaSn__MO_329881861557_000
Supported species : Na Sn
Model computes energy : True
Model computes forces : True
Model native length unit : A
Model native energy unit : eV
Influence distance : 4.8 Angstroms
Model cutoffs : [4.8] Angstroms
Smallest model cutoff : 4.8 Angstroms
Parameters for random cluster generation
Random seed: 11
Min. distance between atoms (dmin) : 4.7999999999999998e-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 Na atoms with a diameter 4.320000 Angstroms and a minimum separation of
0.480000 Angstroms between all atoms
Cluster positions (Angstroms):
[[-3.7878403001998175e+00 1.1684304557916991e+00 4.7729322876626240e-01]
[-2.4783266387137930e+00 5.4335274672342027e-01 3.9794499379993582e-02]
[ 1.0856954869368127e+00 2.4942762727996106e+00 6.4809037040248194e-02]
[ 2.0419186686064492e-01 -7.3770812917863859e-01 -1.0639594585416983e+00]
[ 1.9805969501707015e+00 1.2686616383111045e+00 1.8551759273749222e+00]]
Calling Model compute...
Model returned energy of 1.7230648557222230e+00 eV
Model returned forces (eV/Angstrom):
[[-6.6619707209446055e+00 3.1808245131857444e+00 2.2257660894861524e+00]
[ 6.4964629737016288e+00 -3.0799278117163560e+00 -2.1502102237384269e+00]
[-6.0163101377394745e-01 8.9828541499440662e-01 -1.1738604562215131e+00]
[ 2.3242723920853886e-01 -9.6370391279996359e-02 8.1123798719492483e-03]
[ 5.3471152180838499e-01 -9.0281172518379904e-01 1.0901922106018389e+00]]
Cumulative norm of all forces: 1.0984836300707396e+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...
Creating random cluster of 5 Sn atoms with a diameter 4.320000 Angstroms and a minimum separation of
0.480000 Angstroms between all atoms
Cluster positions (Angstroms):
[[-2.0573490064751039e+00 -2.4840849288089248e-01 6.0578521138288788e-01]
[-6.2590070856459146e-01 -1.0206505070111647e+00 -1.0255026697863877e-01]
[ 4.7541808933019220e-01 -7.0017634062365733e-03 3.5984548086322938e+00]
[-2.4155095629160242e-01 -8.8975877963390204e-01 -3.6654789169421476e-01]
[-4.1082920663039418e-01 1.6411087352194225e+00 -2.8454330259453813e+00]]
Calling Model compute...
Model returned energy of 4.3192926374244792e+02 eV
Model returned forces (eV/Angstrom):
[[-2.8950734304930709e+01 1.9725011466469994e+01 1.4947669237950898e+01]
[-7.8160007530574569e+02 -3.0844439697741279e+02 5.4541632453174168e+02]
[-7.4990816456060272e-01 2.6316729309852724e-02 -5.1274988018767731e-01]
[ 8.1137827334703820e+02 2.8943973391778178e+02 -5.6062661553818134e+02]
[-7.7555571801266737e-02 -7.4666513614888752e-01 7.7537164867641473e-01]]
Cumulative norm of all forces: 1.4357508486823820e+03 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:
[[-3.8878261648713632e+00 -4.6942401855933352e-01 1.1447681398216969e+00]
[-1.1827809203544537e+00 -1.9287499271433153e+00 -1.9379191859002665e-01]
[ 8.9840998349515533e-01 -1.3231415226745973e-02 6.8000940599171509e+00]
[-4.5646515251643333e-01 -1.6814004104298568e+00 -6.9267512683655486e-01]
[-7.7635468450127465e-01 3.1012460501860066e+00 -5.3770891248117545e+00]]
Calling Model compute...
Model returned energy of 1.5873108786386041e+01 Hartree
Model returned forces (Hartree/Bohr):
[[-5.6300218490394893e-01 3.8359042765235535e-01 2.9068590632447722e-01]
[-1.5199702552736396e+01 -5.9982889411580969e+00 1.0606659546503076e+01]
[-1.4583392969519160e-02 5.1177893952234908e-04 -9.9713983007937920e-03]
[ 1.5778796346460824e+01 5.6287070606697176e+00 -1.0902452633457415e+01]
[-1.5082158509588880e-03 -1.4520326103498370e-02 1.5078578930654471e-02]]
Cumulative norm of all forces: 2.7920910615667886e+01 Hartree/Bohr
Converting energy and forces returned by model back to Angstroms and eV...
Converted energy is 4.3192926369825045e+02 eV
Converted forces (eV/Angstrom):
[[-2.8950734301967941e+01 1.9725011464451427e+01 1.4947669236421207e+01]
[-7.8160007522579815e+02 -3.0844439694586100e+02 5.4541632447595236e+02]
[-7.4990816448388364e-01 2.6316729307155704e-02 -5.1274988013523581e-01]
[ 8.1137827326404340e+02 2.8943973388817477e+02 -5.6062661548083520e+02]
[-7.7555571793343117e-02 -7.4666513607230267e-01 7.7537164859689611e-01]]
Cumulative norm of converted forces: 1.4357508485355211e+03 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: 4.4197463466844056e-08 eV
Cumulative norm of difference in initial forces and converted forces: 1.4686074347118648e-07
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