[lammps-users] segmentation fault during deposit

Dear users,

I can’t get rid of a segmentation fault during the deposition of atoms.

I analyze diffusion through a pore. Therefore every time an atom enters a pore, another atom is to be added in the free surrounding space to keep a steady state.

I run at 1400 Kelvin and can only shift the near option between 2-4, otherwise atoms are kicked out (<2) or deposition is unsuccessful (>4).

Here is my fix:

fix 6_$a CH4_depo deposit $f 1 100 12345 near 2.5 attempt 50 region CH4_oben units box

Here is my script:

region CH4_oben block -6.6 6.6 -6.6 6.6 151 174 units box

region depo_box block INF INF INF INF 75 150 units box

region depo_CNT cylinder z 0 0 3.4 75 150 side out units box

region depo intersect 2 depo_box depo_CNT units box

variable c equal 13

variable x equal 400

variable a loop $c

label loopa

group CH4_depo subtract all all

group CH4_depo_b region depo

group CH4_depo subtract CH4_depo_b CH4_depo_a

group CH4_depo_a union CH4_depo_a CH4_depo_b


variable f equal count(CH4_depo)

if $f > 0 then “include fix.txt”

run $x

if $a == $c then “jump in.txt end”

next a

jump in.txt loopa

label end

Thanks for any help

Thomas Siegfried

I don't understand your script. The fix deposit command inserts multiple
atoms over time. You appear to be invoking it multiple times and never
unfixing the previous ones. So possibly you have multiple fix deposit
commands active, which seems like a bad idea?


Dear Steve & all,

the unfix option doesn't change anything, and I also get the same error for a much easier input script:


dimension 3
boundary p p p

atom_style bond

units real

# create geometry

read_data run.data
mass 2 12
mass 1 16

group CNT type 2
group CH4 type 1

neighbor 2 bin

#Potential forces

pair_style lj/cut 10
pair_coeff * * 0.0 3.0 0.0

pair_coeff 1 2 0.128 3.605 10
pair_coeff 1 1 0.2943 3.81 10


fix 1 all nve
fix 2 all temp/rescale 50 1350 1400 0.1 1
fix 3 CNT rigid single
fix 4 CNT setforce 0.0 0.0 0.0

thermo_style multi
thermo_modify lost warn
thermo 100

dump 1 all atom 200 result*.lammpstrj

region CH4_oben block EDGE EDGE EDGE EDGE 151 EDGE units box

run 800

fix 6 all deposit 15 1 200 12345 near 2 attempt 15 region CH4_oben units box

run 2400

after 6 inserted atoms a segmentation fault occurs.

My data file is attached.

Thank you for your help,

Thomas Siegfried

run.data (76.1 KB)

in.txt (853 Bytes)

I just posted a patch that fixes this bug. It had to do with fix deposit being
used in conjunction with fix rigid.