Commit e284545c authored by vishalkenchan's avatar vishalkenchan
Browse files

added some documentation and reference example

parent 71c4edda
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -9,12 +9,13 @@
pair_style born/coul/long/cs command :h3
pair_style buck/coul/long/cs command :h3
pair_style born/coul/dsf/cs command :h3
pair_style born/coul/wolf/cs command :h3

[Syntax:]

pair_style style args :pre

style = {born/coul/long/cs} or {buck/coul/long/cs} or {born/coul/dsf/cs}
style = {born/coul/long/cs} or {buck/coul/long/cs} or {born/coul/dsf/cs} or {born/coul/wolf/cs}
args = list of arguments for a particular style :ul
  {born/coul/long/cs} args = cutoff (cutoff2)
    cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
@@ -26,6 +27,10 @@ args = list of arguments for a particular style :ul
    alpha = damping parameter (inverse distance units)
    cutoff = global cutoff for non-Coulombic (and Coulombic if only 1 arg) (distance units)
    cutoff2 = global cutoff for Coulombic (distance units) :pre
  {born/coul/wolf/cs} args = alpha cutoff (cutoff2)
    alpha = damping parameter (inverse distance units)
    cutoff = global cutoff for Buckingham (and Coulombic if only 1 arg) (distance units)
    cutoff2 = global cutoff for Coulombic (optional) (distance units)

[Examples:]

@@ -41,6 +46,10 @@ pair_style born/coul/dsf/cs 0.1 10.0 12.0
pair_coeff * *   0.0 1.00 0.00 0.00 0.00
pair_coeff 1 1 480.0 0.25 0.00 1.05 0.50 :pre

pair_style born/coul/wolf/cs 0.25 10.0 12.0
pair_coeff * *   0.0 1.00 0.00 0.00 0.00
pair_coeff 1 1 480.0 0.25 0.00 1.05 0.50 :pre

[Description:]

These pair styles are designed to be used with the adiabatic
@@ -73,13 +82,21 @@ the core and shell, epsilon is the dielectric constant and r_min is the
minimal distance.

The pair style {born/coul/dsf/cs} is identical to the
"pair_style born/coul/dsf"_pair_born.html style, which uses the
"pair_style born/coul/dsf"_pair_born.html style, which uses
the damped shifted force model as in "coul/dsf"_pair_coul.html
to compute the Coulomb contribution. This approach does not require
a long-range solver, thus the only correction is the addition of a
minimal distance to avoid the possible r = 0.0 case for a
core/shell pair.

The pair style {born/coul/wolf/cs} is identical to the
"pair_style born/coul/wolf"_pair_born.html style, which uses
the Wolf summation as in "coul/wolf"_pair_coul.html to compute
the Coulomb contribution. This approach does not require
a long-range solver, thus the only correction is the addition of a
minimal distance to avoid the possible r = 0.0 case for a
core/shell pair.

[Restrictions:]

These pair styles are part of the CORESHELL package.  They are only
+71 −0
Original line number Diff line number Diff line
# Testsystem for core-shell model compared to Mitchel and Finchham
# Shamelessly copied from in.coreshell.dsf but this script uses Wolf summation.

# ------------------------ INITIALIZATION ----------------------------

units 		metal
dimension	3
boundary	p	p	p
atom_style	full

# ----------------------- ATOM DEFINITION ----------------------------

fix csinfo all property/atom i_CSID
read_data data.coreshell fix csinfo NULL CS-Info

group cores type 1 2
group shells type 3 4

neighbor 2.0 bin
comm_modify vel yes

# ------------------------ FORCE FIELDS ------------------------------

pair_style   born/coul/wolf/cs 0.1 20.0 20.0    # A, rho, sigma=0, C, D 
pair_coeff   * *      0.0 1.000   0.00  0.00   0.00
pair_coeff   3 3    487.0 0.23768 0.00  1.05   0.50 #Na-Na
pair_coeff   3 4 145134.0 0.23768 0.00  6.99   8.70 #Na-Cl
pair_coeff   4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl

bond_style harmonic
bond_coeff 1 63.014 0.0
bond_coeff 2 25.724 0.0

# ------------------------ Equilibration Run -------------------------------

reset_timestep 0

thermo 50
thermo_style custom step etotal pe ke temp press &
             epair evdwl ecoul elong ebond fnorm fmax vol

compute CSequ all temp/cs cores shells 

# output via chunk method

