parameters: (self, modelchem, benchmark='default', sset='default', failoninc=True, verbose=False)
return_statement: return err
docstring: For full database or subset *sset*, computes raw reaction
          errors between *modelchem* and *benchmark* model chemistries.
          Returns error if model chemistries are missing for any reaction in
          subset unless *failoninc* set to False, whereupon returns partial.
          Returns dictionary of reaction labels and error forms.
docstring_summary: For full database or subset *sset*, computes raw reaction
          errors between *modelchem* and *benchmark* model chemistries.
          Returns error if model chemistries are missing for any reaction in
          subset unless *failoninc* set to False, whereupon returns partial.
          Returns dictionary of reaction labels and error forms.
docstring_tokens: For full database or subset * sset * computes raw reaction errors between * modelchem * and * benchmark * model chemistries . Returns error if model chemistries are missing for any reaction in subset unless * failoninc * set to False whereupon returns partial . Returns dictionary of reaction labels and error forms .
function: def compute_errors(self, modelchem, benchmark='default', sset='default', failoninc=True, verbose=False):
          """For full database or subset *sset*, computes raw reaction
          errors between *modelchem* and *benchmark* model chemistries.
          Returns error if model chemistries are missing for any reaction in
          subset unless *failoninc* set to False, whereupon returns partial.
          Returns dictionary of reaction labels and error forms.
  
          """
          if isinstance(sset, basestring):
              # sset is normal subset name 'MX' corresponding to HRXN_MX or MX array in database module
              try:
                  lsset = self.sset[sset.lower()]
              except KeyError as e:
                  # raise ValidationError("""Subset named %s not available""" % (str(e)))
                  lsset = OrderedDict()
          else:
              if callable(sset):
                  # sset is function that will generate subset of HRXN from sset(self)
                  lsslist = [rxn for rxn in self.sset['default'].keys() if rxn in sset(self)]
              else:
                  # sset is array containing reactions
                  lsslist = [rxn for rxn in self.sset['default'].keys() if rxn in sset]
              # assemble dict of qcdb.Reaction objects from array of reaction names
              lsset = OrderedDict()
              for rxn in lsslist:
                  lsset[rxn] = self.hrxn[rxn]
  
  #        cureinfo = self.get_pec_weightinfo()
          err = {}
          for rxn, oRxn in lsset.items():
              lbench = oRxn.benchmark if benchmark == 'default' else benchmark
              try:
                  mcLesser = oRxn.data[modelchem].value
              except KeyError as e:
                  if failoninc:
                      raise ValidationError("""Reaction %s missing datum %s.""" % (str(rxn), str(e)))
                  else:
                      continue
              try:
                  mcGreater = oRxn.data[lbench].value
              except KeyError as e:
                  if lbench == 'ZEROS':
                      pass
                  else:
                      print("""Reaction %s missing benchmark""" % (str(rxn)))
                      continue
              # handle particulars of PEC error measures
  #            rxncureinfo = cureinfo[rxn]
  #            try:
  #                mcGreaterCrvmin = self.hrxn[rxncureinfo['eq']].data[lbench].value
  #            except KeyError as e:
  #                print """Reaction %s missing benchmark""" % (str(eqrxn))
  
  #            cure_denom = cure_weight(refrxn=mcGreater, refeq=mcGreaterCrvmin, rrat=rxncureinfo['Rrat'])
  #            balanced_mask, balwt = balanced_error(refrxn=mcGreater, refeq=mcGreaterCrvmin, rrat=rxncureinfo['Rrat'])
  
              if lbench == 'ZEROS':
                  err[rxn] = [mcLesser,
                              0.0, 0.0, 0.0, 1.0]  # FAKE
              else:
                  err[rxn] = [mcLesser - mcGreater,
                          (mcLesser - mcGreater) / abs(mcGreater),
                          (mcLesser - mcGreater) / abs(mcGreater),  # FAKE
                          (mcLesser - mcGreater) / abs(mcGreater),  # FKAE
                          1.0  # FAKE
                          ]
  #                        (mcLesser - mcGreater) / abs(cure_denom),
  #                        (mcLesser - mcGreater) * balanced_mask / abs(mcGreaterCrvmin),
  #                        balwt]
              if verbose:
                  print("""p = %8.4f, pe = %8.3f%%, pbe = %8.3f%% pce = %8.3f%% reaction %s.""" %
                   (err[rxn][0], 100 * err[rxn][1], 100 * err[rxn][3], 100 * err[rxn][2], str(rxn)))
          return err
