Example #1
0
def reaction_leaf(prefix, root_ds=None):
    """ reaction leaf DataSeries
    """
    loc_dfile = file_.locator(
        file_prefix=SPEC_FILE_PREFIX,
        map_dct_={
            'inchis':
            lambda locs: locs[0],
            'charges':
            lambda locs: locs[1],
            'multiplicities':
            lambda locs: locs[2],
            'ts_multiplicity':
            lambda locs: locs[3],
            'smiles':
            lambda locs: [
                list(map(automol.inchi.smiles, locs[0][0])),
                list(map(automol.inchi.smiles, locs[0][1]))
            ],
        },
        loc_keys=['inchis', 'charges', 'multiplicities', 'ts_multiplicity'])

    _map = _pack_arguments(map_.reaction_leaf)
    nlocs = _count_arguments(map_.reaction_leaf)
    return model.DataSeries(prefix,
                            map_=_map,
                            nlocs=nlocs,
                            depth=11,
                            loc_dfile=loc_dfile,
                            root_ds=root_ds)
Example #2
0
def conformer_leaf(prefix, root_ds=None):
    """ conformer leaf DataSeries
    """
    loc_dfile = file_.locator(file_prefix=SPEC_FILE_PREFIX,
                              map_dct_={'conformer_id': lambda locs: locs[0]},
                              loc_keys=['conformer_id'])

    _map = _pack_arguments(map_.conformer_leaf)
    nlocs = _count_arguments(map_.conformer_leaf)
    return model.DataSeries(prefix,
                            map_=_map,
                            nlocs=nlocs,
                            depth=1,
                            loc_dfile=loc_dfile,
                            root_ds=root_ds)
Example #3
0
def build_trunk(prefix, root_ds=None):
    """ build trunk DataSeries
    """
    loc_dfile = file_.locator(file_prefix=SPEC_FILE_PREFIX,
                              map_dct_={'head': lambda locs: locs[0]},
                              loc_keys=['head'])

    _map = _pack_arguments(map_.build_trunk)
    nlocs = _count_arguments(map_.build_trunk)
    return model.DataSeries(prefix,
                            map_=_map,
                            nlocs=nlocs,
                            depth=1,
                            loc_dfile=loc_dfile,
                            root_ds=root_ds)
Example #4
0
def scan_branch(prefix, root_ds=None):
    """ scan branch DataSeries
    """
    loc_dfile = file_.locator(file_prefix=SPEC_FILE_PREFIX,
                              map_dct_={'coo_names': lambda locs: locs[0]},
                              loc_keys=['coo_names'])

    _map = _pack_arguments(map_.scan_branch)
    nlocs = _count_arguments(map_.scan_branch)
    return model.DataSeries(prefix,
                            map_=_map,
                            nlocs=nlocs,
                            depth=1,
                            loc_dfile=loc_dfile,
                            root_ds=root_ds)
Example #5
0
def build_leaf(prefix, root_ds=None):
    """ build leaf DataSeries
    """
    loc_dfile = file_.locator(file_prefix=SPEC_FILE_PREFIX,
                              map_dct_={'num': lambda locs: locs[0]},
                              loc_keys=['num'])

    _map = _pack_arguments(map_.build_leaf)
    nlocs = _count_arguments(map_.build_leaf)
    return model.DataSeries(prefix,
                            map_=_map,
                            nlocs=nlocs,
                            depth=1,
                            loc_dfile=loc_dfile,
                            root_ds=root_ds,
                            removable=True)
Example #6
0
def subrun_leaf(prefix, root_ds=None):
    """ subrun leaf DataSeries
    """
    loc_dfile = file_.locator(file_prefix=SPEC_FILE_PREFIX,
                              map_dct_={
                                  'macro_idx': lambda locs: locs[0],
                                  'micro_idx': lambda locs: locs[1]
                              },
                              loc_keys=['macro_idx', 'micro_idx'])

    _map = _pack_arguments(map_.subrun_leaf)
    nlocs = _count_arguments(map_.subrun_leaf)
    return model.DataSeries(prefix,
                            map_=_map,
                            nlocs=nlocs,
                            depth=1,
                            loc_dfile=loc_dfile,
                            root_ds=root_ds)
Example #7
0
def theory_leaf(prefix, root_ds=None):
    """ theory leaf DataSeries
    """
    loc_dfile = file_.locator(file_prefix=SPEC_FILE_PREFIX,
                              map_dct_={
                                  'method': lambda locs: locs[0],
                                  'basis': lambda locs: locs[1],
                                  'orb_restricted': lambda locs: locs[2]
                              },
                              loc_keys=['method', 'basis', 'orb_restricted'])

    _map = _pack_arguments(map_.theory_leaf)
    nlocs = _count_arguments(map_.theory_leaf)
    return model.DataSeries(prefix,
                            map_=_map,
                            nlocs=nlocs,
                            depth=1,
                            loc_dfile=loc_dfile,
                            root_ds=root_ds)
Example #8
0
def species_leaf(prefix, root_ds=None):
    """ species leaf DataSeries
    """
    loc_dfile = file_.locator(file_prefix=SPEC_FILE_PREFIX,
                              map_dct_={
                                  'inchi':
                                  lambda locs: locs[0],
                                  'charge':
                                  lambda locs: locs[1],
                                  'multiplicity':
                                  lambda locs: locs[2],
                                  'smiles':
                                  lambda locs: automol.inchi.smiles(locs[0])
                              },
                              loc_keys=['inchi', 'charge', 'multiplicity'])

    _map = _pack_arguments(map_.species_leaf)
    nlocs = _count_arguments(map_.species_leaf)
    return model.DataSeries(prefix,
                            map_=_map,
                            nlocs=nlocs,
                            depth=5,
                            loc_dfile=loc_dfile,
                            root_ds=root_ds)