parameters: (expected, computed, label)
docstring: Function to compare two FCIDUMP files. Prints success
      when value *computed* matches value *expected*.
      Performs a system exit on failure. Used in input files in the test suite.
  
      :returns: a dictionary of energies computed from the MO integrals.
        - 'NUCLEAR REPULSION ENERGY' : nuclear repulsion plus frozen core energy
        - 'ONE-ELECTRON ENERGY' : SCF one-electron energy
        - 'TWO-ELECTRON ENERGY' : SCF two-electron energy
        - 'SCF TOTAL ENERGY' : SCF total energy
        - 'MP2 CORRELATION ENERGY' : MP2 correlation energy
  
      :param expected: reference FCIDUMP file
      :param computed: computed FCIDUMP file
      :param label: string labelling the test
docstring_summary: Function to compare two FCIDUMP files. Prints success
      when value *computed* matches value *expected*.
      Performs a system exit on failure. Used in input files in the test suite.
docstring_tokens: Function to compare two FCIDUMP files . Prints success when value * computed * matches value * expected * . Performs a system exit on failure . Used in input files in the test suite .
function: def compare_fcidumps(expected, computed, label):
      """Function to compare two FCIDUMP files. Prints success
      when value *computed* matches value *expected*.
      Performs a system exit on failure. Used in input files in the test suite.
  
      :returns: a dictionary of energies computed from the MO integrals.
        - 'NUCLEAR REPULSION ENERGY' : nuclear repulsion plus frozen core energy
        - 'ONE-ELECTRON ENERGY' : SCF one-electron energy
        - 'TWO-ELECTRON ENERGY' : SCF two-electron energy
        - 'SCF TOTAL ENERGY' : SCF total energy
        - 'MP2 CORRELATION ENERGY' : MP2 correlation energy
  
      :param expected: reference FCIDUMP file
      :param computed: computed FCIDUMP file
      :param label: string labelling the test
      """
  
      # Grab expected header and integrals
      ref_intdump = fcidump_from_file(expected)
      intdump = fcidump_from_file(computed)
  
      # Compare headers
      compare_recursive(
          ref_intdump,
          intdump,
          'FCIDUMP header',
          forgive=['enuc', 'hcore', 'eri', 'epsilon'])
  
      ref_energies = energies_from_fcidump(ref_intdump)
      energies = energies_from_fcidump(intdump)
  
      pass_1el = compare_values(ref_energies['ONE-ELECTRON ENERGY'], energies['ONE-ELECTRON ENERGY'], 7,
                                label + '. 1-electron energy')
      pass_2el = compare_values(ref_energies['TWO-ELECTRON ENERGY'], energies['TWO-ELECTRON ENERGY'], 7,
                                label + '. 2-electron energy')
      pass_scf = compare_values(ref_energies['SCF TOTAL ENERGY'], energies['SCF TOTAL ENERGY'], 10,
                                label + '. SCF total energy')
      pass_mp2 = compare_values(ref_energies['MP2 CORRELATION ENERGY'], energies['MP2 CORRELATION ENERGY'], 10,
                                label + '. MP2 correlation energy')
  
      compare_integers(True, (pass_1el and pass_2el and pass_scf and pass_mp2), label)
function_tokens: def compare_fcidumps ( expected , computed , label ) : # Grab expected header and integrals ref_intdump = fcidump_from_file ( expected ) intdump = fcidump_from_file ( computed ) # Compare headers compare_recursive ( ref_intdump , intdump , 'FCIDUMP header' , forgive = [ 'enuc' , 'hcore' , 'eri' , 'epsilon' ] ) ref_energies = energies_from_fcidump ( ref_intdump ) energies = energies_from_fcidump ( intdump ) pass_1el = compare_values ( ref_energies [ 'ONE-ELECTRON ENERGY' ] , energies [ 'ONE-ELECTRON ENERGY' ] , 7 , label + '. 1-electron energy' ) pass_2el = compare_values ( ref_energies [ 'TWO-ELECTRON ENERGY' ] , energies [ 'TWO-ELECTRON ENERGY' ] , 7 , label + '. 2-electron energy' ) pass_scf = compare_values ( ref_energies [ 'SCF TOTAL ENERGY' ] , energies [ 'SCF TOTAL ENERGY' ] , 10 , label + '. SCF total energy' ) pass_mp2 = compare_values ( ref_energies [ 'MP2 CORRELATION ENERGY' ] , energies [ 'MP2 CORRELATION ENERGY' ] , 10 , label + '. MP2 correlation energy' ) compare_integers ( True , ( pass_1el and pass_2el and pass_scf and pass_mp2 ) , label )