!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! !!!!!
!!!!! 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 : SW_BereSerra_2006_GaN__MO_861114678890_000
Supported species : N Ga
Model computes energy : True
Model computes forces : True
Model native length unit : A
Model native energy unit : eV
Influence distance : 3.3600000000000003 Angstroms
Model cutoffs : [3.36] Angstroms
Smallest model cutoff : 3.3600000000000003 Angstroms
Parameters for random cluster generation
Random seed: 11
Min. distance between atoms (dmin) : 3.3600000000000008e-01 Angstroms
------------------------------------------------------------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
STEP I: Cluster generation
Attempting to find a species supported by the Model for which a random cluster can be generated
which 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 addtional
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 N atoms with a diameter 3.024000 Angstroms and a minimum separation of
0.336000 Angstroms between all atoms
Cluster positions (Angstroms):
[[-2.6514882101398731e+00 8.1790131905418961e-01 3.3410526013638381e-01]
[-1.7348286470996552e+00 3.8034692270639425e-01 2.7856149565995511e-02]
[ 7.5998684085576906e-01 1.7459933909597278e+00 4.5366325928173745e-02]
[ 1.4293430680245148e-01 -5.1639569042504718e-01 -7.4477162097918892e-01]
[ 1.3864178651194914e+00 8.8806314681777332e-01 1.2986231491624458e+00]]
Calling Model compute...
Model returned energy of 1.0867624157401072e+00 eV
Model returned forces (eV/Angstrom):
[[-1.9655090435788402e+01 9.3820776782593853e+00 6.5666166440411953e+00]
[ 1.9667371844315586e+01 -9.3879427724250935e+00 -6.5716688987512377e+00]
[ 6.9182669471513536e-01 -9.4749305527850491e-01 1.3840893762668145e+00]
[-1.2281408527186198e-02 5.8650941657072313e-03 5.0522547100422142e-03]
[-6.9182669471513536e-01 9.4749305527850491e-01 -1.3840893762668145e+00]]
Cumulative norm of all forces: 3.2282759868336349e+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...
Creating random cluster of 5 Ga atoms with a diameter 3.024000 Angstroms and a minimum separation of
0.336000 Angstroms between all atoms
Cluster positions (Angstroms):
[[-1.4401443045325730e+00 -1.7388594501662477e-01 4.2404964796802158e-01]
[-4.3813049599521409e-01 -7.1445535490781542e-01 -7.1785186885047148e-02]
[ 3.3279266253113465e-01 -4.9012343843656036e-03 2.5189183660426067e+00]
[-1.6908566940412170e-01 -6.2283114574373155e-01 -2.5658352418595037e-01]
[-2.8758044464127602e-01 1.1487761146535960e+00 -1.9918031181617675e+00]]
Calling Model compute...
Model returned energy of 5.0547510093987739e+03 eV
Model returned forces (eV/Angstrom):
[[-8.9453559912056406e+01 4.9386443368428424e+01 4.4805748421924399e+01]
[-4.7907668190250057e+04 -1.6398079118478581e+04 3.2923683422290720e+04]
[-4.5720468486282828e-01 -1.5098237983492460e-01 -8.6345829364024440e-01]
[ 4.7997681436127379e+04 1.6348074632986340e+04 -3.2966805838066248e+04]
[-1.0248128041013728e-01 7.6902450364570096e-01 -8.1987435275593634e-01]]
Cumulative norm of all forces: 8.5474383915155340e+04 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 sizeableenergy/forces from Step I and change
the units from Angstroms to Bohrourselves. Next, create a new Model object wherein we've
registeredBohr and Hartree as the unit set. Ask the model for its neighbor listcutoffs and
influence once more and use them to create a new neighborlist using the coordinates we converted
to Bohr. Finally, have theModel compute the energy and/or forces once more and compare
theresults to our own conversion of the energy and/or forces the modelreturned in Step I.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Creating Model object with Bohr and Hartree as simulator registered units
Cluster positions converted to Bohr:
[[-2.7214783154099549e+00 -3.2859681299153354e-01 8.0133769787518805e-01]
[-8.2794664424811770e-01 -1.3501249490003211e+00 -1.3565434301301868e-01]
[ 6.2888698844660895e-01 -9.2619906587221856e-03 4.7600658419420077e+00]
[-3.1952560676150338e-01 -1.1769802873008999e+00 -4.8487258878558848e-01]
[-5.4344827915089244e-01 2.1708722351302052e+00 -3.7639623873682293e+00]]
Calling Model compute...
Model returned energy of 1.8575868642260849e+02 Hartree
Model returned forces (Hartree/Bohr):
[[-1.7395948975756135e+00 9.6041348133698901e-01 8.7133314105625781e-01]
[-9.3165588066520490e+02 -3.1889188974246650e+02 6.4026374967210813e+02]
[-8.8912161541359110e-03 -2.9361400244201810e-03 -1.6791591562846962e-02]
[ 9.3340635972267751e+02 3.1791945725455082e+02 -6.4110234720280414e+02]
[-1.9929437428064137e-03 1.4955146603085345e-02 -1.5944018797122341e-02]]
Cumulative norm of all forces: 1.6622122392714653e+03 Hartree/Bohr
Converting energy and forces returned by model back to Angstroms and eV...
Converted energy is 5.0547510088815525e+03 eV
Converted forces (eV/Angstrom):
[[-8.9453559902903095e+01 4.9386443363374930e+01 4.4805748417339643e+01]
[-4.7907668185347946e+04 -1.6398079116800687e+04 3.2923683418921850e+04]
[-4.5720468481604382e-01 -1.5098237981947502e-01 -8.6345829355188930e-01]
[ 4.7997681431216071e+04 1.6348074631313562e+04 -3.2966805834692947e+04]
[-1.0248128039965146e-01 7.6902450356701157e-01 -8.1987435267204367e-01]]
Cumulative norm of converted forces: 8.5474383906409275e+04 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: 5.172214514459483e-07 eV
Cumulative norm of difference in initial forces and converted forces: 8.746069205783584e-06
eV/Angstrom
FAILURE: Absolute difference in energy is below tolerance 1e-06 but cumulative norm of difference in
forces on all atoms exceeds tolerance 1e-06.
Grade: F
Comment: Unit conversion failed