!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!! !!!!!
!!!!! 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 3.552713678800501e-15 Bohr, which is below
tolerance 1e-06.
Creating Model object with Angstrom and eV as simulator registered units
------------------------------------------------------------------------------------------------------------------------
Results for KIM Model : LJ_Shifted_Bernardes_1958MedCutoff_Kr__MO_984281096460_004
Supported species : Kr
Model computes energy : True
Model computes forces : True
Model native length unit : A
Model native energy unit : eV
Influence distance : 14.5 Angstroms
Model cutoffs : [14.5] Angstroms
Smallest model cutoff : 14.5 Angstroms
Parameters for random cluster generation
Random seed: 11
Min. distance between atoms (dmin) : 1.4500000000000002e+00 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 Kr atoms with a diameter 13.050000 Angstroms and a minimum separation
of 1.450000 Angstroms between all atoms
Cluster positions (Angstroms):
[[-1.1442434240186950e+01 3.5296336685374246e+00 1.4418232952314178e+00]
[-7.4866117211145831e+00 1.6413780890603322e+00 1.2021255021039728e-01]
[ 3.2797051167882887e+00 7.5347929074154916e+00 1.9577729939241645e-01]
[ 6.1682959780819824e-01 -2.2284933068938044e+00 -3.2140441976780472e+00]
[ 5.9830532869739947e+00 3.8324153657314617e+00 5.6041772806117445e+00]]
Calling Model compute...
Model returned energy of -1.1970558730596111e-02 eV
Model returned forces (eV/Angstrom):
[[ 7.9266257703068076e-03 -3.7836628913721490e-03 -2.6485359764962667e-03]
[-7.8138266236455964e-03 3.7467920318527696e-03 2.6092142656582106e-03]
[ 2.9484305806076820e-04 -4.9838692514325028e-04 6.3191169729763671e-04]
[-7.3650111867129683e-05 1.0306973588589897e-04 7.1996652794609282e-05]
[-3.3399209285484997e-04 4.3218804877673093e-04 -6.6458663925418983e-04]]
Cumulative norm of all forces: 1.2944514595790588e-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 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.1623066912228889e+01 6.6700409535579466e+00 2.7246511479964535e+00]
[-1.4147645753819322e+01 3.1017550551759241e+00 2.2716879663243986e-01]
[ 6.1977444400444259e+00 1.4238695000284389e+01 3.6996547725744450e-01]
[ 1.1656390053793300e+00 -4.2112420204419436e+00 -6.0736632858392516e+00]
[ 1.1306332101022935e+01 7.2422154367838099e+00 1.0590360213831636e+01]]
Calling Model compute...
Model returned energy of -4.3990995034287649e-04 Hartree
Model returned forces (Hartree/Bohr):
[[ 1.5414833974828322e-04 -7.3580533479585577e-05 -5.1505827999332342e-05]
[-1.5195474543883773e-04 7.2863509370626716e-05 5.0741142417170207e-05]
[ 5.7337849929321096e-06 -9.6920832759473610e-06 1.2288726859143769e-05]
[-1.4322667419372758e-06 2.0043873806458806e-06 1.4001120801358409e-06]
[-6.4951125604403086e-06 8.4047200042603376e-06 -1.2924153357117475e-05]]
Cumulative norm of all forces: 2.5173074793857786e-04 Hartree/Bohr
Converting energy and forces returned by model back to Angstroms and eV...
Converted energy is -1.1970558729371228e-02 eV
Converted forces (eV/Angstrom):
[[ 7.9266257694957116e-03 -3.7836628909849851e-03 -2.6485359762252543e-03]
[-7.8138266228460415e-03 3.7467920314693780e-03 2.6092142653912219e-03]
[ 2.9484305803059827e-04 -4.9838692509225277e-04 6.3191169723297619e-04]
[-7.3650111859593448e-05 1.0306973587535246e-04 7.1996652787242250e-05]
[-3.3399209282067413e-04 4.3218804873250714e-04 -6.6458663918618586e-04]]
Cumulative norm of converted forces: 1.2944514594466033e-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.2248830422167956e-12 eV
Cumulative norm of difference in initial forces and converted forces: 1.324553837725836e-12
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