What I am trying to simulate is an evaporation of ammonia water, after being heated by a gold plate underneath. But I have received a lost atom error during minimization. If I removed the minimization command along with the velocity command, it gives bond atom missing error.
I am assuming that it is due to the water penetrating the gold plate but I have tried out all the fix/wall commands and fix/addforce command, the results are still the same.
Below are my input script:
# Create a simulation box
units real
dimension 3
atom_style full
bond_style hybrid morse harmonic
angle_style harmonic
dihedral_style charmm
improper_style umbrella
special_bonds dreiding
pair_style hybrid/overlay lj/cut/coul/long 12.0 hbond/dreiding/lj 4 6 6.5 90
kspace_style pppm 1.0e-4
kspace_modify slab 3.0
dielectric 1.0
boundary p p f
region awmix block 0 40.07 0 40.07 -5 100.07 #ammonia water region
create_box 4 awmix bond/types 2 angle/types 2 extra/bond/per/atom 3 extra/angle/per/atom 3 extra/dihedral/per/atom 3 extra/improper/per/atom 3 extra/special/per/atom 3
read_data ATLASparticle.data add append
region plate block 0 40.07 0 40.07 -5 -1 # gold plate
lattice fcc 4.08
create_atoms 4 region plate
lattice none 1.0
group liquid type 2 3
group solid type 4
# Define interaction potential
pair_coeff 1 1 lj/cut/coul/long 0.0 0.0
pair_coeff 1 2 lj/cut/coul/long 0.00278209 3.0544905
pair_coeff 1 3 lj/cut/coul/long 0.00309354 2.939787
pair_coeff 2 2 lj/cut/coul/long 0.21 3.36
pair_coeff 2 2 hbond/dreiding/lj 2 i 4.0 2.75 4
pair_coeff 2 2 hbond/dreiding/lj 2 j 4.0 2.75 4
pair_coeff 2 3 lj/cut/coul/long 0.08606498 3.1478565
pair_coeff 2 3 hbond/dreiding/lj 2 i 4.0 2.75 4
pair_coeff 2 3 hbond/dreiding/lj 2 j 4.0 2.75 4
pair_coeff 3 3 lj/cut/coul/long 0.1553 3.166
pair_coeff 3 3 hbond/dreiding/lj 2 i 4.0 2.75 4
pair_coeff 3 3 hbond/dreiding/lj 2 j 4.0 2.75 4
bond_coeff 1 morse 101.905 2.3470 1.0124
bond_coeff 2 harmonic 600.0 1.0
angle_coeff 1 103.045 106.67
angle_coeff 2 75.0 109.47
mass 4 196.96657 # gold
pair_coeff 4 4 lj/cut/coul/long 11.697 2.574
pair_coeff 1 4 lj/cut/coul/long 0.0 0.0
pair_coeff 2 4 lj/cut/coul/long 0.0 0.0
pair_coeff 3 4 lj/cut/coul/long 2.8675 0.0554
pair_coeff 3 4 lj/cut/coul/long 2.8675 0.0114
# Count molecule
variable oxygen atom "type==3"
variable nitrogen atom "type==2"
group oxygen dynamic all var oxygen
group nitrogen dynamic all var nitrogen
variable nO equal count(oxygen)
variable nN equal count(nitrogen)
fix oxy all ave/time 1000 1 1000 v_nO file number_oxygen.dat
fix nit all ave/time 1000 1 1000 v_nN file number_nitrogen.dat
# Count energy
variable kinetic_energy equal ke
variable potential_energy equal pe
variable pressure equal press
variable temperature equal temp
variable volume equal vol
fix myat1 all ave/time 1000 1 1000 v_kinetic_energy v_potential_energy v_pressure v_temperature v_volume file energy.dat
#Provide initial velocity to the atoms by setting temperature of our system = 298.15K
velocity all create 298.15 102939 dist gaussian mom yes rot yes
#Perform minimization
minimize 2.0e-5 0.001 10000 10000
timestep 1
reset_timestep 0
#Setting system
neigh_modify every 1 delay 0 check yes
# Results
dump dump03 all custom 1000 dump03.lammpstrj id type x y z ix iy iz vx vy vz
thermo_style custom step time temp pe ke etotal press vol
thermo 1000
# run
fix wall solid addforce 1.0 0.0 0.0 region plate
fix 2 all nve/limit 1
fix 3 all temp/berendsen 80 80 1
timestep 0.1
run 50000
I'm not sure if it is related to the data file (ATLASparticle.data = ammonia water data file) but I don't think that's the case because I have run similar simulation (same data file and parameters) and there is no overlapping.
#Create a simulation box
units real
dimension 3
atom_style full
bond_style hybrid morse harmonic
angle_style harmonic
dihedral_style charmm
improper_style umbrella
special_bonds dreiding
pair_style hybrid/overlay lj/cut/coul/long 12.0 hbond/dreiding/lj 4 6 6.5 90
kspace_style pppm 1.0e-4
dielectric 1.0
boundary p p p
region awmix block -50 58.63 -50 58.63 -50 58.63 #ammonia water region
create_box 3 awmix bond/types 2 angle/types 2 extra/bond/per/atom 3 extra/angle/per/atom 3 extra/dihedral/per/atom 3 extra/improper/per/atom 3 extra/special/per/atom 3
read_data ATLASparticle.data add append
group vapor type 2 3
#Define interaction potential
pair_coeff 1 1 lj/cut/coul/long 0.0 0.0
pair_coeff 1 2 lj/cut/coul/long 0.00278209 3.0544905
pair_coeff 1 3 lj/cut/coul/long 0.00309354 2.939787
pair_coeff 2 2 lj/cut/coul/long 0.21 3.36
pair_coeff 2 2 hbond/dreiding/lj 2 i 4.0 2.75 4
pair_coeff 2 2 hbond/dreiding/lj 2 j 4.0 2.75 4
pair_coeff 2 3 lj/cut/coul/long 0.08606498 3.1478565
pair_coeff 2 3 hbond/dreiding/lj 2 i 4.0 2.75 4
pair_coeff 2 3 hbond/dreiding/lj 2 j 4.0 2.75 4
pair_coeff 3 3 lj/cut/coul/long 0.1553 3.166
pair_coeff 3 3 hbond/dreiding/lj 2 i 4.0 2.75 4
pair_coeff 3 3 hbond/dreiding/lj 2 j 4.0 2.75 4
bond_coeff 1 morse 101.905 2.3470 1.0124
bond_coeff 2 harmonic 600.0 1.0
angle_coeff 1 103.045 106.67
angle_coeff 2 75.0 109.47
#Provide initial velocity to the atoms by setting temperature of our system = 298.15K
velocity all create 298.15 102939 dist gaussian mom yes rot yes
#Perform minimization
minimize 2.0e-5 0.001 10000 10000
timestep 1
reset_timestep 0
#Setting system
neigh_modify delay 10 every 1 check yes
variable oxygen atom "type==3"
variable nitrogen atom "type==2"
group oxygen dynamic all var oxygen
group nitrogen dynamic all var nitrogen
variable nO equal count(oxygen)
variable nN equal count(nitrogen)
fix oxy all ave/time 1000 1 1000 v_nO file number_oxygen_test.dat
fix nit all ave/time 1000 1 1000 v_nN file number_nitrogen_test.dat
dump dumpMIX all custom 1000 dumpMIXtest.lammpstrj id type x y z ix iy iz vx vy vz
thermo_style custom step time temp pe ke etotal press vol
thermo 1000
variable kinetic_energy equal ke
variable potential_energy equal pe
variable pressure equal press
variable temperature equal temp
variable volume equal vol
fix myat1 all ave/time 1000 1 1000 v_kinetic_energy v_potential_energy v_pressure v_temperature v_volume file energy_test.dat
#run
fix 2 all nve
fix 3 all temp/berendsen 413.15 413.15 100.0
fix 4 all temp/rescale 1 413.15 413.15 0.05 1.0
fix 5 all press/berendsen iso 4.0 4.0 1000.0
timestep 0.1
run 1000000
*You can get the data file from link below: https://github.com/JackyXes/ATLASparticle/blob/main/ATLASparticle.data Please ignore the coordinate values because I changed them for 2 different scripts.
Thanks in advance.
*Edit
As you can see, there are molecules entering the bottom plate. I tried using fix wall/region on the plate region but I got a illegal command error instead.
thermo_modify lost
option to allow for lost atoms. $\endgroup$