Fitting a pair potential with a user defined function

This example demonstrates the (ab)use of the embedded atom method (EAM) potential. A pair potential of the generalized Morse form is fitted to the lattice constant, bulk modulus, and cohesive energy of copper in the face-centered cubic (FCC) crystal structure. The example also illustrates the use of XML Inclusions. Note that the final potential is not particularly good, which is unsurprising given the fact that a pair potential form is being used with a limited number of parameters.

Location

examples/fitting_pair_potential

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
    <?xml version="1.0" encoding="iso-8859-1"?>
    <job>
    
      <name>Fitting an EAM potential for copper</name>
      
      <verbosity>medium</verbosity>
      
      <fitting>
        <BFGS conv-threshold="1e-5" max-iter="200" />
      </fitting>
      
      <atom-types>
        <species>Cu</species>
      </atom-types>
      
      <potentials>
        <xi:include href="potential.xml"
    		xmlns:xi="http://www.w3.org/2003/XInclude" />
      </potentials>
      
      <structures>
        <xi:include href="structures.xml"
    		xmlns:xi="http://www.w3.org/2003/XInclude" />
      </structures>
    
    </job>
    
  • potential.xml: initial parameter set (included in main input file via XML Inclusions)

     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
    <eam id='Cu pair potential' species-a='*' species-b='*'>
    
      <export-functions>Cu_potential</export-functions>
    
      <mapping>
        <pair-interaction species-a='*' species-b='*' function='V' />
      </mapping>
    
      <functions>
    
        <user-function id='V'>
          <input-var>r</input-var>
          <expression>
    	D0 / (S-1) * exp(-beta * sqrt(2.0 * S) * (r-r0) )
    	- S * D0 / (S-1) * exp(-beta * sqrt(2.0 / S) * (r-r0) )
          </expression>
          <derivative>
    	- beta * ( sqrt(2 * S) * D0 / (S - 1)
    	* exp(-beta * sqrt(2 * S) * (r - r0) )
            - sqrt(2 / S) * S * D0 / (S - 1)
    	* exp(- beta * sqrt(2/S) * (r - r0) ) )
          </derivative>
          <param name='D0'>0.2</param>
          <param name='beta'>1.5</param>
          <param name='r0'>2.63</param>
          <param name='S'>1.84</param>
          <fit-dof>
    	<D0/>
    	<r0/>
    	<beta/>
          </fit-dof>
          <screening>
    	<user-function id='cutoff function'>
    	  <cutoff>5.5</cutoff>
    	  <input-var>r</input-var>
    	  <expression>
    	    1 - 1/(1 + ((r - cutoff) / h)^4)
    	  </expression>
    	  <derivative>
    	    4 * h^4 * (r - cutoff)^3 / ((h^4 + (r - cutoff)^4)^2)
    	  </derivative>
    	  <param name='h'>0.5</param>
    	</user-function>
          </screening>
        </user-function>
    
      </functions>
    
    </eam>
    
  • structures.xml: input structures (included in main input file via XML Inclusions)

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    <group>
    
      <fcc-lattice id="FCC">
        <atom-type>Cu</atom-type>
        <lattice-parameter>3.615</lattice-parameter>
        <properties>
          <lattice-parameter fit='true' target='3.615' relative-weight='4'/>
          <atomic-energy fit='true' target='-3.540' relative-weight='4'/>
          <bulk-modulus fit='true' target='138'/>
          <C11 target='170.0'/>
          <C12 target='122.5'/>
          <C44 target= '75.8'/>
        </properties>
      </fcc-lattice>
    
    </group>
    

