!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! !!!!!
!!!!! 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_JeongParkDo_2018_PdCo__MO_101997554790_001
Supported species : Co Pd
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 Co 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 -3.9345547294460341e+00 eV
Model returned forces (eV/Angstrom):
[[-1.9213537662054801e+01 9.1971238737455341e+00 6.4172846339146963e+00]
[ 2.0245664202283002e+01 -9.5354408373861332e+00 -6.7725290604144481e+00]
[-6.3772847148405448e-02 -9.4589908360664821e-01 2.9891313767636613e-01]
[-5.3094923399402527e-01 1.1724249888512426e+00 8.6044576261304828e-01]
[-4.3740445908577458e-01 1.1179105839600496e-01 -8.0411447378966294e-01]]
Cumulative norm of all forces: 3.2339492503759381e+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 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 -1.4459222953628478e-01 Hartree
Model returned forces (Hartree/Bohr):
[[-3.7364384507612758e-01 1.7885559589655592e-01 1.2479632578539966e-01]
[ 3.9371551203715932e-01 -1.8543481380908081e-01 -1.3170473046307543e-01]
[-1.2401845115197821e-03 -1.8394809788243049e-02 5.8129354452894529e-03]
[-1.0325319408595098e-02 2.2800037588228256e-02 1.6733007157610537e-02]
[-8.5061630409169024e-03 2.1739901125397022e-03 -1.5637537925224241e-02]]
Cumulative norm of all forces: 6.2890304427274346e-01 Hartree/Bohr
Converting energy and forces returned by model back to Angstroms and eV...
Converted energy is -3.9345547290434233e+00 eV
Converted forces (eV/Angstrom):
[[-1.9213537660089404e+01 9.1971238728047418e+00 6.4172846332582587e+00]
[ 2.0245664200212079e+01 -9.5354408364107552e+00 -6.7725290597216929e+00]
[-6.3772847141881986e-02 -9.4589908350980600e-01 2.9891313764577587e-01]
[-5.3094923393980731e-01 1.1724249887312441e+00 8.6044576252498406e-01]
[-4.3740445904098585e-01 1.1179105838457794e-01 -8.0411447370732680e-01]]
Cumulative norm of converted forces: 3.2339492500451350e+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: 4.026108335608569e-10 eV
Cumulative norm of difference in initial forces and converted forces: 3.3080426146930612e-09
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