def write_mainlib_split_datasets(component_inchikey_dict, mainlib_inchikey_dict, output_dir, max_atoms, max_mass_spec_peak_loc):
    'Write all train/val/test set TFRecords from main NIST sdf file.'
    for component_kwarg in component_inchikey_dict.keys():
        component_mainlib_filename = (component_kwarg + FROM_MAINLIB_FILENAME_MODIFIER)
        if (component_kwarg == ds_constants.MAINLIB_TRAIN_BASENAME):
            write_all_dataset_files(mainlib_inchikey_dict, component_inchikey_dict[component_kwarg], component_mainlib_filename, output_dir, max_atoms, max_mass_spec_peak_loc, make_library_array=True)
        else:
            write_all_dataset_files(mainlib_inchikey_dict, component_inchikey_dict[component_kwarg], component_mainlib_filename, output_dir, max_atoms, max_mass_spec_peak_loc)
Write all train/val/test set TFRecords from main NIST sdf file.
def write_mainlib_split_datasets(component_inchikey_dict, mainlib_inchikey_dict, output_dir, max_atoms, max_mass_spec_peak_loc):
    
    for component_kwarg in component_inchikey_dict.keys():
        component_mainlib_filename = (component_kwarg + FROM_MAINLIB_FILENAME_MODIFIER)
        if (component_kwarg == ds_constants.MAINLIB_TRAIN_BASENAME):
            write_all_dataset_files(mainlib_inchikey_dict, component_inchikey_dict[component_kwarg], component_mainlib_filename, output_dir, max_atoms, max_mass_spec_peak_loc, make_library_array=True)
        else:
            write_all_dataset_files(mainlib_inchikey_dict, component_inchikey_dict[component_kwarg], component_mainlib_filename, output_dir, max_atoms, max_mass_spec_peak_loc)