special_bonds command in combination with the lj/cut/coul/long pair potential

Dear All,

I have a question regarding the special_bonds command in combination with the lj/cut/coul/long pair potential.
I am trying to relax a bulk system of polymer molecules in an NPT ensemble at ambient conditions using the OPLSAA force field.
However, I am not able to obtain a working simulation in which long-range coulomb interactions and special bonds for the lj or lj/coul parameters (to take into account 1-4 atom pairs) are combined.

To figure out the problem, I have tried the following individual scenarios in my initial settings:

pair_style lj/cut 10.0
-> Simulation runs fine

pair_style lj/cut/coul/long 10.0 10.0
-> Simulation runs fine

pair_style lj/cut 10.0
special_bonds lj 0.0 0.0 0.5 angle yes dihedral yes
-> Simulation runs fine

pair_style lj/cut/coul/long 10.0 10.0
special_bonds lj 0.0 0.0 0.5 angle yes dihedral yes
-> All thermodynamic variables give a nan output right after the first timestep

pair_style lj/cut/coul/long 10.0 10.0
special_bonds lj/coul 0.0 0.0 0.5 angle yes dihedral yes
-> All thermodynamic variables give a nan output right after the first timestep

I’m running out of ideas, especially because the special bonds for lj work in case 3), but once I add the same in case 4) to an lj/cut/coul/long pair style (where the special bonds should still only affect the lj part), I only get a nan output.

Could anyone maybe give me a hint at what I might be overlooking here?
Thanks so much in advance!

Mia

Your special bonds command is changing the default
of 1-4 interactions turned off to weighting them with 50%.
If you have some (invalid) geometry or charges in your
model, it’s possible that toggling this weight will
cause bad dynamics or things to blow-up.

See the bench/in.rhodo script. It as a similar model, If
you add your special bonds command it will definitely
change the answers, though I don’t think that one
will blow up.

Steve

Arun & Steve, thanks a lot for your comments!

@Arun:

  1. I checked the force parameters, they seem to be right.
  2. I do not see abnormally large bonds.
  3. The system is minimized prior to equilibration and I am using PBCs. I’m attaching my log file for case [4].
    The contributions from potential energy and coulomb forces are huge, which does not happen in cases [1], [2], and [3].
  4. The “working” simulations for cases [1], [2], and [3] were run for 10ns with a timestep of 1fs. Velocities are assigned via the “velocity all create 300.0 4928459 rot yes dist gaussian” command.

@Steve:
One follow-up question regarding your comment: I do see a slight change in behavior in case [3] once the bonds are added compared to case [1]. Both of these cases only make use of the “pair_style lj/cut 10.0”.
My problem arises once I am trying to use the “pair_style lj/cut/coul/long 10.0 10.0”, which works fine by itself as tested in case [2]. But using this pair_style, once the bonds are added (trying both “special_bonds lj” in case [4] and “special_bonds lj/coul” in case [5]), the simulations only give a nan output.
Is my understanding correct that the “special_bonds lj” command only changes 1-4 interactions for the lj potential, whereas the “special_bonds lj/coul” command also changes 1-4 coulomb interactions?

If so, the biggest mystery to me is why case [3] is working, while case [4] isn’t…

Thanks a lot in advance,
Mia

LAMMPS (18 Apr 2015)

----------------- Init Section -----------------

include “system.in.init”
units real
atom_style full
pair_style lj/cut/coul/long 10.0 10.0
bond_style harmonic
special_bonds lj 0.0 0.0 0.5 angle yes dihedral yes
angle_style harmonic
dihedral_style fourier

kspace_style ewald 1.0e-4

----------------- Atom Definition Section -----------------

read_data “system_bulk.data”
orthogonal box = (14.35 -11 -25) to (64.35 39 25)
3 by 4 by 4 MPI processor grid
reading atoms …
14532 atoms
scanning bonds …
4 = max bonds/atom
scanning angles …
6 = max angles/atom
scanning dihedrals …
18 = max dihedrals/atom
reading bonds …
14766 bonds
reading angles …
26964 angles
reading dihedrals …
36276 dihedrals
4 = max # of 1-2 neighbors
7 = max # of 1-3 neighbors
13 = max # of 1-4 neighbors
54360 = # of 1-3 neighbors before angle trim
53928 = # of 1-3 neighbors after angle trim
93432 = # of 1-4 neighbors before dihedral trim
71112 = # of 1-4 neighbors after dihedral trim
16 = max # of special neighbors

----------------- Run Section -----------------

variable max_it equal 1000000

dump dump_image all image 100000 Bulk..jpg mass type size 2500 2500 axes yes 0.8 0.02 zoom 1.5 view 90 90
dump dump_image_2 all image 100000 Bulk_2.
.jpg mass type size 2500 2500 axes yes 0.8 0.02 zoom 1.5 view 0 90
dump_modify dump_image amap 0.0 18.0 da 0.0 4 0.0 2.0 silver 2.1 13.0 teal 13.1 14.5 coral min max darkblue
dump_modify dump_image_2 amap 0.0 18.0 da 0.0 4 0.0 2.0 silver 2.1 13.0 teal 13.1 14.5 coral min max darkblue