#compute prop all property/atom i_CSID
#compute cs_chunk all chunk/atom c_prop
#compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0
#fix ave_chunk all ave/time 100 1 100 c_cstherm file chunk.dump mode vector 

thermo_modify temp CSequ

# velocity bias option

velocity all create 1427 134 dist gaussian mom yes rot no bias yes temp CSequ
velocity all scale 1427 temp CSequ

fix thermoberendsen all temp/berendsen 1427 1427 0.4
fix nve all nve
fix_modify thermoberendsen temp CSequ

# 2 fmsec timestep

timestep 0.002
run 500

unfix thermoberendsen

# ------------------------ Dynamic Run -------------------------------

run 1000
+190 −0
Original line number Diff line number Diff line
LAMMPS (22 Sep 2017)
# Testsystem for core-shell model compared to Mitchel and Finchham
# Shamelessly copied from in.coreshell.dsf but this script uses Wolf summation.

# ------------------------ INITIALIZATION ----------------------------

units 		metal
dimension	3
boundary	p	p	p
atom_style	full

# ----------------------- ATOM DEFINITION ----------------------------

fix csinfo all property/atom i_CSID
read_data data.coreshell fix csinfo NULL CS-Info
  orthogonal box = (0 0 0) to (24.096 24.096 24.096)
  1 by 1 by 1 MPI processor grid
  reading atoms ...
  432 atoms
  scanning bonds ...
  1 = max bonds/atom
  reading bonds ...
  216 bonds
  1 = max # of 1-2 neighbors
  0 = max # of 1-3 neighbors
  0 = max # of 1-4 neighbors
  1 = max # of special neighbors

group cores type 1 2
216 atoms in group cores
group shells type 3 4
216 atoms in group shells

neighbor 2.0 bin
comm_modify vel yes

# ------------------------ FORCE FIELDS ------------------------------

pair_style   born/coul/wolf/cs 0.1 20.0 20.0    # A, rho, sigma=0, C, D
pair_coeff   * *      0.0 1.000   0.00  0.00   0.00
pair_coeff   3 3    487.0 0.23768 0.00  1.05   0.50 #Na-Na
pair_coeff   3 4 145134.0 0.23768 0.00  6.99   8.70 #Na-Cl
pair_coeff   4 4 405774.0 0.23768 0.00 72.40 145.40 #Cl-Cl

bond_style harmonic
bond_coeff 1 63.014 0.0
bond_coeff 2 25.724 0.0

# ------------------------ Equilibration Run -------------------------------

reset_timestep 0

thermo 50
thermo_style custom step etotal pe ke temp press              epair evdwl ecoul elong ebond fnorm fmax vol

compute CSequ all temp/cs cores shells

# output via chunk method

#compute prop all property/atom i_CSID
#compute cs_chunk all chunk/atom c_prop
#compute cstherm all temp/chunk cs_chunk temp internal com yes cdof 3.0
#fix ave_chunk all ave/time 100 1 100 c_cstherm file chunk.dump mode vector

thermo_modify temp CSequ

# velocity bias option

velocity all create 1427 134 dist gaussian mom yes rot no bias yes temp CSequ
Neighbor list info ...
  update every 1 steps, delay 10 steps, check yes
  max neighbors/atom: 2000, page size: 100000
  master list distance cutoff = 22
  ghost atom cutoff = 22
  binsize = 11, bins = 3 3 3
  1 neighbor lists, perpetual/occasional/extra = 1 0 0
  (1) pair born/coul/wolf/cs, perpetual
      attributes: half, newton on
      pair build: half/bin/newton
      stencil: half/bin/3d/newton
      bin: standard
velocity all scale 1427 temp CSequ

fix thermoberendsen all temp/berendsen 1427 1427 0.4
fix nve all nve
fix_modify thermoberendsen temp CSequ

# 2 fmsec timestep

