From 56475229060040c22a53a60c5e042dc5d55cd355 Mon Sep 17 00:00:00 2001
From: Axel Kohlmeyer <akohlmey@gmail.com>
Date: Tue, 28 Nov 2017 12:34:23 -0500
Subject: [PATCH] various small cosmetic adjustments to increase conformance
 with LAMMPS programming conventions

---
 .../USER/misc/extep/{input => in.extep-bn}    |   2 +-
 .../misc/extep/log.23Oct17.extep-bn.g++.1     | 180 ++++++++++++++++++
 .../misc/extep/log.23Oct17.extep-bn.g++.4     | 180 ++++++++++++++++++
 potentials/BN.extep                           |   7 +-
 src/.gitignore                                |   6 +
 src/USER-MISC/README                          |   1 +
 src/USER-MISC/pair_extep.cpp                  | 139 ++++++++------
 src/USER-MISC/pair_extep.h                    |   0
 8 files changed, 449 insertions(+), 66 deletions(-)
 rename examples/USER/misc/extep/{input => in.extep-bn} (98%)
 create mode 100644 examples/USER/misc/extep/log.23Oct17.extep-bn.g++.1
 create mode 100644 examples/USER/misc/extep/log.23Oct17.extep-bn.g++.4
 mode change 100755 => 100644 src/USER-MISC/pair_extep.cpp
 mode change 100755 => 100644 src/USER-MISC/pair_extep.h

diff --git a/examples/USER/misc/extep/input b/examples/USER/misc/extep/in.extep-bn
similarity index 98%
rename from examples/USER/misc/extep/input
rename to examples/USER/misc/extep/in.extep-bn
index d5e81eb82b..bb7ed0ea28 100644
--- a/examples/USER/misc/extep/input
+++ b/examples/USER/misc/extep/in.extep-bn
@@ -19,7 +19,7 @@ pair_coeff      * * ../../../../potentials/BN.extep B N
 
 # Output 
 thermo          10
-thermo_style    custom step time etotal pe temp lx ly lz pxx pyy pzz spcpu
+thermo_style    custom step time etotal pe temp lx ly lz pxx pyy pzz
 thermo_modify   line one format float %14.8g
 
 # Setup NPT MD run
