PBC bead and spring.


I am currently having a problem using PBC with polymer chains. I use a c++ code to generate my data files that contains the atoms coordinates. My code works the following way. I determine a fiber length and a box size. I start depositing fibers randomly. if a fiber crosses the box I cut the fiber at the intersection and introduce the fiber from the other side. now when I use PBC it works only when one fiber goes out of box but if the fiber gets in the box it is not connected to its images. My question is how to introduce bonded interactions between a cell and its image in LAMMPS.

Ahmed Sengab