parameters: (self, charge, value=None)
docstring: Sets the value of a ion's charge in units of |e|.
          @param charge - either a dictionary mapping ionnames to charges e.g. {'Ce':3, 'O1':-2, 'O2':-2}
                          or a particular ion's name, with its value in the next argument
          @param value - the value of the charge on the ion defined in 'charge' in |e|.
          Note that ions which have no charges set will be considered to have zero charge (ignored in calculation)
docstring_summary: Sets the value of a ion's charge in units of |e|.
docstring_tokens: Sets the value of a ion s charge in units of |e| .
function: def Charges(self, charge, value=None):
          """
          Sets the value of a ion's charge in units of |e|.
          @param charge - either a dictionary mapping ionnames to charges e.g. {'Ce':3, 'O1':-2, 'O2':-2}
                          or a particular ion's name, with its value in the next argument
          @param value - the value of the charge on the ion defined in 'charge' in |e|.
          Note that ions which have no charges set will be considered to have zero charge (ignored in calculation)
          """
          if self._checkHasStructure(warnName='Charges'):
              if value is None:
                  if not isinstance(charge, dict):
                      raise ValueError('Argument ''charge'' must be a dictionary')
                  self._charges = charge
              else:
                  if self._charges is None:
                      self._charges = {}
                  self._charges[charge] = float(value)
function_tokens: def Charges ( self , charge , value = None ) : if self . _checkHasStructure ( warnName = 'Charges' ) : if value is None : if not isinstance ( charge , dict ) : raise ValueError ( 'Argument ' 'charge' ' must be a dictionary' ) self . _charges = charge else : if self . _charges is None : self . _charges = { } self . _charges [ charge ] = float ( value )