!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! !!!!!
!!!!! 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 : EAM_Dynamo_StollerTammBeland_2016_Ni__MO_103383163946_000
Supported species : Ni
Model computes energy : True
Model computes forces : True
Model native length unit : A
Model native energy unit : eV
Influence distance : 6.5 Angstroms
Model cutoffs : [6.5] Angstroms
Smallest model cutoff : 6.5 Angstroms
Parameters for random cluster generation
Random seed: 11
Min. distance between atoms (dmin) : 6.5000000000000002e-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 Ni atoms with a diameter 5.850000 Angstroms and a minimum separation of
0.650000 Angstroms between all atoms
Cluster positions (Angstroms):
[[-5.1293670731872529e+00 1.5822495755512593e+00 6.4633458062098037e-01]
[-3.3560673232582610e+00 7.3579017785463163e-01 5.3888384577074636e-02]
[ 1.4702126385602672e+00 3.3776657860828059e+00 8.7762237658669431e-02]
[ 2.7650981970712329e-01 -9.9897975826273977e-01 -1.4407784334418832e+00]
[ 2.6820583700228249e+00 1.7179793018796206e+00 2.5122174016535403e+00]]
Calling Model compute...
Model returned energy of -2.7618287779202846e+00 eV
Model returned forces (eV/Angstrom):
[[-1.2364264398218578e+00 5.9019056399782588e-01 4.1308083474883522e-01]
[ 1.4672558030722662e+00 -7.0042520568062760e-01 -5.0805830564520971e-01]
[ 4.1464931530027621e-01 -6.2069735955232819e-01 8.3711202429633647e-01]
[-2.2034220392914150e-01 1.4868523289474364e-01 1.0840631540749734e-01]
[-4.2513647462154319e-01 5.8224676834038624e-01 -8.5054086880745927e-01]]
Cumulative norm of all forces: 2.7445959875169192e+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:
[[-9.6930989606543285e+00 2.9900183584914934e+00 1.2213953422053065e+00]
[-6.3420480965396955e+00 1.3904419212857588e+00 1.0183428814557646e-01]
[ 2.7782992317440529e+00 6.3828632759895525e+00 1.6584659325333717e-01]
[ 5.2252782999763059e-01 -1.8877981470946641e+00 -2.7226766453762163e+00]
[ 5.0683557694240742e+00 3.2465103682134315e+00 4.7474028544762499e+00]]
Calling Model compute...
Model returned energy of -1.0149534268981744e-01 Hartree
Model returned forces (Hartree/Bohr):
[[-2.4044667736603090e-02 1.1477379935882572e-02 8.0331438248161646e-03]
[ 2.8533584476370642e-02 -1.3621102560180592e-02 -9.8801616955235937e-03]
[ 8.0636459173757339e-03 -1.2070642696360193e-02 1.6279238161083232e-02]
[-4.2849739468448986e-03 2.8914676256911443e-03 2.1081673365850556e-03]
[-8.2675887102983889e-03 1.1322897694967068e-02 -1.6540387626960858e-02]]
Cumulative norm of all forces: 5.3373897925189928e-02 Hartree/Bohr
Converting energy and forces returned by model back to Angstroms and eV...
Converted energy is -2.7618287776376786e+00 eV
Converted forces (eV/Angstrom):
[[-1.2364264396953575e+00 5.9019056393744296e-01 4.1308083470657248e-01]
[ 1.4672558029221412e+00 -7.0042520560896260e-01 -5.0805830559322640e-01]
[ 4.1464931525784560e-01 -6.2069735948881344e-01 8.3711202421067565e-01]
[-2.2034220390658990e-01 1.4868523287952742e-01 1.0840631539640277e-01]
[-4.2513647457803960e-01 5.8224676828080557e-01 -8.5054086872042456e-01]]
Cumulative norm of converted forces: 2.7445959872360932e+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.8260593865070405e-10 eV
Cumulative norm of difference in initial forces and converted forces: 2.808258399629854e-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