Arbitrary Periodic Boundary Condition

Hello,

I would like to create a fix that would allow the user to define arbitrary periodic boundaries in a simulation. This would work by creating two planes (defined by normal vector and a point on the plane). Periodic images could then be projected onto each plane. This would for instance allow the user to create a periodic boundary with cylindrical symmetry (like a slice of pie) rather than just Cartesian symmetry. This method has been used to study CNT buckling ( see “Wavelike rippling in multiwalled carbon nanotubes under pure bending”). Clearly this would involve editing the src code. I believe the approach would require editing the ghost atoms list of atoms near the defined periodic boundary planes (not sure if this is correct). I was hoping to use the pbc implemented in lammps as a jumping off point, however, it seems the actual the application of the pbc is scattered across several files. I have very little experience editing the lammps source code and was hoping to get some recommendations as to where I should begin (ie what src files could i find something similar etc.). I found the online tutorial “A dissection of LAMMPS classes - A Guide for Beginner LAMMPS Hackers” very helpful as a first step. Alternatively if someone knows a combination of fixes and constraints that could be applied as a hack I would also be interested.

Thanks!
Joseph

Hello,

I would like to create a fix that would allow the user to define arbitrary
periodic boundaries in a simulation. This would work by creating two planes
(defined by normal vector and a point on the plane). Periodic images could
then be projected onto each plane. This would for instance allow the user to
create a periodic boundary with cylindrical symmetry (like a slice of pie)
rather than just Cartesian symmetry. This method has been used to study CNT
buckling ( see "Wavelike rippling in multiwalled carbon nanotubes under pure
bending"). Clearly this would involve editing the src code. I believe the
approach would require editing the ghost atoms list of atoms near the
defined periodic boundary planes (not sure if this is correct). I was hoping
to use the pbc implemented in lammps as a jumping off point, however, it
seems the actual the application of the pbc is scattered across several
files. I have very little experience editing the lammps source code and was
hoping to get some recommendations as to where I should begin (ie what src
files could i find something similar etc.). I found the online tutorial "A
dissection of LAMMPS classes - A Guide for Beginner LAMMPS Hackers" very
helpful as a first step. Alternatively if someone knows a combination of
fixes and constraints that could be applied as a hack I would also be
interested.

i don't see, how this can work as a fix. as far as i see it, this
would require a completely new domain decomposition, which is indeed a
major undertaking and would be quite difficult to fold into the
existing code. have a look at domain.cpp and be scared...

axel.

Axel,

Thanks for the prompt response. Writing in a new domain decomposition is certainly beyond my ability, but suppose you were to keep the current domain decomposition and just ensure atoms in your simulation are far away from any boundary of the simulation box. In this case only the ghost atoms of particular atoms in the simulation would need to be changed. I suppose it would also only work for shorter range potentials. Is this a possible workaround?

Joseph

Axel,

Thanks for the prompt response. Writing in a new domain decomposition is
certainly beyond my ability, but suppose you were to keep the current domain
decomposition and just ensure atoms in your simulation are far away from any
boundary of the simulation box. In this case only the ghost atoms of
particular atoms in the simulation would need to be changed. I suppose it
would also only work for shorter range potentials. Is this a possible
workaround?

sorry, but i don't understand your reasoning. there is more to domain
decomposition than maintaining ghost atoms. i also don't understand
what you mean by "far away" form the boundary. with fixed or
shrinkwrapped boundaries, there are not "parasitic" ghosts.

you have to show some pseudocode or sketches to illustrate how you
will handle things.

axel.

It’s an interesting idea, but I’m not sure it would work.
Several things that would have to change:

domain::pbc() needs to be able to change the
coords of an atom that crosses a periodic boundary
to its new coords

comm::exchange() needs to be able to migrate atoms
that are no longer in a proc’s sub-domain to the new owning
proc - currently that takes advantage of the 3d grid of procs,
so it would probably need to call the irregular comm option
in LAMMPS for the arbitrary boundaries you’re describing

comm::borders() figures out what atoms owned by a proc
are ghost atoms of other prods, this also takes advantage
of the 3d grid of prods

comm:forward/revers comm is called every step to
communicate ghost atoms to other prods, this also
takes advantage of the 3d grid of prods

Steve