示例#1
0
    def get_retrieved_outputs(self, node, filename=None, rtype=None):
        """
        Generic function to return output of calc outputls verdi command.
        Actual definition is in child classes as the content to be
        returned and its format depends on the visualization plugin specific
        to the resource

        :param node: node object
        :returns: list of calc outputls command
        """

        if node.dbnode.type.startswith("calculation"):
            from aiida.restapi.translator.calculation import CalculationTranslator
            return CalculationTranslator.get_retrieved_outputs(node, filename=filename, rtype=rtype)
        return []
示例#2
0
 def __init__(self):
     from aiida.restapi.translator.calculation import CalculationTranslator
     self.trans = CalculationTranslator()
     from aiida.orm import Calculation
     self.tclass = Calculation