Thanks for the prompt reply.
I am sorry but I didn’t get as to how the system would be ill defined in x and z - directions if a part of system is non-periodic y-direction. The system I have described has been simulated in past “Modeling of Adsorption and Desorption in Pores of Simple Geometry Using Molecular Dynamics” , Langmuir,2001(17),7600-7604. In the schematic below , the direct distance between two atom is greater than cutoff but if we were to consider slitpore region periodic , there may be interaction between atom 1 and periodic image of atom 2 or vice versa. In this paper slitpore region was made non-periodic in order to prevent such interactions between atom 1 and atom 2 .
non periodic | periodic
slit pore O (Atom 1) bulk
O (Atom 2)
LAMMPS does not support the type of boundary condition you are requesting, and it probably never will, because it would greatly complicate the core code for ghost atoms, communication, etc… Essentially you are asking that the boundary condition in y switch from periodic to non-periodic at some particular value of x. This is probably quite common in continuum models, and I can see how something like this could be implemented in an MD simulation, although it would come with some very peculiar properties. For example, every time a particle in the simulation cell crosses the x position where the y boundary condition switches, the periodic images of that particle would appear and disappear in a discontinuous manner. This will cause the total potential energy and forces to be strongly discontinuous functions of particle position at x = s_switch. You can prevent this by using the pore walls to completely block fluid from approaching the y boundaries near x=x_switch, but at that point you are back to doing what Axel suggested i.e. make the periodic dimension in y large enough that particles at opposite pore walls can never interact with each other across the periodic boundary.
I was curious to see what Sarkisov and Monson said about their choice of boundary condition. “Periodic boundaries were used in the direction normal to the plane of the figure and also for the ink bottle geometry and open slit in the direction parallel to the channels in the plane of the figure.” No mention of the third direction! From the images taken from their simulations, it does appear that they implemented a switch boundary condition. But you will get very similar results if you follow Axel’s suggestion. You will need to construct a repulsive wall at x=x_switch to stop particles from going in behind the pore wall. It appears that Sarkisov and Monson also did this for their ink-bottle pore. I think fix wall/region will do the job, or you can achieve the same result with suitably placed frozen repulsive particles.