My question is regarding periodic boundary condition

What would be the equations for PBC if my box's (cubic) origin is at the
corner instead of the center of the box. i.e all atom co-ordinates lie
within 0 to L rather that -L/2 to L/2.(L is the length of the box)

For the latter case (-L/2 to L/2) the PBC is written as (in fortran)

   RX(I) = RX(I) - L*ANINT(RX(I)/L)
  RY(I) = RY(I) - L*ANINT(RY(I)/L)
  RZ(I) = RZ(I) - L*ANINT(RZ(I)/L)

Any help would be appreciated

Thanks and Regards,
Mayur M. Ostwal

LAMMPS doesn't care whether your periodic (or non) box
has its corner or center at the origin (or anywhere else).
It just keeps track of xlo,xhi,xprd etc for the box edges. The
logic for this, including for enforcing the PBC is in domain.cpp.