)

    grid = gridplot(
        [[p0, p1], [p2, p3], [p4, p5], [p6, p7], [p8, p9]],
        plot_width=plot_width,
        plot_height=plot_height,
    )

    return grid


# Maybe add here a plot with the CH4-Framework RDF

sizing_mode = "fixed"
cof_name = get_name_from_url()
entry = get_data(cof_name, plot_info)

if cof_name in allowed_names:
    cif_str = get_cif_str(entry.filename)
    info = dict(
        height="100%",
        width="100%",
        use="HTML5",
        # serverURL="https://chemapps.stolaf.edu/jmol/jsmol/php/jsmol.php",
        # j2sPath="https://chemapps.stolaf.edu/jmol/jsmol/j2s",
        # serverURL="https://www.materialscloud.org/discover/scripts/external/jsmol/php/jsmol.php",
        # j2sPath="https://www.materialscloud.org/discover/scripts/external/jsmol/j2s",
        serverURL="detail/static/jsmol/php/jsmol.php",
        j2sPath="detail/static/jsmol/j2s",
        script="""set antialiasDisplay ON;
load data "cifstring"
Beispiel #2
0
                           columns=columns,
                           width=500,
                           height=570,
                           index_position=None,
                           fit_columns=False)

    json_str = json.dumps(entry_dict, indent=2)
    btn_download_table.callback = bmd.CustomJS(args=dict(
        string=json_str, filename=entry_dict['name'] + '.json'),
                                               code=download_js)

    return widgetbox(data_table)


cof_name = get_name_from_url()
entry = get_data(cof_name, plot_info, get_table_from_url())


def get_cif_content_from_os(filename):
    """Load CIF content via GET request from object store."""
    import requests

    url = "https://object.cscs.ch/v1/AUTH_b1d80408b3d340db9f03d373bbde5c1e/discover-mofs/structures/{}".format(
        filename)
    #print(url)
    data = requests.get(url)
    #print(str(data.content.decode()))
    return str(data.content.decode())


def postprocess_cif_for_jsmol(cif_str):