!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! !!!!!
!!!!! 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 8.881784197001252e-16 Bohr, which is below
tolerance 1e-06.
Creating Model object with Angstrom and eV as simulator registered units
------------------------------------------------------------------------------------------------------------------------
Results for KIM Model : MEAM_LAMMPS_SaLee_2008_NbFe__MO_162036141261_000
Supported species : Fe Nb
Model computes energy : True
Model computes forces : True
Model native length unit : A
Model native energy unit : eV
Influence distance : 4.0 Angstroms
Model cutoffs : [4.] Angstroms
Smallest model cutoff : 4.0 Angstroms
Parameters for random cluster generation
Random seed: 11
Min. distance between atoms (dmin) : 4.0000000000000002e-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 Fe atoms with a diameter 3.600000 Angstroms and a minimum separation of
0.400000 Angstroms between all atoms
Cluster positions (Angstroms):
[[-3.1565335834998485e+00 9.7369204649308272e-01 3.9774435730521873e-01]
[-2.0652721989281608e+00 4.5279395560285024e-01 3.3162082816661317e-02]
[ 9.0474623911401064e-01 2.0785635606663422e+00 5.4007530866873502e-02]
[ 1.7015988905053742e-01 -6.1475677431553211e-01 -8.8663288211808189e-01]
[ 1.6504974584755849e+00 1.0572180319259206e+00 1.5459799394791023e+00]]
Calling Model compute...
Model returned energy of 1.0770796926001839e+01 eV
Model returned forces (eV/Angstrom):
[[-6.1138850184359057e+01 2.9211793386721297e+01 2.0405719717100521e+01]
[ 6.1935772183820163e+01 -2.9237915370154678e+01 -2.0555303799613462e+01]
[-1.8269730411589933e+00 1.5329447901106170e+00 -2.9350528415798114e+00]
[-3.7750069850311235e-02 8.1590072399728641e-01 7.8007849093069292e-01]
[ 1.0678011115481953e+00 -2.3227235306745242e+00 2.3045584331620601e+00]]
Cumulative norm of all forces: 1.0073987054638303e+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:
[[-5.9649839757872805e+00 1.8400112975332268e+00 7.5162790289557335e-01]
[-3.9027988286398130e+00 8.5565656694508241e-01 6.2667254243431683e-02]
[ 1.7097226041501865e+00 3.9279158621474175e+00 1.0205944200205365e-01]
[ 3.2155558769084958e-01 -1.1617219366736393e+00 -1.6754933202315176e+00]
[ 3.1189881657994309e+00 1.9978525342851892e+00 2.9214786796776933e+00]]
Calling Model compute...
Model returned energy of 3.9581951415184458e-01 Hartree
Model returned forces (Hartree/Bohr):
[[-1.1889614223170399e+00 5.6807897611383174e-01 3.9682809645729106e-01]
[ 1.2044590888759936e+00 -5.6858696784876106e-01 -3.9973704392627857e-01]
[-3.5528971496868830e-02 2.9811031978649004e-02 -5.7077694306942123e-02]
[-7.3412202889896940e-04 1.5866744015434753e-02 1.5170112445672027e-02]
[ 2.0765426966814150e-02 -4.5169784259154445e-02 4.4816529330257607e-02]]
Cumulative norm of all forces: 1.9590787103075737e+00 Hartree/Bohr
Converting energy and forces returned by model back to Angstroms and eV...
Converted energy is 1.0770796924899717e+01 eV
Converted forces (eV/Angstrom):
[[-6.1138850178108939e+01 2.9211793383735017e+01 2.0405719715014481e+01]
[ 6.1935772177488580e+01 -2.9237915367165762e+01 -2.0555303797512149e+01]
[-1.8269730409723444e+00 1.5329447899541950e+00 -2.9350528412800823e+00]
[-3.7750069846534659e-02 8.1590072391381496e-01 7.8007849085089298e-01]
[ 1.0678011114392387e+00 -2.3227235304372651e+00 2.3045584329268571e+00]]
Cumulative norm of converted forces: 1.0073987053608462e+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.1021228374374914e-09 eV
Cumulative norm of difference in initial forces and converted forces: 1.0298420117922012e-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