      subroutine potts_order(ista,iact,nd,ns,iq) 
c bernd berg nov 8 2007: assigns the value iq to the states ista(is) 
c kept in common_potts.f and returns the corresponding action iact.
      include '../../libs/fortran/implicit.sta'
      dimension ista(ns)
      iact=nd*ns
      do is=1,ns
        ista(is)=iq
      end do
      return
      end
