If the interaction is short range, it wouldn't make a difference when the size of the system goes to infinity, i.e. the thermodynamic limit. The boundary conditions that you refer to are global, "topological" effects, while (short range) interactions are local, "metric" effects.
I find it hard to believe that there's a general proof of this for an arbitrary Hamiltonian and an arbitrary geometry, but it is quite simple to see this for specific systems.
For example, consider a 1D spin chain model (Ising, XY, Heisenberg, or whatnot) with $N$ sites and nearest neighbours interaction. For a given state of the system, the energy depends on the boundary conditions only through the interaction between two spins. Since there are $N-1$ other spins, it is very easy to convince yourself that the contribution from the boundary is negligible when $N\to\infty$.
By the way, when you calculate the partition function of an ideal gas, you usually assume it is confined in a box, and then state that the result is true for an arbitrary geometry. This is basically the same reasoning.
This post imported from StackExchange Physics at 2015-03-30 13:26 (UTC), posted by SE-user yohBS