A question about links under periodic boundary condition

Dear all,

I want to simulate polymer chain cross links under periodic boundary condition. Below graph is the simple sketch. In the simulation box, a number of molecules are connected. In my graph, between dashed lines, A-B-B-A-B-B is chain structures constructed by my script. By lammps periodic boundary condition, a number of images of A-B-B-A-B-B will appear in the neighbor image.
My question is, I also want the link labeled dashed line, which means bond interaction between last B in one image box and the first A in next image box.
How could I do to let lammps will include the dashed line(FENE bond) during simulation?

Best wishes,


From looking at the code ("bond_table.cpp"), my impression is that
when calculating the bonded interactions between atoms, LAMMPS chooses
the closest image automatically. If you bond the first A with the
last B, and the periodic boundary conditions are set correctly, that
should be enough. You don't have to tell LAMMPS that the A and B are
in different boxes.

   I think that bond-angle and dihedral-angle (3-body, 4-body bonded)
interactions work the same way.
(You are right to be concerned. I know that AMBER has trouble with this.)


  Thanks for your reply.
  It is very helpful. I thought it this way too, connecting first A and last B in the simulation box. However, I worried that LAMMPS will report too long bond error.
  Thanks a lot again.

Best wishes,

在 Jul 22, 2011,7:40 PM, Andrew Jewett 写道:

In the input data file, you tell LAMMPS that you want
atom I bonded to atom J explicitly. If your periodic
dimension is so small that there is ambiguity about which
image of J should be bonded to I, then you could have
problems, but otherwise it is just the closest one.