Output (files)

  • Cu_potential.V.table: pair potential suitable for plotting

      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
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    # 1st col: index
    # 2nd col: x
    # 3rd col: y
    # 4th col: derivative
    
     0 0.2 351.883 -1010.26
     1 0.2265 326.086 -937.589
     2 0.253 302.146 -870.092
     3 0.2795 279.929 -807.407
     4 0.306 259.314 -749.191
     5 0.3325 240.185 -695.129
     6 0.359 222.438 -644.924
     7 0.3855 205.972 -598.304
     8 0.412 190.698 -555.014
     9 0.4385 176.529 -514.818
     10 0.465 163.387 -477.496
     11 0.4915 151.199 -442.844
     12 0.518 139.895 -410.673
     13 0.5445 129.413 -380.805
     14 0.571 119.693 -353.078
     15 0.5975 110.682 -327.339
     16 0.624 102.328 -303.447
     17 0.6505 94.584 -281.27
     18 0.677 87.4065 -260.687
     19 0.7035 80.7545 -241.583
     20 0.73 74.5904 -223.854
     21 0.7565 68.879 -207.401
     22 0.783 63.5877 -192.134
     23 0.8095 58.6862 -177.968
     24 0.836 54.1463 -164.824
     25 0.8625 49.9421 -152.63
     26 0.889 46.0492 -141.317
     27 0.9155 42.445 -130.823
     28 0.942 39.1088 -121.09
     29 0.9685 36.0211 -112.062
     30 0.995 33.1638 -103.689
     31 1.0215 30.5202 -95.9247
     32 1.048 28.0748 -88.7252
     33 1.0745 25.8131 -82.0501
     34 1.101 23.7218 -75.8617
     35 1.1275 21.7884 -70.1251
     36 1.154 20.0015 -64.8079
     37 1.1805 18.3502 -59.8799
     38 1.207 16.8247 -55.3131
     39 1.2335 15.4156 -51.0816
     40 1.26 14.1146 -47.1612
     41 1.2865 12.9135 -43.5294
     42 1.313 11.8052 -40.1656
     43 1.3395 10.7826 -37.0502
     44 1.366 9.83946 -34.1654
     45 1.3925 8.96992 -31.4946
     46 1.419 8.16849 -29.0221
     47 1.4455 7.43012 -26.7337
     48 1.472 6.7501 -24.616
     49 1.4985 6.12408 -22.6565
     50 1.525 5.54801 -20.8439
     51 1.5515 5.01815 -19.1673
     52 1.578 4.53103 -17.617
     53 1.6045 4.08342 -16.1837
     54 1.631 3.67233 -14.8588
     55 1.6575 3.29501 -13.6344
     56 1.684 2.94889 -12.5032
     57 1.7105 2.63158 -11.4583
     58 1.737 2.34089 -10.4934
     59 1.7635 2.07478 -9.60258
     60 1.79 1.83135 -8.78043
     61 1.8165 1.60885 -8.02186
     62 1.843 1.40567 -7.32217
     63 1.8695 1.2203 -6.67701
     64 1.896 1.05134 -6.08232
     65 1.9225 0.897522 -5.53437
     66 1.949 0.757641 -5.02966
     67 1.9755 0.630597 -4.56497
     68 2.002 0.515371 -4.13731
     69 2.0285 0.411018 -3.7439
     70 2.055 0.316664 -3.38217
     71 2.0815 0.231504 -3.04973
     72 2.108 0.15479 -2.74437
     73 2.1345 0.0858312 -2.46405
     74 2.161 0.0239908 -2.20685
     75 2.1875 -0.0313208 -1.97103
     76 2.214 -0.0806481 -1.75495
     77 2.2405 -0.124494 -1.55709
     78 2.267 -0.163322 -1.37605
     79 2.2935 -0.197562 -1.21055
     80 2.32 -0.227608 -1.05937
     81 2.3465 -0.253825 -0.921399
     82 2.373 -0.27655 -0.795614
     83 2.3995 -0.296092 -0.681058
     84 2.426 -0.312737 -0.576848
     85 2.4525 -0.326749 -0.482165
     86 2.479 -0.338369 -0.396255
     87 2.5055 -0.347822 -0.318416
     88 2.532 -0.355311 -0.248003
     89 2.5585 -0.361026 -0.184415
     90 2.585 -0.36514 -0.127101
     91 2.6115 -0.367813 -0.0755472
     92 2.638 -0.369191 -0.0292818
     93 2.6645 -0.369408 0.0121324
     94 2.691 -0.368587 0.0490992
     95 2.7175 -0.366842 0.0819914
     96 2.744 -0.364275 0.111153
     97 2.7705 -0.360981 0.136903
     98 2.797 -0.357046 0.159533
     99 2.8235 -0.352551 0.179315
     100 2.85 -0.347566 0.196497
     101 2.8765 -0.342157 0.211311
     102 2.903 -0.336385 0.223967
     103 2.9295 -0.330304 0.234662
     104 2.956 -0.323964 0.243576
     105 2.9825 -0.317409 0.250873
     106 3.009 -0.31068 0.256706
     107 3.0355 -0.303815 0.261216
     108 3.062 -0.296847 0.26453
     109 3.0885 -0.289805 0.266769
     110 3.115 -0.282716 0.26804
     111 3.1415 -0.275606 0.268443
     112 3.168 -0.268496 0.26807
     113 3.1945 -0.261405 0.267005
     114 3.221 -0.25435 0.265324
     115 3.2475 -0.247347 0.263098
     116 3.274 -0.24041 0.260391
     117 3.3005 -0.23355 0.257263
     118 3.327 -0.226778 0.253766
     119 3.3535 -0.220103 0.249951
     120 3.38 -0.213533 0.245861
     121 3.4065 -0.207075 0.241537
     122 3.433 -0.200734 0.237017
     123 3.4595 -0.194514 0.232334
     124 3.486 -0.188421 0.227518
     125 3.5125 -0.182457 0.222597
     126 3.539 -0.176624 0.217597
     127 3.5655 -0.170925 0.212539
     128 3.592 -0.16536 0.207445
     129 3.6185 -0.15993 0.202332
     130 3.645 -0.154636 0.197217
     131 3.6715 -0.149478 0.192115
     132 3.698 -0.144454 0.187038
     133 3.7245 -0.139564 0.182
     134 3.751 -0.134808 0.17701
     135 3.7775 -0.130182 0.172077
     136 3.804 -0.125687 0.167209
     137 3.8305 -0.12132 0.162415
     138 3.857 -0.117078 0.1577
     139 3.8835 -0.112961 0.15307
     140 3.91 -0.108965 0.148529
     141 3.9365 -0.105088 0.144083
     142 3.963 -0.101327 0.139734
     143 3.9895 -0.097681 0.135485
     144 4.016 -0.0941458 0.13134
     145 4.0425 -0.0907191 0.1273
     146 4.069 -0.087398 0.123368
     147 4.0955 -0.0841796 0.119545
     148 4.122 -0.0810611 0.115833
     149 4.1485 -0.0780395 0.112234
     150 4.175 -0.0751117 0.108748
     151 4.2015 -0.0722748 0.105376
     152 4.228 -0.0695258 0.102121
     153 4.2545 -0.0668614 0.0989824
     154 4.281 -0.0642786 0.0959629
     155 4.3075 -0.0617743 0.0930638
     156 4.334 -0.0593452 0.0902867
     157 4.3605 -0.056988 0.087634
     158 4.387 -0.0546995 0.0851082
     159 4.4135 -0.0524761 0.0827123
     160 4.44 -0.0503145 0.0804497
     161 4.4665 -0.0482111 0.0783247
     162 4.493 -0.0461621 0.0763419
     163 4.5195 -0.0441636 0.0745067
     164 4.546 -0.0422118 0.0728251
     165 4.5725 -0.0403025 0.071304
     166 4.599 -0.0384313 0.0699504
     167 4.6255 -0.0365936 0.0687717
     168 4.652 -0.0347847 0.0677754
     169 4.6785 -0.0329998 0.0669678
     170 4.705 -0.0312337 0.0663537
     171 4.7315 -0.0294814 0.0659344
     172 4.758 -0.0277375 0.0657062
     173 4.7845 -0.0259973 0.0656571
     174 4.811 -0.0242563 0.0657639
     175 4.8375 -0.0225108 0.0659872
     176 4.864 -0.0207585 0.0662667
     177 4.8905 -0.0189989 0.0665164
     178 4.917 -0.0172344 0.0666205
     179 4.9435 -0.0154706 0.0664326
     180 4.97 -0.0137176 0.0657803
     181 4.9965 -0.01199 0.0644776
     182 5.023 -0.0103076 0.0623473
     183 5.0495 -0.00869415 0.0592528
     184 5.076 -0.00717626 0.055134
     185 5.1025 -0.00578071 0.0500387
     186 5.129 -0.00453137 0.0441373
     187 5.1555 -0.00344608 0.0377116
     188 5.182 -0.00253416 0.031116
     189 5.2085 -0.00179515 0.0247206
     190 5.235 -0.00121929 0.0188515
     191 5.2615 -0.000789239 0.0137466
     192 5.288 -0.000482796 0.00953506
     193 5.3145 -0.000275746 0.0062417
     194 5.341 -0.000144375 0.00380814
     195 5.3675 -6.73101e-05 0.00212131
     196 5.394 -2.65902e-05 0.00104062
     197 5.4205 -8.10173e-06 0.000419336
     198 5.447 -1.53971e-06 0.000118464
     199 5.4735 -9.2548e-08 1.41062e-05
     200 5.5 -0 0
    
  • 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
    This is program version 0.1.6
    Reading job file main.xml
    -------------------------------------------------------
    Parsing input file(s)
    -------------------------------------------------------
    -------------------------------------------------------
    Potential parameters being optimized (#dof=3):
       elemental EAM potential[EAM].V[user-function].D0: 0.2
       elemental EAM potential[EAM].V[user-function].beta: 1.5
       elemental EAM potential[EAM].V[user-function].r0: 2.63
    -------------------------------------------------------
    -------------------------------------------------------
    Number of properties being fitted: 3
    -------------------------------------------------------
      iter= 1 residual= 14077.2 grad= 142826
      iter= 2 residual= 467034 grad= 2.33932e+06
      iter= 3 residual= 1463.38 grad= 27202.1
      iter= 4 residual= 1463.38 grad= 27202.1
      iter= 5 residual= 914.83 grad= 11131.5
      iter= 6 residual= 914.83 grad= 11131.5
      iter= 7 residual= 695.498 grad= 12252
      iter= 8 residual= 96.1781 grad= 9763.98
      iter= 9 residual= 96.1781 grad= 9763.98
      iter= 10 residual= 16.3463 grad= 3264.58
    -------------------------------------------------------
    Potential parameters being optimized (#dof=3):
       elemental EAM potential[EAM].V[user-function].D0: 0.421798
       elemental EAM potential[EAM].V[user-function].beta: 1.5293
       elemental EAM potential[EAM].V[user-function].r0: 2.76538
    -------------------------------------------------------
      iter= 11 residual= 16.3463 grad= 3264.58
      iter= 12 residual= 17.2543 grad= 3555.34
      iter= 13 residual= 7.98951 grad= 1445.09
      iter= 14 residual= 7.98951 grad= 1445.09
      iter= 15 residual= 8.90514 grad= 2132.15
      iter= 16 residual= 7.56993 grad= 1323.44
      iter= 17 residual= 7.56993 grad= 1323.44
      iter= 18 residual= 10.5635 grad= 2330.62
      iter= 19 residual= 6.97667 grad= 898.806
      iter= 20 residual= 6.97667 grad= 898.806
    -------------------------------------------------------
    Potential parameters being optimized (#dof=3):
       elemental EAM potential[EAM].V[user-function].D0: 0.424874
       elemental EAM potential[EAM].V[user-function].beta: 1.52458
       elemental EAM potential[EAM].V[user-function].r0: 2.76091
    -------------------------------------------------------
      iter= 21 residual= 7.0202 grad= 537.2
      iter= 22 residual= 6.97784 grad= 1497.81
      iter= 23 residual= 6.97561 grad= 987.668
      iter= 24 residual= 6.97797 grad= 1786.67
      iter= 25 residual= 6.97688 grad= 373.522
      iter= 26 residual= 6.97569 grad= 1531.91
      iter= 27 residual= 6.97569 grad= 1531.91
      iter= 28 residual= 114.257 grad= 10793.4
      iter= 29 residual= 7.12217 grad= 1337.44
      iter= 30 residual= 6.97273 grad= 538.562
    -------------------------------------------------------
    Potential parameters being optimized (#dof=3):
       elemental EAM potential[EAM].V[user-function].D0: 0.424779
       elemental EAM potential[EAM].V[user-function].beta: 1.52381
       elemental EAM potential[EAM].V[user-function].r0: 2.76096
    -------------------------------------------------------
      iter= 31 residual= 6.97273 grad= 538.562
      iter= 32 residual= 6.81371 grad= 264.436
      iter= 33 residual= 6.81371 grad= 264.436
      iter= 34 residual= 6.79466 grad= 601.69
      iter= 35 residual= 6.79466 grad= 601.69
      iter= 36 residual= 7.8179 grad= 875.562
      iter= 37 residual= 6.80111 grad= 473.237
      iter= 38 residual= 6.7948 grad= 901.646
      iter= 39 residual= 6.79405 grad= 400.6
      iter= 40 residual= 6.7953 grad= 711.802
    -------------------------------------------------------
    Potential parameters being optimized (#dof=3):
       elemental EAM potential[EAM].V[user-function].D0: 0.424077
       elemental EAM potential[EAM].V[user-function].beta: 1.52379
       elemental EAM potential[EAM].V[user-function].r0: 2.76089
    -------------------------------------------------------
      iter= 41 residual= 6.79581 grad= 592.135
      iter= 42 residual= 6.79527 grad= 842.651
      iter= 43 residual= 6.79412 grad= 994.064
      iter= 44 residual= 6.79412 grad= 994.064
      iter= 45 residual= 6.7906 grad= 913.106
      iter= 46 residual= 6.7906 grad= 913.106
      iter= 47 residual= 6.76243 grad= 542.524
      iter= 48 residual= 6.76243 grad= 542.524
      iter= 49 residual= 6.82223 grad= 752.146
      iter= 50 residual= 6.76024 grad= 1402.08
    -------------------------------------------------------
    Potential parameters being optimized (#dof=3):
       elemental EAM potential[EAM].V[user-function].D0: 0.42355
       elemental EAM potential[EAM].V[user-function].beta: 1.52278
       elemental EAM potential[EAM].V[user-function].r0: 2.76094
    -------------------------------------------------------
      iter= 51 residual= 6.76223 grad= 1325.41
      iter= 52 residual= 6.76061 grad= 704.579
      iter= 53 residual= 6.76038 grad= 1078.16
      iter= 54 residual= 6.75934 grad= 930.737
      iter= 55 residual= 6.75934 grad= 930.737
      iter= 56 residual= 6.96147 grad= 1045.85
      iter= 57 residual= 6.7702 grad= 792.081
      iter= 58 residual= 6.76002 grad= 1230.7
      iter= 59 residual= 6.76052 grad= 1135.03
      iter= 60 residual= 6.76138 grad= 1151.42
    -------------------------------------------------------
    Potential parameters being optimized (#dof=3):
       elemental EAM potential[EAM].V[user-function].D0: 0.423544
       elemental EAM potential[EAM].V[user-function].beta: 1.52277
       elemental EAM potential[EAM].V[user-function].r0: 2.76095
    -------------------------------------------------------
      iter= 61 residual= 6.76134 grad= 842.388
      iter= 62 residual= 6.76055 grad= 552.923
      iter= 63 residual= 6.75985 grad= 859.367
      iter= 64 residual= 6.75845 grad= 969.45
      iter= 65 residual= 6.76031 grad= 1497
      iter= 66 residual= 6.75959 grad= 1022.64
      iter= 67 residual= 6.75952 grad= 460.327
      iter= 68 residual= 6.75952 grad= 460.327
    -------------------------------------------------------
    Potential parameters being optimized (#dof=3):
       elemental EAM potential[EAM].V[user-function].D0: 0.42355
       elemental EAM potential[EAM].V[user-function].beta: 1.52278
       elemental EAM potential[EAM].V[user-function].r0: 2.76094
    -------------------------------------------------------
    Fitting process complete.
    -------------------------------------------------------
    Computing structure properties
    Structure 'FCC':
       total-energy: -3.53491 eV
       atomic-energy: -3.53491 eV/atom (target: -3.54 eV/atom) Abs. weight: 0.444444; Tolerance: 0.01; Weighted residual: 0.115302
       total-volume: 11.8546 A^3
       atomic-volume: 11.8546 A^3/atom
       bulk-modulus: 153.04 GPa (target: 138 GPa) Abs. weight: 0.111111; Tolerance: 2; Weighted residual: 6.28344
       C11: 201.423 GPa
       C12: 128.859 GPa
       C44: 128.857 GPa
       lattice-parameter: 3.6195 A (target: 3.615 A) Abs. weight: 0.444444; Tolerance: 0.005; Weighted residual: 0.360779 (relaxed) [0:]
    -------------------------------------------------------
    Writing EAM function tables to Cu_potential.*
    -------------------------------------------------------
    

Other files

  • pairpotential_reference.table: the pair potential from the embedded atom method (EAM) potential presented in [MisMehPap01]

      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
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    # pair potential from Mishin's EAM potential (2001)
    # 1st col: index
    # 2nd col: x
    # 3rd col: y
    # 4th col: derivative
    
     0 0.2 8379.04 -50890.7
     1 0.226534 7132.66 -43259.4
     2 0.253068 6073.32 -36763.4
     3 0.279602 5173.15 -31235.8
     4 0.306136 4408.4 -26534.2
     5 0.33267 3758.81 -22536.8
     6 0.359204 3207.12 -19139.7
     7 0.385738 2738.59 -16254.1
     8 0.412272 2340.69 -13804.3
     9 0.438806 2002.75 -11725.5
     10 0.465339 1715.66 -9962.36
     11 0.491873 1471.69 -8467.78
     12 0.518407 1264.27 -7201.46
     13 0.544941 1087.81 -6129.04
     14 0.571475 937.564 -5221.19
     15 0.598009 809.501 -4452.93
     16 0.624543 700.211 -3802.92
     17 0.651077 606.803 -3253.01
     18 0.677611 526.833 -2787.73
     19 0.704145 458.233 -2393.93
     20 0.730679 399.259 -2060.4
     21 0.757213 348.443 -1777.64
     22 0.783747 304.546 -1537.59
     23 0.810281 266.529 -1333.42
     24 0.836815 233.519 -1159.35
     25 0.863349 204.782 -1010.5
     26 0.889883 179.707 -882.781
     27 0.916417 157.779 -772.746
     28 0.942951 138.568 -677.522
     29 0.969485 121.714 -594.718
     30 0.996018 106.915 -522.36
     31 1.02255 93.9159 -458.828
     32 1.04909 82.5 -402.806
     33 1.07562 72.4828 -353.239
     34 1.10215 63.7047 -309.297
     35 1.12869 56.0251 -270.339
     36 1.15522 49.3185 -235.892
     37 1.18176 43.4699 -205.62
     38 1.20829 38.3717 -179.307
     39 1.23482 33.922 -156.659
     40 1.26136 30.0302 -137.166
     41 1.28789 26.619 -120.37
     42 1.31443 23.6221 -105.876
     43 1.34096 20.983 -93.3484
     44 1.36749 18.6535 -82.4975
     45 1.39403 16.5924 -73.0768
     46 1.42056 14.7647 -64.8758
     47 1.4471 13.1404 -57.7145
     48 1.47363 11.694 -51.44
     49 1.50016 10.4039 -45.9222
     50 1.5267 9.25134 -41.0509
     51 1.55323 8.22051 -36.7331
     52 1.57977 7.29779 -32.8903
     53 1.6063 6.47147 -29.4572
     54 1.63283 5.73142 -26.3792
     55 1.65937 5.06884 -23.6115
     56 1.6859 4.476 -21.1174
     57 1.71244 3.94603 -18.8675
     58 1.73897 3.47279 -16.8385
     59 1.7655 3.05065 -15.0126
     60 1.79204 2.67442 -13.3767
     61 1.81857 2.33918 -11.9207
     62 1.8451 2.04038 -10.6273
     63 1.87164 1.77396 -9.47641
     64 1.89817 1.53638 -8.45024
     65 1.92471 1.32455 -7.53348
     66 1.95124 1.13575 -6.71283
     67 1.97777 0.967568 -5.97681
     68 2.00431 0.817908 -5.31549
     69 2.03084 0.684901 -4.72032
     70 2.05738 0.566891 -4.18395
     71 2.08391 0.462404 -3.70008
     72 2.11044 0.370119 -3.26335
     73 2.13698 0.288848 -2.86922
     74 2.16351 0.217513 -2.51385
     75 2.19005 0.155129 -2.19404
     76 2.21658 0.100789 -1.90717
     77 2.24311 0.0536478 -1.65107
     78 2.26965 0.0129159 -1.42364
     79 2.29618 -0.0221292 -1.22194
     80 2.32272 -0.0521329 -1.04321
     81 2.34925 -0.0776711 -0.884964
     82 2.37578 -0.0992577 -0.745002
     83 2.40232 -0.117351 -0.621352
     84 2.42885 -0.13236 -0.512256
     85 2.45539 -0.14465 -0.416144
     86 2.48192 -0.154547 -0.331613
     87 2.50845 -0.16234 -0.257409
     88 2.53499 -0.168288 -0.192413
     89 2.56152 -0.172623 -0.13562
     90 2.58806 -0.17555 -0.0861355
     91 2.61459 -0.177252 -0.0431567
     92 2.64112 -0.177891 -0.00596593
     93 2.66766 -0.177614 0.0260791
     94 2.69419 -0.176548 0.0535531
     95 2.72073 -0.174808 0.0769705
     96 2.74726 -0.172495 0.0967917
     97 2.77379 -0.169699 0.113428
     98 2.80033 -0.1665 0.127249
     99 2.82686 -0.162968 0.138583
     100 2.85339 -0.159165 0.147726
     101 2.87993 -0.155146 0.154939
     102 2.90646 -0.150958 0.16046
     103 2.933 -0.146644 0.164498
     104 2.95953 -0.14224 0.167241
     105 2.98606 -0.137779 0.168855
     106 3.0126 -0.133288 0.169491
     107 3.03913 -0.128791 0.169281
     108 3.06567 -0.124311 0.168343
     109 3.0922 -0.119863 0.166782
     110 3.11873 -0.115465 0.164692
     111 3.14527 -0.111127 0.162156
     112 3.1718 -0.106863 0.159246
     113 3.19834 -0.102679 0.156029
     114 3.22487 -0.0985848 0.15256
     115 3.2514 -0.094585 0.148891
     116 3.27794 -0.0906848 0.145065
     117 3.30447 -0.0868878 0.141123
     118 3.33101 -0.0831965 0.137097
     119 3.35754 -0.0796128 0.133018
     120 3.38407 -0.0761377 0.128912
     121 3.41061 -0.0727717 0.124801
     122 3.43714 -0.0695146 0.120704
     123 3.46368 -0.0663659 0.116638
     124 3.49021 -0.0633245 0.112617
     125 3.51674 -0.0603891 0.108653
     126 3.54328 -0.0575579 0.104756
     127 3.56981 -0.0548292 0.100934
     128 3.59635 -0.0522008 0.0971953
     129 3.62288 -0.0496705 0.0935438
     130 3.64941 -0.0472358 0.0899845
     131 3.67595 -0.0448944 0.0865207
     132 3.70248 -0.0426435 0.0831548
     133 3.72902 -0.0404806 0.0798884
     134 3.75555 -0.0384031 0.0767224
     135 3.78208 -0.0364082 0.0736573
     136 3.80862 -0.0344934 0.0706928
     137 3.83515 -0.0326558 0.0678284
     138 3.86169 -0.030893 0.065063
     139 3.88822 -0.0292022 0.0623954
     140 3.91475 -0.0275809 0.0598239
     141 3.94129 -0.0260266 0.0573468
     142 3.96782 -0.0245369 0.054962
     143 3.99435 -0.0231091 0.0526673
     144 4.02089 -0.0217411 0.0504604
     145 4.04742 -0.0204306 0.0483389
     146 4.07396 -0.0191752 0.0463004
     147 4.10049 -0.0179728 0.0443422
     148 4.12702 -0.0168213 0.0424617
     149 4.15356 -0.0157188 0.0406563
     150 4.18009 -0.0146631 0.0389232
     151 4.20663 -0.0136526 0.0372598
     152 4.23316 -0.0126852 0.0356633
     153 4.25969 -0.0117594 0.0341309
     154 4.28623 -0.0108734 0.0326598
     155 4.31276 -0.0100257 0.0312471
     156 4.3393 -0.00921474 0.0298899
     157 4.36583 -0.00843906 0.0285852
     158 4.39236 -0.00769734 0.0273299
     159 4.4189 -0.00698831 0.0261208
     160 4.44543 -0.00631079 0.0249545
     161 4.47197 -0.00566369 0.0238273
     162 4.4985 -0.00504601 0.0227355
     163 4.52503 -0.00445689 0.0216748
     164 4.55157 -0.00389554 0.0206405
     165 4.5781 -0.00336135 0.0196277
     166 4.60464 -0.0028538 0.0186306
     167 4.63117 -0.00237258 0.0176427
     168 4.6577 -0.00191753 0.0166569
     169 4.68424 -0.00148869 0.015665
     170 4.71077 -0.00108635 0.0146581
     171 4.73731 -0.000711038 0.0136259
     172 4.76384 -0.00036357 0.0125576
     173 4.79037 -4.50522e-05 0.0114418
     174 4.81691 0.000243102 0.0102671
     175 4.84344 0.000499188 0.00902306
     176 4.86998 0.000721253 0.00770177
     177 4.89651 0.00090719 0.00629994
     178 4.92304 0.0010549 0.00482166
     179 4.94958 0.00116251 0.00328152
     180 4.97611 0.00122874 0.00170785
     181 5.00264 0.00125324 0.00014482
     182 5.02918 0.00123705 -0.00134747
     183 5.05571 0.00118299 -0.0026966
     184 5.08225 0.00109589 -0.00382582
     185 5.10878 0.000982528 -0.00466597
     186 5.13531 0.00085127 -0.00516907
     187 5.16185 0.000711345 -0.00531972
     188 5.18838 0.000571892 -0.00514044
     189 5.21492 0.000440972 -0.00468847
     190 5.24145 0.00032478 -0.00404508
     191 5.26798 0.0002272 -0.00330065
     192 5.29452 0.000149758 -0.00254022
     193 5.32105 9.19208e-05 -0.00183278
     194 5.34759 5.15999e-05 -0.00122598
     195 5.37412 2.57372e-05 -0.000745547
     196 5.40065 1.08566e-05 -0.00039786
     197 5.42719 3.52603e-06 -0.000173891
     198 5.45372 7.13171e-07 -5.31468e-05
     199 5.48026 4.55553e-08 -6.83139e-06
     200 5.50679 0 0
    
  • plot_pairpotential.py: a python script that plots a comparison between the pair potential fitted here and the pair potential from the EAM potential in [MisMehPap01]

     1
     2
     3
     4
     5
     6
     7
     8
     9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    # creates: pairpotential.svg
    
    import matplotlib.pyplot as plt
    import numpy as np
    
    x_ref,y_ref = np.loadtxt('pairpotential_reference.table',
                             usecols=(1,2), unpack=True)
    x_fit,y_fit = np.loadtxt('Cu_potential.V.table',
                             usecols=(1,2), unpack=True)
    
    plt.figure(figsize=(4, 3))
    plt.xlabel(r'Pair distance (A)')
    plt.ylabel(r'Pair potential (eV)')
    plt.axis([1.8, 5.5, -0.5, 2])
    plt.plot(x_ref, y_ref,
             color='cornflowerblue',
             linestyle='-',
             label='from EAM potential')
    plt.plot(x_fit, y_fit,
             color='orange',
             linestyle='-',
             label='fitted potential')
    plt.legend()
    plt.savefig('pairpotential.svg', bbox_inches='tight')
    
../_images/pairpotential.svg

Pair interaction from a pure pair and an EAM potential [MisMehPap01].