# Problem in simulation drawing process

hello, I am a beginner in lammps.
I am trying to simulate a drawing process of metal wire.
I have encountered some problems that I can’t solve. I hope you can help me check the code and make comments!

My code as follow (sorry for no right to upload all the attachments)

# 环境设定

units metal
boundary s s s
atom_style atomic
neighbor 3 bin
neigh_modify every 1 delay 0 check yes exclude type 4 4 ######## 去除固定CC原子作用 -----------
timestep 0.0001
log D0.log

reset_atom_ids

# 势函数设置

#Mg-Y-Zn合金混合势设置
#第一行把所有的势函数类型都列出来
pair_style hybrid meam meam lj/cut 10 lj/cut 5.5 lj/cut 7 lj/cut 7.5 lj/cut 9.5
#Y-Zn-Mg, NULL说明原子类型
pair_coeff * * meam 1 library.meam.txt Mg Y Mg-Y.meam.txt Mg Y NULL NULL
pair_coeff * * meam 2 library.meam.txt Zn Mg Zn-Mg.meam.txt Mg NULL Zn NULL
#设置Y与Zn之间的原子势函数
pair_coeff 2 3 lj/cut 1 0.7271 2.7128

#C-*混合势设置
pair_coeff 4 4 lj/cut 2 6.3695 1.3542 #C-C
pair_coeff 3 4 lj/cut 3 1.1046 1.7157 #Zn-C
pair_coeff 1 4 lj/cut 4 0.7075 1.8445 #Mg-C
pair_coeff 2 4 lj/cut 5 4.1926 2.1411 #Y-C ########### 在混合势中添加C的势函数-------------------------

#pair_modify shift yes
#comm_modify mode single cutoff 10.0 vel yes

# 组别设置

region wirehead cylinder y 0 0 37 90 100
group die type 4
group wire1 type 1
group wire2 type 2
group wire3 type 3
group wire0 union wire1 wire2 wire3

# 能量最小化

min_style cg
minimize 1.0e-8 1.0e-8 100 10000

#write_data DD0M.data

# die 刚体rigid wirehead 刚体move wire 计算体nve

velocity wire create 723 77777 dist gaussian mom no rot no

fix 5 wire nve/limit 1.5
fix 31 wire temp/berendsen 723 723 1

fix 10 die rigid single

fix 20 wirehead move linear 0 0 0 units box

#fix 30 wire nve
#fix 32 wire langevin 723 723 1 4284

dump 1 all atom 200 DD0E.xyz

thermo 200
thermo_style custom step temp press pe ke vol
thermo_modify lost ignore

run 10000

undump 1

unfix 5
#unfix 10
#unfix 20
#unfix 30
unfix 31

reset_timestep 0

fix 30 wire nve
fix 31 wire langevin 723 723 1 48984

fix 20 wirehead move linear 0 1 0 units box

#fix 30 die rigid single

thermo 20
thermo_style custom step temp press pe ke vol
thermo_modify lost ignore

dump 2 all atom 20 DD0.xyz

run 1000

Please let us know what those problems are.

Sorry, I foget to upload the logfile.

In my test, this code (or it’s variant) leads to two results:
1.ERROR on proc 0: Too many neighbor bins (src/nbin_standard.cpp:213)
2.particles explosion and it’s temp rises out of control.
These occur in relaxation or direct simulation.

logfile as follow

# 外部模型读入############## 模具扩孔

orthogonal box = (-69.0555 -100.01835 -69.947249) to (69.18898 100.01367 69.18898)
2 by 3 by 2 MPI processor grid
128141 atoms
128141 velocities
reset_atom_ids
Resetting atom IDs …
No /omp style for force computation currently active
WARNING: Communication cutoff is 0.0. No ghost atoms will be generated. Atoms may get lost. (src/comm_brick.cpp:210)

# 势函数设置 ################### 添加势函数文件---------------------------

#Mg-Y-Zn合金混合势设置
#第一行把所有的势函数类型都列出来
pair_style hybrid meam meam lj/cut 10 lj/cut 5.5 lj/cut 7 lj/cut 7.5 lj/cut 9.5
#Y-Zn-Mg, NULL说明原子类型
pair_coeff * * meam 1 library.meam.txt Mg Y Mg-Y.meam.txt Mg Y NULL NULL
pair_coeff * * meam 2 library.meam.txt Zn Mg Zn-Mg.meam.txt Mg NULL Zn NULL
#设置Y与Zn之间的原子势函数
pair_coeff 2 3 lj/cut 1 0.7271 2.7128