timestep 0.002
run 500
Per MPI rank memory allocation (min/avg/max) = 8.59 | 8.59 | 8.59 Mbytes
Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume 
       0   -637.41039   -677.06805    39.657659         1427   -21302.622   -677.06805    1.6320365   -678.70009            0            0 1.2935454e-14 3.3306691e-15      13990.5 
      50   -635.62711   -667.67134    32.044236    1153.0465   -4533.0717   -669.45724     37.76997   -707.22721            0    1.7858939    9.6844521    2.2001656      13990.5 
     100   -632.76337   -662.83035    30.066977    1081.8989   -3492.8736   -664.98454    39.197093   -704.18164            0    2.1541967    11.063962    2.1543406      13990.5 
     150   -630.82538   -663.70056    32.875182    1182.9464   -74.330324   -666.12202    46.263665   -712.38569            0    2.4214607    11.739683    2.7558416      13990.5 
     200    -629.1541   -664.54637     35.39227    1273.5187   -1707.5508   -666.87772    41.796197   -708.67391            0    2.3313445    10.594804    3.0025376      13990.5 
     250   -627.86587   -662.60879    34.742918    1250.1531   -1258.7537   -665.21416    43.017024   -708.23118            0    2.6053655    10.576999    1.8400986      13990.5 
     300   -627.10755   -664.12897    37.021419    1332.1403   -1891.3466   -666.39618    40.769593   -707.16577            0    2.2672094     9.412943    1.2434258      13990.5 
     350   -626.27558   -665.04303    38.767448    1394.9676   -1436.8514   -667.47081    41.854746   -709.32556            0    2.4277827    10.304721     1.977594      13990.5 
     400   -625.55098   -661.86388    36.312896    1306.6455   -331.92076    -664.4632    44.426542   -708.88975            0     2.599325    11.081635    2.1734468      13990.5 
     450   -624.88626   -661.07359    36.187328    1302.1272    -2325.834    -663.6031    39.662697   -703.26579            0    2.5295037    9.9810051    1.3068929      13990.5 
     500   -623.87093   -660.24145    36.370525    1308.7192    410.85324   -662.86944    45.869201   -708.73864            0    2.6279856    10.592785    1.8162326      13990.5 
Loop time of 11.7065 on 1 procs for 500 steps with 432 atoms

Performance: 7.381 ns/day, 3.252 hours/ns, 42.711 timesteps/s
100.0% CPU use with 1 MPI tasks x no OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 11.535     | 11.535     | 11.535     |   0.0 | 98.54
Bond    | 0.001443   | 0.001443   | 0.001443   |   0.0 |  0.01
Neigh   | 0.10952    | 0.10952    | 0.10952    |   0.0 |  0.94
Comm    | 0.048796   | 0.048796   | 0.048796   |   0.0 |  0.42
Output  | 0.00038695 | 0.00038695 | 0.00038695 |   0.0 |  0.00
Modify  | 0.0067511  | 0.0067511  | 0.0067511  |   0.0 |  0.06
Other   |            | 0.004243   |            |       |  0.04

Nlocal:    432 ave 432 max 432 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost:    9328 ave 9328 max 9328 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs:    297280 ave 297280 max 297280 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 297280
Ave neighs/atom = 688.148
Ave special neighs/atom = 1
Neighbor list builds = 21
Dangerous builds = 0

unfix thermoberendsen

# ------------------------ Dynamic Run -------------------------------

