diffusion coefficient

Hi lammps users.
I am new in lammps. am using lammps_daily.
I would like to calculate diffusion coefficient of Iodine ions in CH3NH3PbI3 (MAPI)

1.My Diffusion coeff do not converge. Have a challenge on pair_style /pair_coeff and compute specifications
2. Below is my data file, potential file and MAPI data file

#MAPI

LAMMPS input script for diffusion of CH3NH3PbI3

---------- Initialize Simulation ---------------------

units metal
dimension 3
boundary p p p
atom_style atomic
read_data mapi_lammp.data

---------- Create Atoms ---------------------

group H type 1
group Pb type 2
group C type 3
group I type 4
group N type 5

---------- Define Inter-atomic Potential ---------------------

include potential_file
velocity all create 300 12345
run 0
velocity all scale 300.0
fix 1 all nve
min_style cg
minimize 1.0e-30 1.0e-30 10000 100000

equilibration run

thermo 1000
run 5000
reset_timestep 0

---------- dump option ---------------------

dump 1 all custom 5000 output.lammpstrj id type x y z

---------- Define Settings ---------------------

compute msd I msd com yes
variable twopoint equal c_msd[4]/6/(stepdt+1.0e-6)
fix 9 all vector 10 c_msd[4]
variable fitslope equal slope(f_9)/6/(10
dt)

---------- Initial Minimization ---------------------

thermo_style custom step temp c_msd[4] v_twopoint v_fitslope
thermo 1000
run 200000

print “All done!”

POTENTIAL FILE
pair_style hybrid lj/cut 2.5 buck 2.5
pair_coeff 1 1 lj/cut 0.0157 1.06710
pair_coeff 1 2 lj/cut 0.0140 2.26454
pair_coeff 1 3 lj/cut 0.0414 2.23440
#pair_coeff 2 1 lj/cut 0.0140 2.26454
pair_coeff 1 4 lj/cut 0.0574 2.7500
pair_coeff 1 5 lj/cut 0.0517 2.15950
pair_coeff 2 2 buck 70359906.629702 0.131258 0.0
pair_coeff 2 3 buck 32690390.937995 0.150947 0.00
pair_coeff 2 4 buck 103496.133010 0.321737 0.0
pair_coeff 2 5 buck 32690390.937995 0.150947 0.00
pair_coeff 3 3 lj/cut 0.1094 3.39970
pair_coeff 3 4 buck 112936.714213 0.342426 0.00
#pair_coeff 4 1 lj/cut 0.0574 2.7500
pair_coeff 3 5 lj/cut 0.1364 3.32480
pair_coeff 4 4 buck 22793.338582 0.482217 696.949542
pair_coeff 4 5 buck 112936.714213 0.342426 0.00
#pair_coeff 5 1 lj/cut 0.0517 2.15950
#pair_coeff 5 3 lj/cut 0.1364 3.32480
pair_coeff 5 5 lj/cut 0.1700 3.2500

---------- Molecular Dynamics Parameters ---------------------

neighbor 2.0 bin
neigh_modify delay 0 every 1
timestep 1.0e-15

MAPI DATA

H24 Pb4 C4 I12 N4

48 atoms
5 atom types

0.00000000 8.55672637 xlo xhi
0.00000000 9.25046000 ylo yhi
0.00000000 12.96364987 zlo zhi
Masses
1 1.00800000 # H
2 207.20000000 # Pb
3 12.01100000 # C
4 126.90447000 # I
5 14.00700000 # N

Atoms # atomic

1 1 4.22928180 1.32257527 4.07867538
2 1 4.32744457 7.92788473 8.88497449
3 1 0.04908138 5.94780527 8.88497449
4 1 8.50764499 3.30265473 4.07867538
5 1 4.32744457 7.92788473 10.56050031
6 1 4.22928180 1.32257527 2.40314956
7 1 8.50764499 3.30265473 2.40314956
8 1 0.04908138 5.94780527 10.56050031
9 1 2.89267836 0.72738217 3.24091247
10 1 5.66404801 8.52307783 9.72273740
11 1 1.38568483 5.35261217 9.72273740
12 1 7.17104154 3.89784783 3.24091247
13 1 4.23365429 8.13937800 4.13850262
14 1 4.32307208 1.11108200 8.82514725
15 1 0.04470890 3.51414800 8.82514725
16 1 8.51201747 5.73631200 4.13850262
17 1 4.32307208 1.11108200 10.62032756
18 1 4.23365429 8.13937800 2.34332231
19 1 8.51201747 5.73631200 2.34332231
20 1 0.04470890 3.51414800 10.62032756
21 1 5.64613878 8.78481959 3.24091247
22 1 2.91058759 0.46564041 9.72273740
23 1 7.18895077 4.15958959 9.72273740
24 1 1.36777560 5.09087041 3.24091247
25 2 4.27836318 4.62523000 0.00000000
26 2 0.00000000 0.00000000 0.00000000
27 2 4.27836318 4.62523000 6.48182493
28 2 0.00000000 0.00000000 6.48182493
29 3 4.55521607 8.67543291 3.24091247
30 3 4.00151030 0.57502709 9.72273740
31 3 8.27987349 4.05020291 9.72273740
32 3 0.27685288 5.20025709 3.24091247
33 4 4.60123414 4.74174879 3.24091247
34 4 3.95549223 4.50871121 9.72273740
35 4 8.23385541 0.11651879 9.72273740
36 4 0.32287096 9.13394121 3.24091247
37 4 6.98285346 6.40907946 12.67654392
38 4 1.57387291 2.84138054 0.28710595
39 4 5.85223609 1.78384946 0.28710595
40 4 2.70449028 7.46661054 12.67654392
41 4 1.57387291 2.84138054 6.19471898
42 4 6.98285346 6.40907946 6.76893089
43 4 2.70449028 7.46661054 6.76893089
44 4 5.85223609 1.78384946 6.19471898
45 5 3.93274845 0.78502179 3.24091247
46 5 4.62397792 8.46543821 9.72273740
47 5 0.34561473 5.41025179 9.72273740
48 5 8.21111164 3.84020821 3.24091247

Thank you
Edward
Student.

edward,

your simulations seem very short and there doesn’t seem to be much time set aside for equilibration. try to experiment with a (much) longer equilibration period and accumulate average over more production simulation data.

axel.

Hi Edward
If I well understand your script, timestep is set to 1-e15. But units metal have ps units not second. So a 1fs timestep should be written as command “timestep 0.001”
best