#C-*混合势设置
pair_coeff 4 4 lj/cut 2 6.3695 1.3542 #C-C
pair_coeff 3 4 lj/cut 3 1.1046 1.7157 #Zn-C
pair_coeff 1 4 lj/cut 4 0.7075 1.8445 #Mg-C
pair_coeff 2 4 lj/cut 5 4.1926 2.1411 #Y-C ########### 在混合势中添加C的势函数-------------------------

#pair_modify shift yes
#comm_modify mode single cutoff 10.0 vel yes

# 组别设置

region wirehead cylinder y 0 0 37 90 100 ###################调整模具空间坐标-------------
group die type 4
64219 atoms in group die
group wire1 type 1
60395 atoms in group wire1
group wire2 type 2
2019 atoms in group wire2
group wire3 type 3
1508 atoms in group wire3
group wire0 union wire1 wire2 wire3
63922 atoms in group wire0
62050 atoms in group wire

# 能量最小化

min_style cg
minimize 1.0e-8 1.0e-8 100 10000
Hybrid pair style last /omp style lj/cut
Last active /omp style is pair_style lj/cut
Neighbor list info …
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 13
ghost atom cutoff = 13
binsize = 6.5, bins = 22 31 22
15 neighbor lists, perpetual/occasional/extra = 15 0 0
(1) pair meam, perpetual, skip from (10)
attributes: full, newton on, omp, cut 9
pair build: skip/omp
stencil: none
bin: none
(2) pair meam, perpetual, skip from (11)
attributes: half, newton on, omp
pair build: skip/omp
stencil: none
bin: none
(3) pair meam, perpetual, skip from (10)
attributes: full, newton on, omp, cut 9
pair build: skip/omp
stencil: none
bin: none
(4) pair meam, perpetual, skip from (11)
attributes: half, newton on, omp
pair build: skip/omp
stencil: none
bin: none
(5) pair lj/cut, perpetual, skip from (11)
attributes: half, newton on, omp
pair build: skip/omp
stencil: none
bin: none
(6) pair lj/cut, perpetual, skip from (12)
attributes: half, newton on, omp, cut 8.5
pair build: skip/omp
stencil: none
bin: none
(7) pair lj/cut, perpetual, skip from (13)
attributes: half, newton on, omp, cut 10
pair build: skip/omp
stencil: none
bin: none
(8) pair lj/cut, perpetual, skip from (14)
attributes: half, newton on, omp, cut 10.5
pair build: skip/omp
stencil: none
bin: none
(9) pair lj/cut, perpetual, skip from (15)
attributes: half, newton on, omp, cut 12.5
pair build: skip/omp
stencil: none
bin: none
attributes: full, newton on, omp, cut 9
pair build: full/bin/atomonly/omp
stencil: full/bin/3d
bin: standard
attributes: half, newton on, omp
pair build: half/bin/atomonly/newton/omp
stencil: half/bin/3d
bin: standard
(12) neighbor class addition, perpetual, trim from (13)
attributes: half, newton on, omp, cut 8.5
pair build: trim/omp
stencil: none
bin: none
(13) neighbor class addition, perpetual, trim from (14)
attributes: half, newton on, omp, cut 10
pair build: trim/omp
stencil: none
bin: none
(14) neighbor class addition, perpetual, trim from (11)
attributes: half, newton on, omp, cut 10.5
pair build: trim/omp
stencil: none
bin: none
(15) neighbor class addition, perpetual, trim from (11)
attributes: half, newton on, omp, cut 12.5
pair build: trim/omp
stencil: none
bin: none
Per MPI rank memory allocation (min/avg/max) = 49.08 | 55.03 | 66.17 Mbytes
Step Temp E_pair E_mol TotEng Press Volume
0 0 -81294.555 0 -81294.555 12660.011 3847564.4
100 0 -130054.57 0 -130054.57 12322.07 3847564.4
Loop time of 207.147 on 24 procs for 100 steps with 128141 atoms

Minimization stats:
Stopping criterion = max iterations
Energy initial, next-to-last, final =
-81294.5554963493 -130007.004262976 -130054.573550521
Force two-norm initial, final = 3572.7132 210101.83
Force max component initial, final = 931.05661 76701.212
Final line search alpha, max atom move = 4.545859e-09 0.00034867289
Iterations, force evaluations = 100 1065

## MPI task timing breakdown: Section | min time | avg time | max time |%varavg| %total

Pair | 183.33 | 195.13 | 202.57 | 43.8 | 94.20
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 3.8598 | 10.693 | 21.347 | 165.6 | 5.16
Output | 0.000225 | 0.00022625 | 0.000231 | 0.0 | 0.00
Modify | 0.11048 | 0.22873 | 0.43924 | 29.3 | 0.11
Other | | 1.097 | | | 0.53

