[lammps-users] semi-permeable wall?

Hello,

From my experiments with lammps, it seems to be impossible to place it

on the non-repulsive side of a fixed wall that is repulsive in one
direction.

For example, the combination of

create_atoms 1 single -1 0 0
fix mywall all wall/lj93 xlo 0 1. 1. 2.5

seems to result in the error:

ERROR on proc 3: Particle on or inside fix wall surface
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 3
rank 3 in job 169 cn-b204-4_37257 caused collective abort of all
ranks
  exit status of rank 3: killed by signal 9

Is this a bug or is this a desired feature?

I am trying to construct a geometry in which I have particles diffuse
(actually, my particles are pushed inside) into a region that would
be coated with some kind of repulsive material from the inside.
Therefore, particles can enter into this region, but not get out again.

It is not possible to create such a situation using lammps?

Thanks for any help!

(PS: I could of course rebuild my walls using a collection of LJ
particles that allow for tiny openings through which I would squeeze my
external mparticles using large forces. But it seems that this would
mean an illimited amount of wall particles to be simulated, even if I
keep them fix, such that a simulation would probably take huge amount of
time and memory resources.)

You have defined a wall at x=0
that is a "lo" wall meaning it pushes on
atoms with x > 0. So you can't put
an atom inside the wall at x= -1. The
force from the wall on that atom
would be infinite. Why do
you want to do that?

Steve

hi bjoern,

Hello,

>From my experiments with lammps, it seems to be impossible to place it
on the non-repulsive side of a fixed wall that is repulsive in one
direction.

For example, the combination of

create_atoms 1 single -1 0 0
fix mywall all wall/lj93 xlo 0 1. 1. 2.5

seems to result in the error:

ERROR on proc 3: Particle on or inside fix wall surface
application called MPI_Abort(MPI_COMM_WORLD, 1) - process 3
rank 3 in job 169 cn-b204-4_37257 caused collective abort of all
ranks
exit status of rank 3: killed by signal 9

Is this a bug or is this a desired feature?

this is a feature. this way you avoid having
particles located at or near the position of
the divergence of the wall potential, which
is easy to achieve "from the back" since
there is no repulsion. in case of the reflective
walls, this is not doable, since one determines
the reflection point from particles having crossed
the wall and then places them back on the
other side of the wall.

I am trying to construct a geometry in which I have particles diffuse
(actually, my particles are pushed inside) into a region that would
be coated with some kind of repulsive material from the inside.
Therefore, particles can enter into this region, but not get out again.

It is not possible to create such a situation using lammps?

you would have to program a new fix - probably derived by copying
and modifying one of the existing wall fixes - that is tailored to
your specific needs.

Thanks for any help!

(PS: I could of course rebuild my walls using a collection of LJ
particles that allow for tiny openings through which I would squeeze my
external mparticles using large forces. But it seems that this would
mean an illimited amount of wall particles to be simulated, even if I
keep them fix, such that a simulation would probably take huge amount of
time and memory resources.)

yes. most likely, it will take more computational effort, but it depends
on the overall system size, how much more. it would also be more realistic,
right? what you would need sounds more like a wall with a "soft" potential,
i.e. a potential without a divergence.

there are a number of ways how to do this. if you had some more
specific information about what you want to achieve and what functional
forms or potentials you have in mind, perhaps some people here on
the list can make some more specific suggestions.

cheers,
     axel.

Thanks Axel.
To be a bit more precise, I am planning to have polymer chains grow into
a kind of chamber. For lammps, I was planning to define long fene bead
chains, maybe with fixed bondlengths, have them strictly aligned along
some axis (say y), and then apply a force on these linear chains in the
y direction, such that they grow into the chamber.
Inside the chamber, I want langevin dynamcis to take over. And I do not
want any particle to leave the chamber, but I have to allow for these
chains to enter the chamber.
In lammps terms, another workaround (I do not know whether it is
possible), would be to have group-IDs of atoms assigned due to position.
If, for examples, the walls of the chamber would only be acting on
particles of group InChamber, but not on particles of group OutChamber,
that would be cool. However, in this case a particle of group OutChamber
would have to change its group-ID as soon as it enters the chamber.
Maybe something like this is possible?
I tried to modify the wall/lj93 command by setting fwall=0 if onflag==0
and commenting out the error message, but I now get the error:
ERROR: Dump dcd of non-matching # of atoms

