Relaxation of a user defined structure¶
This example demonstrates the definition and relaxation of a user defined structure provided in the input file via the <user-structure> element. None of the parameters are fitted.
Location¶
examples/relaxing_user_structure
Input files¶
main.xml: main input file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
<?xml version='1.0' encoding='iso-8859-1'?> <job> <name>Relaxation of a user defined structure</name> <verbosity>maximum</verbosity> <validate-potentials /> <atom-types> <species>Ga</species> <species>N</species> </atom-types> <potentials> <tersoff id='GaN potential' species-a='*' species-b='*'> <param-file>GaN.tersoff</param-file> </tersoff> </potentials> <structures> <user-structure id='B1'> <pbc x='true' y='true' z='true' /> <cell> <a1 x='4.304' y='0' z='0' /> <a2 x='0' y='4.304' z='0' /> <a3 x='0' y='0' z='4.304' /> <atoms> <atom type='Ga' x='0.1' y='0.0' z='0.0' reduced='true' /> <atom type='Ga' x='0.56' y='0.5' z='0.2' reduced='true' /> <atom type='Ga' x='0.5' y='0.0' z='0.5' reduced='true' /> <atom type='Ga' x='0.0' y='0.5' z='0.5' reduced='true' /> <atom type='N' x='0.5' y='0.2' z='0.0' reduced='true' /> <atom type='N' x='0.0' y='0.5' z='0.0' reduced='true' /> <atom type='N' x='0.0' y='0.0' z='0.5' reduced='true' /> <atom type='N' x='0.5' y='0.6' z='0.8' reduced='true' /> </atoms> </cell> <relax-dof> <atom-coordinates/> </relax-dof> </user-structure> </structures> </job>
GaN.tersoff: initial parameter set in Lammps/Tersoff format
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
# Tersoff parameters for various elements and mixtures # multiple entries can be added to this file, LAMMPS reads the ones it needs # these entries are in LAMMPS "metal" units: # A,B = eV; lambda1,lambda2,lambda3 = 1/Angstroms; R,D = Angstroms # other quantities are unitless # format of a single entry (one or more lines): # element 1, element 2, element 3, # m, gamma, lambda3, c, d, costheta0, n, beta, lambda2, B, R, D, lambda1, A # The following GaN potential is from J. Nord, K. Albe, P. Erhart # and K. Nordlund, J. Phys.: Condens. Matter, 15, 5649(2003). # This file is from Xiaowang Zhou, xzhou @ sandia.gov Ga Ga Ga 1.0 0.007874 1.846 1.918000 0.75000 -0.301300 1.0 1.0 1.44970 410.132 2.87 0.15 1.60916 535.199 N N N 1.0 0.766120 0.000 0.178493 0.20172 -0.045238 1.0 1.0 2.38426 423.769 2.20 0.20 3.55779 1044.77 Ga Ga N 1.0 0.001632 0.000 65.20700 2.82100 -0.518000 1.0 0.0 0.00000 0.00000 2.90 0.20 0.00000 0.00000 Ga N N 1.0 0.001632 0.000 65.20700 2.82100 -0.518000 1.0 1.0 2.63906 3864.27 2.90 0.20 2.93516 6136.44 N Ga Ga 1.0 0.001632 0.000 65.20700 2.82100 -0.518000 1.0 1.0 2.63906 3864.27 2.90 0.20 2.93516 6136.44 N Ga N 1.0 0.766120 0.000 0.178493 0.20172 -0.045238 1.0 0.0 0.00000 0.00000 2.20 0.20 0.00000 0.00000 N N Ga 1.0 0.001632 0.000 65.20700 2.82100 -0.518000 1.0 0.0 0.00000 0.00000 2.90 0.20 0.00000 0.00000 Ga N Ga 1.0 0.007874 1.846 1.918000 0.75000 -0.301300 1.0 0.0 0.00000 0.00000 2.87 0.15 0.00000 0.00000
Output¶
The final properties (as well as parameters) are written to standard output.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
This is program version 0.1.6 Reading job file main.xml ------------------------------------------------------- Parsing input file(s) ------------------------------------------------------- Maximum cutoff for Tersoff potential 'GaN' is 3.1 Neighbor lists of structure 'B1' will be built for the first time. ------------------------------------------------------- Validating potential routines. Finite difference epsilon: 0.0001 Testing structure 'B1' with 24 atomic degrees of freedom. Neighbor lists of structure 'B1' need to be rebuilt because of cell deformation (skin=0, cell_def=0 threshold=0). Atom 0 pos(0.4304, 0, 0) dim=0 Numerical derivative: 13.8521 err: 1.1073e-08 Analytical derivative: 13.8521 Deviation: 3.07875e-10 0.0278041 Atom 0 pos(0.4304, 0, 0) dim=1 Numerical derivative: 5.11556 err: 4.16382e-08 Analytical derivative: 5.11556 Deviation: 2.49345e-10 0.00598839 Atom 0 pos(0.4304, 0, 0) dim=2 Numerical derivative: -0.30519 err: 7.27303e-08 Analytical derivative: -0.30519 Deviation: 2.02029e-10 0.00277779 Atom 1 pos(2.41024, 2.152, 0.8608) dim=0 Numerical derivative: -8.51022 err: 3.73012e-07 Analytical derivative: -8.51022 Deviation: 1.03178e-09 0.00276607 Atom 1 pos(2.41024, 2.152, 0.8608) dim=1 Numerical derivative: -36.1769 err: 4.80475e-07 Analytical derivative: -36.1769 Deviation: 8.6262e-10 0.00179535 Atom 1 pos(2.41024, 2.152, 0.8608) dim=2 Numerical derivative: -44.2624 err: 3.30148e-07 Analytical derivative: -44.2624 Deviation: 8.90907e-10 0.00269851 Atom 2 pos(2.152, 0, 2.152) dim=0 Numerical derivative: -2.65016 err: 1.67913e-07 Analytical derivative: -2.65016 Deviation: 6.53948e-11 0.000389455 Atom 2 pos(2.152, 0, 2.152) dim=1 Numerical derivative: 0.728396 err: 3.05131e-07 Analytical derivative: 0.728396 Deviation: 4.24452e-10 0.00139105 Atom 2 pos(2.152, 0, 2.152) dim=2 Numerical derivative: 2.82222 err: 9.58467e-08 Analytical derivative: 2.82222 Deviation: 5.40852e-11 0.000564289 Atom 3 pos(0, 2.152, 2.152) dim=0 Numerical derivative: -1.49171 err: 1.51867e-07 Analytical derivative: -1.49171 Deviation: 2.8947e-10 0.00190608 Atom 3 pos(0, 2.152, 2.152) dim=1 Numerical derivative: 0.743795 err: 1.28908e-08 Analytical derivative: 0.743795 Deviation: 7.38442e-11 0.00572844 Atom 3 pos(0, 2.152, 2.152) dim=2 Numerical derivative: -2.27849 err: 3.68302e-08 Analytical derivative: -2.27849 Deviation: 3.37614e-11 0.000916679 Atom 4 pos(2.152, 0.8608, 0) dim=0 Numerical derivative: -3.8569 err: 2.91654e-07 Analytical derivative: -3.8569 Deviation: 7.23626e-10 0.00248111 Atom 4 pos(2.152, 0.8608, 0) dim=1 Numerical derivative: 32.0262 err: 4.49265e-07 Analytical derivative: 32.0262 Deviation: 4.02665e-11 8.96275e-05 Atom 4 pos(2.152, 0.8608, 0) dim=2 Numerical derivative: 29.7458 err: 1.09448e-07 Analytical derivative: 29.7458 Deviation: 4.87226e-10 0.00445168 Atom 5 pos(0, 2.152, 0) dim=0 Numerical derivative: -1.5007 err: 1.36496e-06 Analytical derivative: -1.5007 Deviation: 3.04156e-10 0.000222832 Atom 5 pos(0, 2.152, 0) dim=1 Numerical derivative: 8.51754 err: 4.90494e-07 Analytical derivative: 8.51754 Deviation: 3.29276e-10 0.000671315 Atom 5 pos(0, 2.152, 0) dim=2 Numerical derivative: -21.3724 err: 1.88489e-06 Analytical derivative: -21.3724 Deviation: 4.89138e-11 2.59505e-05 Atom 6 pos(0, 0, 2.152) dim=0 Numerical derivative: 0.40748 err: 4.87943e-09 Analytical derivative: 0.40748 Deviation: 1.2907e-10 0.0264519 Atom 6 pos(0, 0, 2.152) dim=1 Numerical derivative: -0.308894 err: 6.86895e-09 Analytical derivative: -0.308894 Deviation: 5.64106e-11 0.0082124 Atom 6 pos(0, 0, 2.152) dim=2 Numerical derivative: 0.434478 err: 1e-09 Analytical derivative: 0.434478 Deviation: 5.08127e-11 0.0508127 Atom 7 pos(2.152, 2.5824, 3.4432) dim=0 Numerical derivative: 3.75013 err: 2.14176e-07 Analytical derivative: 3.75013 Deviation: 1.30607e-10 0.000609811 Atom 7 pos(2.152, 2.5824, 3.4432) dim=1 Numerical derivative: -10.6457 err: 9.11384e-07 Analytical derivative: -10.6457 Deviation: 2.83357e-10 0.000310909 Atom 7 pos(2.152, 2.5824, 3.4432) dim=2 Numerical derivative: 35.216 err: 1.26092e-06 Analytical derivative: 35.216 Deviation: 3.19467e-10 0.000253361 Validation successful. ------------------------------------------------------- ------------------------------------------------------- Computing structure properties Relaxing atomic d.o.f. of structure B1 (#dof=21): force_rlx_iter=1 E=7.13911 fnorm=77.7135 force_rlx_iter=2 E=-1.46156 fnorm=34.7045 force_rlx_iter=3 E=-1.46156 fnorm=34.7045 force_rlx_iter=4 E=-7.43048 fnorm=17.3768 force_rlx_iter=5 E=-7.43048 fnorm=17.3768 force_rlx_iter=6 E=-11.5514 fnorm=37.9108 force_rlx_iter=7 E=-11.5514 fnorm=37.9108 Neighbor lists of structure 'B1' need to be rebuilt because of atomic displacement (skin=1.7216, threshold=0.8608). force_rlx_iter=8 E=140.376 fnorm=282.454 Neighbor lists of structure 'B1' need to be rebuilt because of atomic displacement (skin=1.7216, threshold=0.8608). force_rlx_iter=9 E=14.7855 fnorm=225.067 force_rlx_iter=10 E=-17.5515 fnorm=32.2691 force_rlx_iter=11 E=-17.5515 fnorm=32.2691 force_rlx_iter=12 E=-17.1346 fnorm=32.6048 force_rlx_iter=13 E=-18.309 fnorm=20.2751 force_rlx_iter=14 E=-18.309 fnorm=20.2751 force_rlx_iter=15 E=-20.1917 fnorm=31.4942 force_rlx_iter=16 E=-20.1917 fnorm=31.4942 force_rlx_iter=17 E=-20.9584 fnorm=39.4341 force_rlx_iter=18 E=-20.9584 fnorm=39.4341 force_rlx_iter=19 E=-21.6398 fnorm=20.1743 force_rlx_iter=20 E=-21.6398 fnorm=20.1743 force_rlx_iter=21 E=-22.2835 fnorm=9.9512 force_rlx_iter=22 E=-22.2835 fnorm=9.9512 force_rlx_iter=23 E=-22.8377 fnorm=13.3711 force_rlx_iter=24 E=-22.8377 fnorm=13.3711 force_rlx_iter=25 E=-23.179 fnorm=6.89407 force_rlx_iter=26 E=-23.179 fnorm=6.89407 force_rlx_iter=27 E=-23.4691 fnorm=6.68285 force_rlx_iter=28 E=-23.4691 fnorm=6.68285 force_rlx_iter=29 E=-24.2948 fnorm=4.80567 force_rlx_iter=30 E=-24.2948 fnorm=4.80567 Neighbor lists of structure 'B1' need to be rebuilt because of atomic displacement (skin=1.7216, threshold=0.8608). force_rlx_iter=31 E=-25.3725 fnorm=9.23799 force_rlx_iter=32 E=-25.3725 fnorm=9.23799 force_rlx_iter=33 E=-24.1837 fnorm=17.5088 force_rlx_iter=34 E=-26.2755 fnorm=10.1217 force_rlx_iter=35 E=-26.2755 fnorm=10.1217 force_rlx_iter=36 E=-27.2469 fnorm=9.00067 force_rlx_iter=37 E=-27.2469 fnorm=9.00067 force_rlx_iter=38 E=-28.0786 fnorm=5.84743 force_rlx_iter=39 E=-28.0786 fnorm=5.84743 force_rlx_iter=40 E=-28.5226 fnorm=4.47269 force_rlx_iter=41 E=-28.5226 fnorm=4.47269 force_rlx_iter=42 E=-29.1394 fnorm=3.18133 force_rlx_iter=43 E=-29.1394 fnorm=3.18133 Neighbor lists of structure 'B1' need to be rebuilt because of atomic displacement (skin=1.7216, threshold=0.8608). force_rlx_iter=44 E=-29.4139 fnorm=4.1065 force_rlx_iter=45 E=-29.4139 fnorm=4.1065 force_rlx_iter=46 E=-29.635 fnorm=2.09631 force_rlx_iter=47 E=-29.635 fnorm=2.09631 force_rlx_iter=48 E=-29.7691 fnorm=1.13437 force_rlx_iter=49 E=-29.7691 fnorm=1.13437 force_rlx_iter=50 E=-29.8357 fnorm=0.665141 force_rlx_iter=51 E=-29.8357 fnorm=0.665141 force_rlx_iter=52 E=-29.8467 fnorm=0.68019 force_rlx_iter=53 E=-29.8467 fnorm=0.68019 force_rlx_iter=54 E=-29.8567 fnorm=0.276079 force_rlx_iter=55 E=-29.8567 fnorm=0.276079 force_rlx_iter=56 E=-29.8597 fnorm=0.124064 force_rlx_iter=57 E=-29.8597 fnorm=0.124064 force_rlx_iter=58 E=-29.861 fnorm=0.145802 force_rlx_iter=59 E=-29.861 fnorm=0.145802 force_rlx_iter=60 E=-29.8621 fnorm=0.138224 force_rlx_iter=61 E=-29.8621 fnorm=0.138224 force_rlx_iter=62 E=-29.8627 fnorm=0.0927194 force_rlx_iter=63 E=-29.8627 fnorm=0.0927194 force_rlx_iter=64 E=-29.8633 fnorm=0.0587317 force_rlx_iter=65 E=-29.8633 fnorm=0.0587317 force_rlx_iter=66 E=-29.8635 fnorm=0.0718047 force_rlx_iter=67 E=-29.8635 fnorm=0.0718047 force_rlx_iter=68 E=-29.8638 fnorm=0.0842552 force_rlx_iter=69 E=-29.8638 fnorm=0.0842552 force_rlx_iter=70 E=-29.8641 fnorm=0.0587966 force_rlx_iter=71 E=-29.8641 fnorm=0.0587966 force_rlx_iter=72 E=-29.8643 fnorm=0.046053 force_rlx_iter=73 E=-29.8643 fnorm=0.046053 force_rlx_iter=74 E=-29.8644 fnorm=0.0454129 force_rlx_iter=75 E=-29.8644 fnorm=0.0454129 force_rlx_iter=76 E=-29.8645 fnorm=0.0607217 force_rlx_iter=77 E=-29.8645 fnorm=0.0607217 force_rlx_iter=78 E=-29.8646 fnorm=0.0262235 force_rlx_iter=79 E=-29.8646 fnorm=0.0262235 force_rlx_iter=80 E=-29.8646 fnorm=0.0211356 force_rlx_iter=81 E=-29.8646 fnorm=0.0211356 force_rlx_iter=82 E=-29.8647 fnorm=0.0224202 force_rlx_iter=83 E=-29.8647 fnorm=0.0224202 force_rlx_iter=84 E=-29.8647 fnorm=0.0241339 force_rlx_iter=85 E=-29.8647 fnorm=0.0241339 force_rlx_iter=86 E=-29.8647 fnorm=0.0448303 force_rlx_iter=87 E=-29.8647 fnorm=0.0132578 force_rlx_iter=88 E=-29.8647 fnorm=0.0132578 force_rlx_iter=89 E=-29.8647 fnorm=0.00517589 force_rlx_iter=90 E=-29.8647 fnorm=0.00517589 force_rlx_iter=91 E=-29.8647 fnorm=0.00493333 force_rlx_iter=92 E=-29.8647 fnorm=0.00493333 force_rlx_iter=93 E=-29.8647 fnorm=0.00470475 force_rlx_iter=94 E=-29.8647 fnorm=0.00470475 force_rlx_iter=95 E=-29.8647 fnorm=0.00282684 force_rlx_iter=96 E=-29.8647 fnorm=0.00282684 force_rlx_iter=97 E=-29.8647 fnorm=0.00201777 force_rlx_iter=98 E=-29.8647 fnorm=0.00201777 force_rlx_iter=99 E=-29.8647 fnorm=0.000957771 force_rlx_iter=100 E=-29.8647 fnorm=0.000957771 force_rlx_iter=101 E=-29.8647 fnorm=0.000805027 force_rlx_iter=102 E=-29.8647 fnorm=0.000805027 Structure 'B1': total-energy: -29.8647 eV atomic-energy: -3.73309 eV/atom total-volume: 79.7291 A^3 atomic-volume: 9.96614 A^3/atom ------------------------------------------------------- -------------------------------------------------------