      SUBROUTINE OFFSET_eomccsdt_y1_18_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h2 p4 p7 p8 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h2b
      INTEGER p4b
      INTEGER p7b
      INTEGER p8b
      length = 0
      DO h2b = 1,noab
      DO p4b = noab+1,noab+nvab
      DO p7b = noab+1,noab+nvab
      DO p8b = p7b,noab+nvab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+p4b-1) .eq. int_mb(k_spin+p
     &7b-1)+int_mb(k_spin+p8b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+p4b-1),ieor(int_mb(
     &k_sym+p7b-1),int_mb(k_sym+p8b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+p4b-1
     &)+int_mb(k_spin+p7b-1)+int_mb(k_spin+p8b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_18_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h2b = 1,noab
      DO p4b = noab+1,noab+nvab
      DO p7b = noab+1,noab+nvab
      DO p8b = p7b,noab+nvab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+p4b-1) .eq. int_mb(k_spin+p
     &7b-1)+int_mb(k_spin+p8b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+p4b-1),ieor(int_mb(
     &k_sym+p7b-1),int_mb(k_sym+p8b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+p4b-1
     &)+int_mb(k_spin+p7b-1)+int_mb(k_spin+p8b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p8b - noab - 1 + nvab * (p7b - noab - 1 
     &+ nvab * (p4b - noab - 1 + nvab * (h2b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h2b-1) * int_mb(k_range+p4b-1) * int_
     &mb(k_range+p7b-1) * int_mb(k_range+p8b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_19_1_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h8 h9 h6 p1 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h8b
      INTEGER h9b
      INTEGER p1b
      INTEGER h6b
      length = 0
      DO h8b = 1,noab
      DO h9b = h8b,noab
      DO p1b = noab+1,noab+nvab
      DO h6b = 1,noab
      IF (int_mb(k_spin+h8b-1)+int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h
     &6b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h6b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h8b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h6b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_19_1_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h8b = 1,noab
      DO h9b = h8b,noab
      DO p1b = noab+1,noab+nvab
      DO h6b = 1,noab
      IF (int_mb(k_spin+h8b-1)+int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h
     &6b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h6b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h8b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h6b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h6b - 1 + noab * (p1b - noab - 1 + nvab 
     &* (h9b - 1 + noab * (h8b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h8b-1) * int_mb(k_range+h9b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h6b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_19_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h9 p7 h6 p1 )_ytt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h9b
      INTEGER p7b
      INTEGER p1b
      INTEGER h6b
      length = 0
      DO h9b = 1,noab
      DO p7b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h6b = 1,noab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+p7b-1) .eq. int_mb(k_spin+h
     &6b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+p7b-1),ieor(int_mb(
     &k_sym+h6b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,ieor(irrep_t
     &,irrep_t))) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+p7b-1
     &)+int_mb(k_spin+h6b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_19_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h9b = 1,noab
      DO p7b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h6b = 1,noab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+p7b-1) .eq. int_mb(k_spin+h
     &6b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+p7b-1),ieor(int_mb(
     &k_sym+h6b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,ieor(irrep_t
     &,irrep_t))) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+p7b-1
     &)+int_mb(k_spin+h6b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h6b - 1 + noab * (p1b - noab - 1 + nvab 
     &* (p7b - noab - 1 + nvab * (h9b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h9b-1) * int_mb(k_range+p7b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h6b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_20_1_1_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h5 h9 h10 p1 p3 p4 )_y
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h5b
      INTEGER h9b
      INTEGER h10b
      INTEGER p1b
      INTEGER p3b
      INTEGER p4b
      length = 0
      DO h5b = 1,noab
      DO h9b = h5b,noab
      DO h10b = h9b,noab
      DO p1b = noab+1,noab+nvab
      DO p3b = noab+1,noab+nvab
      DO p4b = p3b,noab+nvab
      IF (int_mb(k_spin+h5b-1)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-1
     &) .eq. int_mb(k_spin+p1b-1)+int_mb(k_spin+p3b-1)+int_mb(k_spin+p4b
     &-1)) THEN
      IF (ieor(int_mb(k_sym+h5b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h10b-1),ieor(int_mb(k_sym+p1b-1),ieor(int_mb(k_sym+p3b-1),in
     &t_mb(k_sym+p4b-1)))))) .eq. irrep_y) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h5b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p3b-1)+
     &int_mb(k_spin+p4b-1).ne.12)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_20_1_1_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h5b = 1,noab
      DO h9b = h5b,noab
      DO h10b = h9b,noab
      DO p1b = noab+1,noab+nvab
      DO p3b = noab+1,noab+nvab
      DO p4b = p3b,noab+nvab
      IF (int_mb(k_spin+h5b-1)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-1
     &) .eq. int_mb(k_spin+p1b-1)+int_mb(k_spin+p3b-1)+int_mb(k_spin+p4b
     &-1)) THEN
      IF (ieor(int_mb(k_sym+h5b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h10b-1),ieor(int_mb(k_sym+p1b-1),ieor(int_mb(k_sym+p3b-1),in
     &t_mb(k_sym+p4b-1)))))) .eq. irrep_y) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h5b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p3b-1)+
     &int_mb(k_spin+p4b-1).ne.12)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p4b - noab - 1 + nvab * (p3b - noab - 1 
     &+ nvab * (p1b - noab - 1 + nvab * (h10b - 1 + noab * (h9b - 1 + no
     &ab * (h5b - 1)))))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h5b-1) * int_mb(k_range+h9b-1) * int_
     &mb(k_range+h10b-1) * int_mb(k_range+p1b-1) * int_mb(k_range+p3b-1)
     & * int_mb(k_range+p4b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_20_1_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h9 h10 h11 p1 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h9b
      INTEGER h10b
      INTEGER p1b
      INTEGER h11b
      length = 0
      DO h9b = 1,noab
      DO h10b = h9b,noab
      DO p1b = noab+1,noab+nvab
      DO h11b = 1,noab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-1) .eq. int_mb(k_spin+
     &h11b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+h10b-1),ieor(int_mb
     &(k_sym+h11b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-
     &1)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_20_1_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h9b = 1,noab
      DO h10b = h9b,noab
      DO p1b = noab+1,noab+nvab
      DO h11b = 1,noab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-1) .eq. int_mb(k_spin+
     &h11b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+h10b-1),ieor(int_mb
     &(k_sym+h11b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-
     &1)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h11b - 1 + noab * (p1b - noab - 1 + nvab
     & * (h10b - 1 + noab * (h9b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h9b-1) * int_mb(k_range+h10b-1) * int
     &_mb(k_range+p1b-1) * int_mb(k_range+h11b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_20_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p12 p13 h11 p1 )_ytt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p12b
      INTEGER p13b
      INTEGER p1b
      INTEGER h11b
      length = 0
      DO p12b = noab+1,noab+nvab
      DO p13b = p12b,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h11b = 1,noab
      IF (int_mb(k_spin+p12b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin
     &+h11b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p12b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_m
     &b(k_sym+h11b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,ieor(irre
     &p_t,irrep_t))) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p12b-1)+int_mb(k_spin+p13b
     &-1)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_20_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p12b = noab+1,noab+nvab
      DO p13b = p12b,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h11b = 1,noab
      IF (int_mb(k_spin+p12b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin
     &+h11b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p12b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_m
     &b(k_sym+h11b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,ieor(irre
     &p_t,irrep_t))) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p12b-1)+int_mb(k_spin+p13b
     &-1)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h11b - 1 + noab * (p1b - noab - 1 + nvab
     & * (p13b - noab - 1 + nvab * (p12b - noab - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p12b-1) * int_mb(k_range+p13b-1) * in
     &t_mb(k_range+p1b-1) * int_mb(k_range+h11b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_20_2_1_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h4 h6 h11 p1 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h4b
      INTEGER h6b
      INTEGER p1b
      INTEGER h11b
      length = 0
      DO h4b = 1,noab
      DO h6b = h4b,noab
      DO p1b = noab+1,noab+nvab
      DO h11b = 1,noab
      IF (int_mb(k_spin+h4b-1)+int_mb(k_spin+h6b-1) .eq. int_mb(k_spin+h
     &11b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),ieor(int_mb(k_sym+h6b-1),ieor(int_mb(
     &k_sym+h11b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+h6b-1
     &)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_20_2_1_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h4b = 1,noab
      DO h6b = h4b,noab
      DO p1b = noab+1,noab+nvab
      DO h11b = 1,noab
      IF (int_mb(k_spin+h4b-1)+int_mb(k_spin+h6b-1) .eq. int_mb(k_spin+h
     &11b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),ieor(int_mb(k_sym+h6b-1),ieor(int_mb(
     &k_sym+h11b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+h6b-1
     &)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h11b - 1 + noab * (p1b - noab - 1 + nvab
     & * (h6b - 1 + noab * (h4b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h4b-1) * int_mb(k_range+h6b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h11b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_20_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h4 p13 h11 p1 )_ytt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h4b
      INTEGER p13b
      INTEGER p1b
      INTEGER h11b
      length = 0
      DO h4b = 1,noab
      DO p13b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h11b = 1,noab
      IF (int_mb(k_spin+h4b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin+
     &h11b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_mb
     &(k_sym+h11b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,ieor(irrep
     &_t,irrep_t))) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+p13b-
     &1)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_20_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h4b = 1,noab
      DO p13b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h11b = 1,noab
      IF (int_mb(k_spin+h4b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin+
     &h11b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_mb
     &(k_sym+h11b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,ieor(irrep
     &_t,irrep_t))) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+p13b-
     &1)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h11b - 1 + noab * (p1b - noab - 1 + nvab
     & * (p13b - noab - 1 + nvab * (h4b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h4b-1) * int_mb(k_range+p13b-1) * int
     &_mb(k_range+p1b-1) * int_mb(k_range+h11b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p7 p1 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p7b
      INTEGER p1b
      length = 0
      DO p7b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+p7b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p7b-1),int_mb(k_sym+p1b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+p7b-1)+int_mb(k_spin+p1b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p7b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+p7b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p7b-1),int_mb(k_sym+p1b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+p7b-1)+int_mb(k_spin+p1b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p1b - noab - 1 + nvab * (p7b - noab - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p7b-1) * int_mb(k_range+p1b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_2_3_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h4 p1 )_vt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h4b
      INTEGER p1b
      length = 0
      DO h4b = 1,noab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),int_mb(k_sym+p1b-1)) .eq. ieor(irrep_
     &v,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+p1b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_2_3_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h4b = 1,noab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),int_mb(k_sym+p1b-1)) .eq. ieor(irrep_
     &v,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+p1b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p1b - noab - 1 + nvab * (h4b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h4b-1) * int_mb(k_range+p1b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_4_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p11 h10 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p11b
      INTEGER h10b
      length = 0
      DO p11b = noab+1,noab+nvab
      DO h10b = 1,noab
      IF (int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+h10b-1)) THEN
      IF (ieor(int_mb(k_sym+p11b-1),int_mb(k_sym+h10b-1)) .eq. irrep_f) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p11b-1)+int_mb(k_spin+h10b
     &-1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_4_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p11b = noab+1,noab+nvab
      DO h10b = 1,noab
      IF (int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+h10b-1)) THEN
      IF (ieor(int_mb(k_sym+p11b-1),int_mb(k_sym+h10b-1)) .eq. irrep_f) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p11b-1)+int_mb(k_spin+h10b
     &-1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h10b - 1 + noab * (p11b - noab - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p11b-1) * int_mb(k_range+h10b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_4_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h9 h10 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h9b
      INTEGER h10b
      length = 0
      DO h9b = 1,noab
      DO h10b = 1,noab
      IF (int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h10b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),int_mb(k_sym+h10b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_4_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h9b = 1,noab
      DO h10b = 1,noab
      IF (int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h10b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),int_mb(k_sym+h10b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h10b - 1 + noab * (h9b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h9b-1) * int_mb(k_range+h10b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_4_2_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h9 p3 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h9b
      INTEGER p3b
      length = 0
      DO h9b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),int_mb(k_sym+p3b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+p3b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_4_2_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h9b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),int_mb(k_sym+p3b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+p3b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p3b - noab - 1 + nvab * (h9b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h9b-1) * int_mb(k_range+p3b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_4_3_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( p11 p7 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p11b
      INTEGER p7b
      length = 0
      DO p11b = noab+1,noab+nvab
      DO p7b = noab+1,noab+nvab
      IF (int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+p7b-1)) THEN
      IF (ieor(int_mb(k_sym+p11b-1),int_mb(k_sym+p7b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+p11b-1)+int_mb(k_spin+p7b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_4_3_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p11b = noab+1,noab+nvab
      DO p7b = noab+1,noab+nvab
      IF (int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+p7b-1)) THEN
      IF (ieor(int_mb(k_sym+p11b-1),int_mb(k_sym+p7b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+p11b-1)+int_mb(k_spin+p7b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p7b - noab - 1 + nvab * (p11b - noab - 1
     &)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p11b-1) * int_mb(k_range+p7b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_4_5_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h5 p4 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h5b
      INTEGER p4b
      length = 0
      DO h5b = 1,noab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+h5b-1) .eq. int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+h5b-1),int_mb(k_sym+p4b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h5b-1)+int_mb(k_spin+p4b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_4_5_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h5b = 1,noab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+h5b-1) .eq. int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+h5b-1),int_mb(k_sym+p4b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h5b-1)+int_mb(k_spin+p4b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p4b - noab - 1 + nvab * (h5b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h5b-1) * int_mb(k_range+p4b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_4_6_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h5 h6 h10 p4 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h5b
      INTEGER h6b
      INTEGER h10b
      INTEGER p4b
      length = 0
      DO h5b = 1,noab
      DO h6b = h5b,noab
      DO h10b = 1,noab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+h5b-1)+int_mb(k_spin+h6b-1) .eq. int_mb(k_spin+h
     &10b-1)+int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+h5b-1),ieor(int_mb(k_sym+h6b-1),ieor(int_mb(
     &k_sym+h10b-1),int_mb(k_sym+p4b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h5b-1)+int_mb(k_spin+h6b-1
     &)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p4b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_4_6_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h5b = 1,noab
      DO h6b = h5b,noab
      DO h10b = 1,noab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+h5b-1)+int_mb(k_spin+h6b-1) .eq. int_mb(k_spin+h
     &10b-1)+int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+h5b-1),ieor(int_mb(k_sym+h6b-1),ieor(int_mb(
     &k_sym+h10b-1),int_mb(k_sym+p4b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h5b-1)+int_mb(k_spin+h6b-1
     &)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p4b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p4b - noab - 1 + nvab * (h10b - 1 + noab
     & * (h6b - 1 + noab * (h5b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h5b-1) * int_mb(k_range+h6b-1) * int_
     &mb(k_range+h10b-1) * int_mb(k_range+p4b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_5_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h2 p11 h9 h12 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h2b
      INTEGER p11b
      INTEGER h9b
      INTEGER h12b
      length = 0
      DO h2b = 1,noab
      DO p11b = noab+1,noab+nvab
      DO h9b = 1,noab
      DO h12b = h9b,noab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+
     &h9b-1)+int_mb(k_spin+h12b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+p11b-1),ieor(int_mb
     &(k_sym+h9b-1),int_mb(k_sym+h12b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+p11b-
     &1)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h12b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_5_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h2b = 1,noab
      DO p11b = noab+1,noab+nvab
      DO h9b = 1,noab
      DO h12b = h9b,noab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+
     &h9b-1)+int_mb(k_spin+h12b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+p11b-1),ieor(int_mb
     &(k_sym+h9b-1),int_mb(k_sym+h12b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+p11b-
     &1)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h12b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h12b - 1 + noab * (h9b - 1 + noab * (p11
     &b - noab - 1 + nvab * (h2b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h2b-1) * int_mb(k_range+p11b-1) * int
     &_mb(k_range+h9b-1) * int_mb(k_range+h12b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_5_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h2 h7 h9 h12 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h2b
      INTEGER h7b
      INTEGER h9b
      INTEGER h12b
      length = 0
      DO h2b = 1,noab
      DO h7b = 1,noab
      DO h9b = 1,noab
      DO h12b = h9b,noab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+h7b-1) .eq. int_mb(k_spin+h
     &9b-1)+int_mb(k_spin+h12b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+h7b-1),ieor(int_mb(
     &k_sym+h9b-1),int_mb(k_sym+h12b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+h7b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h12b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_5_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h2b = 1,noab
      DO h7b = 1,noab
      DO h9b = 1,noab
      DO h12b = h9b,noab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+h7b-1) .eq. int_mb(k_spin+h
     &9b-1)+int_mb(k_spin+h12b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+h7b-1),ieor(int_mb(
     &k_sym+h9b-1),int_mb(k_sym+h12b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+h7b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h12b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h12b - 1 + noab * (h9b - 1 + noab * (h7b
     & - 1 + noab * (h2b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h2b-1) * int_mb(k_range+h7b-1) * int_
     &mb(k_range+h9b-1) * int_mb(k_range+h12b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_5_2_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h2 h7 h9 p3 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h2b
      INTEGER h7b
      INTEGER h9b
      INTEGER p3b
      length = 0
      DO h2b = 1,noab
      DO h7b = 1,noab
      DO h9b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+h7b-1) .eq. int_mb(k_spin+h
     &9b-1)+int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+h7b-1),ieor(int_mb(
     &k_sym+h9b-1),int_mb(k_sym+p3b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+h7b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+p3b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_5_2_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h2b = 1,noab
      DO h7b = 1,noab
      DO h9b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+h7b-1) .eq. int_mb(k_spin+h
     &9b-1)+int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+h7b-1),ieor(int_mb(
     &k_sym+h9b-1),int_mb(k_sym+p3b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+h7b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+p3b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p3b - noab - 1 + nvab * (h9b - 1 + noab 
     &* (h7b - 1 + noab * (h2b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h2b-1) * int_mb(k_range+h7b-1) * int_
     &mb(k_range+h9b-1) * int_mb(k_range+p3b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_5_3_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h2 p11 h9 p3 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h2b
      INTEGER p11b
      INTEGER h9b
      INTEGER p3b
      length = 0
      DO h2b = 1,noab
      DO p11b = noab+1,noab+nvab
      DO h9b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+
     &h9b-1)+int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+p11b-1),ieor(int_mb
     &(k_sym+h9b-1),int_mb(k_sym+p3b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+p11b-
     &1)+int_mb(k_spin+h9b-1)+int_mb(k_spin+p3b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_5_3_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h2b = 1,noab
      DO p11b = noab+1,noab+nvab
      DO h9b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+
     &h9b-1)+int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+p11b-1),ieor(int_mb
     &(k_sym+h9b-1),int_mb(k_sym+p3b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+p11b-
     &1)+int_mb(k_spin+h9b-1)+int_mb(k_spin+p3b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p3b - noab - 1 + nvab * (h9b - 1 + noab 
     &* (p11b - noab - 1 + nvab * (h2b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h2b-1) * int_mb(k_range+p11b-1) * int
     &_mb(k_range+h9b-1) * int_mb(k_range+p3b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_5_4_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h2 p5 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h2b
      INTEGER p5b
      length = 0
      DO h2b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h2b-1) .eq. int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),int_mb(k_sym+p5b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+p5b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_5_4_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h2b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h2b-1) .eq. int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),int_mb(k_sym+p5b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+p5b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p5b - noab - 1 + nvab * (h2b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h2b-1) * int_mb(k_range+p5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_5_5_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h2 h6 h9 p4 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h2b
      INTEGER h6b
      INTEGER h9b
      INTEGER p4b
      length = 0
      DO h2b = 1,noab
      DO h6b = 1,noab
      DO h9b = 1,noab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+h6b-1) .eq. int_mb(k_spin+h
     &9b-1)+int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+h6b-1),ieor(int_mb(
     &k_sym+h9b-1),int_mb(k_sym+p4b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+h6b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+p4b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_5_5_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h2b = 1,noab
      DO h6b = 1,noab
      DO h9b = 1,noab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+h2b-1)+int_mb(k_spin+h6b-1) .eq. int_mb(k_spin+h
     &9b-1)+int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),ieor(int_mb(k_sym+h6b-1),ieor(int_mb(
     &k_sym+h9b-1),int_mb(k_sym+p4b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+h6b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+p4b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p4b - noab - 1 + nvab * (h9b - 1 + noab 
     &* (h6b - 1 + noab * (h2b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h2b-1) * int_mb(k_range+h6b-1) * int_
     &mb(k_range+h9b-1) * int_mb(k_range+p4b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_6_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p5 p8 h7 p1 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p5b
      INTEGER p8b
      INTEGER p1b
      INTEGER h7b
      length = 0
      DO p5b = noab+1,noab+nvab
      DO p8b = p5b,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h7b = 1,noab
      IF (int_mb(k_spin+p5b-1)+int_mb(k_spin+p8b-1) .eq. int_mb(k_spin+h
     &7b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p5b-1),ieor(int_mb(k_sym+p8b-1),ieor(int_mb(
     &k_sym+h7b-1),int_mb(k_sym+p1b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p5b-1)+int_mb(k_spin+p8b-1
     &)+int_mb(k_spin+h7b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_6_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p5b = noab+1,noab+nvab
      DO p8b = p5b,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h7b = 1,noab
      IF (int_mb(k_spin+p5b-1)+int_mb(k_spin+p8b-1) .eq. int_mb(k_spin+h
     &7b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p5b-1),ieor(int_mb(k_sym+p8b-1),ieor(int_mb(
     &k_sym+h7b-1),int_mb(k_sym+p1b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p5b-1)+int_mb(k_spin+p8b-1
     &)+int_mb(k_spin+h7b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h7b - 1 + noab * (p1b - noab - 1 + nvab 
     &* (p8b - noab - 1 + nvab * (p5b - noab - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p5b-1) * int_mb(k_range+p8b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h7b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_10_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h7 h8 h13 p5 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h7b
      INTEGER h8b
      INTEGER h13b
      INTEGER p5b
      length = 0
      DO h7b = 1,noab
      DO h8b = h7b,noab
      DO h13b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h7b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &13b-1)+int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h7b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h13b-1),int_mb(k_sym+p5b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h7b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p5b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_10_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h7b = 1,noab
      DO h8b = h7b,noab
      DO h13b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h7b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &13b-1)+int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h7b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h13b-1),int_mb(k_sym+p5b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h7b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p5b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p5b - noab - 1 + nvab * (h13b - 1 + noab
     & * (h8b - 1 + noab * (h7b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h7b-1) * int_mb(k_range+h8b-1) * int_
     &mb(k_range+h13b-1) * int_mb(k_range+p5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_12_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h13 )_ft
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h13b
      length = 0
      DO h3b = 1,noab
      DO h13b = 1,noab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+h13b-1)) .eq. ieor(irrep
     &_f,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h13b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_12_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h13b = 1,noab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+h13b-1)) .eq. ieor(irrep
     &_f,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h13b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h13b - 1 + noab * (h3b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h13b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_13_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( p15 p4 )_ft
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p15b
      INTEGER p4b
      length = 0
      DO p15b = noab+1,noab+nvab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+p15b-1) .eq. int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+p15b-1),int_mb(k_sym+p4b-1)) .eq. ieor(irrep
     &_f,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p15b-1)+int_mb(k_spin+p4b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_13_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p15b = noab+1,noab+nvab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+p15b-1) .eq. int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+p15b-1),int_mb(k_sym+p4b-1)) .eq. ieor(irrep
     &_f,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p15b-1)+int_mb(k_spin+p4b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p4b - noab - 1 + nvab * (p15b - noab - 1
     &)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p15b-1) * int_mb(k_range+p4b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_14_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 p14 h12 h13 )_vt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER p14b
      INTEGER h12b
      INTEGER h13b
      length = 0
      DO h3b = 1,noab
      DO p14b = noab+1,noab+nvab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p14b-1) .eq. int_mb(k_spin+
     &h12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p14b-1),ieor(int_mb
     &(k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. ieor(irrep_v,irrep_t))
     & THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p14b-
     &1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_14_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO p14b = noab+1,noab+nvab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p14b-1) .eq. int_mb(k_spin+
     &h12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p14b-1),ieor(int_mb
     &(k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. ieor(irrep_v,irrep_t))
     & THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p14b-
     &1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h13b - 1 + noab * (h12b - 1 + noab * (p1
     &4b - noab - 1 + nvab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+p14b-1) * int
     &_mb(k_range+h12b-1) * int_mb(k_range+h13b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p14 p15 h12 h13 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p14b
      INTEGER p15b
      INTEGER h12b
      INTEGER h13b
      length = 0
      DO p14b = noab+1,noab+nvab
      DO p15b = p14b,noab+nvab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+p14b-1)+int_mb(k_spin+p15b-1) .eq. int_mb(k_spin
     &+h12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+p14b-1),ieor(int_mb(k_sym+p15b-1),ieor(int_m
     &b(k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p14b-1)+int_mb(k_spin+p15b
     &-1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p14b = noab+1,noab+nvab
      DO p15b = p14b,noab+nvab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+p14b-1)+int_mb(k_spin+p15b-1) .eq. int_mb(k_spin
     &+h12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+p14b-1),ieor(int_mb(k_sym+p15b-1),ieor(int_m
     &b(k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p14b-1)+int_mb(k_spin+p15b
     &-1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h13b - 1 + noab * (h12b - 1 + noab * (p1
     &5b - noab - 1 + nvab * (p14b - noab - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p14b-1) * int_mb(k_range+p15b-1) * in
     &t_mb(k_range+h12b-1) * int_mb(k_range+h13b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h9 p15 h12 h13 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h9b
      INTEGER p15b
      INTEGER h12b
      INTEGER h13b
      length = 0
      DO h9b = 1,noab
      DO p15b = noab+1,noab+nvab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+p15b-1) .eq. int_mb(k_spin+
     &h12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+p15b-1),ieor(int_mb
     &(k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+p15b-
     &1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h9b = 1,noab
      DO p15b = noab+1,noab+nvab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+p15b-1) .eq. int_mb(k_spin+
     &h12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+p15b-1),ieor(int_mb
     &(k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+p15b-
     &1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h13b - 1 + noab * (h12b - 1 + noab * (p1
     &5b - noab - 1 + nvab * (h9b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h9b-1) * int_mb(k_range+p15b-1) * int
     &_mb(k_range+h12b-1) * int_mb(k_range+h13b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_2_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h4 h9 h12 h13 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h4b
      INTEGER h9b
      INTEGER h12b
      INTEGER h13b
      length = 0
      DO h4b = 1,noab
      DO h9b = h4b,noab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h
     &12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_2_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h4b = 1,noab
      DO h9b = h4b,noab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h
     &12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h13b - 1 + noab * (h12b - 1 + noab * (h9
     &b - 1 + noab * (h4b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h4b-1) * int_mb(k_range+h9b-1) * int_
     &mb(k_range+h12b-1) * int_mb(k_range+h13b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_2_2_2_1(l_a_offset,k_a_offset,size
     &)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i4 ( h4 h9 h13 p3 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h4b
      INTEGER h9b
      INTEGER h13b
      INTEGER p3b
      length = 0
      DO h4b = 1,noab
      DO h9b = h4b,noab
      DO h13b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h
     &13b-1)+int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h13b-1),int_mb(k_sym+p3b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p3b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_2_2_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h4b = 1,noab
      DO h9b = h4b,noab
      DO h13b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h
     &13b-1)+int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h13b-1),int_mb(k_sym+p3b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p3b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p3b - noab - 1 + nvab * (h13b - 1 + noab
     & * (h9b - 1 + noab * (h4b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h4b-1) * int_mb(k_range+h9b-1) * int_
     &mb(k_range+h13b-1) * int_mb(k_range+p3b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_2_3_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h9 p15 h13 p3 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h9b
      INTEGER p15b
      INTEGER h13b
      INTEGER p3b
      length = 0
      DO h9b = 1,noab
      DO p15b = noab+1,noab+nvab
      DO h13b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+p15b-1) .eq. int_mb(k_spin+
     &h13b-1)+int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+p15b-1),ieor(int_mb
     &(k_sym+h13b-1),int_mb(k_sym+p3b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+p15b-
     &1)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p3b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_2_3_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h9b = 1,noab
      DO p15b = noab+1,noab+nvab
      DO h13b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+p15b-1) .eq. int_mb(k_spin+
     &h13b-1)+int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+p15b-1),ieor(int_mb
     &(k_sym+h13b-1),int_mb(k_sym+p3b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+p15b-
     &1)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p3b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p3b - noab - 1 + nvab * (h13b - 1 + noab
     & * (p15b - noab - 1 + nvab * (h9b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h9b-1) * int_mb(k_range+p15b-1) * int
     &_mb(k_range+h13b-1) * int_mb(k_range+p3b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_2_5_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h9 h10 h12 p8 )_vt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h9b
      INTEGER h10b
      INTEGER h12b
      INTEGER p8b
      length = 0
      DO h9b = 1,noab
      DO h10b = h9b,noab
      DO h12b = 1,noab
      DO p8b = noab+1,noab+nvab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-1) .eq. int_mb(k_spin+
     &h12b-1)+int_mb(k_spin+p8b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+h10b-1),ieor(int_mb
     &(k_sym+h12b-1),int_mb(k_sym+p8b-1)))) .eq. ieor(irrep_v,irrep_t)) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-
     &1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p8b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_2_5_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h9b = 1,noab
      DO h10b = h9b,noab
      DO h12b = 1,noab
      DO p8b = noab+1,noab+nvab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-1) .eq. int_mb(k_spin+
     &h12b-1)+int_mb(k_spin+p8b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+h10b-1),ieor(int_mb
     &(k_sym+h12b-1),int_mb(k_sym+p8b-1)))) .eq. ieor(irrep_v,irrep_t)) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-
     &1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p8b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p8b - noab - 1 + nvab * (h12b - 1 + noab
     & * (h10b - 1 + noab * (h9b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h9b-1) * int_mb(k_range+h10b-1) * int
     &_mb(k_range+h12b-1) * int_mb(k_range+p8b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_3_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( p14 p15 h13 p3 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p14b
      INTEGER p15b
      INTEGER h13b
      INTEGER p3b
      length = 0
      DO p14b = noab+1,noab+nvab
      DO p15b = p14b,noab+nvab
      DO h13b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+p14b-1)+int_mb(k_spin+p15b-1) .eq. int_mb(k_spin
     &+h13b-1)+int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+p14b-1),ieor(int_mb(k_sym+p15b-1),ieor(int_m
     &b(k_sym+h13b-1),int_mb(k_sym+p3b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p14b-1)+int_mb(k_spin+p15b
     &-1)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p3b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_3_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p14b = noab+1,noab+nvab
      DO p15b = p14b,noab+nvab
      DO h13b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+p14b-1)+int_mb(k_spin+p15b-1) .eq. int_mb(k_spin
     &+h13b-1)+int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+p14b-1),ieor(int_mb(k_sym+p15b-1),ieor(int_m
     &b(k_sym+h13b-1),int_mb(k_sym+p3b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p14b-1)+int_mb(k_spin+p15b
     &-1)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p3b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p3b - noab - 1 + nvab * (h13b - 1 + noab
     & * (p15b - noab - 1 + nvab * (p14b - noab - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p14b-1) * int_mb(k_range+p15b-1) * in
     &t_mb(k_range+h13b-1) * int_mb(k_range+p3b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_4_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h4 h12 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h4b
      INTEGER h12b
      length = 0
      DO h4b = 1,noab
      DO h12b = 1,noab
      IF (int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h12b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),int_mb(k_sym+h12b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+h12b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_4_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h4b = 1,noab
      DO h12b = 1,noab
      IF (int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h12b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),int_mb(k_sym+h12b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+h12b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h12b - 1 + noab * (h4b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h4b-1) * int_mb(k_range+h12b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_4_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h4 p3 )_vt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h4b
      INTEGER p3b
      length = 0
      DO h4b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),int_mb(k_sym+p3b-1)) .eq. ieor(irrep_
     &v,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+p3b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_4_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h4b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),int_mb(k_sym+p3b-1)) .eq. ieor(irrep_
     &v,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+p3b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p3b - noab - 1 + nvab * (h4b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h4b-1) * int_mb(k_range+p3b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_5_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( p14 p3 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p14b
      INTEGER p3b
      length = 0
      DO p14b = noab+1,noab+nvab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+p14b-1) .eq. int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+p14b-1),int_mb(k_sym+p3b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+p14b-1)+int_mb(k_spin+p3b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_5_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p14b = noab+1,noab+nvab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+p14b-1) .eq. int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+p14b-1),int_mb(k_sym+p3b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+p14b-1)+int_mb(k_spin+p3b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p3b - noab - 1 + nvab * (p14b - noab - 1
     &)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p14b-1) * int_mb(k_range+p3b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_5_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h4 p3 )_vt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h4b
      INTEGER p3b
      length = 0
      DO h4b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),int_mb(k_sym+p3b-1)) .eq. ieor(irrep_
     &v,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+p3b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_5_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h4b = 1,noab
      DO p3b = noab+1,noab+nvab
      IF (int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+p3b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),int_mb(k_sym+p3b-1)) .eq. ieor(irrep_
     &v,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+p3b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p3b - noab - 1 + nvab * (h4b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h4b-1) * int_mb(k_range+p3b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_6_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h6 h8 h12 h13 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h6b
      INTEGER h8b
      INTEGER h12b
      INTEGER h13b
      length = 0
      DO h6b = 1,noab
      DO h8b = h6b,noab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h6b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_6_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h6b = 1,noab
      DO h8b = h6b,noab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h6b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h13b - 1 + noab * (h12b - 1 + noab * (h8
     &b - 1 + noab * (h6b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h6b-1) * int_mb(k_range+h8b-1) * int_
     &mb(k_range+h12b-1) * int_mb(k_range+h13b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_6_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h6 h8 h13 p4 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h6b
      INTEGER h8b
      INTEGER h13b
      INTEGER p4b
      length = 0
      DO h6b = 1,noab
      DO h8b = h6b,noab
      DO h13b = 1,noab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &13b-1)+int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+h6b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h13b-1),int_mb(k_sym+p4b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p4b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_6_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h6b = 1,noab
      DO h8b = h6b,noab
      DO h13b = 1,noab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &13b-1)+int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+h6b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h13b-1),int_mb(k_sym+p4b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p4b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p4b - noab - 1 + nvab * (h13b - 1 + noab
     & * (h8b - 1 + noab * (h6b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h6b-1) * int_mb(k_range+h8b-1) * int_
     &mb(k_range+h13b-1) * int_mb(k_range+p4b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_7_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h6 p15 h13 p4 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h6b
      INTEGER p15b
      INTEGER h13b
      INTEGER p4b
      length = 0
      DO h6b = 1,noab
      DO p15b = noab+1,noab+nvab
      DO h13b = 1,noab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+h6b-1)+int_mb(k_spin+p15b-1) .eq. int_mb(k_spin+
     &h13b-1)+int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+h6b-1),ieor(int_mb(k_sym+p15b-1),ieor(int_mb
     &(k_sym+h13b-1),int_mb(k_sym+p4b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h6b-1)+int_mb(k_spin+p15b-
     &1)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p4b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_7_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h6b = 1,noab
      DO p15b = noab+1,noab+nvab
      DO h13b = 1,noab
      DO p4b = noab+1,noab+nvab
      IF (int_mb(k_spin+h6b-1)+int_mb(k_spin+p15b-1) .eq. int_mb(k_spin+
     &h13b-1)+int_mb(k_spin+p4b-1)) THEN
      IF (ieor(int_mb(k_sym+h6b-1),ieor(int_mb(k_sym+p15b-1),ieor(int_mb
     &(k_sym+h13b-1),int_mb(k_sym+p4b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h6b-1)+int_mb(k_spin+p15b-
     &1)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p4b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p4b - noab - 1 + nvab * (h13b - 1 + noab
     & * (p15b - noab - 1 + nvab * (h6b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h6b-1) * int_mb(k_range+p15b-1) * int
     &_mb(k_range+h13b-1) * int_mb(k_range+p4b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_7_9_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h4 p6 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h4b
      INTEGER p6b
      length = 0
      DO h4b = 1,noab
      DO p6b = noab+1,noab+nvab
      IF (int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+p6b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),int_mb(k_sym+p6b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+p6b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_7_9_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h4b = 1,noab
      DO p6b = noab+1,noab+nvab
      IF (int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+p6b-1)) THEN
      IF (ieor(int_mb(k_sym+h4b-1),int_mb(k_sym+p6b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h4b-1)+int_mb(k_spin+p6b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p6b - noab - 1 + nvab * (h4b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h4b-1) * int_mb(k_range+p6b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_8_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h2 h3 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h2b
      INTEGER h3b
      length = 0
      DO h2b = 1,noab
      DO h3b = 1,noab
      IF (int_mb(k_spin+h2b-1) .eq. int_mb(k_spin+h3b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),int_mb(k_sym+h3b-1)) .eq. ieor(irrep_
     &y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+h3b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_8_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h2b = 1,noab
      DO h3b = 1,noab
      IF (int_mb(k_spin+h2b-1) .eq. int_mb(k_spin+h3b-1)) THEN
      IF (ieor(int_mb(k_sym+h2b-1),int_mb(k_sym+h3b-1)) .eq. ieor(irrep_
     &y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h2b-1)+int_mb(k_spin+h3b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h3b - 1 + noab * (h2b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h2b-1) * int_mb(k_range+h3b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y1_9_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h10 h8 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h10b
      INTEGER h8b
      length = 0
      DO h10b = 1,noab
      DO h8b = 1,noab
      IF (int_mb(k_spin+h10b-1) .eq. int_mb(k_spin+h8b-1)) THEN
      IF (ieor(int_mb(k_sym+h10b-1),int_mb(k_sym+h8b-1)) .eq. ieor(irrep
     &_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h10b-1)+int_mb(k_spin+h8b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y1_9_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h10b = 1,noab
      DO h8b = 1,noab
      IF (int_mb(k_spin+h10b-1) .eq. int_mb(k_spin+h8b-1)) THEN
      IF (ieor(int_mb(k_sym+h10b-1),int_mb(k_sym+h8b-1)) .eq. ieor(irrep
     &_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h10b-1)+int_mb(k_spin+h8b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h8b - 1 + noab * (h10b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h10b-1) * int_mb(k_range+h8b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_10_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 p13 h11 h14 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER p13b
      INTEGER h11b
      INTEGER h14b
      length = 0
      DO h3b = 1,noab
      DO p13b = noab+1,noab+nvab
      DO h11b = 1,noab
      DO h14b = h11b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin+
     &h11b-1)+int_mb(k_spin+h14b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_mb
     &(k_sym+h11b-1),int_mb(k_sym+h14b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p13b-
     &1)+int_mb(k_spin+h11b-1)+int_mb(k_spin+h14b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_10_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO p13b = noab+1,noab+nvab
      DO h11b = 1,noab
      DO h14b = h11b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin+
     &h11b-1)+int_mb(k_spin+h14b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_mb
     &(k_sym+h11b-1),int_mb(k_sym+h14b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p13b-
     &1)+int_mb(k_spin+h11b-1)+int_mb(k_spin+h14b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h14b - 1 + noab * (h11b - 1 + noab * (p1
     &3b - noab - 1 + nvab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+p13b-1) * int
     &_mb(k_range+h11b-1) * int_mb(k_range+h14b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_10_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h9 h11 h14 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h9b
      INTEGER h11b
      INTEGER h14b
      length = 0
      DO h3b = 1,noab
      DO h9b = 1,noab
      DO h11b = 1,noab
      DO h14b = h11b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h
     &11b-1)+int_mb(k_spin+h14b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h11b-1),int_mb(k_sym+h14b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h11b-1)+int_mb(k_spin+h14b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_10_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h9b = 1,noab
      DO h11b = 1,noab
      DO h14b = h11b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h
     &11b-1)+int_mb(k_spin+h14b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h11b-1),int_mb(k_sym+h14b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h11b-1)+int_mb(k_spin+h14b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h14b - 1 + noab * (h11b - 1 + noab * (h9
     &b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h9b-1) * int_
     &mb(k_range+h11b-1) * int_mb(k_range+h14b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_10_2_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h3 h9 h11 p5 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h9b
      INTEGER h11b
      INTEGER p5b
      length = 0
      DO h3b = 1,noab
      DO h9b = 1,noab
      DO h11b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h
     &11b-1)+int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h11b-1),int_mb(k_sym+p5b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p5b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_10_2_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h9b = 1,noab
      DO h11b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h9b-1) .eq. int_mb(k_spin+h
     &11b-1)+int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h9b-1),ieor(int_mb(
     &k_sym+h11b-1),int_mb(k_sym+p5b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h9b-1
     &)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p5b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p5b - noab - 1 + nvab * (h11b - 1 + noab
     & * (h9b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h9b-1) * int_
     &mb(k_range+h11b-1) * int_mb(k_range+p5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_10_3_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 p13 h11 p5 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER p13b
      INTEGER h11b
      INTEGER p5b
      length = 0
      DO h3b = 1,noab
      DO p13b = noab+1,noab+nvab
      DO h11b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin+
     &h11b-1)+int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_mb
     &(k_sym+h11b-1),int_mb(k_sym+p5b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p13b-
     &1)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p5b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_10_3_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO p13b = noab+1,noab+nvab
      DO h11b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin+
     &h11b-1)+int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_mb
     &(k_sym+h11b-1),int_mb(k_sym+p5b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p13b-
     &1)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p5b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p5b - noab - 1 + nvab * (h11b - 1 + noab
     & * (p13b - noab - 1 + nvab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+p13b-1) * int
     &_mb(k_range+h11b-1) * int_mb(k_range+p5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_10_4_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 p7 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER p7b
      length = 0
      DO h3b = 1,noab
      DO p7b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+p7b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+p7b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p7b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_10_4_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO p7b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+p7b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+p7b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p7b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p7b - noab - 1 + nvab * (h3b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+p7b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_10_5_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h8 h11 p6 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h8b
      INTEGER h11b
      INTEGER p6b
      length = 0
      DO h3b = 1,noab
      DO h8b = 1,noab
      DO h11b = 1,noab
      DO p6b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &11b-1)+int_mb(k_spin+p6b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h11b-1),int_mb(k_sym+p6b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p6b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_10_5_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h8b = 1,noab
      DO h11b = 1,noab
      DO p6b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &11b-1)+int_mb(k_spin+p6b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h11b-1),int_mb(k_sym+p6b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h11b-1)+int_mb(k_spin+p6b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p6b - noab - 1 + nvab * (h11b - 1 + noab
     & * (h8b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h8b-1) * int_
     &mb(k_range+h11b-1) * int_mb(k_range+p6b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_11_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p11 p13 h12 p1 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p11b
      INTEGER p13b
      INTEGER p1b
      INTEGER h12b
      length = 0
      DO p11b = noab+1,noab+nvab
      DO p13b = p11b,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h12b = 1,noab
      IF (int_mb(k_spin+p11b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin
     &+h12b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p11b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_m
     &b(k_sym+h12b-1),int_mb(k_sym+p1b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p11b-1)+int_mb(k_spin+p13b
     &-1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_11_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p11b = noab+1,noab+nvab
      DO p13b = p11b,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h12b = 1,noab
      IF (int_mb(k_spin+p11b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin
     &+h12b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p11b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_m
     &b(k_sym+h12b-1),int_mb(k_sym+p1b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p11b-1)+int_mb(k_spin+p13b
     &-1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h12b - 1 + noab * (p1b - noab - 1 + nvab
     & * (p13b - noab - 1 + nvab * (p11b - noab - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p11b-1) * int_mb(k_range+p13b-1) * in
     &t_mb(k_range+p1b-1) * int_mb(k_range+h12b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_11_3_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h7 h8 h12 p1 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h7b
      INTEGER h8b
      INTEGER p1b
      INTEGER h12b
      length = 0
      DO h7b = 1,noab
      DO h8b = h7b,noab
      DO p1b = noab+1,noab+nvab
      DO h12b = 1,noab
      IF (int_mb(k_spin+h7b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &12b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h7b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h12b-1),int_mb(k_sym+p1b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h7b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_11_3_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h7b = 1,noab
      DO h8b = h7b,noab
      DO p1b = noab+1,noab+nvab
      DO h12b = 1,noab
      IF (int_mb(k_spin+h7b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &12b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h7b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h12b-1),int_mb(k_sym+p1b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h7b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h12b - 1 + noab * (p1b - noab - 1 + nvab
     & * (h8b - 1 + noab * (h7b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h7b-1) * int_mb(k_range+h8b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h12b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_11_6_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h8 p11 h12 p1 )_vt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h8b
      INTEGER p11b
      INTEGER p1b
      INTEGER h12b
      length = 0
      DO h8b = 1,noab
      DO p11b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h12b = 1,noab
      IF (int_mb(k_spin+h8b-1)+int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+
     &h12b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+p11b-1),ieor(int_mb
     &(k_sym+h12b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_v,irrep_t)) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h8b-1)+int_mb(k_spin+p11b-
     &1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_11_6_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h8b = 1,noab
      DO p11b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h12b = 1,noab
      IF (int_mb(k_spin+h8b-1)+int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+
     &h12b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+p11b-1),ieor(int_mb
     &(k_sym+h12b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_v,irrep_t)) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h8b-1)+int_mb(k_spin+p11b-
     &1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h12b - 1 + noab * (p1b - noab - 1 + nvab
     & * (p11b - noab - 1 + nvab * (h8b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h8b-1) * int_mb(k_range+p11b-1) * int
     &_mb(k_range+p1b-1) * int_mb(k_range+h12b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_11_7_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h10 p13 h12 p1 )_vt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h10b
      INTEGER p13b
      INTEGER p1b
      INTEGER h12b
      length = 0
      DO h10b = 1,noab
      DO p13b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h12b = 1,noab
      IF (int_mb(k_spin+h10b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin
     &+h12b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h10b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_m
     &b(k_sym+h12b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_v,irrep_t))
     & THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h10b-1)+int_mb(k_spin+p13b
     &-1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_11_7_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h10b = 1,noab
      DO p13b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h12b = 1,noab
      IF (int_mb(k_spin+h10b-1)+int_mb(k_spin+p13b-1) .eq. int_mb(k_spin
     &+h12b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h10b-1),ieor(int_mb(k_sym+p13b-1),ieor(int_m
     &b(k_sym+h12b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_v,irrep_t))
     & THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h10b-1)+int_mb(k_spin+p13b
     &-1)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h12b - 1 + noab * (p1b - noab - 1 + nvab
     & * (p13b - noab - 1 + nvab * (h10b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h10b-1) * int_mb(k_range+p13b-1) * in
     &t_mb(k_range+p1b-1) * int_mb(k_range+h12b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_1_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 p1 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER p1b
      length = 0
      DO h3b = 1,noab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+p1b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p1b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_1_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+p1b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p1b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p1b - noab - 1 + nvab * (h3b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+p1b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_12_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h11 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h11b
      length = 0
      DO h3b = 1,noab
      DO h11b = 1,noab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+h11b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+h11b-1)) .eq. ieor(irrep
     &_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h11b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_12_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h11b = 1,noab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+h11b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+h11b-1)) .eq. ieor(irrep
     &_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h11b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h11b - 1 + noab * (h3b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h11b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_13_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h4 h5 p1 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER p1b
      INTEGER h5b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO p1b = noab+1,noab+nvab
      DO h5b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &5b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h5b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h5b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_13_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO p1b = noab+1,noab+nvab
      DO h5b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &5b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h5b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h5b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h5b - 1 + noab * (p1b - noab - 1 + nvab 
     &* (h4b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_14_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h8 h10 p1 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h8b
      INTEGER p1b
      INTEGER h10b
      length = 0
      DO h3b = 1,noab
      DO h8b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h10b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &10b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h10b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_14_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h8b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h10b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &10b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h10b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h10b - 1 + noab * (p1b - noab - 1 + nvab
     & * (h8b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h8b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h10b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_15_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h4 h10 p8 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h10b
      INTEGER p8b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h10b = 1,noab
      DO p8b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &10b-1)+int_mb(k_spin+p8b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h10b-1),int_mb(k_sym+p8b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p8b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_15_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h10b = 1,noab
      DO p8b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &10b-1)+int_mb(k_spin+p8b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h10b-1),int_mb(k_sym+p8b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p8b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p8b - noab - 1 + nvab * (h10b - 1 + noab
     & * (h4b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h10b-1) * int_mb(k_range+p8b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_16_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h4 h8 h6 p1 p7 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h8b
      INTEGER p1b
      INTEGER h6b
      INTEGER p7b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h8b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h6b = 1,noab
      DO p7b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+h8b-1)
     & .eq. int_mb(k_spin+h6b-1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p7b-
     &1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h8b-1),ieor(int_mb(k_sym+h6b-1),ieor(int_mb(k_sym+p1b-1),int
     &_mb(k_sym+p7b-1)))))) .eq. ieor(irrep_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h8b-1)+int_mb(k_spin+h6b-1)+int_mb(k_spin+p1b-1)+i
     &nt_mb(k_spin+p7b-1).ne.12)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_16_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h8b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h6b = 1,noab
      DO p7b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+h8b-1)
     & .eq. int_mb(k_spin+h6b-1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p7b-
     &1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h8b-1),ieor(int_mb(k_sym+h6b-1),ieor(int_mb(k_sym+p1b-1),int
     &_mb(k_sym+p7b-1)))))) .eq. ieor(irrep_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h8b-1)+int_mb(k_spin+h6b-1)+int_mb(k_spin+p1b-1)+i
     &nt_mb(k_spin+p7b-1).ne.12)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p7b - noab - 1 + nvab * (h6b - 1 + noab 
     &* (p1b - noab - 1 + nvab * (h8b - 1 + noab * (h4b - 1 + noab * (h3
     &b - 1)))))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h8b-1) * int_mb(k_range+p1b-1) * int_mb(k_range+h6b-1) 
     &* int_mb(k_range+p7b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_17_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p11 p1 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p11b
      INTEGER p1b
      length = 0
      DO p11b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p11b-1),int_mb(k_sym+p1b-1)) .eq. ieor(irrep
     &_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p11b-1)+int_mb(k_spin+p1b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_17_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p11b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+p11b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p11b-1),int_mb(k_sym+p1b-1)) .eq. ieor(irrep
     &_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p11b-1)+int_mb(k_spin+p1b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p1b - noab - 1 + nvab * (p11b - noab - 1
     &)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p11b-1) * int_mb(k_range+p1b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_18_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h4 h12 h13 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h12b
      INTEGER h13b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. ieor(irrep_y,irrep_t)) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_18_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h12b = 1,noab
      DO h13b = h12b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &12b-1)+int_mb(k_spin+h13b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h12b-1),int_mb(k_sym+h13b-1)))) .eq. ieor(irrep_y,irrep_t)) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h12b-1)+int_mb(k_spin+h13b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h13b - 1 + noab * (h12b - 1 + noab * (h4
     &b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h12b-1) * int_mb(k_range+h13b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_18_3_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h4 h13 p5 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h13b
      INTEGER p5b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h13b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &13b-1)+int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h13b-1),int_mb(k_sym+p5b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p5b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_18_3_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h13b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &13b-1)+int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h13b-1),int_mb(k_sym+p5b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p5b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p5b - noab - 1 + nvab * (h13b - 1 + noab
     & * (h4b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h13b-1) * int_mb(k_range+p5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_18_4_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h4 h12 p9 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h12b
      INTEGER p9b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h12b = 1,noab
      DO p9b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &12b-1)+int_mb(k_spin+p9b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h12b-1),int_mb(k_sym+p9b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p9b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_18_4_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h12b = 1,noab
      DO p9b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &12b-1)+int_mb(k_spin+p9b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h12b-1),int_mb(k_sym+p9b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h12b-1)+int_mb(k_spin+p9b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p9b - noab - 1 + nvab * (h12b - 1 + noab
     & * (h4b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h12b-1) * int_mb(k_range+p9b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_19_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h9 p6 p1 p2 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h9b
      INTEGER p6b
      INTEGER p1b
      INTEGER p2b
      length = 0
      DO h9b = 1,noab
      DO p6b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO p2b = p1b,noab+nvab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+p6b-1) .eq. int_mb(k_spin+p
     &1b-1)+int_mb(k_spin+p2b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+p6b-1),ieor(int_mb(
     &k_sym+p1b-1),int_mb(k_sym+p2b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+p6b-1
     &)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p2b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_19_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h9b = 1,noab
      DO p6b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO p2b = p1b,noab+nvab
      IF (int_mb(k_spin+h9b-1)+int_mb(k_spin+p6b-1) .eq. int_mb(k_spin+p
     &1b-1)+int_mb(k_spin+p2b-1)) THEN
      IF (ieor(int_mb(k_sym+h9b-1),ieor(int_mb(k_sym+p6b-1),ieor(int_mb(
     &k_sym+p1b-1),int_mb(k_sym+p2b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h9b-1)+int_mb(k_spin+p6b-1
     &)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p2b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p2b - noab - 1 + nvab * (p1b - noab - 1 
     &+ nvab * (p6b - noab - 1 + nvab * (h9b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h9b-1) * int_mb(k_range+p6b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+p2b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_20_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 p6 p1 p9 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER p6b
      INTEGER p1b
      INTEGER p9b
      length = 0
      DO h3b = 1,noab
      DO p6b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO p9b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p6b-1) .eq. int_mb(k_spin+p
     &1b-1)+int_mb(k_spin+p9b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p6b-1),ieor(int_mb(
     &k_sym+p1b-1),int_mb(k_sym+p9b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p6b-1
     &)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p9b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_20_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO p6b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO p9b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p6b-1) .eq. int_mb(k_spin+p
     &1b-1)+int_mb(k_spin+p9b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p6b-1),ieor(int_mb(
     &k_sym+p1b-1),int_mb(k_sym+p9b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p6b-1
     &)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p9b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p9b - noab - 1 + nvab * (p1b - noab - 1 
     &+ nvab * (p6b - noab - 1 + nvab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+p6b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+p9b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_21_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h4 p5 h8 h9 h10 )_vt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER p5b
      INTEGER h8b
      INTEGER h9b
      INTEGER h10b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO p5b = noab+1,noab+nvab
      DO h8b = 1,noab
      DO h9b = h8b,noab
      DO h10b = h9b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+p5b-1)
     & .eq. int_mb(k_spin+h8b-1)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b
     &-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+p5b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+h9b-1),int
     &_mb(k_sym+h10b-1)))))) .eq. ieor(irrep_v,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+p5b-1)+int_mb(k_spin+h8b-1)+int_mb(k_spin+h9b-1)+i
     &nt_mb(k_spin+h10b-1).ne.12)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_21_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO p5b = noab+1,noab+nvab
      DO h8b = 1,noab
      DO h9b = h8b,noab
      DO h10b = h9b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+p5b-1)
     & .eq. int_mb(k_spin+h8b-1)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b
     &-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+p5b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+h9b-1),int
     &_mb(k_sym+h10b-1)))))) .eq. ieor(irrep_v,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+p5b-1)+int_mb(k_spin+h8b-1)+int_mb(k_spin+h9b-1)+i
     &nt_mb(k_spin+h10b-1).ne.12)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h10b - 1 + noab * (h9b - 1 + noab * (h8b
     & - 1 + noab * (p5b - noab - 1 + nvab * (h4b - 1 + noab * (h3b - 1)
     &))))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+p5b-1) * int_mb(k_range+h8b-1) * int_mb(k_range+h9b-1) 
     &* int_mb(k_range+h10b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h4 h7 p1 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER p1b
      INTEGER h7b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO p1b = noab+1,noab+nvab
      DO h7b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &7b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h7b-1),int_mb(k_sym+p1b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h7b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO p1b = noab+1,noab+nvab
      DO h7b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &7b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h7b-1),int_mb(k_sym+p1b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h7b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h7b - 1 + noab * (p1b - noab - 1 + nvab 
     &* (h4b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h7b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_22_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 p12 h13 p1 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER p12b
      INTEGER p1b
      INTEGER h13b
      length = 0
      DO h3b = 1,noab
      DO p12b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h13b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p12b-1) .eq. int_mb(k_spin+
     &h13b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p12b-1),ieor(int_mb
     &(k_sym+h13b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p12b-
     &1)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_22_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO p12b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h13b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p12b-1) .eq. int_mb(k_spin+
     &h13b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p12b-1),ieor(int_mb
     &(k_sym+h13b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p12b-
     &1)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h13b - 1 + noab * (p1b - noab - 1 + nvab
     & * (p12b - noab - 1 + nvab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+p12b-1) * int
     &_mb(k_range+p1b-1) * int_mb(k_range+h13b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_22_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h8 h13 p1 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h8b
      INTEGER p1b
      INTEGER h13b
      length = 0
      DO h3b = 1,noab
      DO h8b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h13b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &13b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h13b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_22_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h8b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h13b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1) .eq. int_mb(k_spin+h
     &13b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(
     &k_sym+h13b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h8b-1
     &)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h13b - 1 + noab * (p1b - noab - 1 + nvab
     & * (h8b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h8b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h13b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_22_3_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h7 h8 h13 p1 p5 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h7b
      INTEGER h8b
      INTEGER p1b
      INTEGER h13b
      INTEGER p5b
      length = 0
      DO h3b = 1,noab
      DO h7b = 1,noab
      DO h8b = h7b,noab
      DO p1b = noab+1,noab+nvab
      DO h13b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h7b-1)+int_mb(k_spin+h8b-1)
     & .eq. int_mb(k_spin+h13b-1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p5b
     &-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h7b-1),ieor(int_mb(
     &k_sym+h8b-1),ieor(int_mb(k_sym+h13b-1),ieor(int_mb(k_sym+p1b-1),in
     &t_mb(k_sym+p5b-1)))))) .eq. ieor(irrep_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h7b-1
     &)+int_mb(k_spin+h8b-1)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p1b-1)+
     &int_mb(k_spin+p5b-1).ne.12)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_22_3_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h7b = 1,noab
      DO h8b = h7b,noab
      DO p1b = noab+1,noab+nvab
      DO h13b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h7b-1)+int_mb(k_spin+h8b-1)
     & .eq. int_mb(k_spin+h13b-1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p5b
     &-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h7b-1),ieor(int_mb(
     &k_sym+h8b-1),ieor(int_mb(k_sym+h13b-1),ieor(int_mb(k_sym+p1b-1),in
     &t_mb(k_sym+p5b-1)))))) .eq. ieor(irrep_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h7b-1
     &)+int_mb(k_spin+h8b-1)+int_mb(k_spin+h13b-1)+int_mb(k_spin+p1b-1)+
     &int_mb(k_spin+p5b-1).ne.12)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p5b - noab - 1 + nvab * (h13b - 1 + noab
     & * (p1b - noab - 1 + nvab * (h8b - 1 + noab * (h7b - 1 + noab * (h
     &3b - 1)))))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h7b-1) * int_
     &mb(k_range+h8b-1) * int_mb(k_range+p1b-1) * int_mb(k_range+h13b-1)
     & * int_mb(k_range+p5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_23_1_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h4 h9 h8 p1 p5 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h9b
      INTEGER p1b
      INTEGER h8b
      INTEGER p5b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h9b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h8b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1)
     & .eq. int_mb(k_spin+h8b-1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p5b-
     &1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h9b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+p1b-1),int
     &_mb(k_sym+p5b-1)))))) .eq. ieor(irrep_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h8b-1)+int_mb(k_spin+p1b-1)+i
     &nt_mb(k_spin+p5b-1).ne.12)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_23_1_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h9b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h8b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1)
     & .eq. int_mb(k_spin+h8b-1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p5b-
     &1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h9b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+p1b-1),int
     &_mb(k_sym+p5b-1)))))) .eq. ieor(irrep_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h8b-1)+int_mb(k_spin+p1b-1)+i
     &nt_mb(k_spin+p5b-1).ne.12)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p5b - noab - 1 + nvab * (h8b - 1 + noab 
     &* (p1b - noab - 1 + nvab * (h9b - 1 + noab * (h4b - 1 + noab * (h3
     &b - 1)))))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h9b-1) * int_mb(k_range+p1b-1) * int_mb(k_range+h8b-1) 
     &* int_mb(k_range+p5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_23_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h4 h9 h6 h8 p1 )_ytt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h9b
      INTEGER p1b
      INTEGER h6b
      INTEGER h8b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h9b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h6b = 1,noab
      DO h8b = h6b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1)
     & .eq. int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1)+int_mb(k_spin+p1b-
     &1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h9b-1),ieor(int_mb(k_sym+h6b-1),ieor(int_mb(k_sym+h8b-1),int
     &_mb(k_sym+p1b-1)))))) .eq. ieor(irrep_y,ieor(irrep_t,irrep_t))) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1)+i
     &nt_mb(k_spin+p1b-1).ne.12)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_23_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h9b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h6b = 1,noab
      DO h8b = h6b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+h9b-1)
     & .eq. int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1)+int_mb(k_spin+p1b-
     &1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h9b-1),ieor(int_mb(k_sym+h6b-1),ieor(int_mb(k_sym+h8b-1),int
     &_mb(k_sym+p1b-1)))))) .eq. ieor(irrep_y,ieor(irrep_t,irrep_t))) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1)+i
     &nt_mb(k_spin+p1b-1).ne.12)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h8b - 1 + noab * (h6b - 1 + noab * (p1b 
     &- noab - 1 + nvab * (h9b - 1 + noab * (h4b - 1 + noab * (h3b - 1))
     &)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h9b-1) * int_mb(k_range+p1b-1) * int_mb(k_range+h6b-1) 
     &* int_mb(k_range+h8b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_24_1_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h10 p6 p1 p2 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h10b
      INTEGER p6b
      INTEGER p1b
      INTEGER p2b
      length = 0
      DO h10b = 1,noab
      DO p6b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO p2b = p1b,noab+nvab
      IF (int_mb(k_spin+h10b-1)+int_mb(k_spin+p6b-1) .eq. int_mb(k_spin+
     &p1b-1)+int_mb(k_spin+p2b-1)) THEN
      IF (ieor(int_mb(k_sym+h10b-1),ieor(int_mb(k_sym+p6b-1),ieor(int_mb
     &(k_sym+p1b-1),int_mb(k_sym+p2b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h10b-1)+int_mb(k_spin+p6b-
     &1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p2b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_24_1_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h10b = 1,noab
      DO p6b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO p2b = p1b,noab+nvab
      IF (int_mb(k_spin+h10b-1)+int_mb(k_spin+p6b-1) .eq. int_mb(k_spin+
     &p1b-1)+int_mb(k_spin+p2b-1)) THEN
      IF (ieor(int_mb(k_sym+h10b-1),ieor(int_mb(k_sym+p6b-1),ieor(int_mb
     &(k_sym+p1b-1),int_mb(k_sym+p2b-1)))) .eq. ieor(irrep_y,irrep_t)) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h10b-1)+int_mb(k_spin+p6b-
     &1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p2b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p2b - noab - 1 + nvab * (p1b - noab - 1 
     &+ nvab * (p6b - noab - 1 + nvab * (h10b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h10b-1) * int_mb(k_range+p6b-1) * int
     &_mb(k_range+p1b-1) * int_mb(k_range+p2b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_24_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p6 p9 p1 p2 )_ytt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p6b
      INTEGER p9b
      INTEGER p1b
      INTEGER p2b
      length = 0
      DO p6b = noab+1,noab+nvab
      DO p9b = p6b,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO p2b = p1b,noab+nvab
      IF (int_mb(k_spin+p6b-1)+int_mb(k_spin+p9b-1) .eq. int_mb(k_spin+p
     &1b-1)+int_mb(k_spin+p2b-1)) THEN
      IF (ieor(int_mb(k_sym+p6b-1),ieor(int_mb(k_sym+p9b-1),ieor(int_mb(
     &k_sym+p1b-1),int_mb(k_sym+p2b-1)))) .eq. ieor(irrep_y,ieor(irrep_t
     &,irrep_t))) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p6b-1)+int_mb(k_spin+p9b-1
     &)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p2b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_24_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p6b = noab+1,noab+nvab
      DO p9b = p6b,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO p2b = p1b,noab+nvab
      IF (int_mb(k_spin+p6b-1)+int_mb(k_spin+p9b-1) .eq. int_mb(k_spin+p
     &1b-1)+int_mb(k_spin+p2b-1)) THEN
      IF (ieor(int_mb(k_sym+p6b-1),ieor(int_mb(k_sym+p9b-1),ieor(int_mb(
     &k_sym+p1b-1),int_mb(k_sym+p2b-1)))) .eq. ieor(irrep_y,ieor(irrep_t
     &,irrep_t))) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p6b-1)+int_mb(k_spin+p9b-1
     &)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p2b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p2b - noab - 1 + nvab * (p1b - noab - 1 
     &+ nvab * (p9b - noab - 1 + nvab * (p6b - noab - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p6b-1) * int_mb(k_range+p9b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+p2b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_25_1_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h4 h8 p1 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER p1b
      INTEGER h8b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO p1b = noab+1,noab+nvab
      DO h8b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &8b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h8b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h8b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_25_1_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO p1b = noab+1,noab+nvab
      DO h8b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &8b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h8b-1),int_mb(k_sym+p1b-1)))) .eq. ieor(irrep_y,irrep_t)) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h8b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h8b - 1 + noab * (p1b - noab - 1 + nvab 
     &* (h4b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h8b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_25_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h4 p11 h8 h10 p1 )_ytt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER p11b
      INTEGER p1b
      INTEGER h8b
      INTEGER h10b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO p11b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h8b = 1,noab
      DO h10b = h8b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+p11b-1
     &) .eq. int_mb(k_spin+h8b-1)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p1
     &b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+p11b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+h10b-1),i
     &nt_mb(k_sym+p1b-1)))))) .eq. ieor(irrep_y,ieor(irrep_t,irrep_t))) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+p11b-1)+int_mb(k_spin+h8b-1)+int_mb(k_spin+h10b-1)
     &+int_mb(k_spin+p1b-1).ne.12)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_25_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO p11b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h8b = 1,noab
      DO h10b = h8b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+p11b-1
     &) .eq. int_mb(k_spin+h8b-1)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p1
     &b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+p11b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+h10b-1),i
     &nt_mb(k_sym+p1b-1)))))) .eq. ieor(irrep_y,ieor(irrep_t,irrep_t))) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+p11b-1)+int_mb(k_spin+h8b-1)+int_mb(k_spin+h10b-1)
     &+int_mb(k_spin+p1b-1).ne.12)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h10b - 1 + noab * (h8b - 1 + noab * (p1b
     & - noab - 1 + nvab * (p11b - noab - 1 + nvab * (h4b - 1 + noab * (
     &h3b - 1)))))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+p11b-1) * int_mb(k_range+p1b-1) * int_mb(k_range+h8b-1)
     & * int_mb(k_range+h10b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_25_2_1_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h3 h4 h6 h10 p1 p7 )_yt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h6b
      INTEGER p1b
      INTEGER h10b
      INTEGER p7b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h6b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h10b = 1,noab
      DO p7b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+h6b-1)
     & .eq. int_mb(k_spin+h10b-1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p7b
     &-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h6b-1),ieor(int_mb(k_sym+h10b-1),ieor(int_mb(k_sym+p1b-1),in
     &t_mb(k_sym+p7b-1)))))) .eq. ieor(irrep_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h6b-1)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p1b-1)+
     &int_mb(k_spin+p7b-1).ne.12)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_25_2_1_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h6b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h10b = 1,noab
      DO p7b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+h6b-1)
     & .eq. int_mb(k_spin+h10b-1)+int_mb(k_spin+p1b-1)+int_mb(k_spin+p7b
     &-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h6b-1),ieor(int_mb(k_sym+h10b-1),ieor(int_mb(k_sym+p1b-1),in
     &t_mb(k_sym+p7b-1)))))) .eq. ieor(irrep_y,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h6b-1)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p1b-1)+
     &int_mb(k_spin+p7b-1).ne.12)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p7b - noab - 1 + nvab * (h10b - 1 + noab
     & * (p1b - noab - 1 + nvab * (h6b - 1 + noab * (h4b - 1 + noab * (h
     &3b - 1)))))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h6b-1) * int_mb(k_range+p1b-1) * int_mb(k_range+h10b-1)
     & * int_mb(k_range+p7b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_25_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h4 h6 h8 h10 p1 )_ytt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h6b
      INTEGER p1b
      INTEGER h8b
      INTEGER h10b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h6b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h8b = 1,noab
      DO h10b = h8b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+h6b-1)
     & .eq. int_mb(k_spin+h8b-1)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p1b
     &-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h6b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+h10b-1),in
     &t_mb(k_sym+p1b-1)))))) .eq. ieor(irrep_y,ieor(irrep_t,irrep_t))) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1)+int_mb(k_spin+h10b-1)+
     &int_mb(k_spin+p1b-1).ne.12)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_25_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h6b = 1,noab
      DO p1b = noab+1,noab+nvab
      DO h8b = 1,noab
      DO h10b = h8b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1)+int_mb(k_spin+h6b-1)
     & .eq. int_mb(k_spin+h8b-1)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p1b
     &-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h6b-1),ieor(int_mb(k_sym+h8b-1),ieor(int_mb(k_sym+h10b-1),in
     &t_mb(k_sym+p1b-1)))))) .eq. ieor(irrep_y,ieor(irrep_t,irrep_t))) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h6b-1)+int_mb(k_spin+h8b-1)+int_mb(k_spin+h10b-1)+
     &int_mb(k_spin+p1b-1).ne.12)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h10b - 1 + noab * (h8b - 1 + noab * (p1b
     & - noab - 1 + nvab * (h6b - 1 + noab * (h4b - 1 + noab * (h3b - 1)
     &))))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h6b-1) * int_mb(k_range+p1b-1) * int_mb(k_range+h8b-1) 
     &* int_mb(k_range+h10b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_4_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h9 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h9b
      length = 0
      DO h3b = 1,noab
      DO h9b = 1,noab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+h9b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+h9b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h9b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_4_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h9b = 1,noab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+h9b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+h9b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h9b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h9b - 1 + noab * (h3b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h9b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_4_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 p5 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER p5b
      length = 0
      DO h3b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+p5b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p5b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_4_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1) .eq. int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),int_mb(k_sym+p5b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p5b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p5b - noab - 1 + nvab * (h3b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+p5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_5_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p10 p1 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p10b
      INTEGER p1b
      length = 0
      DO p10b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+p10b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p10b-1),int_mb(k_sym+p1b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+p10b-1)+int_mb(k_spin+p1b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_5_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p10b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+p10b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+p10b-1),int_mb(k_sym+p1b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+p10b-1)+int_mb(k_spin+p1b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p1b - noab - 1 + nvab * (p10b - noab - 1
     &)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p10b-1) * int_mb(k_range+p1b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_5_4_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h6 p1 )_vt
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h6b
      INTEGER p1b
      length = 0
      DO h6b = 1,noab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+h6b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h6b-1),int_mb(k_sym+p1b-1)) .eq. ieor(irrep_
     &v,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h6b-1)+int_mb(k_spin+p1b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_5_4_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h6b = 1,noab
      DO p1b = noab+1,noab+nvab
      IF (int_mb(k_spin+h6b-1) .eq. int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h6b-1),int_mb(k_sym+p1b-1)) .eq. ieor(irrep_
     &v,irrep_t)) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h6b-1)+int_mb(k_spin+p1b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p1b - noab - 1 + nvab * (h6b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h6b-1) * int_mb(k_range+p1b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_6_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 h4 h9 h10 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h9b
      INTEGER h10b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h9b = 1,noab
      DO h10b = h9b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &9b-1)+int_mb(k_spin+h10b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h9b-1),int_mb(k_sym+h10b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_6_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h9b = 1,noab
      DO h10b = h9b,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &9b-1)+int_mb(k_spin+h10b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h9b-1),int_mb(k_sym+h10b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+h10b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h10b - 1 + noab * (h9b - 1 + noab * (h4b
     & - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h9b-1) * int_mb(k_range+h10b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_6_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h3 h4 h10 p5 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER h4b
      INTEGER h10b
      INTEGER p5b
      length = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h10b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &10b-1)+int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h10b-1),int_mb(k_sym+p5b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p5b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_6_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO h4b = h3b,noab
      DO h10b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1) .eq. int_mb(k_spin+h
     &10b-1)+int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+h4b-1),ieor(int_mb(
     &k_sym+h10b-1),int_mb(k_sym+p5b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+h4b-1
     &)+int_mb(k_spin+h10b-1)+int_mb(k_spin+p5b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p5b - noab - 1 + nvab * (h10b - 1 + noab
     & * (h4b - 1 + noab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+h4b-1) * int_
     &mb(k_range+h10b-1) * int_mb(k_range+p5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_7_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( h3 p7 h9 p1 )_v
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h3b
      INTEGER p7b
      INTEGER p1b
      INTEGER h9b
      length = 0
      DO h3b = 1,noab
      DO p7b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h9b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p7b-1) .eq. int_mb(k_spin+h
     &9b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p7b-1),ieor(int_mb(
     &k_sym+h9b-1),int_mb(k_sym+p1b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p7b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_7_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h3b = 1,noab
      DO p7b = noab+1,noab+nvab
      DO p1b = noab+1,noab+nvab
      DO h9b = 1,noab
      IF (int_mb(k_spin+h3b-1)+int_mb(k_spin+p7b-1) .eq. int_mb(k_spin+h
     &9b-1)+int_mb(k_spin+p1b-1)) THEN
      IF (ieor(int_mb(k_sym+h3b-1),ieor(int_mb(k_sym+p7b-1),ieor(int_mb(
     &k_sym+h9b-1),int_mb(k_sym+p1b-1)))) .eq. irrep_v) THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h3b-1)+int_mb(k_spin+p7b-1
     &)+int_mb(k_spin+h9b-1)+int_mb(k_spin+p1b-1).ne.8)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h9b - 1 + noab * (p1b - noab - 1 + nvab 
     &* (p7b - noab - 1 + nvab * (h3b - 1)))
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h3b-1) * int_mb(k_range+p7b-1) * int_
     &mb(k_range+p1b-1) * int_mb(k_range+h9b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_9_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i1 ( p13 h12 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p13b
      INTEGER h12b
      length = 0
      DO p13b = noab+1,noab+nvab
      DO h12b = 1,noab
      IF (int_mb(k_spin+p13b-1) .eq. int_mb(k_spin+h12b-1)) THEN
      IF (ieor(int_mb(k_sym+p13b-1),int_mb(k_sym+h12b-1)) .eq. irrep_f) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p13b-1)+int_mb(k_spin+h12b
     &-1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_9_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p13b = noab+1,noab+nvab
      DO h12b = 1,noab
      IF (int_mb(k_spin+p13b-1) .eq. int_mb(k_spin+h12b-1)) THEN
      IF (ieor(int_mb(k_sym+p13b-1),int_mb(k_sym+h12b-1)) .eq. irrep_f) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+p13b-1)+int_mb(k_spin+h12b
     &-1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h12b - 1 + noab * (p13b - noab - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p13b-1) * int_mb(k_range+h12b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_9_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h11 h12 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h11b
      INTEGER h12b
      length = 0
      DO h11b = 1,noab
      DO h12b = 1,noab
      IF (int_mb(k_spin+h11b-1) .eq. int_mb(k_spin+h12b-1)) THEN
      IF (ieor(int_mb(k_sym+h11b-1),int_mb(k_sym+h12b-1)) .eq. irrep_f) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h11b-1)+int_mb(k_spin+h12b
     &-1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_9_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h11b = 1,noab
      DO h12b = 1,noab
      IF (int_mb(k_spin+h11b-1) .eq. int_mb(k_spin+h12b-1)) THEN
      IF (ieor(int_mb(k_sym+h11b-1),int_mb(k_sym+h12b-1)) .eq. irrep_f) 
     &THEN
      IF ((.not.restricted).or.(int_mb(k_spin+h11b-1)+int_mb(k_spin+h12b
     &-1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = h12b - 1 + noab * (h11b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h11b-1) * int_mb(k_range+h12b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_9_2_2_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i3 ( h11 p5 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h11b
      INTEGER p5b
      length = 0
      DO h11b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h11b-1) .eq. int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h11b-1),int_mb(k_sym+p5b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h11b-1)+int_mb(k_spin+p5b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_9_2_2_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h11b = 1,noab
      DO p5b = noab+1,noab+nvab
      IF (int_mb(k_spin+h11b-1) .eq. int_mb(k_spin+p5b-1)) THEN
      IF (ieor(int_mb(k_sym+h11b-1),int_mb(k_sym+p5b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+h11b-1)+int_mb(k_spin+p5b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p5b - noab - 1 + nvab * (h11b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h11b-1) * int_mb(k_range+p5b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_9_3_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( p13 p9 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER p13b
      INTEGER p9b
      length = 0
      DO p13b = noab+1,noab+nvab
      DO p9b = noab+1,noab+nvab
      IF (int_mb(k_spin+p13b-1) .eq. int_mb(k_spin+p9b-1)) THEN
      IF (ieor(int_mb(k_sym+p13b-1),int_mb(k_sym+p9b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+p13b-1)+int_mb(k_spin+p9b-
     &1).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_9_3_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO p13b = noab+1,noab+nvab
      DO p9b = noab+1,noab+nvab
      IF (int_mb(k_spin+p13b-1) .eq. int_mb(k_spin+p9b-1)) THEN
      IF (ieor(int_mb(k_sym+p13b-1),int_mb(k_sym+p9b-1)) .eq. irrep_f) T
     &HEN
      IF ((.not.restricted).or.(int_mb(k_spin+p13b-1)+int_mb(k_spin+p9b-
     &1).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p9b - noab - 1 + nvab * (p13b - noab - 1
     &)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+p13b-1) * int_mb(k_range+p9b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
      SUBROUTINE OFFSET_eomccsdt_y2_9_5_1(l_a_offset,k_a_offset,size)
C     $Id: OFFSET_eomccsdt_3.F 19702 2010-10-29 17:26:22Z d3y133 $
C     This is a Fortran77 program generated by Tensor Contraction Engine v.1.0
C     Copyright (c) Battelle & Pacific Northwest National Laboratory (2002)
C     i2 ( h7 p6 )_f
      IMPLICIT NONE
#include "global.fh"
#include "mafdecls.fh"
#include "sym.fh"
#include "errquit.fh"
#include "tce.fh"
      INTEGER l_a_offset
      INTEGER k_a_offset
      INTEGER size
      INTEGER length
      INTEGER addr
      INTEGER h7b
      INTEGER p6b
      length = 0
      DO h7b = 1,noab
      DO p6b = noab+1,noab+nvab
      IF (int_mb(k_spin+h7b-1) .eq. int_mb(k_spin+p6b-1)) THEN
      IF (ieor(int_mb(k_sym+h7b-1),int_mb(k_sym+p6b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h7b-1)+int_mb(k_spin+p6b-1
     &).ne.4)) THEN
      length = length + 1
      END IF
      END IF
      END IF
      END DO
      END DO
      IF (.not.MA_PUSH_GET(mt_int,2*length+1,'noname',l_a_offset,k_a_off
     &set)) CALL ERRQUIT('eomccsdt_y2_9_5_1',0,MA_ERR)
      int_mb(k_a_offset) = length
      addr = 0
      size = 0
      DO h7b = 1,noab
      DO p6b = noab+1,noab+nvab
      IF (int_mb(k_spin+h7b-1) .eq. int_mb(k_spin+p6b-1)) THEN
      IF (ieor(int_mb(k_sym+h7b-1),int_mb(k_sym+p6b-1)) .eq. irrep_f) TH
     &EN
      IF ((.not.restricted).or.(int_mb(k_spin+h7b-1)+int_mb(k_spin+p6b-1
     &).ne.4)) THEN
      addr = addr + 1
      int_mb(k_a_offset+addr) = p6b - noab - 1 + nvab * (h7b - 1)
      int_mb(k_a_offset+length+addr) = size
      size = size + int_mb(k_range+h7b-1) * int_mb(k_range+p6b-1)
      END IF
      END IF
      END IF
      END DO
      END DO
      RETURN
      END
