anchor.diff:            prm,fmodel,data_format,err)
        if (err /= 0) then
           if (iproc == 0) call dump_error(err,'')
  -        call mpi_wrapper_finalize(err)
           stop
        end if
        close(uprm)
  
positive.code:      call read_rst(urst,data_format,nvars,nclasses,iproc,nproc,seq,seqs_table,prm,fmodel,err)
       if (err /= 0) then
          if (iproc == 0) call dump_error(err,'')
          call mpi_wrapper_finalize(err)
          stop
       end if
       close(urst)
  
negative.code:   dim1 = nvars * nclasses
    dim2 = nvars * (nvars - 1) * nclasses**2 / 2
  
    write(filename,*) iproc
    call units_open(trim(adjustl(filename))//'.ene','unknown',uene,err)
    if(err /= 0) then
       if (iproc == 0) write(0,*) "error opening file ", trim(adjustl(filename))//'.ene'
       stop
    end if
    
    do j = 1,nseqs
       call mcmc_compute_energy(nvars,nclasses,seqs(:,j),prm(1:dim1),prm(dim1+1:dim1+dim2),efields,ecouplings,etot)
       call dump_energies(uene,etot,efields,ecouplings)
    end do
  
  end program eval
  