anchor.diff:        IB_A = IBSPGPFTP(IATP)
         IB_B = IBSPGPFTP(IBTP)
   *
  -      NVAR = NDET
  -      NVAR_MAX = NDET_MAX
  +      IF(NOCSF.EQ.1) THEN
  +        NVAR = NDET
  +        NVAR_MAX = NDET_MAX
  +      ELSE
  +        NCONF = NCONF_PER_SYM_GN(ISM, ISPC)
  +        NCSF =  NCSF_PER_SYM_GN(ISM, ISPC)
  +        NCCM_CONF = NCM_PER_SYM_GN(ISM, ISPC)
  +        NSCM_CONF = NCCM_CONF
  +        NDET = NSD_PER_SYM_GN(ISM, ISPC)
  +        NVAR = NCSF
  +*. There is pt only the single symmetry for CSFs, so
  +        NVAR_MAX = NCSF
  +        WRITE(6,'(A,2(2X,I9))')
  +     &  ' Number of CONF determinants/combinations in S, C',
  +     &    NCCM_CONF, NSCM_CONF
  +C?      WRITE(6,*) ' NCONF, NCSF, NSD = ', NCONF, NCSF, NSD
  +      END  IF
   *
         NCVAR = NVAR
         NSVAR = NVAR
  
positive.code:      &  ' **************************************************'
          WRITE(6,*)
          END IF
          CALL FRMDSC(WORK(KPVEC1),NVAR,-1,LUC,IMZERO,IAMPACK)
          CALL COPVEC(WORK(KPVEC1),WORK(KPVEC2),NVAR)
  *
  C?      WRITE(6,*) ' Testing: CI vector read in '
  C?      CALL WRTMAT(WORK(KPVEC1),1,NVAR,1,NVAR)
  *
          IF(IDENSI.EQ.1) THEN
            KRHO2 = 1
          END IF
          IF(IDENSI.GE.1)
       &  CALL DENSI2(IDENSI,WORK(KRHO1),WORK(KRHO2),
       &       WORK(KPVEC1),WORK(KPVEC2),0,0,EXPS2,ISPNDEN,WORK(KSRHO1),
       &       WORK(KRHO2AA),WORK(KRHO2AB),WORK(KRHO2BB),1)
          IF(IDENSI.EQ.2) THEN
  *. Test calculation of energy
            CALL EN_FROM_DENS(ENERGY,2,0)
            WRITE(6,*) ' Energy from density ', ENERGY
          END IF
  *
  C?      IF(I_DO_LZ2.EQ.1) THEN
  C?          CALL EXP_LZ2(KPVEC1,KPVEC2,RLZEFF,RL2EFF,0)
  
negative.code: *. Position vectors 
           CALL REWINO(LUC)
           DO JROOT = 1, IH0ROOT
             IF(ICISTR.EQ.1) THEN
               CALL FRMDSC(KVEC1,NVAR,-1,LUC,IMZERO,IAMPACK)
             ELSE
               CALL REWINO(LUSC1)
               CALL COPVCD(LUC,LUSC1,KVEC1,0,LBLK)
             END IF
           END DO
           IF(ICISTR.EQ.1) THEN
             CALL COPVEC(KVEC1,KVEC2,NVAR)
             CALL DENSI2(1,WORK(KRHO1),WORK(KRHO2),
       &          KVEC1,KVEC2,0,0,EXPS2,
       &          ISPNDEN,WORK(KSRHO1),WORK(KRHO2AA),WORK(KRHO2AB),
       &          WORK(KRHO2BB),1 )
           ELSE
             CALL REWINO(LUSC1)
             CALL COPVCD(LUSC1,LUSC2,WORK(KVEC1),1,LBLK)
               CALL DENSI2(1,WORK(KRHO1),WORK(KRHO2),
       &            KVEC1,KVEC2,LUSC1,LUSC2,EXPS2,ISPNDEN,
       &            WORK(KSRHO1),WORK(KRHO2AA),WORK(KRHO2AB),
       &            WORK(KRHO2BB),1)
           END IF
         END IF
  *
         IF(IEXTKOP.EQ.1) THEN
  