Hi lammps-users,
I am having some trouble with the fix deposit command. I’m using ReaxFF and trying to add some iron atoms into the void space of a box that is otherwise occupied by a diamond crystal. I’m not currently focused on getting them into a particular location or arrangement, I just need to get them in the box. I keep getting the warning “WARNING: Particle deposition was unsuccessful (fix_deposit.cpp:347)” and I can’t figure out the cause. I’ve looked through the mailing list and documentation without result and the error isn’t too instructive. I don’t think the error is associated with reaxFF but I could be wrong. The script is below.
Thanks,
Matt Thompson
Initializations
units real
dimension 3
boundary p p p
atom_style charge
lattice diamond 3.5668
region mybox block 0 5 0 5 0 5
create_box 1 mybox
create_atoms 1 region mybox
mass 1 12.011
velocity all create 10 12345
Interaction definitions
pair_style reax/c NULL checkqeq yes
pair_coeff * * ffield-FeCHO.reax 1
neighbor 4.0 bin
neigh_modify check yes
Integrator Definitions
fix 1 all nvt temp 298 298 100
fix 4 all qeq/reax 1 0.0 10 1.0e-6 reax/c
timestep 0.001
dump initial trajectory and write to restart file
dump 1 all xyz 1 diamond.xyz
run 1
write_restart restart.diamond
Expand box by a factor of 3 in y to give space for new atoms
change_box all y scale 3
Add iron atoms to box
fix 5 all deposit 100 4 10 12345 region mybox global 5 10 near 2.0 units box
thermo 10
dump 2 all atom 10 added_iron.lammpstrj
dump_modify 2 scale no
run 1000
fix-deposit-errors.tar (30 KB)
Since you’re inserting into a region you’ve already filled with atoms via
create_atoms, how much “empty” space is there that has no
atom closer than 2.0 Angs (in your fix deposit command)?
Are you inserting 0 atoms, or just some of them are unsuccessful?
Have you visualized your system to insure after the change_box that
it is what you expect?
Steve
Hi Steve,
Thanks for the reply.
Are you inserting 0 atoms, or just some of them are unsuccessful?
I’m inserting 0 atoms; all insertions fail.
Since you’re inserting into a region you’ve already filled with atoms via create_atoms, how much "empty"space is there that has no atom closer than 2.0 Angs (in your fix deposit command)?
In the log file, the original box (Created orthogonal box = (0 0 0) to (17.834 17.834 17.834)) was filled with carbon atoms and then expanded in y by a factor of 3 (orthogonal box = (0 -17.834 0) to (17.834 35.668 17.834)) to create 2x that original box size in void space. So only 1/3 of the box has atoms in it and there is plenty of space > 2.0 Angstroms away from another atom.
Have you visualized your system to insure after the change_box that
it is what you expect?
Yes, after applying periodic images in each dimension in VMD, it shows what I was expecting - alternating layers of atoms in the xz plane with empty space in a 1:2 ratio. I’ve attached that lammpstrj dump in case it would be useful. I dumped in between expanding the box with change_box and trying to add iron atoms with fix deposit.
Thanks,
Matt Thompson
expanded_box.lammpstrj (45.2 KB)
If you are using mybox as the region for fix deposit,
which you also used to create the atoms, then
isn’t it the region in the 1/3 of the final expanded box where
the atoms are? I.e. you need to define another
region in the void space to do the deposit into?
Steve
Steve,
Yes, that was the problem. I have defined a new region that includes only the void space and atom insertion works fine now. Thanks for your help.
Best,
Matt Thompson