LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] How to make a neutral sphere by Lammps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] How to make a neutral sphere by Lammps


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Sat, 16 Dec 2017 14:18:30 -0500



On Sat, Dec 16, 2017 at 3:23 AM, bahman daneshian <bahmanpbamp@...24...> wrote:
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.


 

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,
Bahman Daneshian

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...12...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.