diff --git a/examples/USER/misc/extep/log.23Oct17.extep-bn.g++.1 b/examples/USER/misc/extep/log.23Oct17.extep-bn.g++.1
new file mode 100644
index 0000000000..392e5c4f0e
--- /dev/null
+++ b/examples/USER/misc/extep/log.23Oct17.extep-bn.g++.1
@@ -0,0 +1,180 @@
+LAMMPS (23 Oct 2017)
+  using 1 OpenMP thread(s) per MPI task
+# Initialization
+units           metal
+boundary        p p p
+atom_style      atomic
+processors      * * 1
+
+# System and atom definition
+read_data       BN.data     # read lammps data file
+  orthogonal box = (0 0 0) to (21.75 12.5574 50)
+  1 by 1 by 1 MPI processor grid
+  reading atoms ...
+  100 atoms
+
+# Neighbor update settings
+neighbor        2.0 bin
+neigh_modify    every 1
+neigh_modify    delay 0
+neigh_modify    check yes
+
+# Potential
+pair_style      extep
+pair_coeff      * * ../../../../potentials/BN.extep B N
+Reading potential file ../../../../potentials/BN.extep with DATE: 2017-11-28
+
+# Output
+thermo          10
+thermo_style    custom step time etotal pe temp lx ly lz pxx pyy pzz
+thermo_modify   line one format float %14.8g
+
+# Setup NPT MD run
+timestep        0.0001 # ps
+velocity        all create 300.0 12345
+fix             thermos all npt temp 300 300 1.0 x 0 0 1.0 y 0 0 1.0
+run 1000
+Neighbor list info ...
+  update every 1 steps, delay 0 steps, check yes
+  max neighbors/atom: 2000, page size: 100000
+  master list distance cutoff = 4.2
+  ghost atom cutoff = 4.2
+  binsize = 2.1, bins = 11 6 24
+  1 neighbor lists, perpetual/occasional/extra = 1 0 0
+  (1) pair extep, perpetual
+      attributes: full, newton on, ghost
+      pair build: full/bin/ghost
+      stencil: full/ghost/bin/3d
+      bin: standard
+Per MPI rank memory allocation (min/avg/max) = 2.97 | 2.97 | 2.97 Mbytes
+Step Time TotEng PotEng Temp Lx Ly Lz Pxx Pyy Pzz 
+       0              0     -665.11189     -668.95092            300          21.75      12.557368             50     -1638.8315     -1636.7368      321.73163 
+      10          0.001     -665.11194     -668.81065      289.03491      21.749944      12.557333             50     -1391.3771     -1841.1723      316.66669 
+      20          0.002      -665.1121      -668.4273      259.06599      21.749789      12.557222             50     -1137.0171     -1980.5977      301.79466 
+      30          0.003     -665.11237     -667.90117      217.93027      21.749552      12.557029             50     -912.51949      -2055.822      278.00774 
+      40          0.004     -665.11278     -667.36471      175.97662       21.74925      12.556752             50     -755.38643     -2078.0669      246.62816 
+      50          0.005     -665.11333     -666.94254      142.94321      21.748894      12.556389             50     -694.93153     -2062.1349      209.26356 
+      60          0.006     -665.11405     -666.71476      125.08741      21.748487       12.55594             50      -744.6962     -2019.9093      167.70563 
+      70          0.007     -665.11494     -666.69555      123.51632      21.748026      12.555408             50     -898.67863     -1956.2845      123.88845 
+      80          0.008       -665.116     -666.83408      134.25892        21.7475      12.554796             50     -1132.5952      -1868.738       79.87581 
+      90          0.009      -665.1172     -667.03647      149.98053      21.746893      12.554106             50     -1409.6896     -1750.4875      37.821017 
+     100           0.01     -665.11853     -667.20002      162.65705      21.746185      12.553344             50     -1689.1599     -1595.9411    -0.14399002 
+     110          0.011     -665.11997     -667.24752      166.25742      21.745356      12.552516             50     -1934.6334     -1406.3665     -32.091026 
+     120          0.012     -665.12148     -667.15088      158.58671      21.744389       12.55163             50     -2120.4014     -1193.6117      -56.50543 
+     130          0.013     -665.12306     -666.93754       141.7922      21.743271      12.550694             50     -2234.0841     -980.32815      -72.45885 
+     140          0.014      -665.1247     -666.67903       121.4631      21.741993      12.549719             50     -2275.5656     -796.26701     -79.693692 
+     150          0.015      -665.1264     -666.46562      104.65306      21.740553       12.54871             50       -2253.08      -671.5409     -78.603431 
+     160          0.016      -665.1282     -666.37541      97.462619      21.738952      12.547674             50     -2178.0108     -628.83531     -70.130423 
+     170          0.017     -665.13011     -666.44775      102.96665      21.737195      12.546611             50     -2060.2073     -677.02227     -55.623931 
+     180          0.018     -665.13215     -666.67004      120.17784      21.735292       12.54552             50       -1905.36     -808.22824     -36.699042 
+     190          0.019     -665.13431     -666.98201      144.38814      21.733253      12.544396             50     -1715.2526      -999.2481     -15.117617 
+     200           0.02     -665.13656     -667.29591      168.74214      21.731091      12.543231             50     -1490.6934      -1216.735      7.3107732 
+     210          0.021     -665.13885     -667.52511      186.47391      21.728823      12.542015             50     -1235.9283     -1424.4324      28.822782 
+     220          0.022     -665.14112     -667.61153       193.0492      21.726467      12.540741             50     -962.70697     -1590.2885      47.801678 
+     230          0.023     -665.14332     -667.54317      187.53534      21.724043      12.539402             50     -692.12856     -1691.6537      62.881768 
+     240          0.024      -665.1454     -667.35665      172.79772       21.72157      12.537993             50     -453.02755     -1717.6064      73.041858 
+     250          0.025     -665.14735     -667.12424      154.48373      21.719064      12.536514             50     -276.81709     -1668.3598      77.670868 
+     260          0.026     -665.14918     -666.92939      139.11409      21.716539      12.534967             50     -190.03656     -1552.4049       76.59734 
+     270          0.027     -665.15091     -666.83859      131.88391         21.714      12.533357             50     -206.85537     -1382.4915      70.085105 
+     280          0.028     -665.15258     -666.87889      134.90214      21.711446       12.53169             50     -324.01795     -1171.7578      58.801327 
+     290          0.029     -665.15421     -667.02881      146.49028      21.708869      12.529975             50      -520.0146     -931.26466      43.758636 
+     300           0.03      -665.1558     -667.22646      161.81084      21.706255      12.528222             50     -758.87113     -669.74523      26.225956 
+     310          0.031     -665.15734     -667.39183      174.61368      21.703587      12.526442             50     -997.42782     -395.56111       7.601897 
+     320          0.032     -665.15878     -667.45546      179.47345      21.700849      12.524646             50     -1193.9402     -119.86797     -10.744258 
+     330          0.033     -665.16008     -667.38312      173.71901      21.698026      12.522846             50     -1315.6446       140.7451     -27.638433 
+     340          0.034     -665.16118     -667.18792      158.37888      21.695112      12.521051             50     -1343.5396      363.95099     -42.231049 
+     350          0.035     -665.16207     -666.92571      137.81938      21.692103      12.519271             50     -1273.6625      524.73453     -54.046178 
+     360          0.036     -665.16274     -666.67543      118.20885      21.689004      12.517514             50     -1115.1514      601.37143     -62.932702 
+     370          0.037      -665.1632      -666.5115      105.36258      21.685827      12.515781             50     -886.11568      582.42087     -68.942158 
+     380          0.038     -665.16348     -666.47849      102.76116      21.682589      12.514072             50     -608.71321      472.04732     -72.193259 
+     390          0.039      -665.1636     -666.57728      110.47178      21.679308      12.512382             50     -304.85697      291.41908     -72.787214 
+     400           0.04     -665.16356     -666.76741      125.33244      21.676006      12.510704             50      6.3732307      75.407852     -70.806087 
+     410          0.041     -665.16336     -666.98363      142.24457      21.672705       12.50903             50      309.23046     -134.40319     -66.378966 
+     420          0.042     -665.16298     -667.15939      156.00935      21.669426      12.507351             50      590.16982     -298.16702     -59.767469 
+     430          0.043     -665.16239     -667.24843      163.01313       21.66619       12.50566             50      836.19535     -385.22443     -51.420249 
+     440          0.044     -665.16157     -667.23746       162.2204      21.663014      12.503955             50       1033.943      -378.7816     -41.969885 
+     450          0.045      -665.1605     -667.14707      155.24066      21.659911      12.502234             50      1170.3399     -277.11556     -32.175503 
+     460          0.046     -665.15917      -667.0218      145.55489      21.656891      12.500503             50      1234.9026     -91.620499     -22.833423 
+     470          0.047     -665.15761     -666.91366      137.22578       21.65396      12.498768             50      1222.9519      157.31306     -14.680548 
+     480          0.048     -665.15585     -666.86462      133.53159      21.651114      12.497041             50      1138.5551       445.2926     -8.3071781 
+     490          0.049     -665.15393     -666.89359       135.9458       21.64835      12.495333             50      996.00682      748.51842     -4.0872169 
+     500           0.05     -665.15188     -666.99142      143.75058      21.645657      12.493655             50      819.08561      1046.9785     -2.1306918 
+     510          0.051     -665.14975     -667.12519      154.36991      21.643022       12.49202             50      637.99022      1325.7112     -2.2650822 
+     520          0.052     -665.14756        -667.25      164.29491      21.640432       12.49044             50      484.54509      1574.1916     -4.0528391 
+     530          0.053     -665.14531     -667.32459      170.29969      21.637878      12.488923             50      386.77357      1784.4858     -6.8479114 
+     540          0.054       -665.143     -667.32552      170.55254      21.635352       12.48748             50      364.14599      1949.2189     -9.8841824 
+     550          0.055     -665.14064     -667.25527      165.24765      21.632853      12.486117             50       424.6565      2060.4607      -12.37851 
+     560          0.056     -665.13822     -667.14127      156.52756      21.630385      12.484837             50       564.3912      2110.2547      -13.62742 
+     570          0.057     -665.13576      -667.0259      147.70502      21.627958      12.483643             50      769.54354      2092.8157     -13.082914 
+     580          0.058     -665.13327     -666.95107      142.05154      21.625586      12.482535             50      1020.1218      2007.6508     -10.405617 
+     590          0.059     -665.13079     -666.94279      141.59877      21.623287      12.481508             50      1294.1274      1862.3568     -5.5031153 
+     600           0.06     -665.12832     -667.00189      146.40928      21.621079      12.480557             50      1570.9478      1673.8456      1.4410957 
+     610          0.061     -665.12591     -667.10417      154.59072      21.618982      12.479674             50      1833.1388      1467.2639      9.9561573 
+     620          0.062     -665.12355     -667.20973      163.02368      21.617015      12.478851             50      2066.4951      1272.6732      19.310607 
+     630          0.063     -665.12128     -667.27744      168.49239      21.615193       12.47808             50      2259.0193      1120.2758       28.59477 
+     640          0.064     -665.11911     -667.27898       168.7823      21.613531      12.477355             50       2399.792      1035.3525        36.8539 
+     650          0.065     -665.11707     -667.20773      163.37438      21.612037      12.476673             50      2478.6675      1034.0481      43.239368 
+     660          0.066     -665.11518      -667.0802      153.55598      21.610718      12.476033             50      2487.2505      1120.8274      47.131883 
+     670          0.067     -665.11345     -666.93026      141.97434      21.609573      12.475439             50      2420.9786      1288.0136      48.201717 
+     680          0.068     -665.11191     -666.79864      131.80955      21.608598      12.474897             50      2281.6131      1517.4002      46.399066 
+     690          0.069     -665.11056     -666.72065      125.82027      21.607784      12.474418             50      2079.2055      1783.5346      41.895586 
+     700           0.07     -665.10941     -666.71578       125.5291      21.607116      12.474011             50      1832.7039      2057.9076      35.011051 
+     710          0.071     -665.10848     -666.78203      130.77932      21.606577      12.473687             50      1568.7275      2313.0601      26.153491 
+     720          0.072     -665.10776     -666.89681      139.80468      21.606148      12.473458             50      1318.5189      2525.6808      15.783637 
+     730          0.073     -665.10727      -667.0243      149.80574      21.605812       12.47333             50      1113.5537      2678.1859      4.3967762 
+     740          0.074     -665.10701     -667.12698      157.85016      21.605555      12.473311             50        980.633      2758.9123     -7.4930622 
+     750          0.075     -665.10697     -667.17729      161.78497      21.605368      12.473404             50      937.45086      2761.5936     -19.376492 
+     760          0.076     -665.10714      -667.1654      160.84249      21.605247      12.473609             50       989.5724      2684.9256     -30.776106 
+     770          0.077      -665.1075     -667.10061      155.75086      21.605196      12.473922             50      1129.4775      2532.7048     -41.263677 
+     780          0.078     -665.10803     -667.00654      148.35835      21.605226      12.474338             50      1337.8663      2314.4556     -50.455407 
+     790          0.079     -665.10869     -666.91242       140.9515      21.605349      12.474848             50      1586.9099      2045.9808     -57.988114 
+     800           0.08     -665.10946     -666.84375      135.52533      21.605585      12.475441             50      1844.7038      1749.1281     -63.495405 
+     810          0.081     -665.11032     -666.81538      133.24173       21.60595      12.476105             50      2079.9601      1450.3113      -66.60795 
+     820          0.082     -665.11127     -666.82877      134.21424      21.606461      12.476828             50      2266.0059      1177.7937     -66.990929 
+     830          0.083      -665.1123     -666.87353       137.6312      21.607131      12.477599             50      2383.4351      958.19752     -64.411861 
+     840          0.084     -665.11343     -666.93214      142.12323      21.607968      12.478409             50      2421.1969      812.91475     -58.816538 
+     850          0.085     -665.11467     -666.98597       146.2321      21.608975      12.479253             50      2376.3483      755.06052     -50.389393 
+     860          0.086     -665.11603     -667.02075      148.84448      21.610149      12.480128             50      2252.9811      787.43069     -39.585062 
+     870          0.087      -665.1175     -667.03045      149.48743      21.611481      12.481034             50       2060.884      901.76342     -27.129117 
+     880          0.088     -665.11907     -667.01838      148.42091      21.612958      12.481978             50      1814.3354      1079.4855     -13.988401 
+     890          0.089     -665.12073     -666.99552      146.50471      21.614562      12.482966             50      1531.1565      1293.9709      -1.305884 
+     900           0.09     -665.12247     -666.97639      144.87389      21.616275      12.484007             50      1231.9005      1514.0741      9.7083525 
+     910          0.091     -665.12426     -666.97371      144.52455      21.618074      12.485109             50      938.90089       1708.364      17.929974 
+     920          0.092     -665.12609     -666.99389      145.95889       21.61994      12.486281             50      674.90767      1849.2415      22.497207 
+     930          0.093     -665.12794     -667.03498      149.02559      21.621853      12.487528             50      461.18604      1916.1468      22.971745 
+     940          0.094     -665.12977     -667.08777      153.00718        21.6238      12.488852             50      315.19601      1897.3867       19.43758 
+     950          0.095     -665.13156     -667.13925       156.8903       21.62577      12.490254             50      248.20946      1790.5667      12.504818 
+     960          0.096     -665.13326     -667.17668      159.68273      21.627757      12.491728             50      263.35912      1601.9528      3.2123256 
+     970          0.097     -665.13485     -667.19079       160.6611      21.629764      12.493267             50      354.58496      1345.1489     -7.1487162 
+     980          0.098     -665.13628     -667.17758       159.5175      21.631796      12.494862             50       506.7626       1039.346     -17.249179 
+     990          0.099     -665.13753     -667.13942      156.43758      21.633864      12.496499             50      697.06054      707.26671      -25.92737 
+    1000            0.1     -665.13859      -667.0853      152.12472      21.635982      12.498164             50      897.38498      372.94791     -32.344697 
+Loop time of 0.463574 on 1 procs for 1000 steps with 100 atoms
+
+Performance: 18.638 ns/day, 1.288 hours/ns, 2157.152 timesteps/s
+99.0% CPU use with 1 MPI tasks x 1 OpenMP threads
+
+MPI task timing breakdown:
+Section |  min time  |  avg time  |  max time  |%varavg| %total
+---------------------------------------------------------------
+Pair    | 0.44776    | 0.44776    | 0.44776    |   0.0 | 96.59
+Neigh   | 0          | 0          | 0          |   0.0 |  0.00
+Comm    | 0.0023057  | 0.0023057  | 0.0023057  |   0.0 |  0.50
+Output  | 0.0015752  | 0.0015752  | 0.0015752  |   0.0 |  0.34
+Modify  | 0.010602   | 0.010602   | 0.010602   |   0.0 |  2.29
+Other   |            | 0.001331   |            |       |  0.29
+
+Nlocal:    100 ave 100 max 100 min
+Histogram: 1 0 0 0 0 0 0 0 0 0
+Nghost:    360 ave 360 max 360 min
+Histogram: 1 0 0 0 0 0 0 0 0 0
+Neighs:    0 ave 0 max 0 min
+Histogram: 1 0 0 0 0 0 0 0 0 0
+FullNghs:  1800 ave 1800 max 1800 min
+Histogram: 1 0 0 0 0 0 0 0 0 0
+
+Total # of neighbors = 1800
+Ave neighs/atom = 18
+Neighbor list builds = 0
+Dangerous builds = 0
+Total wall time: 0:00:00
diff --git a/examples/USER/misc/extep/log.23Oct17.extep-bn.g++.4 b/examples/USER/misc/extep/log.23Oct17.extep-bn.g++.4
new file mode 100644
index 0000000000..c5c9236649
--- /dev/null
+++ b/examples/USER/misc/extep/log.23Oct17.extep-bn.g++.4
@@ -0,0 +1,180 @@
+LAMMPS (23 Oct 2017)
+  using 1 OpenMP thread(s) per MPI task
+# Initialization
+units           metal
+boundary        p p p
+atom_style      atomic
+processors      * * 1
+
+# System and atom definition
+read_data       BN.data     # read lammps data file
+  orthogonal box = (0 0 0) to (21.75 12.5574 50)
+  2 by 2 by 1 MPI processor grid
+  reading atoms ...
+  100 atoms
+
+# Neighbor update settings
+neighbor        2.0 bin
+neigh_modify    every 1
+neigh_modify    delay 0
+neigh_modify    check yes
+
+# Potential
+pair_style      extep
+pair_coeff      * * ../../../../potentials/BN.extep B N
+Reading potential file ../../../../potentials/BN.extep with DATE: 2017-11-28
+
+# Output
+thermo          10
+thermo_style    custom step time etotal pe temp lx ly lz pxx pyy pzz
+thermo_modify   line one format float %14.8g
+
+# Setup NPT MD run
+timestep        0.0001 # ps
+velocity        all create 300.0 12345
+fix             thermos all npt temp 300 300 1.0 x 0 0 1.0 y 0 0 1.0
+run 1000
+Neighbor list info ...
+  update every 1 steps, delay 0 steps, check yes
+  max neighbors/atom: 2000, page size: 100000
+  master list distance cutoff = 4.2
+  ghost atom cutoff = 4.2
+  binsize = 2.1, bins = 11 6 24
+  1 neighbor lists, perpetual/occasional/extra = 1 0 0
+  (1) pair extep, perpetual
+      attributes: full, newton on, ghost
+      pair build: full/bin/ghost
+      stencil: full/ghost/bin/3d
+      bin: standard
+Per MPI rank memory allocation (min/avg/max) = 2.943 | 2.943 | 2.943 Mbytes
+Step Time TotEng PotEng Temp Lx Ly Lz Pxx Pyy Pzz 
+       0              0     -665.11189     -668.95092            300          21.75      12.557368             50     -1638.8315     -1636.7368      321.73163 
+      10          0.001     -665.11194     -668.81065      289.03491      21.749944      12.557333             50     -1391.3771     -1841.1723      316.66669 
+      20          0.002      -665.1121      -668.4273      259.06599      21.749789      12.557222             50     -1137.0171     -1980.5977      301.79466 
+      30          0.003     -665.11237     -667.90117      217.93027      21.749552      12.557029             50     -912.51949      -2055.822      278.00774 
+      40          0.004     -665.11278     -667.36471      175.97662       21.74925      12.556752             50     -755.38643     -2078.0669      246.62816 
+      50          0.005     -665.11333     -666.94254      142.94321      21.748894      12.556389             50     -694.93153     -2062.1349      209.26356 
+      60          0.006     -665.11405     -666.71476      125.08741      21.748487       12.55594             50      -744.6962     -2019.9093      167.70563 
+      70          0.007     -665.11494     -666.69555      123.51632      21.748026      12.555408             50     -898.67863     -1956.2845      123.88845 
+      80          0.008       -665.116     -666.83408      134.25892        21.7475      12.554796             50     -1132.5952      -1868.738       79.87581 
+      90          0.009      -665.1172     -667.03647      149.98053      21.746893      12.554106             50     -1409.6896     -1750.4875      37.821017 
+     100           0.01     -665.11853     -667.20002      162.65705      21.746185      12.553344             50     -1689.1599     -1595.9411    -0.14399002 
+     110          0.011     -665.11997     -667.24752      166.25742      21.745356      12.552516             50     -1934.6334     -1406.3665     -32.091026 
+     120          0.012     -665.12148     -667.15088      158.58671      21.744389       12.55163             50     -2120.4014     -1193.6117      -56.50543 
+     130          0.013     -665.12306     -666.93754       141.7922      21.743271      12.550694             50     -2234.0841     -980.32815      -72.45885 
+     140          0.014      -665.1247     -666.67903       121.4631      21.741993      12.549719             50     -2275.5656     -796.26701     -79.693692 
+     150          0.015      -665.1264     -666.46562      104.65306      21.740553       12.54871             50       -2253.08      -671.5409     -78.603431 
+     160          0.016      -665.1282     -666.37541      97.462619      21.738952      12.547674             50     -2178.0108     -628.83531     -70.130423 
+     170          0.017     -665.13011     -666.44775      102.96665      21.737195      12.546611             50     -2060.2073     -677.02227     -55.623931 
+     180          0.018     -665.13215     -666.67004      120.17784      21.735292       12.54552             50       -1905.36     -808.22824     -36.699042 
+     190          0.019     -665.13431     -666.98201      144.38814      21.733253      12.544396             50     -1715.2526      -999.2481     -15.117617 
+     200           0.02     -665.13656     -667.29591      168.74214      21.731091      12.543231             50     -1490.6934      -1216.735      7.3107732 
+     210          0.021     -665.13885     -667.52511      186.47391      21.728823      12.542015             50     -1235.9283     -1424.4324      28.822782 
+     220          0.022     -665.14112     -667.61153       193.0492      21.726467      12.540741             50     -962.70697     -1590.2885      47.801678 
+     230          0.023     -665.14332     -667.54317      187.53534      21.724043      12.539402             50     -692.12856     -1691.6537      62.881768 
+     240          0.024      -665.1454     -667.35665      172.79772       21.72157      12.537993             50     -453.02755     -1717.6064      73.041858 
+     250          0.025     -665.14735     -667.12424      154.48373      21.719064      12.536514             50     -276.81709     -1668.3598      77.670868 
+     260          0.026     -665.14918     -666.92939      139.11409      21.716539      12.534967             50     -190.03656     -1552.4049       76.59734 
+     270          0.027     -665.15091     -666.83859      131.88391         21.714      12.533357             50     -206.85537     -1382.4915      70.085105 
+     280          0.028     -665.15258     -666.87889      134.90214      21.711446       12.53169             50     -324.01795     -1171.7578      58.801327 
+     290          0.029     -665.15421     -667.02881      146.49028      21.708869      12.529975             50      -520.0146     -931.26466      43.758636 
+     300           0.03      -665.1558     -667.22646      161.81084      21.706255      12.528222             50     -758.87113     -669.74523      26.225956 
+     310          0.031     -665.15734     -667.39183      174.61368      21.703587      12.526442             50     -997.42782     -395.56111       7.601897 
+     320          0.032     -665.15878     -667.45546      179.47345      21.700849      12.524646             50     -1193.9402     -119.86797     -10.744258 
+     330          0.033     -665.16008     -667.38312      173.71901      21.698026      12.522846             50     -1315.6446       140.7451     -27.638433 
+     340          0.034     -665.16118     -667.18792      158.37888      21.695112      12.521051             50     -1343.5396      363.95099     -42.231049 
+     350          0.035     -665.16207     -666.92571      137.81938      21.692103      12.519271             50     -1273.6625      524.73453     -54.046178 
+     360          0.036     -665.16274     -666.67543      118.20885      21.689004      12.517514             50     -1115.1514      601.37143     -62.932702 
+     370          0.037      -665.1632      -666.5115      105.36258      21.685827      12.515781             50     -886.11568      582.42087     -68.942158 
+     380          0.038     -665.16348     -666.47849      102.76116      21.682589      12.514072             50     -608.71321      472.04732     -72.193259 
+     390          0.039      -665.1636     -666.57728      110.47178      21.679308      12.512382             50     -304.85697      291.41908     -72.787214 
+     400           0.04     -665.16356     -666.76741      125.33244      21.676006      12.510704             50      6.3732307      75.407852     -70.806087 
+     410          0.041     -665.16336     -666.98363      142.24457      21.672705       12.50903             50      309.23046     -134.40319     -66.378966 
+     420          0.042     -665.16298     -667.15939      156.00935      21.669426      12.507351             50      590.16982     -298.16702     -59.767469 
+     430          0.043     -665.16239     -667.24843      163.01313       21.66619       12.50566             50      836.19535     -385.22443     -51.420249 
+     440          0.044     -665.16157     -667.23746       162.2204      21.663014      12.503955             50       1033.943      -378.7816     -41.969885 
+     450          0.045      -665.1605     -667.14707      155.24066      21.659911      12.502234             50      1170.3399     -277.11556     -32.175503 
+     460          0.046     -665.15917      -667.0218      145.55489      21.656891      12.500503             50      1234.9026     -91.620499     -22.833423 
+     470          0.047     -665.15761     -666.91366      137.22578       21.65396      12.498768             50      1222.9519      157.31306     -14.680548 
+     480          0.048     -665.15585     -666.86462      133.53159      21.651114      12.497041             50      1138.5551       445.2926     -8.3071781 
+     490          0.049     -665.15393     -666.89359       135.9458       21.64835      12.495333             50      996.00682      748.51842     -4.0872169 
+     500           0.05     -665.15188     -666.99142      143.75058      21.645657      12.493655             50      819.08561      1046.9785     -2.1306918 
+     510          0.051     -665.14975     -667.12519      154.36991      21.643022       12.49202             50      637.99022      1325.7112     -2.2650822 
+     520          0.052     -665.14756        -667.25      164.29491      21.640432       12.49044             50      484.54509      1574.1916     -4.0528391 
+     530          0.053     -665.14531     -667.32459      170.29969      21.637878      12.488923             50      386.77357      1784.4858     -6.8479114 
+     540          0.054       -665.143     -667.32552      170.55254      21.635352       12.48748             50      364.14599      1949.2189     -9.8841824 
+     550          0.055     -665.14064     -667.25527      165.24765      21.632853      12.486117             50       424.6565      2060.4607      -12.37851 
+     560          0.056     -665.13822     -667.14127      156.52756      21.630385      12.484837             50       564.3912      2110.2547      -13.62742 
+     570          0.057     -665.13576      -667.0259      147.70502      21.627958      12.483643             50      769.54354      2092.8157     -13.082914 
+     580          0.058     -665.13327     -666.95107      142.05154      21.625586      12.482535             50      1020.1218      2007.6508     -10.405617 
+     590          0.059     -665.13079     -666.94279      141.59877      21.623287      12.481508             50      1294.1274      1862.3568     -5.5031153 
+     600           0.06     -665.12832     -667.00189      146.40928      21.621079      12.480557             50      1570.9478      1673.8456      1.4410957 
+     610          0.061     -665.12591     -667.10417      154.59072      21.618982      12.479674             50      1833.1388      1467.2639      9.9561573 
+     620          0.062     -665.12355     -667.20973      163.02368      21.617015      12.478851             50      2066.4951      1272.6732      19.310607 
+     630          0.063     -665.12128     -667.27744      168.49239      21.615193       12.47808             50      2259.0193      1120.2758       28.59477 
+     640          0.064     -665.11911     -667.27898       168.7823      21.613531      12.477355             50       2399.792      1035.3525        36.8539 
+     650          0.065     -665.11707     -667.20773      163.37438      21.612037      12.476673             50      2478.6675      1034.0481      43.239368 
+     660          0.066     -665.11518      -667.0802      153.55598      21.610718      12.476033             50      2487.2505      1120.8274      47.131883 
+     670          0.067     -665.11345     -666.93026      141.97434      21.609573      12.475439             50      2420.9786      1288.0136      48.201717 
+     680          0.068     -665.11191     -666.79864      131.80955      21.608598      12.474897             50      2281.6131      1517.4002      46.399066 
+     690          0.069     -665.11056     -666.72065      125.82027      21.607784      12.474418             50      2079.2055      1783.5346      41.895586 
+     700           0.07     -665.10941     -666.71578       125.5291      21.607116      12.474011             50      1832.7039      2057.9076      35.011051 
+     710          0.071     -665.10848     -666.78203      130.77932      21.606577      12.473687             50      1568.7275      2313.0601      26.153491 
+     720          0.072     -665.10776     -666.89681      139.80468      21.606148      12.473458             50      1318.5189      2525.6808      15.783637 
+     730          0.073     -665.10727      -667.0243      149.80574      21.605812       12.47333             50      1113.5537      2678.1859      4.3967762 
+     740          0.074     -665.10701     -667.12698      157.85016      21.605555      12.473311             50        980.633      2758.9123     -7.4930622 
+     750          0.075     -665.10697     -667.17729      161.78497      21.605368      12.473404             50      937.45086      2761.5936     -19.376492 
+     760          0.076     -665.10714      -667.1654      160.84249      21.605247      12.473609             50       989.5724      2684.9256     -30.776106 
+     770          0.077      -665.1075     -667.10061      155.75086      21.605196      12.473922             50      1129.4775      2532.7048     -41.263677 
+     780          0.078     -665.10803     -667.00654      148.35835      21.605226      12.474338             50      1337.8663      2314.4556     -50.455407 
+     790          0.079     -665.10869     -666.91242       140.9515      21.605349      12.474848             50      1586.9099      2045.9808     -57.988114 
+     800           0.08     -665.10946     -666.84375      135.52533      21.605585      12.475441             50      1844.7038      1749.1281     -63.495405 
+     810          0.081     -665.11032     -666.81538      133.24173       21.60595      12.476105             50      2079.9601      1450.3113      -66.60795 
+     820          0.082     -665.11127     -666.82877      134.21424      21.606461      12.476828             50      2266.0059      1177.7937     -66.990929 
+     830          0.083      -665.1123     -666.87353       137.6312      21.607131      12.477599             50      2383.4351      958.19752     -64.411861 
+     840          0.084     -665.11343     -666.93214      142.12323      21.607968      12.478409             50      2421.1969      812.91475     -58.816538 
+     850          0.085     -665.11467     -666.98597       146.2321      21.608975      12.479253             50      2376.3483      755.06052     -50.389393 
+     860          0.086     -665.11603     -667.02075      148.84448      21.610149      12.480128             50      2252.9811      787.43069     -39.585062 
+     870          0.087      -665.1175     -667.03045      149.48743      21.611481      12.481034             50       2060.884      901.76342     -27.129117 
+     880          0.088     -665.11907     -667.01838      148.42091      21.612958      12.481978             50      1814.3354      1079.4855     -13.988401 
+     890          0.089     -665.12073     -666.99552      146.50471      21.614562      12.482966             50      1531.1565      1293.9709      -1.305884 
+     900           0.09     -665.12247     -666.97639      144.87389      21.616275      12.484007             50      1231.9005      1514.0741      9.7083525 
+     910          0.091     -665.12426     -666.97371      144.52455      21.618074      12.485109             50      938.90089       1708.364      17.929974 
+     920          0.092     -665.12609     -666.99389      145.95889       21.61994      12.486281             50      674.90767      1849.2415      22.497207 
+     930          0.093     -665.12794     -667.03498      149.02559      21.621853      12.487528             50      461.18604      1916.1468      22.971745 
+     940          0.094     -665.12977     -667.08777      153.00718        21.6238      12.488852             50      315.19601      1897.3867       19.43758 
+     950          0.095     -665.13156     -667.13925       156.8903       21.62577      12.490254             50      248.20946      1790.5667      12.504818 
+     960          0.096     -665.13326     -667.17668      159.68273      21.627757      12.491728             50      263.35912      1601.9528      3.2123256 
+     970          0.097     -665.13485     -667.19079       160.6611      21.629764      12.493267             50      354.58496      1345.1489     -7.1487162 
+     980          0.098     -665.13628     -667.17758       159.5175      21.631796      12.494862             50       506.7626       1039.346     -17.249179 
+     990          0.099     -665.13753     -667.13942      156.43758      21.633864      12.496499             50      697.06054      707.26671      -25.92737 
+    1000            0.1     -665.13859      -667.0853      152.12472      21.635982      12.498164             50      897.38498      372.94791     -32.344697 
+Loop time of 0.174508 on 4 procs for 1000 steps with 100 atoms
+
+Performance: 49.511 ns/day, 0.485 hours/ns, 5730.393 timesteps/s
+98.8% CPU use with 4 MPI tasks x 1 OpenMP threads
+
+MPI task timing breakdown:
+Section |  min time  |  avg time  |  max time  |%varavg| %total
+---------------------------------------------------------------
+Pair    | 0.12409    | 0.12834    | 0.13408    |   1.1 | 73.54
+Neigh   | 0          | 0          | 0          |   0.0 |  0.00
+Comm    | 0.016369   | 0.021358   | 0.025324   |   2.7 | 12.24
+Output  | 0.0023892  | 0.0025101  | 0.0028272  |   0.4 |  1.44
+Modify  | 0.01733    | 0.018302   | 0.018958   |   0.5 | 10.49
+Other   |            | 0.003995   |            |       |  2.29
+
+Nlocal:    25 ave 26 max 24 min
+Histogram: 2 0 0 0 0 0 0 0 0 2
+Nghost:    179 ave 180 max 178 min
+Histogram: 2 0 0 0 0 0 0 0 0 2
+Neighs:    0 ave 0 max 0 min
+Histogram: 4 0 0 0 0 0 0 0 0 0
+FullNghs:  450 ave 468 max 432 min
+Histogram: 2 0 0 0 0 0 0 0 0 2
+
+Total # of neighbors = 1800
+Ave neighs/atom = 18
+Neighbor list builds = 0
+Dangerous builds = 0
+Total wall time: 0:00:00
diff --git a/potentials/BN.extep b/potentials/BN.extep
index fd5e653fb5..1b9f46c768 100644
--- a/potentials/BN.extep
+++ b/potentials/BN.extep
@@ -1,7 +1,8 @@
-# B and N mixture, parameterized for Tersoff potential
-# values are from Los et al. PhysRevB.96.184108 (2017)
+# DATE: 2017-11-28 CONTRIBUTOR: J.H. Los, J.M.H. Kroes CITATION: Los et al. Phys. Rev. B 96, 184108 (2017)
 
