def make_folders(template, custom_base):
    def dict_representer(dumper, data):
        return dumper.represent_dict(data.items())
    Dumper.add_representer(collections.OrderedDict, dict_representer)
    if custom_base is None:
        custom_base = os.path.abspath(os.path.curdir)
    template = custom_base + '/' + template
    template_data = ase_tools.REACTION_TEMPLATE
    if not os.path.exists(template):
        with open(template, 'w') as outfile:
            outfile.write(
                yaml.dump(
                    template_data,
                    indent=4,
                    Dumper=Dumper) +
                '\n')
            print("Created template file: {template}\n".format(**locals()) +
                  '  Please edit it and run the script again to create your folderstructure.\n' +
                  '  Run cathub make_folders --help for instructions')
            return
    with open(template) as infile:
        template_data = yaml.load(infile)
        title = template_data['title']
        authors = template_data['authors']
        journal = template_data['journal']
        volume = template_data['volume']
        number = template_data['number']
        pages = template_data['pages']
        year = template_data['year']
        email = template_data['email']
        publisher = template_data['publisher']
        doi = template_data['doi']
        dft_code = template_data['DFT_code']
        dft_functionals = template_data['DFT_functionals']
        reactions = template_data['reactions']
        crystal_structures = template_data['crystal_structures']
        bulk_compositions = template_data['bulk_compositions']
        facets = template_data['facets']
        energy_corrections = template_data['energy_corrections']
    make_folders_template.main(
        title=title,
        authors=eval(authors) if isinstance(
            authors, six.string_types) else authors,
        journal=journal,
        volume=volume,
        number=number,
        pages=pages,
        year=year,
        email=email,
        publisher=publisher,
        doi=doi,
        DFT_code=dft_code,
        DFT_functionals=dft_functionals,
        reactions=eval(reactions) if isinstance(
            reactions, six.string_types) else reactions,
        custom_base=custom_base,
        bulk_compositions=bulk_compositions,
        crystal_structures=crystal_structures,
        facets=facets,
        energy_corrections=energy_corrections
    )
    pub_id = tools.get_pub_id(title, authors, year)
    print(
        "Now dump your DFT output files into the folder, and run 'cathub folder2db {pub_id}'".format(**locals()))