Beispiel #1
0
 def __init__(self, backend_entity):
     """
     :param backend_entity: the backend model supporting this entity
     :type backend_entity: :class:`aiida.orm.implementation.BackendEntity`
     """
     self._backend_entity = backend_entity
     call_with_super_check(self.initialize)
Beispiel #2
0
    def from_backend_entity(cls, backend_entity):
        """
        Construct an entity from a backend entity instance

        :param backend_entity: the backend entity

        :return: an AiiDA entity instance
        """
        from . import implementation

        type_check(backend_entity, implementation.BackendEntity)
        entity = cls.__new__(cls)
        entity.init_from_backend(backend_entity)
        call_with_super_check(entity.initialize)
        return entity
Beispiel #3
0
 def do(self):
     utils.call_with_super_check(self.method)