LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] neigh_modify
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] neigh_modify

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Thu, 17 Aug 2017 16:49:11 -0400

On Thu, Aug 17, 2017 at 4:38 PM, Prakash Makwana <pmakwana9005@...24...> wrote:
Thanks for quick reply,

Artificial setup  means dont we suppose to use that?

​no, you can use it, but you have to know what is meaningful and what not. particularly during equilibration and preparation of a system into a specific state,​ this kind of approach can be very powerful. but you have to be aware of its limitations.

For the first , i want to melt it at 0 bar pressure. so i am tracking pressure. 

​this is and example for such a pointless thing i was mentioning. you simply cannot compute a meaningful pressure for a subsystem that is also applicable for expanding a system along a direction where only parts of the atoms are mobile. while you *can* set up such a simulation, it is a complete artifact with no corresponding setup in reality (how can you have a system at 0K in contact with a system at 800K and not exchange of kinetic energy?).

yes i try to visualise the system but as i start from restart file in next step it suddenly contract in z even temperature is increasing.

Before starting of simulation it has length in z about 40 angstroms and in next step it become 38.4.

even i am not observing appropriate expansion during heating what we expect from bulk melting. 

​have you tried doing this thing just with a fixed volume?



On 18 August 2017 at 00:05, Axel Kohlmeyer <akohlmey@...24...> wrote:

On Thu, Aug 17, 2017 at 1:13 PM, Prakash Makwana <pmakwana9005@...24...> wrote:
hello all,

 i am doing simulation for aluminium.I intitially heated crystal uoto 800K. now what i need to do is to create two group.Then heat one group to temperature higher than 
the melting temperature and keep the other group atoms fixed.
i need to heat such that its x and y dimension remain unchanged. so i applled barostate in z direction only.But as i know that barostate is applied to whole system. 
so how can i correct the barostate.?  

​this is a rather artificial setup, why bother with a barostat at all? unless there is a significant expansion upon melting, you could just keep the volume or otherwise compute the expected change in volume for the melting part and use the change_box command to expand the box as needed, and then run with fixed volume.

To apply thermostat to group i used fix_modify and to fix atoms of other group, i exclude it from time integration. i thought that i should turn off solid group interaction\
so i used neigh_modify command .

can anyone please tell me neigh_modify can correct barostat or not?

I am writing script here.i observed that the temperature of group which is heated suddenly increse from 800K to 1200K and then decrese slowely during inital timesteps.
But if i run same script made for alumina then there is no any increase in themperature is observed.sO Is there any difference between this? please look the below script 
and tell me what did i do wrong.

​what temperature reported how?
have you visualized your system? did you see anything out of the ordinary?
please note, that you have to be extremely careful when moving only part of the atoms with the box change. you can quickly create large overlaps. you have to watch where you place the origin of the cell. again, my main suggestion is to side-step all the headaches and worries and just run with a fixed volume. 


i named the heating group as liquid and fix group as solid. 

region box block -0.15 20.5 -0.135 20.5 19.0 40.9 units box
read_restart stage1.restart.130000
region box1 block -0.15 20.5 -0.135 20.5 -0.2 19.0 units box
region box2 block -0.15 20.5 -0.135 20.5 19.0 40.9 units box

group solid region box1
group liquid region box2


pair_style eam/alloy
pair_coeff * * Al 

compute 1 all pe
variable pressure equal press
variable peatom equal (pe/atoms)
variable mass_g equal mass(all)/6.02e23
variable vol_cm3 equal vol*1.0e-24
variable density equal v_mass_g/v_vol_cm3
variable teatom equal (etotal/atoms)
compute        le liquid pe/atom
compute        lo liquid reduce sum c_le
variable       leatom equal (c_lo)/(960)

compute        se solid pe/atom
compute        so solid reduce sum c_se
variable       seatom equal (c_so)/(960)

compute t_s solid temp 
compute t_l liquid temp 
compute te all temp
#compute p_l liquid pressure NULL
#pressure in solid
compute s1 solid stress/atom NULL
compute ps solid reduce/region box1 sum c_s1[1] c_s1[2] c_s1[3]
variable solidpress equal -(c_ps[1]+c_ps[1]+c_ps[1])/(3*20*17*26)
variable sxx equal -(c_ps[1])/(20*17*26)
variable syy equal -(c_ps[2])/(20*17*26)
variable szz equal -(c_ps[3])/(20*17*26)

#pressure in liquid
compute l1 liquid stress/atom NULL
compute pl liquid reduce/region box2 sum c_l1[1] c_l1[2] c_l1[3]
variable liquidpress equal -(c_pl[1]+c_pl[1]+c_pl[1])/(3*20*17*26)
variable lxx equal -(c_pl[1])/(20*17*26)
variable lyy equal -(c_pl[2])/(20*17*26)
variable lzz equal -(c_pl[3])/(20*17*26)

thermo_style custom step  c_t_s c_t_l temp press v_sxx v_syy v_szz  v_lxx v_lyy v_lzz pxx pyy pzz v_leatom v_seatom lz

neigh_modify exclude group solid solid
restart 150000 stage2.restart
log log.heat1500
fix 3 liquid npt temp 800 1500 1.0 z 0.0 0.0 1.0 dilate liquid
fix_modify 3 temp t_l 
run 70000
unfix 3

Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.

Dr. Axel Kohlmeyer  akohlmey@...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.