How to make a neutral sphere by Lammps

Dear Lammps users,

I am going to simulate a deposition behavior of anatase nanoparticles by LAMMPS. For this purpose, I first made a successful primitive unit cell of anatase by lattice command and checked the resulted structure which works correctly.

Then, I made my deposition model as below and started to stabilization the model at 300k by fix NVT command. unfortunately, the sphere in my model is not charge neutral and I have not idea how I can make it neutral. How about increasing the size of the sphere?!

Second, although I succeed to fix temp. by considering Tdamp to 10 instead of 100, t still seems that the model starts to evaporate at the room temp. which should not happen!

Therefore, please let me know whether you can give me any comment on my mistakes.

dimension 3

units real
atom_style charge
boundary p p p

#simulation box
region box block 0 37.86 0 37.86 0.0 114.168 units box
create_box 2 box #2 is number of atomss

lattice custom 1 a1 3.786 0.00000 0.00000 a2 0.0000 3.786 0.00000 a3 0 0 9.514 &
basis 0.0000 0.0000 0.0000 &
basis 0.0000 0.5000 0.2500 &
basis 0.5000 0.5000 0.5000 &
basis 0.5000 0.0000 0.7500 &
basis 0.0000 0.0000 0.2080 &
basis 0.0000 0.5000 0.4580 &
basis 0.5000 0.0000 0.5420 &
basis 0.5000 0.5000 0.2920 &
basis 0.5000 0.5000 0.7080 &
basis 0.5000 0.0000 0.9580 &
basis 0.0000 0.5000 0.0420 &
basis 0.0000 0.0000 0.7920

mass 1 47.86
mass 2 15.99940

#particle
region particle sphere 18.93 18.93 76.112 14 units box
#region particle block 4 6 4 6 7 9 units lattice
#region particle block 15.144 22.716 15.144 22.716 66.598 85.626 units box
create_atoms 2 region particle &
basis 1 1 &
basis 2 1 &
basis 3 1 &
basis 4 1 &
basis 5 2 &
basis 6 2 &
basis 7 2 &
basis 8 2 &
basis 9 2 &
basis 10 2 &
basis 11 2 &
basis 12 2
group particle region particle

set type 1 charge 2.196
set type 2 charge -1.098

#substrate
region substrate block 0 37.86 0 37.86 0 28.542 units box
create_atoms 2 region substrate &
basis 1 1 &
basis 2 1 &
basis 3 1 &
basis 4 1 &
basis 5 2 &
basis 6 2 &
basis 7 2 &
basis 8 2 &
basis 9 2 &
basis 10 2 &
basis 11 2 &
basis 12 2
group substrate region substrate

set type 1 charge 2.196
set type 2 charge -1.098

#-----------------------------------------Buckingham Potential------------

pair_style buck/coul/long 15.0
pair_coeff 1 1 717647.40 0.154 121.067
pair_coeff 1 2 391049.10 0.194 290.331
pair_coeff 2 2 271716.30 0.234 696.888

neighbor 2.0 bin # skin distance for real units is by default 2.0
neigh_modify every 1 delay 0 check yes

kspace_style pppm 0.0001

#-------------------------------------Initial Equilibration at 300K --------------------

timestep 1.0

velocity all create 300 12345 mom yes rot no
fix 1 all nvt temp 300.0 300.0 5.0
#fix 1 all nve

thermo 100

dump 1 all image 500 image.*.png type type adiam 1.0 axes yes 0.8 0.02 zoom 2.5 view 80 30

dump_modify 1 backcolor white boxcolor white acolor 1*2 blue/red/orange/green/cyan/aqua/yellow/red

run 5000
unfix 1

Yours Sincerely,

Dear Lammps users,

I am going to simulate a deposition behavior of anatase nanoparticles by
LAMMPS. For this purpose, I first made a successful primitive unit cell of
anatase by lattice command and checked the resulted structure which works
correctly.

Then, I made my deposition model as below and started to stabilization the
model at 300k by fix NVT command. unfortunately, the sphere in my model is
not charge neutral and I have not idea how I can make it neutral. How about
increasing the size of the sphere?!

‚Äčthe reason why your system may not be neutral is a geometric one. LAMMPS
cannot fix this for you, you have to use your own brains and think
creatively.
the reason for non-neutral objects through using create_atoms in an
arbitrarily shaped region is that neither the region nor the lattice
command have any notion of what the total charge of the created object will
be. this is something that you have to figure out from geometric
considerations. on the LAMMPS side, you can modify both, the origin and the
size of the sphere, but whether it is geometrically possible to generate a
neutral object this way, depends on your specific lattice and the
dimensions.

an obviously more rigorous approach is the following. rather than placing
individual atoms, you can generate your geometry based on neutral groups.
there is some minimal support for that in LAMMPS through the molecule
command, but adapting this to a complex lattice may be tedious. the
alternative is to write a little tool by yourself, that builds the suitable
geometry.

axel.

Dear Axel,

Thank you very much for your response. Actually, it seems that the problem is not just relevant to the particle group(nanosphere) charge.

In fact, even when I disable the particle group and run the model, the lammps still tells me that your system is not charge neutral which is correct. Since, if you consider 1300 atoms with charge of 2.196 and 1400 atoms with the charge of -1.098, so the result is 219.6 which is charge neutral.

Therefore, I guess first I should find exact charge value of O and Ti in Anatase structure.

Please let me know I am right or not.

With the best regards,

Dear Axel,

Sorry the charges are Ok. I think I should again check the fractional coordinates in lattice command.

Yours,
Bahman