run 1000
Per MPI rank memory allocation (min/avg/max) = 8.59 | 8.59 | 8.59 Mbytes
Step TotEng PotEng KinEng Temp Press E_pair E_vdwl E_coul E_long E_bond Fnorm Fmax Volume 
     500   -623.87093   -660.24145    36.370525    1308.7192    410.85324   -662.86944    45.869201   -708.73864            0    2.6279856    10.592785    1.8162326      13990.5 
     550   -623.95762   -659.99899    36.041371    1296.8752   -442.62446   -662.68699    44.004419   -706.69141            0    2.6879934    10.936057    1.7358509      13990.5 
     600   -624.04214   -661.21748    37.175332    1337.6785    47.615854   -663.76133    45.009742   -708.77107            0    2.5438549    11.431366    2.1185464      13990.5 
     650   -623.98279   -661.85255     37.86976    1362.6661   -1708.3823   -664.31138    40.933446   -705.24482            0    2.4588298    9.7960191    1.4159904      13990.5 
     700   -624.02941   -661.57484     37.54543    1350.9958   -124.09512   -663.95322    44.666402   -708.61962            0    2.3783801    10.518712    2.0854584      13990.5 
     750   -624.03935   -661.11619    37.076837    1334.1344   -1163.2721   -663.82553      42.1219   -705.94743            0    2.7093404    10.634859    1.9381654      13990.5 
     800   -623.98709   -659.43647     35.44938    1275.5737   -285.65702   -662.23782    44.650233   -706.88805            0    2.8013482     11.83459    3.4506407      13990.5 
     850   -623.96081   -661.77923    37.818422    1360.8188   -814.33212   -664.38161    42.860208   -707.24181            0    2.6023728    10.766451    2.9211132      13990.5 
     900   -623.96136   -662.98419    39.022831     1404.157    308.13105   -665.65877    45.053188   -710.71195            0    2.6745786    11.028799    1.8494322      13990.5 
     950   -623.91048   -660.63828      36.7278     1321.575   -445.31526   -663.79806     43.94833   -707.74639            0    3.1597729    11.852051    1.8238458      13990.5 
    1000   -623.90541   -661.03474    37.129332    1336.0233    522.57958   -663.50212    45.863261   -709.36538            0    2.4673781    10.949291    1.8614095      13990.5 
    1050   -624.01134   -660.99076    36.979422    1330.6291   -1710.2829   -663.67762    41.056102   -704.73372            0    2.6868521     10.86533    2.2154165      13990.5 
    1100   -624.02639   -660.86661    36.840225    1325.6204    1151.0236    -663.5066    47.207185   -710.71378            0    2.6399847    11.298044    1.8900703      13990.5 
    1150   -624.04418   -661.29819    37.254006    1340.5094    161.09847   -663.73735    45.222561   -708.95991            0    2.4391651    11.261119    2.2245673      13990.5 
    1200   -624.08628   -662.39932    38.313043    1378.6168   -1405.0927   -664.93121    41.728112   -706.65933            0    2.5318927    10.458041    2.1153159      13990.5 
    1250   -624.03036   -661.25661    37.226248    1339.5106    63.407721   -663.72719    45.086961   -708.81415            0    2.4705832    11.766021    2.2297809      13990.5 
    1300   -623.97475   -661.55998    37.585229    1352.4278   -763.66781   -663.80645    42.870244    -706.6767            0    2.2464703    10.098322    1.7614596      13990.5 
    1350   -623.93123   -660.30786    36.376631    1308.9389   -2389.8052   -663.04725    39.749029   -702.79628            0    2.7393936    10.879364    2.6622521      13990.5 
    1400   -623.86468   -658.44644    34.581765    1244.3543    2262.7586   -660.95368     50.10608   -711.05976            0    2.5072434    11.528291    1.7861906      13990.5 
    1450   -623.85494   -661.47216    37.617217    1353.5789   -1435.0174   -664.13587    41.701767   -705.83764            0    2.6637191    11.297444    2.0038345      13990.5 
    1500   -623.79928   -659.70124    35.901959    1291.8588   -198.39562   -662.57415    44.358482   -706.93263            0     2.872907    11.075746    2.2821286      13990.5 
Loop time of 23.4119 on 1 procs for 1000 steps with 432 atoms

Performance: 7.381 ns/day, 3.252 hours/ns, 42.713 timesteps/s
99.9% CPU use with 1 MPI tasks x no OpenMP threads

MPI task timing breakdown:
Section |  min time  |  avg time  |  max time  |%varavg| %total
---------------------------------------------------------------
Pair    | 23.069     | 23.069     | 23.069     |   0.0 | 98.54
Bond    | 0.0029275  | 0.0029275  | 0.0029275  |   0.0 |  0.01
Neigh   | 0.22821    | 0.22821    | 0.22821    |   0.0 |  0.97
Comm    | 0.097941   | 0.097941   | 0.097941   |   0.0 |  0.42
Output  | 0.00074033 | 0.00074033 | 0.00074033 |   0.0 |  0.00
Modify  | 0.0042015  | 0.0042015  | 0.0042015  |   0.0 |  0.02
Other   |            | 0.00865    |            |       |  0.04

Nlocal:    432 ave 432 max 432 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost:    9388 ave 9388 max 9388 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs:    297212 ave 297212 max 297212 min
Histogram: 1 0 0 0 0 0 0 0 0 0

Total # of neighbors = 297212
Ave neighs/atom = 687.991
Ave special neighs/atom = 1
Neighbor list builds = 45
Dangerous builds = 0
Total wall time: 0:00:35
+190 −0

File added.

Preview size limit exceeded, changes collapsed.

+4 −5
Original line number Diff line number Diff line
@@ -70,8 +70,7 @@ void PairBornCoulWolfCS::compute(int eflag, int vflag)

  e_self = v_sh = 0.0;
  e_shift = erfc(alf*cut_coul)/cut_coul;
  f_shift = -(e_shift+ 2.0*alf/MY_PIS * exp(-alf*alf*cut_coul*cut_coul)) /
    cut_coul;
  f_shift = -(e_shift+ 2.0*alf/MY_PIS * exp(-alf*alf*cut_coul*cut_coul)) / cut_coul;

  inum = list->inum;
  ilist = list->ilist;