boundary separation from other atoms

Dear Lammps users & Developers
I used the reax/c pair style in simulation.
I tried to sett the boundary forces to zero during equilibration
by using “fix setforce 0.0 0.0 NULL” & “fix aveforce NULL NULL 0.0” (following commands). I used “fix aveforce” to boundary groups be able to move during the shrinking of simulation box in equilibration steps.
the equilibration include 2 step (1-langvin & 2-nvt).
during NVT equilibration and after half of run time, the one side of the boundary start to seperate from others slowly. I have a warning in NVT equilibration when using the thermostat just for mobile group “WARNING: Temperature for fix modify is not for group all (…/fix_nh.cpp:1335)” that I didn’t have this warning in Langvin step.
1-I want to know why I have this warning in NVT equilibration step but don’t in Langvin step, and is it wrong to apply the thermostat just for mobile group when I am using NVT?
2- why the boundry start to seprate from other atoms in my simulation

boundary p p s
#minimisation
fix boxrelax all box/relax x 0 y 0
min_style cg
min_modify dmax 0.1 line quadratic
minimize 1.0e-6 1.0e-8 10000 1000000

compute new3d mobile temp
compute new2d mobile temp/partial 1 1 0

#Equilibrate_1 (Langvin)
velocity mobile create 300 12345 temp new3d mom yes rot yes dist gaussian
fix fixnve all nve
fix fixstep1 mobile langevin 300 300 50 699483
fix_modify fixstep1 temp new3d

fix upperforce upper setforce 0.0 0.0 NULL
fix lowerforce lower setforce 0.0 0.0 NULL

fix loweraveforce lower aveforce NULL NULL 0.0
fix upperaveforce upper aveforce NULL NULL 0.0

unfix fixnve
unfix fixstep1
unfix upperforce
unfix lowerforce
unfix loweraveforce
unfix upperaveforce

reset_timestep 0

#Equilibrate_2 (NVT)
fix fixstep2 all nvt temp 300 300 50
fix_modify fixstep2 temp new3d

fix upperforce upper setforce 0.0 0.0 NULL
fix lowerforce lower setforce 0.0 0.0 NULL
fix loweraveforce lower aveforce NULL NULL 0.0
fix upperaveforce upper aveforce NULL NULL 0.0

Dear Lammps users & Developers
I used the reax/c pair style in simulation.
I tried to sett the boundary forces to zero during equilibration
by using "fix setforce 0.0 0.0 NULL" & "fix aveforce NULL NULL 0.0"
(following commands). I used "fix aveforce" to boundary groups be able to
move during the shrinking of simulation box in equilibration steps.
the equilibration include 2 step (1-langvin & 2-nvt).
during NVT equilibration and after half of run time, the one side of the
boundary start to seperate from others slowly. I have a warning in NVT
equilibration when using the thermostat just for mobile group "WARNING:
Temperature for fix modify is not for group all (../fix_nh.cpp:1335)" that I
didn't have this warning in Langvin step.

1-I want to know why I have this warning in NVT equilibration step but don't
in Langvin step, and is it wrong to apply the thermostat just for mobile
group when I am using NVT?

because in your input below you are thermalizing *all* atoms with the
temperature computed on a subset of atoms.
if you want the same situation as with fix langevin, you have to write
a different input (e.g. use fix nvt with out fix_modify and fix nve on
all atoms that are not time integrated by fix nvt).

2- why the boundry start to seprate from other atoms in my simulation

how on earth should somebody know? there is no information about it in
the input fragment below and we have yet to find the first person that
can read the minds of other LAMMPS users or their computers.

axel.

Dear Axel
1- in fix langvin I computed the mobile temperature and then thermalise the same group (mobile), but if I use fix nvt for mobile group with out fix_modify (as you said), it means, I compute temperature of all atoms and then thermalise the mobile group. as I understand, you mean:
“fix fixstep2 mobile nvt temp 300 300 50
fix fixnve boundary nve”

but I can’t understand the reason of eliminate the “fix_modify fixstep2 temp new3d”.
I think I should compute the mobile group temperature and thermalise the same group. please clear it for me.

Dear Axel
1- in fix langvin I computed the mobile temperature and then thermalise the
same group (mobile), but if I use fix nvt for mobile group with out
fix_modify (as you said), it means, I compute temperature of all atoms and

no it does *not* mean that.

then thermalise the mobile group. as I understand, you mean:
"fix fixstep2 mobile nvt temp 300 300 50
fix fixnve boundary nve"

but I can't understand the reason of eliminate the "fix_modify fixstep2 temp
new3d".
I think I should compute the mobile group temperature and thermalise the
same group. please clear it for me.

this is not the way how things work around here. first, please read
the documentation of fix nvt again. *that* should be the primary
source for clarification. then, if you don't agree with me, please
provide proof that things are the way you believe they are. without
that we can keep arguing forever without ever getting somewhere.

axel.

Thanks Axel, I studied the NVT documentation again carefully and found that the group of temperature computed in NVT is same as fix group and it is not need to use fix_modify.
but I tried to do some test with NPT :
NPT documentation says the temperature and persure computed for all atoms, like “compute presure”.
I tried to apply thermostat and barostat to a mobile group by use NPT.
the documentation suggest to calculate the presure of a specified group
it is need to use “compute stress/atom” and then “compute reduce sum”.
I tried do it more but the final group presure is a variable result, and no a compute result then I can’t use it
in fix_modify. because the fix_modify need a compute_ID. please advise me.

compute new3d mobile temp
compute peratom all stress/atom
compute p mobile reduce sum c_peratom[1] c_peratom[2] c_peratom[3]
variable mobpress equal -(c_p[1]+c_p[2]+c_p[3])/(3*${mobvol})

fix fixstep2 mobile npt temp 300 300 50 x 0 0 100 y 0 0 100
fix_modify fixstep2 press p temp new3d
fix fixnve boundary nve

Thanks in advance
Hadi

Thanks Axel, I studied the NVT documentation again carefully and found that
the group of temperature computed in NVT is same as fix group and it is not
need to use fix_modify.
but I tried to do some test with NPT :
NPT documentation says the temperature and persure computed for all atoms,
like "compute presure".
I tried to apply thermostat and barostat to a mobile group by use NPT.

this is not possible. the pressure is always computed for the entire system.

the documentation suggest to calculate the presure of a specified group
it is need to use "compute stress/atom" and then "compute reduce sum".
I tried do it more but the final group presure is a variable result, and no
a compute result then I can't use it
in fix_modify. because the fix_modify need a compute_ID. please advise me.

this would be inconsistent with the NPT equations of motion. for
starters, you don't have a well defined volume that you can use to
convert the (virial) stress into a suitable pressure.

in general, this likely means, that your either your system setup is
not adequate for what you are trying to simulate or that you are
trying something that is not necessary. also, why try something more
complicated if you have obviously not yet understood what the problem
is? you are just complicating your problem.

axel.