min_style cg
minimize 1e-25 1e-25 {max_it} {max_it}
minimize 1e-25 1e-25 1000000 ${max_it}
minimize 1e-25 1e-25 1000000 1000000
WARNING: Resetting reneighboring criteria during minimization (…/min.cpp:168)
Ewald initialization …
WARNING: System is not charge neutral, net charge = -415.032 (…/kspace.cpp:297)
G vector (1/distance) = 0.200249
estimated absolute RMS force accuracy = 0.0360554
estimated relative force accuracy = 0.00010858
KSpace vectors: actual max1d max3d = 709 7 1687
kxmax kymax kzmax = 7 7 7
Neighbor list info …
1 neighbor list requests
update every 1 steps, delay 0 steps, check yes
master list distance cutoff = 12
Memory usage per processor = 15.9051 Mbytes
Step Temp E_pair E_mol TotEng Press
0 0 3.0909195e+10 510134.61 3.0909705e+10 6.782164e+10
79 0 -2.5309775e+15 213603.24 -2.5309775e+15 -4.1173958e+14
Loop time of 14.163 on 48 procs for 79 steps with 14532 atoms

Minimization stats:
Stopping criterion = energy tolerance
Energy initial, next-to-last, final =
30909705346.1 -2.530977493e+15 -2.530977493e+15
Force two-norm initial, final = 8.68164e+11 7.12407e+29
Force max component initial, final = 3.52638e+11 3.56203e+29
Final line search alpha, max atom move = 3.98953e-45 1.42109e-15
Iterations, force evaluations = 79 676

Pair time () = 4.58536 (32.3757) Bond time () = 0.154796 (1.09296)
Kspce time () = 5.50174 (38.846) Neigh time () = 0.0363729 (0.256817)
Comm time () = 0.99347 (7.01456) Outpt time () = 0 (0)
Other time (%) = 2.89122 (20.414)

Nlocal: 302.75 ave 421 max 199 min
Histogram: 7 5 8 2 3 8 3 0 5 7
Nghost: 5942.6 ave 7282 max 4899 min
Histogram: 8 2 6 9 3 4 10 2 0 4
Neighs: 146353 ave 254620 max 47653 min
Histogram: 3 7 5 9 6 2 4 0 4 8

Total # of neighbors = 7024957
Ave neighs/atom = 483.413
Ave special neighs/atom = 10.6367
Neighbor list builds = 3
Dangerous builds = 0

dielectric 4.5

thermo_style custom etotal ke temp pe ebond eangle edihed eimp evdwl ecoul elong press pxx pyy pzz pxy pxz pyz lx ly lz
thermo 1

timestep 1.0

velocity all create 300.0 4928459 rot yes dist gaussian
fix 1 all npt temp 300.0 300.0 100.0 iso 1.0 1.0 1000.0

restart 500000 PU.restart
variable run_time equal 10*1000000
run ${run_time}
run 10000000
Ewald initialization …
G vector (1/distance) = 0.1583
estimated absolute RMS force accuracy = 0.0465841
estimated relative force accuracy = 0.000140287
KSpace vectors: actual max1d max3d = 128 4 364
kxmax kymax kzmax = 4 4 4
Neighbor list info …
1 neighbor list requests
update every 1 steps, delay 10 steps, check yes
master list distance cutoff = 12
Memory usage per processor = 14.5322 Mbytes
TotEng KinEng Temp PotEng E_bond E_angle E_dihed E_impro E_vdwl E_coul E_long Press Pxx Pyy Pzz Pxy Pxz Pyz Lx Ly Lz
-5.6243944e+14 12994.245 300 -5.6243944e+14 77844.885 113200.14 22558.219 0 215953.28 -5.6243944e+14 -4814.7833 -1.029349e+14 -1.5440234e+14 502698.61 -1.5440234e+14 -6621.1925 -1.5440234e+14 44754.26 50 50 50
nan nan nan nan nan nan nan 0 0 0 nan nan nan nan nan nan nan nan 0 0 0
nan nan nan nan nan nan nan 0 0 0 nan nan nan nan nan nan nan nan nan nan nan
nan nan nan nan nan nan nan 0 0 0 nan nan nan nan nan nan nan nan nan nan nan
nan nan nan nan nan nan nan 0 0 0 nan nan nan nan nan nan nan nan nan nan nan

Arun & Steve, thanks a lot for your comments!

@Arun:
1) I checked the force parameters, they seem to be right.
2) I do not see abnormally large bonds.
3) The system is minimized prior to equilibration and I am using PBCs. I'm
attaching my log file for case [4].
   The contributions from potential energy and coulomb forces are huge,
which does not happen in cases [1], [2], and [3].
4) The "working" simulations for cases [1], [2], and [3] were run for 10ns
with a timestep of 1fs. Velocities are assigned via the "velocity all
create 300.0 4928459 rot yes dist gaussian" command.

@Steve:
One follow-up question regarding your comment: I do see a slight change in
behavior in case [3] once the bonds are added compared to case [1]. Both of
these cases only make use of the "pair_style lj/cut 10.0".
My problem arises once I am trying to use the "pair_style lj/cut/coul/long
10.0 10.0", which works fine by itself as tested in case [2]. But using
this pair_style, once the bonds are added (trying both "special_bonds lj"
in case [4] and "special_bonds lj/coul" in case [5]), the simulations only
give a nan output.
Is my understanding correct that the "special_bonds lj" command only
changes 1-4 interactions for the lj potential, whereas the "special_bonds
lj/coul" command also changes 1-4 coulomb interactions?

​special_bonds always resets to default values and then sets whatever is
specified in addition.

If so, the biggest mystery to me is why case [3] is working, while case
[4] isn't...

​what you show below looks *very* bad. you have insanely high energies. the
*is* something wrong with your topology, structure or parameters​ or a
combination of that.

the system you have set up is very large. try setting up a simulation with
only one or two molecules and test your topology and energies and
structures. that is fast and can be double checked with a calculator and a
piece of paper.

axel.