-# Tersoff parameters for various elements and mixtures
+# B and N mixture, parameterized for ExTeP potential
+
+# ExTeP 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
diff --git a/src/.gitignore b/src/.gitignore
index 8d99776096..13fb446225 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -1083,10 +1083,16 @@
 /pair_born_coul_long_cs.h
 /pair_born_coul_dsf_cs.cpp
 /pair_born_coul_dsf_cs.h
+/pair_born_coul_wolf_cs.cpp
+/pair_born_coul_wolf_cs.h
 /pair_buck_coul_long_cs.cpp
 /pair_buck_coul_long_cs.h
 /pair_coul_long_cs.cpp
 /pair_coul_long_cs.h
+/pair_coul_wolf_cs.cpp
+/pair_coul_wolf_cs.h
+/pair_extep.cpp
+/pair_extep.h
 /pair_lj_cut_thole_long.cpp
 /pair_lj_cut_thole_long.h
 /pair_plum_hb.cpp
diff --git a/src/USER-MISC/README b/src/USER-MISC/README
index 5af5b22eb7..a8c33fa380 100644
--- a/src/USER-MISC/README
+++ b/src/USER-MISC/README
@@ -63,6 +63,7 @@ pair_style coul/diel, Axel Kohlmeyer, akohlmey at gmail.com, 1 Dec 11
 pair_style dipole/sf, Mario Orsi, orsimario at gmail.com, 8 Aug 11
 pair_style edip, Luca Ferraro, luca.ferraro at caspur.it, 15 Sep 11
 pair_style eam/cd, Alexander Stukowski, stukowski at mm.tu-darmstadt.de, 7 Nov 09
