The subroutine SPM_quotCUBE" performs the periodic boundary conditions. It
can be readily modified to perform Lees-Edwards boundary conditions if this
was required.
C Retract positions to within cube
SUBROUTINE CUBE( GAMMA )
INCLUDE (PARAM)
DOUBLE PRECISION GAMMA(DIMPS)
INTEGER I
DO 1 I=1,D*NP
GAMMA(I) = GAMMA(I)-CUBSIZ*INT( GAMMA(I)/ CUBSIZ)
IF (GAMMA(I).LT.0) GAMMA(I) = GAMMA(I)+CUBSIZ
1 CONTINUE
RETURN
END