def theory_leaf(prefix, root_ds=None): """ theory leaf DataSeries """ loc_dfile = data_files.locator(file_prefix=SPEC_FILE_PREFIX, map_dct_={ 'method': lambda locs: locs[0], 'basis': lambda locs: locs[1], 'orb_type': lambda locs: locs[2] }, loc_keys=['method', 'basis', 'orb_type']) _map = _pack_arguments(loc_maps.theory_leaf) nlocs = _count_arguments(loc_maps.theory_leaf) return model.DataSeries(prefix, map_=_map, nlocs=nlocs, depth=1, loc_dfile=loc_dfile, root_ds=root_ds)
def build_leaf(prefix, root_ds=None): """ build leaf DataSeries :param prefix: path to leaf :type prefix: string :return: dataseries filesystem object for leaf :type: DataSeries """ loc_dfile = data_files.locator(file_prefix=SPEC_FILE_PREFIX, map_dct_={'num': lambda locs: locs[0]}, loc_keys=['num']) _map = _pack_arguments(loc_maps.build_leaf) nlocs = _count_arguments(loc_maps.build_leaf) return model.DataSeries(prefix, map_=_map, nlocs=nlocs, depth=1, loc_dfile=loc_dfile, root_ds=root_ds, removable=True)
def cscan_branch2(prefix, root_ds=None): """ constrained scan branch 1 DataSeries :param prefix: path to branch :type prefix: string :return: dataseries filesystem object for branch :type: DataSeries """ loc_dfile = data_files.locator( file_prefix=SPEC_FILE_PREFIX, map_dct_={'coo_names': lambda locs: locs[0]}, loc_keys=['coo_names']) _map = _pack_arguments(loc_maps.cscan_branch2) nlocs = _count_arguments(loc_maps.cscan_branch2) return model.DataSeries(prefix, map_=_map, nlocs=nlocs, depth=1, loc_dfile=loc_dfile, root_ds=root_ds)
def species_leaf(prefix, root_ds=None): """ species leaf DataSeries """ loc_dfile = data_files.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(loc_maps.species_leaf) nlocs = _count_arguments(loc_maps.species_leaf) return model.DataSeries(prefix, map_=_map, nlocs=nlocs, depth=5, loc_dfile=loc_dfile, root_ds=root_ds)
def scan_leaf(prefix, root_ds=None): """ scan leaf DataSeries :param prefix: path to leaf :type prefix: string :return: dataseries filesystem object for leaf :type: DataSeries """ loc_dfile = data_files.locator( file_prefix=SPEC_FILE_PREFIX, # this should actually say coo_vals, but leave for compatibility map_dct_={'grid_idxs': lambda locs: locs[0]}, loc_keys=['grid_idxs']) _map = _pack_arguments(loc_maps.scan_leaf) nlocs = _count_arguments(loc_maps.scan_leaf) return model.DataSeries(prefix, map_=_map, nlocs=nlocs, depth=1, loc_dfile=loc_dfile, root_ds=root_ds)
def cscan_branch1(prefix, root_ds=None): """ constrained scan branch 2 DataSeries """ def _round_values(val_dct): names = list(val_dct.keys()) vals = [float(round(val, 2)) for val in val_dct.values()] val_dct = dict(zip(names, vals)) return val_dct loc_dfile = data_files.locator( file_prefix=SPEC_FILE_PREFIX, map_dct_={'cons_coo_vals': lambda locs: _round_values(locs[0])}, loc_keys=['cons_coo_vals']) _map = _pack_arguments(loc_maps.cscan_branch1) nlocs = _count_arguments(loc_maps.cscan_branch1) return model.DataSeries(prefix, map_=_map, nlocs=nlocs, depth=1, loc_dfile=loc_dfile, root_ds=root_ds)
def subrun_leaf(prefix, root_ds=None): """ subrun leaf DataSeries :param prefix: path to leaf :type prefix: string :return: dataseries filesystem object for leaf :type: DataSeries """ loc_dfile = data_files.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(loc_maps.subrun_leaf) nlocs = _count_arguments(loc_maps.subrun_leaf) return model.DataSeries(prefix, map_=_map, nlocs=nlocs, depth=1, loc_dfile=loc_dfile, root_ds=root_ds)
def reaction_leaf(prefix, root_ds=None): """ reaction leaf DataSeries :param prefix: path to leaf :type prefix: string :return: dataseries filesystem object for leaf :type: DataSeries """ loc_dfile = data_files.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(loc_maps.reaction_leaf) nlocs = _count_arguments(loc_maps.reaction_leaf) return model.DataSeries(prefix, map_=_map, nlocs=nlocs, depth=11, loc_dfile=loc_dfile, root_ds=root_ds)