!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! !!!!!
!!!!! 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 : EAM_Dynamo_DeluigiPasianotValencia_2021_FeNiCrCoCu__MO_657255834688_000
Supported species : Cr Fe Co Ni Cu
Model computes energy : True
Model computes forces : True
Model native length unit : A
Model native energy unit : eV
Influence distance : 5.80375 Angstroms
Model cutoffs : [5.80375] Angstroms
Smallest model cutoff : 5.80375 Angstroms
Parameters for random cluster generation
Random seed: 11
Min. distance between atoms (dmin) : 5.8037499999999997e-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 5.223375 Angstroms and a minimum separation of
0.580375 Angstroms between all atoms
Cluster positions (Angstroms):
[[-4.5799329463093112e+00 1.4127663037085572e+00 5.7710220342754082e-01]
[-2.9965808811323282e+00 6.5697572995751052e-01 4.8116109536799533e-02]
[ 1.3127302463144850e+00 3.0158658163043213e+00 7.8361551817154276e-02]
[ 2.4689136401926415e-01 -8.9197365723344246e-01 -1.2864488973982044e+00]
[ 2.3947686561569186e+00 1.5339572881975152e+00 2.2431202684379596e+00]]
Calling Model compute...
Model returned energy of -2.5605538787777615e-01 eV
Model returned forces (eV/Angstrom):
[[-4.5320895255164082e+00 2.1633290507429925e+00 1.5143511791344744e+00]
[ 4.6632040113400874e+00 -2.2420040407863486e+00 -1.5749613079644464e+00]
[ 4.8763466311201603e-01 -7.7757687214167970e-01 9.6432590783756988e-01]
[-1.1283376429183752e-01 1.7885543890206870e-01 1.0622005326616135e-01]
[-5.0591538464385799e-01 6.7739642328296723e-01 -1.0099358322737590e+00]]
Cumulative norm of all forces: 7.7671598638171400e+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:
[[-8.6548189373688569e+00 2.6697413920146160e+00 1.0905651103575460e+00]
[-5.6627171754295782e+00 1.2415042001018806e+00 9.0926269203829152e-02]
[ 2.4807006409591614e+00 5.6991604212345193e+00 1.4808187162985473e-01]
[ 4.6655706051519213e-01 -1.6855859224924088e+00 -2.4310360893234177e+00]
[ 4.5254568918146107e+00 2.8987591614644161e+00 4.2388829717948520e+00]]
Calling Model compute...
Model returned energy of -9.4098626055301293e-03 Hartree
Model returned forces (Hartree/Bohr):
[[-8.8135115267576725e-02 4.2070054921787017e-02 2.9449443789043354e-02]
[ 9.0684886241044538e-02 -4.3600039993155759e-02 -3.0628123217315159e-02]
[ 9.4829850557611797e-03 -1.5121463702286533e-02 1.8753154491821581e-02]
[-2.1942675152258006e-03 3.4781847611606658e-03 2.0656513040250889e-03]
[-9.8384885140031762e-03 1.3173264012494603e-02 -1.9640126367574860e-02]]
Cumulative norm of all forces: 1.5104722138541996e-01 Hartree/Bohr
Converting energy and forces returned by model back to Angstroms and eV...
Converted energy is -2.5605538785157556e-01 eV
Converted forces (eV/Angstrom):
[[-4.5320895250526316e+00 2.1633290505216149e+00 1.5143511789795081e+00]
[ 4.6632040108628958e+00 -2.2420040405569215e+00 -1.5749613078032785e+00]
[ 4.8763466306212006e-01 -7.7757687206211634e-01 9.6432590773889759e-01]
[-1.1283376428029200e-01 1.7885543888376829e-01 1.0622005325529331e-01]
[-5.0591538459209184e-01 6.7739642321365412e-01 -1.0099358321704204e+00]]
Cumulative norm of converted forces: 7.7671598630223198e+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.620059724733892e-11 eV
Cumulative norm of difference in initial forces and converted forces: 7.948210201583714e-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