@staticmethod
def promote_ase_atoms(obj, symmetry=None):
    ' Convert ASE Atoms object to the one usable by SPRKKR.\n           For the case of the usability it is a bit ugly hack: The __class__ attribute\n           is replaced so the extra methods and properties of the objects will\n           be available.\n\n           Parameters\n           ----------\n           obj: ase.Atoms\n            The atoms object to be promoted to be used for SPRKKR calculations\n\n           symmetry: boolean or None\n            The sites property of the resulting object will consider the symmetry of the structure.\n            I.e., the by-symmetry-equal atomic sites will share the same sites object.\n            Default None is the same as True, however it does not change the symmetry\n            of the already promoted obj passed into the routine.\n       '
    if (obj and (not isinstance(obj, SPRKKRAtoms))):
        if (obj.__class__ is Atoms):
            obj.__class__ = SPRKKRAtoms
        else:
            if (not isinstance(obj, Atoms)):
                raise f'Can not promote class {obj} of class {obj.__class__} to {SPRKKRAtoms}'

            class SprKKrAtomsEx(obj.__class__, SPRKKRAtoms):
                pass
            obj.__class__ = SprKKrAtomsEx
        obj._init((True if (symmetry is None) else symmetry))
    elif (symmetry is not None):
        obj.symmetry = symmetry
    return obj
Convert ASE Atoms object to the one usable by SPRKKR.
For the case of the usability it is a bit ugly hack: The __class__ attribute
is replaced so the extra methods and properties of the objects will
be available.

Parameters
----------
obj: ase.Atoms
 The atoms object to be promoted to be used for SPRKKR calculations

symmetry: boolean or None
 The sites property of the resulting object will consider the symmetry of the structure.
 I.e., the by-symmetry-equal atomic sites will share the same sites object.
 Default None is the same as True, however it does not change the symmetry
 of the already promoted obj passed into the routine.
@staticmethod
def promote_ase_atoms(obj, symmetry=None):
    ' Convert ASE Atoms object to the one usable by SPRKKR.\n           For the case of the usability it is a bit ugly hack: The __class__ attribute\n           is replaced so the extra methods and properties of the objects will\n           be available.\n\n           Parameters\n           ----------\n           obj: ase.Atoms\n            The atoms object to be promoted to be used for SPRKKR calculations\n\n           symmetry: boolean or None\n            The sites property of the resulting object will consider the symmetry of the structure.\n            I.e., the by-symmetry-equal atomic sites will share the same sites object.\n            Default None is the same as True, however it does not change the symmetry\n            of the already promoted obj passed into the routine.\n       '
    if (obj and (not isinstance(obj, SPRKKRAtoms))):
        if (obj.__class__ is Atoms):
            obj.__class__ = SPRKKRAtoms
        else:
            if (not isinstance(obj, Atoms)):
                raise f'Can not promote class {obj} of class {obj.__class__} to {SPRKKRAtoms}'

            class SprKKrAtomsEx(obj.__class__, SPRKKRAtoms):
                pass
            obj.__class__ = SprKKrAtomsEx
        obj._init((True if (symmetry is None) else symmetry))
    elif (symmetry is not None):
        obj.symmetry = symmetry
    return obj