Пример #1
0
 def sequenceFor(output,inp=None):
     if isinstance(output, list) and output and isinstance(output[0], str):
         key = strlistkey(output)
     elif isinstance(output, str):
         key = output
     else:
         raise TypeError('Output should be token or list of tokens')
     if key not in implemented:
         raise LookupError('Corvus cannot currently produce ' + key + ' using ABINIT')
     f = lambda subkey:implemented[key][subkey]
     if f('type') == 'Exchange':
         return Exchange(Abinit, f('req'), f('out'), cost=f('cost'), desc=f('desc'))
Пример #2
0
    def sequenceFor(output, inp=None):
        from corvus.controls import availableHandlers

        if isinstance(output, list) and output and isinstance(output[0], str):
            key = strlistkey(output)
        elif isinstance(output, str):
            key = output
        else:
            raise TypeError('Output should be token or list of tokens')
        if key not in implemented:
            raise LookupError('Corvus cannot currently produce ' + key +
                              ' using helper')
        f = lambda subkey: implemented[key][subkey]
        required = f('req')

        if f('type') == 'Exchange':
            return Exchange(helper,
                            required,
                            f('out'),
                            cost=f('cost'),
                            desc=f('desc'))
Пример #3
0
    def sequenceFor(output, inp=None):
        if isinstance(output, list) and output and isinstance(output[0], str):
            key = strlistkey(output)
        elif isinstance(output, str):
            key = output
        else:
            raise TypeError('Output should be token of list of tokens')
        if key not in implemented:
            raise LookupError('Corvus cannot currently produce ' + key +
                              ' using FEFF')
        f = lambda subkey: implemented[key][subkey]
        required = f('req')
        # JJK - Need to add requirements of internal workflow here.
        if 'mbconv' in list(inp.keys()):
            required.extend()

        if f('type') == 'Exchange':
            return Exchange(mbconv,
                            f('req'),
                            f('out'),
                            cost=f('cost'),
                            desc=f('desc'))