# Regarding selective boundary condition

Hi,

Can I use selective boundary condition for different group of atoms? Suppose,I have two groups of atoms and I want to fix walls for one group but periodic boundary for other group of atoms in the same dimension.Can LAMMPS handle this?Is there any way to solve this?

Kanka

Hi,
Can I use selective boundary condition for different group of atoms?
Suppose,I have two groups of atoms and I want to fix walls for one group but
periodic boundary for other group of atoms in the same dimension.Can LAMMPS
handle this?Is there any way to solve this?

no. you cannot use a wall fix on periodic boundaries, as then it is -
due to the periodicity - undefined on which side of the wall a
particle is.
however, you could model a model a semi-reflective region using fix
oneway, which does not have the conceptual problem of using fix wall
and is instead a well defined entity under any boundary conditions.

axel.

hi,

Thanks for the reply.I am thinking of some other alternative to do this.Can I make two simulation boxes with a little different dimension using a single input file?If possible then I can use two different boundary condition for two different boxes.Can LAMMPS do this?

Regards,

Kanka

hi,
Thanks for the reply.I am thinking of some other alternative to do
this.Can I make two simulation boxes with a little different dimension using
a single input file?If possible then I can use two different boundary
condition for two different boxes.Can LAMMPS do this?

this is even worse than what you were asking about in the first place.
even if it were technically possible (and it is not), you'll have
particles suddenly vanishing from the neighborhood of others, which
would result in giving both of those groups of particles a sudden
kick, when passing through the domain boundaries.

furthermore, with periodic boundaries, you are translationary
invariant, but with fixed boundaries not. so same as for the walls,
you have the problem of defining, where where the periodic system
begins and ends, but due to its periodicity, there is not beginning or
end.

as i mentioned before. with fix oneway it is conceptionally and
technically clean to build a semi-permeable barrier. it was
particularly written to address the issues that you are running into
(you are not the first person asking for something along these lines)
and that cannot be cleanly solved. you may need to have two regions of
them with opposite direction of reflection placed in your box to have
reflections on both directions, but i urge you to give it a try before
dismissing it again and coming up with even more problematic
suggestions.

axel.