Nlocal: 10678.4 ave 20663 max 5642 min
Histogram: 8 0 0 0 0 0 0 0 0 4
Nghost: 8282.67 ave 10651 max 6121 min
Histogram: 4 0 0 0 4 0 0 0 0 4
Neighs: 0 ave 0 max 0 min
Histogram: 12 0 0 0 0 0 0 0 0 0

Total # of neighbors = 0
Ave neighs/atom = 0
Neighbor list builds = 0
Dangerous builds = 0

#write_data DD0M.data

# die 刚体rigid wirehead 刚体move wire 计算体nve

velocity wire create 723 77777 dist gaussian mom no rot no

fix 5 wire nve/limit 1.5
fix 31 wire temp/berendsen 723 723 1

fix 10 die rigid single
1 rigid bodies with 64219 atoms

fix 20 wirehead move linear 0 0 0 units box

#fix 30 wire nve
#fix 32 wire langevin 723 723 1 4284

dump 1 all atom 200 DD0E.xyz

thermo 200
thermo_style custom step temp press pe ke vol
thermo_modify lost ignore

run 10000
Hybrid pair style last /omp style lj/cut
Last active /omp style is pair_style lj/cut
Neighbor list info …
update: every = 1 steps, delay = 0 steps, check = yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 13
ghost atom cutoff = 13
binsize = 6.5, bins = 22 31 22
11 neighbor lists, perpetual/occasional/extra = 11 0 0
(1) pair meam, perpetual, skip from (10)
attributes: full, newton on, omp
pair build: skip/omp
stencil: none
bin: none
(2) pair meam, perpetual, half/full from (1)
attributes: half, newton on, omp
pair build: halffull/newton/skip/omp
stencil: none
bin: none
(3) pair meam, perpetual, skip from (10)
attributes: full, newton on, omp
pair build: skip/omp
stencil: none
bin: none
(4) pair meam, perpetual, half/full from (3)
attributes: half, newton on, omp
pair build: halffull/newton/skip/omp
stencil: none
bin: none
(5) pair lj/cut, perpetual, skip from (11)
attributes: half, newton on, omp
pair build: skip/omp
stencil: none
bin: none
(6) pair lj/cut, perpetual, skip from (11)
attributes: half, newton on, omp
pair build: skip/omp
stencil: none
bin: none
(7) pair lj/cut, perpetual, skip from (11)
attributes: half, newton on, omp
pair build: skip/omp
stencil: none
bin: none
(8) pair lj/cut, perpetual, skip from (11)
attributes: half, newton on, omp
pair build: skip/omp
stencil: none
bin: none
(9) pair lj/cut, perpetual, skip from (11)
attributes: half, newton on, omp
pair build: skip/omp
stencil: none
bin: none
attributes: full, newton on, omp
pair build: full/bin/atomonly/omp
stencil: full/bin/3d
bin: standard
(11) neighbor class addition, perpetual, half/full from (10)
attributes: half, newton on, omp
pair build: halffull/newton/omp
stencil: none
bin: none
Per MPI rank memory allocation (min/avg/max) = 41.95 | 47.95 | 59.3 Mbytes
Step Temp Press PotEng KinEng Volume
100 701.80415 15170.318 -130210.22 5798.7946 3847566.3
ERROR on proc 0: Too many neighbor bins (src/nbin_standard.cpp:213)
Last command: run 10000

This bad behavior is likely due to using a bad force field model. What you do is “abuse” of the hybrid pair style. I cannot do what you seem to be trying to do. Also, your input is redundant, there is no need to have multiple lj/cut substyles since you can set the cutoff with the pair_coeff.

You seem to have enabled the OPENMP package without using any of the OPENMP package styles. Bad idea.

There are several other minor issues, but the main problem is the lack of a proper force field. For your kind of material you will need a single set of parameters to be used with just a single pair style (no hybrid) that is suitable for your material. That is not going to be easy to find, if it exists at all. You may have to resolve to using some ab initio or similar quantum based simulation method (and a lot more CPU power).

As a beginner with LAMMPS this is a far too complex problem to learn LAMMPS and doing simulations with. I suggest you start with a simpler system, e.g. just a simple metal like copper or nickel for which you can easily find a suitable EAM potential and the build your simulation input in stages until you master the process and then gradually try something more complex. For that you need to thoroughly study the published literature to find publications of simulations of similar (simpler or similarly complex) systems so you can learn about suitable potentials and simulation settings.

Thx a lot ，Professor Kohlmeyer！
I will change materials and test my code.
But I still want to know two more things:

1.The wire I am going to simulate is a two phase polycystical wire with one phaes in complex structure.This structure is calculated by some researchers with DFT，and they upload this structure as supplementary material . Should I ask them for help? Or deeply analyze their literature?

2.Please let know other minor issues in my code, thx!