I am sure that is because the fixwall class still does some
out-of-bounds checking, somehow preventing to save any particle outside
the walls, but I do not know how to tell my modified wall/lj93 class to
override this out-of-bounds checking and allowing to save particles that
are actually outside the walls.

Thanks Axel.
To be a bit more precise, I am planning to have polymer chains grow into
a kind of chamber. For lammps, I was planning to define long fene bead
chains, maybe with fixed bondlengths, have them strictly aligned along
some axis (say y), and then apply a force on these linear chains in the
y direction, such that they grow into the chamber.

this could be done by using fix addforce or something similar.
this is actually "region aware"

Inside the chamber, I want langevin dynamcis to take over. And I do not
want any particle to leave the chamber, but I have to allow for these
chains to enter the chamber.

then you need to have a custom fix.
although i have to remark that it is not quite obvious to me,
how this kind of setup would be physically meaningful.

In lammps terms, another workaround (I do not know whether it is
possible), would be to have group-IDs of atoms assigned due to position.
If, for examples, the walls of the chamber would only be acting on
particles of group InChamber, but not on particles of group OutChamber,
that would be cool. However, in this case a particle of group OutChamber
would have to change its group-ID as soon as it enters the chamber.

no. dynamical group ids are not possible, you'd have to redefine them
all the time, which is not very efficient. but see my remark about
fix addforce. you could form a chamber from six "boards" (i.e. flat rectangular
regions), each of which is a box shaped region which in combination with
with fix addforce would add a sufficiently strong force to your chain atoms
to pull them into the "chamber" and then keep them in there.

Maybe something like this is possible?
I tried to modify the wall/lj93 command by setting fwall=0 if onflag==0
and commenting out the error message, but I now get the error:
ERROR: Dump dcd of non-matching # of atoms

that has to be due to something else. the dcd file format requires
a constant number of atoms, but somehow this is not given in your
simulation. impossible to tell why without actually seeing the input.

I am sure that is because the fixwall class still does some
out-of-bounds checking, somehow preventing to save any particle outside
the walls, but I do not know how to tell my modified wall/lj93 class to
override this out-of-bounds checking and allowing to save particles that
are actually outside the walls.

nope.

cheers,
     axel.

I am trying to construct a geometry in which I have particles diffuse
(actually, my particles are pushed inside) into a region that would
be coated with some kind of repulsive material from the inside.
Therefore, particles can enter into this region, but not get out again.

I don't really understand the physicality of this model. But you
could probably write a simple fix that changed the group assignment
of an atom once it got inside a region. Then if you used fix wall/region,
the wall would constrain the atom to stay inside.

Steve

That would be simple?
Could you give me a hint how to do that?
I am a bit lost here.
As to the physicality of the model, it really is simple.
In some animals, polymer chains can be produced in some kind of tissue
layer. This production can proceed at rather constant speed, or
otherwise said, the chains are being pushed forward with rather constant
force.
However, these chains can grow into some kind of extracellular region,
where they will start to interact in maybe less trivial ways. This
extracellular region is bounded by the cell walls, that are absolutely
impenetrable for the chains.
The only interesting part here is the interaction of growing polymer
chains in the extracellular region, but I do have to get these chains to
appear somehow in the extracellular region slowly, monomer by monomer.

Use any simple fix like fix nve as a starting point.
In the routine that does the check, simply loop
over atoms, check if each one is in the region.
If it is, change the group setting to be in the
group you want, which will be constrained by
another fix, like fix wall/region, to be in the region.

Steve