!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! !!!!!
!!!!! 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_CrMn__MO_671124822359_000
Supported species : Cr Mn
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 Cr 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 1.5751031447403376e+01 eV
Model returned forces (eV/Angstrom):
[[-9.1395432286082595e+01 4.3640165304031257e+01 3.0520499761066937e+01]
[ 9.1735571609431574e+01 -4.3625755188063387e+01 -3.0581483026712689e+01]
[-9.2327203744393321e-02 -4.6191650381495697e-01 2.1230837926952500e-01]
[ 8.2814546734233774e-02 4.8243004104311893e-01 4.4709884586669824e-01]
[-3.3062666633882670e-01 -3.4923653196031620e-02 -5.9842395949047078e-01]]
Cumulative norm of all forces: 1.4981359684560476e+02 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 5.7883976995710962e-01 Hartree
Model returned forces (Hartree/Bohr):
[[-1.7773583055038820e+00 8.4866615668377965e-01 5.9352926488342639e-01]
[ 1.7839729626728584e+00 -8.4838592452492767e-01 -5.9471520066797379e-01]
[-1.7954783767016487e-03 -8.9828464505206825e-03 4.1287409204624984e-03]
[ 1.6104866378202896e-03 9.3817712638913850e-03 8.6946888614186611e-03]
[-6.4296654300950839e-03 -6.7915697222270858e-04 -1.1637493997333721e-02]]
Cumulative norm of all forces: 2.9134108124514331e+00 Hartree/Bohr
Converting energy and forces returned by model back to Angstroms and eV...
Converted energy is 1.5751031445791698e+01 eV
Converted forces (eV/Angstrom):
[[-9.1395432276728158e+01 4.3640165299564657e+01 3.0520499757943131e+01]
[ 9.1735571600042363e+01 -4.3625755183598280e+01 -3.0581483023582653e+01]
[-9.2327203734895377e-02 -4.6191650376768545e-01 2.1230837924787946e-01]
[ 8.2814546725709953e-02 4.8243004099370473e-01 4.4709884582092008e-01]
[-3.3062666630501308e-01 -3.4923653192399443e-02 -5.9842395942927762e-01]]
Cumulative norm of converted forces: 1.4981359683027117e+02 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: 1.6116779022468108e-09 eV
Cumulative norm of difference in initial forces and converted forces: 1.5333560287760825e-08
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