function_tokens: def compute_errors ( self , modelchem , benchmark = 'default' , sset = 'default' , failoninc = True , verbose = False ) : if isinstance ( sset , basestring ) : # sset is normal subset name 'MX' corresponding to HRXN_MX or MX array in database module try : lsset = self . sset [ sset . lower ( ) ] except KeyError as e : # raise ValidationError("""Subset named %s not available""" % (str(e))) lsset = OrderedDict ( ) else : if callable ( sset ) : # sset is function that will generate subset of HRXN from sset(self) lsslist = [ rxn for rxn in self . sset [ 'default' ] . keys ( ) if rxn in sset ( self ) ] else : # sset is array containing reactions lsslist = [ rxn for rxn in self . sset [ 'default' ] . keys ( ) if rxn in sset ] # assemble dict of qcdb.Reaction objects from array of reaction names lsset = OrderedDict ( ) for rxn in lsslist : lsset [ rxn ] = self . hrxn [ rxn ] #        cureinfo = self.get_pec_weightinfo() err = { } for rxn , oRxn in lsset . items ( ) : lbench = oRxn . benchmark if benchmark == 'default' else benchmark try : mcLesser = oRxn . data [ modelchem ] . value except KeyError as e : if failoninc : raise ValidationError ( """Reaction %s missing datum %s.""" % ( str ( rxn ) , str ( e ) ) ) else : continue try : mcGreater = oRxn . data [ lbench ] . value except KeyError as e : if lbench == 'ZEROS' : pass else : print ( """Reaction %s missing benchmark""" % ( str ( rxn ) ) ) continue # handle particulars of PEC error measures #            rxncureinfo = cureinfo[rxn] #            try: #                mcGreaterCrvmin = self.hrxn[rxncureinfo['eq']].data[lbench].value #            except KeyError as e: #                print """Reaction %s missing benchmark""" % (str(eqrxn)) #            cure_denom = cure_weight(refrxn=mcGreater, refeq=mcGreaterCrvmin, rrat=rxncureinfo['Rrat']) #            balanced_mask, balwt = balanced_error(refrxn=mcGreater, refeq=mcGreaterCrvmin, rrat=rxncureinfo['Rrat']) if lbench == 'ZEROS' : err [ rxn ] = [ mcLesser , 0.0 , 0.0 , 0.0 , 1.0 ] # FAKE else : err [ rxn ] = [ mcLesser - mcGreater , ( mcLesser - mcGreater ) / abs ( mcGreater ) , ( mcLesser - mcGreater ) / abs ( mcGreater ) , # FAKE ( mcLesser - mcGreater ) / abs ( mcGreater ) , # FKAE 1.0 # FAKE ] #                        (mcLesser - mcGreater) / abs(cure_denom), #                        (mcLesser - mcGreater) * balanced_mask / abs(mcGreaterCrvmin), #                        balwt] if verbose : print ( """p = %8.4f, pe = %8.3f%%, pbe = %8.3f%% pce = %8.3f%% reaction %s.""" % ( err [ rxn ] [ 0 ] , 100 * err [ rxn ] [ 1 ] , 100 * err [ rxn ] [ 3 ] , 100 * err [ rxn ] [ 2 ] , str ( rxn ) ) ) return err