+pair_style extep, Jaap Kroes (Radboud U), jaapkroes at gmail dot com, 28 Nov 17
 pair_style gauss/cut, Axel Kohlmeyer, akohlmey at gmail.com, 1 Dec 11
 pair_style lennard/mdf, Paolo Raiteri, p.raiteri at curtin.edu.au, 2 Dec 15
 pair_style list, Axel Kohlmeyer (Temple U), akohlmey at gmail.com, 1 Jun 13
diff --git a/src/USER-MISC/pair_extep.cpp b/src/USER-MISC/pair_extep.cpp
old mode 100755
new mode 100644
index 13ca404de3..cf859a28f8
--- a/src/USER-MISC/pair_extep.cpp
+++ b/src/USER-MISC/pair_extep.cpp
@@ -15,10 +15,10 @@
    Contributing author: Jan Los
 ------------------------------------------------------------------------- */
 
-#include "math.h"
-#include "stdio.h"
-#include "stdlib.h"
-#include "string.h"
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
 #include "pair_extep.h"
 #include "atom.h"
 #include "neighbor.h"
@@ -100,7 +100,7 @@ PairExTeP::~PairExTeP()
 void PairExTeP::SR_neigh()
 {
   int i,j,ii,jj,n,allnum,jnum,itype,jtype,iparam_ij;
-  double xtmp,ytmp,ztmp,delx,dely,delz,rsq,dS;
+  double xtmp,ytmp,ztmp,delx,dely,delz,rsq;
   int *ilist,*jlist,*numneigh,**firstneigh;
   int *neighptr;
 
@@ -140,7 +140,7 @@ void PairExTeP::SR_neigh()
     xtmp = x[i][0];
     ytmp = x[i][1];
     ztmp = x[i][2];
-  
+
     Nt[i] = 0.0;
     Nd[i] = 0.0;
 
@@ -162,7 +162,7 @@ void PairExTeP::SR_neigh()
         neighptr[n++] = j;
         double tmp_fc = ters_fc(sqrt(rsq),&params[iparam_ij]);
         Nt[i] += tmp_fc;
-        if(itype!=jtype) {
+        if (itype!=jtype) {
           Nd[i] += tmp_fc;
         }
       }
@@ -184,7 +184,7 @@ void PairExTeP::compute(int eflag, int vflag)
   int itype,jtype,ktype,iparam_ij,iparam_ijk;
   tagint itag,jtag;
   double xtmp,ytmp,ztmp,delx,dely,delz,evdwl,fpair;
-  double rsq,rsq1,rsq2,r,r2;
+  double rsq,rsq1,rsq2,r2;
   double delr1[3],delr2[3],fi[3],fj[3],fk[3];
   double zeta_ij,prefactor;
   int *ilist,*jlist,*numneigh,**firstneigh;
@@ -281,10 +281,10 @@ void PairExTeP::compute(int eflag, int vflag)
       zeta_ij = 0.0;
 
       /* F_IJ (1) */
-        // compute correction to energy and forces
-        // dE/dr = -Fij(Zi,Zj) dV/dr
-        //         - dFij/dZi dZi/dr V
-        //         (conjugate term is computed when j is a central atom) 
+      // compute correction to energy and forces
+      // dE/dr = -Fij(Zi,Zj) dV/dr
+      //         - dFij/dZi dZi/dr V
+      //         (conjugate term is computed when j is a central atom)
 
       double FXY, dFXY_dNdij, dFXY_dNdji, fa, fa_d, deng, fpair;
       double Ntij = Nt[i];
@@ -296,14 +296,14 @@ void PairExTeP::compute(int eflag, int vflag)
 
       Ntij -= fc_ij;
       Ntji -= fc_ij;
-      if(jtype!=itype) {
+      if (jtype!=itype) {
         Ndij -= fc_ij;
         Ndji -= fc_ij;
       }
-      if(Ntij<0) { Ntij=0.; }
-      if(Ndij<0) { Ndij=0.; }
-      if(Ntji<0) { Ntji=0.; } 
-      if(Ndji<0) { Ndji=0.; } 
+      if (Ntij<0) { Ntij=0.; }
+      if (Ndij<0) { Ndij=0.; }
+      if (Ntji<0) { Ntji=0.; }
+      if (Ndji<0) { Ndji=0.; }
       FXY = F_corr(itype, jtype, Ndij, Ndji, &dFXY_dNdij, &dFXY_dNdji);
 
       // envelop functions
@@ -350,7 +350,7 @@ void PairExTeP::compute(int eflag, int vflag)
         /* F_IJ (2) */
         // compute force components due to spline derivatives
         // uses only the part with FXY_x (FXY_y is done when i and j are inversed)
-        int iparam_ik = elem2param[itype][ktype][0]; 
+        int iparam_ik = elem2param[itype][ktype][0];
         double fc_ik_d = ters_fc_d(r2,&params[iparam_ik]);
         double fc_prefac_ik_0 = 1.0 * fc_ik_d * fa / r2;
         double fc_prefac_ik = dFc_dNtij * fc_prefac_ik_0;
@@ -706,7 +706,7 @@ void PairExTeP::read_file(char *file)
       error->all(FLERR,"Illegal ExTeP parameter");
 
     nparams++;
-		if(nparams >= pow(atom->ntypes,3)) break;
+    if (nparams >= pow(atom->ntypes,3)) break;
   }
 
   // deallocate words array
@@ -719,18 +719,18 @@ void PairExTeP::read_file(char *file)
   words = new char*[params_per_line+1];
 
   // intialize F_corr_data to all zeros
-  for(int iel=0;iel<atom->ntypes;iel++)
-    for(int jel=0;jel<atom->ntypes;jel++)
-      for(int in=0;in<4;in++)
-        for(int jn=0;jn<4;jn++)
-          for(int ivar=0;ivar<3;ivar++)
+  for (int iel=0;iel<atom->ntypes;iel++)
+    for (int jel=0;jel<atom->ntypes;jel++)
+      for (int in=0;in<4;in++)
+        for (int jn=0;jn<4;jn++)
+          for (int ivar=0;ivar<3;ivar++)
             F_corr_data[iel][jel][in][jn][ivar]=0;
 
   // loop until EOF
   while (1) {
     if (comm->me == 0) {
       ptr = fgets(line,MAXLINE,fp);
-			//fputs(line,stdout);
+      //fputs(line,stdout);
       if (ptr == NULL) {
         eof = 1;
         fclose(fp);
@@ -759,7 +759,8 @@ void PairExTeP::read_file(char *file)
     // ielement,jelement = 1st args
     // if all 3 args are in element list, then parse this line
     // else skip to next line
-    // these lines set ielement and jelement to the integers matching the strings from the input
+    // these lines set ielement and jelement to the
+    // integers matching the strings from the input
 
     for (ielement = 0; ielement < nelements; ielement++)
       if (strcmp(words[0],elements[ielement]) == 0) break;
@@ -775,8 +776,9 @@ void PairExTeP::read_file(char *file)
     double spline_dery = atof(words[6]);
 
     // Set value for all pairs of ielement,jelement  (any kelement)
-	  for(int iparam = 0; iparam < nparams; iparam++) {
-	    if( ielement == params[iparam].ielement && jelement == params[iparam].jelement) {
+    for (int iparam = 0; iparam < nparams; iparam++) {
+      if ( ielement == params[iparam].ielement
+           && jelement == params[iparam].jelement) {
         F_corr_data[ielement][jelement][Ni][Nj][0] = spline_val;
         F_corr_data[ielement][jelement][Ni][Nj][1] = spline_derx;
         F_corr_data[ielement][jelement][Ni][Nj][2] = spline_dery;
@@ -785,7 +787,7 @@ void PairExTeP::read_file(char *file)
         F_corr_data[jelement][ielement][Nj][Ni][1] = spline_dery;
         F_corr_data[jelement][ielement][Nj][Ni][2] = spline_derx;
       }
-	  }
+    }
   }
 
   delete [] words;
@@ -821,7 +823,6 @@ void PairExTeP::setup()
         elem2param[i][j][k] = n;
       }
 
-
   // compute parameter values derived from inputs
 
   for (m = 0; m < nparams; m++) {
@@ -993,10 +994,10 @@ double PairExTeP::ters_bij_d(double zeta, Param *param)
 /* ---------------------------------------------------------------------- */
 
 void PairExTeP::ters_zetaterm_d(double prefactor,
-                                  double *rij_hat, double rij,
-                                  double *rik_hat, double rik,
-                                  double *dri, double *drj, double *drk,
-                                  Param *param)
+                                double *rij_hat, double rij,
+                                double *rik_hat, double rik,
+                                double *dri, double *drj, double *drk,
+                                Param *param)
 {
   double gijk,gijk_d,ex_delr,ex_delr_d,fc,dfc,cos_theta,tmp;
   double dcosdri[3],dcosdrj[3],dcosdrk[3];
@@ -1052,8 +1053,8 @@ void PairExTeP::ters_zetaterm_d(double prefactor,
 /* ---------------------------------------------------------------------- */
 
 void PairExTeP::costheta_d(double *rij_hat, double rij,
-                             double *rik_hat, double rik,
-                             double *dri, double *drj, double *drk)
+                           double *rik_hat, double rik,
+                           double *dri, double *drj, double *drk)
 {
   // first element is devative wrt Ri, second wrt Rj, third wrt Rk
 
@@ -1074,10 +1075,10 @@ void PairExTeP::costheta_d(double *rij_hat, double rij,
 // initialize spline for F_corr (based on PairLCBOP::F_conj)
 
 void PairExTeP::spline_init() {
-  for( size_t iel=0; iel<atom->ntypes; iel++) {
-    for( size_t jel=0; jel<atom->ntypes; jel++) {
-      for( size_t N_ij=0; N_ij<4; N_ij++ ) {
-        for( size_t N_ji=0; N_ji<4; N_ji++ ) {
+  for ( size_t iel=0; iel<atom->ntypes; iel++) {
+    for ( size_t jel=0; jel<atom->ntypes; jel++) {
+      for ( size_t N_ij=0; N_ij<4; N_ij++ ) {
+        for ( size_t N_ji=0; N_ji<4; N_ji++ ) {
           TF_corr_param &f = F_corr_param[iel][jel][N_ij][N_ji];
 
           // corner points for each spline function
@@ -1096,7 +1097,6 @@ void PairExTeP::spline_init() {
           f.f_y_01 = -(F_corr_data[iel][jel][N_ij  ][N_ji+1][2] - f.f_01 + f.f_00);
           f.f_y_10 =   F_corr_data[iel][jel][N_ij+1][N_ji  ][2] - f.f_11 + f.f_10;
           f.f_y_11 = -(F_corr_data[iel][jel][N_ij+1][N_ji+1][2] - f.f_11 + f.f_10);
-
         }
       }
     }
@@ -1113,7 +1113,7 @@ double PairExTeP::envelop_function(double x, double y, double *func_der) {
   if (x <= 3.0) {
     fx = 1.0;
     dfx = 0.0;
-    if(x < 1.0 && y < 1.0) { 
+    if (x < 1.0 && y < 1.0) {
       double gx=(1.0-x);
       double gy=(1.0-y);
       double gxsq=gx*gx;
@@ -1122,22 +1122,22 @@ double PairExTeP::envelop_function(double x, double y, double *func_der) {
       dfxydx = 2.0*gx*gysq;
     }
   } else if (x < 4.0) {
-      del = 4.0-x;
-      delsq = del*del;
-      fx = (3.0-2.0*del)*delsq;
-      dfx = - 6.0*del*(1.0-del);
-  } else { 
-      fx = 0.0;
-      dfx = 0.0;
+    del = 4.0-x;
+    delsq = del*del;
+    fx = (3.0-2.0*del)*delsq;
+    dfx = - 6.0*del*(1.0-del);
+  } else {
+    fx = 0.0;
+    dfx = 0.0;
   }
   if (y <= 3.0) {
     fy = 1.0;
   } else if (y < 4.0) {
-      del = 4.0-y;
-      delsq = del*del;
-      fy = (3.0-2.0*del)*delsq;
-  } else { 
-      fy = 0.0;
+    del = 4.0-y;
+    delsq = del*del;
+    fy = (3.0-2.0*del)*delsq;
+  } else {
+    fy = 0.0;
   }
 
   double func_val = fxy*fx*fy;
@@ -1147,22 +1147,38 @@ double PairExTeP::envelop_function(double x, double y, double *func_der) {
 }
 
 double PairExTeP::F_corr(int iel, int jel, double Ndij, double Ndji, double *dFN_x, double *dFN_y ) {
-  
+
   // compute F_XY
 
   size_t Ndij_int         = static_cast<size_t>( floor( Ndij ) );
   size_t Ndji_int         = static_cast<size_t>( floor( Ndji ) );
   double x                = Ndij - Ndij_int;
   double y                = Ndji - Ndji_int;
-  const TF_corr_param &f  = F_corr_param[iel][jel][Ndij_int][Ndji_int];
+  TF_corr_param &f  = F_corr_param[iel][jel][Ndij_int][Ndji_int];
   double F   = 0;
   double dF_dx = 0, dF_dy = 0;
   double l, r;
-  if(Ndij_int < 4 && Ndji_int < 4) {
-      l = (1-y)* (1-x);   r = ( f.f_00 + x*     x*   f.f_x_10   + y*     y*   f.f_y_01 );    F += l*r;   dF_dx += -(1-y)*r +l*2*x*    f.f_x_10;    dF_dy += -(1-x)*r +l*2*y*    f.f_y_01;
-      l = (1-y)*  x;      r = ( f.f_10 + (1-x)*(1-x)*f.f_x_00   + y*     y*   f.f_y_11 );    F += l*r;   dF_dx +=  (1-y)*r -l*2*(1-x)*f.f_x_00;    dF_dy += -x*    r +l*2*y*    f.f_y_11;
-      l = y*     (1-x);   r = ( f.f_01 + x*     x*   f.f_x_11   + (1-y)*(1-y)*f.f_y_00 );    F += l*r;   dF_dx += -y*    r +l*2*x*    f.f_x_11;    dF_dy +=  (1-x)*r -l*2*(1-y)*f.f_y_00;
-      l = y*      x;      r = ( f.f_11 + (1-x)*(1-x)*f.f_x_01   + (1-y)*(1-y)*f.f_y_10 );    F += l*r;   dF_dx +=  y*    r -l*2*(1-x)*f.f_x_01;    dF_dy +=  x*    r -l*2*(1-y)*f.f_y_10;
+  if (Ndij_int < 4 && Ndji_int < 4) {
+    l = (1-y)* (1-x);
+    r = ( f.f_00 + x*x* f.f_x_10 + y*y* f.f_y_01 );
+    F += l*r;
+    dF_dx += -(1-y)*r +l*2*x* f.f_x_10;
+    dF_dy += -(1-x)*r +l*2*y* f.f_y_01;
+    l = (1-y)*x;
+    r = ( f.f_10 + (1-x)*(1-x)*f.f_x_00 + y*  y* f.f_y_11 );
+    F += l*r;
+    dF_dx += (1-y)*r -l*2*(1-x)*f.f_x_00;
+    dF_dy += -x*r +l*2*y* f.f_y_11;
+    l = y*  (1-x);
+    r = ( f.f_01 + x*x* f.f_x_11 + (1-y)*(1-y)*f.f_y_00 );
+    F += l*r;
+    dF_dx += -y*r +l*2*x* f.f_x_11;
+    dF_dy += (1-x)*r -l*2*(1-y)*f.f_y_00;
+    l = y*  x;
+    r = ( f.f_11 + (1-x)*(1-x)*f.f_x_01 + (1-y)*(1-y)*f.f_y_10 );
+    F += l*r;
+    dF_dx += y*r -l*2*(1-x)*f.f_x_01;
+    dF_dy += x*r -l*2*(1-y)*f.f_y_10;
   }
   double result = F;
   *dFN_x = dF_dx;
@@ -1171,4 +1187,3 @@ double PairExTeP::F_corr(int iel, int jel, double Ndij, double Ndji, double *dFN
   return result;
 }
 /* F_IJ (4) */
-
diff --git a/src/USER-MISC/pair_extep.h b/src/USER-MISC/pair_extep.h
old mode 100755
new mode 100644
-- 
GitLab