fix atoms in simulation box

Dear all,
this is the sample script,

region box block 0 20 0 20 0 40
region box1 block 0 20 0 20 0 20
region box2 block 0 20 0 20 20 40

group 1 region box1
group 2 region box2

  1. fix 4 2 npt temp…
  2. fix 4 all npt temp…(what is the difference between 1&2)

please assume that i have written whole script. i am writting only some points

then i created atoms in these box1 and box2 region. 1
1)If i apply barostaste or thermostate to only one region by excluding other atoms from time integration so what is the meaning of that? if i have periodic boundary condition. this will fix the another region atoms

  1. or if i apply barostate or thermostate to whole simulation box and want fix other half atoms . i tried fix setforce command but still not able to fix the other half

the problem is where it apply barostate/ thermostate it apply on whole simlation box or only on that region which is time integrated?

Dear all,
this is the sample script,

region box block 0 20 0 20 0 40
region box1 block 0 20 0 20 0 20
region box2 block 0 20 0 20 20 40

group 1 region box1
group 2 region box2

1) fix 4 2 npt temp.......
2) fix 4 all npt temp.......(what is the difference between 1&2)

please assume that i have written whole script. i am writting only some
points

then i created atoms in these box1 and box2 region. 1
1)If i apply barostaste or thermostate to only one region by excluding
other atoms from time integration so what is the meaning of that? if i have
periodic boundary condition. this will fix the another region atoms

2) or if i apply barostate or thermostate to whole simulation box and
want fix other half atoms . i tried fix setforce command but still not able
to fix the other half

the problem is where it apply barostate/ thermostate it apply on whole
simlation box or only on that region which is time integrated?

​please note the following:

- fix npt applies a barostat, a thermostat, and ​does time integration of
atoms
- a barostat always applies to the entire box, and there can only be one
fix active that modifies the box dimension. whether the box expansion also
scales atom positions or not or partially can usually be selected with a
flag
- time integration and thermostat fixes are only applied to atoms in the
fix group (also for other fixes that do thermostatting and/or time
integration)
- if you want to immobilize atoms (please do not use the term "fix" in this
context as it can be easily confused with atoms that a fix is applied to),
you can either exclude them from time integration or you have to make sure
that both, velocities and forces, are zero.
- all of the above is described in the LAMMPS manual and has been discussed
many times on the mailing list and thus can be found and explained in the
mailing list archives, so please make an effort to learn from the material
at hand.

axel.