parameters: (name, **kwargs)
return_statement: return dfocc_wfn
docstring: Function encoding sequence of PSI module calls for
      an density-fitted orbital-optimized MP2 computation
docstring_summary: Function encoding sequence of PSI module calls for
      an density-fitted orbital-optimized MP2 computation
docstring_tokens: Function encoding sequence of PSI module calls for an density - fitted orbital - optimized MP2 computation
function: def run_qchf(name, **kwargs):
      """Function encoding sequence of PSI module calls for
      an density-fitted orbital-optimized MP2 computation
  
      """
      optstash = p4util.OptionsState(
          ['SCF', 'DF_INTS_IO'],
          ['DF_BASIS_SCF'],
          ['DIE_IF_NOT_CONVERGED'],
          ['MAXITER'],
          ['DFOCC', 'ORB_OPT'],
          ['DFOCC', 'WFN_TYPE'],
          ['DFOCC', 'QCHF'],
          ['DFOCC', 'E_CONVERGENCE'])
  
      core.set_local_option('DFOCC', 'ORB_OPT', 'TRUE')
      core.set_local_option('DFOCC', 'WFN_TYPE', 'QCHF')
      core.set_local_option('DFOCC', 'QCHF', 'TRUE')
      core.set_local_option('DFOCC', 'E_CONVERGENCE', 8)
  
      core.set_local_option('SCF', 'DF_INTS_IO', 'SAVE')
      core.set_local_option('SCF', 'DIE_IF_NOT_CONVERGED', 'FALSE')
      core.set_local_option('SCF', 'MAXITER', 1)
  
      # Bypass the scf call if a reference wavefunction is given
      ref_wfn = kwargs.get('ref_wfn', None)
      if ref_wfn is None:
          ref_wfn = scf_helper(name, use_c1=True, **kwargs)  # C1 certified
      else:
          if ref_wfn.molecule().schoenflies_symbol() != 'c1':
              raise ValidationError("""  QCHF does not make use of molecular symmetry: """
                                    """reference wavefunction must be C1.\n""")
  
      if core.get_option('SCF', 'REFERENCE') == 'ROHF':
          ref_wfn.semicanonicalize()
      dfocc_wfn = core.dfocc(ref_wfn)
  
      return dfocc_wfn
function_tokens: def run_qchf ( name , * * kwargs ) : optstash = p4util . OptionsState ( [ 'SCF' , 'DF_INTS_IO' ] , [ 'DF_BASIS_SCF' ] , [ 'DIE_IF_NOT_CONVERGED' ] , [ 'MAXITER' ] , [ 'DFOCC' , 'ORB_OPT' ] , [ 'DFOCC' , 'WFN_TYPE' ] , [ 'DFOCC' , 'QCHF' ] , [ 'DFOCC' , 'E_CONVERGENCE' ] ) core . set_local_option ( 'DFOCC' , 'ORB_OPT' , 'TRUE' ) core . set_local_option ( 'DFOCC' , 'WFN_TYPE' , 'QCHF' ) core . set_local_option ( 'DFOCC' , 'QCHF' , 'TRUE' ) core . set_local_option ( 'DFOCC' , 'E_CONVERGENCE' , 8 ) core . set_local_option ( 'SCF' , 'DF_INTS_IO' , 'SAVE' ) core . set_local_option ( 'SCF' , 'DIE_IF_NOT_CONVERGED' , 'FALSE' ) core . set_local_option ( 'SCF' , 'MAXITER' , 1 ) # Bypass the scf call if a reference wavefunction is given ref_wfn = kwargs . get ( 'ref_wfn' , None ) if ref_wfn is None : ref_wfn = scf_helper ( name , use_c1 = True , * * kwargs ) # C1 certified else : if ref_wfn . molecule ( ) . schoenflies_symbol ( ) != 'c1' : raise ValidationError ( """  QCHF does not make use of molecular symmetry: """ """reference wavefunction must be C1.\n""" ) if core . get_option ( 'SCF' , 'REFERENCE' ) == 'ROHF' : ref_wfn . semicanonicalize ( ) dfocc_wfn = core . dfocc ( ref_wfn ) return dfocc_wfn