import math


def GetStandardizedWeights(weights):
  """
    Normalizes the weights,
    such that the absolute maximum weight equals 1.0.

    Parameters:
      weights -- the list with the atomic weights
    """
  tmp = [math.fabs(w) for w in weights]
  currentMax = max(tmp)
  if currentMax > 0:
    return [w / currentMax for w in weights], currentMax
  else:
    return weights, currentMax