After recentereing, some resids still float out of unit cell.
I tried to recenter only 5 ns at a time but the result is the same.

Code:
stream toppar.str

read psf card name "/export/lustre_1/mallsopp/dpc/sim1/w-dpc-1.psf"
OPEN UNIT 1 READ CARD NAME "/export/lustre_1/mallsopp/dpc/rg/crd/sim1.crd"
 READ COOR UNIT 1 CARD
 CLOSE UNIT 1
 
coor copy comp

crystal free
crystal define cubi 70 70 70 90. 90. 90.
crystal build noper 0 
image byres sele segid DPC end 
update imgfrq 20 cutim 20.0

set i = 100
set j = 100
label beginloop

open unit @i read unform name /export/lustre_1/mallsopp/dpc/dcd/sim1/dyn@i.dcd

incr i by 1
incr j by 1
if @j .lt. 151 then goto beginloop

open write unit 20 file name micelle-tmp-sim1.dcd    ! Write recenered 

merge first 100 nunit 51 output 20 - !nfile 1000 output @wu -
!sele segid DPC .and. (-
! end -
sele segid DPC .or. segid WAT end -
 recenter -
orient norot sele type C212 .and. resid 1 end

close unit 20

end