FRAGMENTS_RENDERING_TEMPLATE = """
""" TARGET_RENDERING_TEMPLATE = """
""" FRAGMENTS_AND_TARGET_RENDERING_TEMPLATE = """
""" SAMPLES_RENDERING_TEMPLATE = """

""" SAMPLES_WITH_TARGET_RENDERING_TEMPLATE = """

""" INVALID_FORMAT_MSG = """

Invalid file format: {extension}

Allowed formats for the fragments file: Allowed formats for the optional protein file: """ ERROR_FORMAT_MSG = """

Error:

{message} """ IFRAME_TEMPLATE = """""" STARTUP_JS = """ () => { window.selected_elements = {} function handleMessage(event) { // console.log("New message: ", event.data) let atom = event.data.data["atom"]; let add = event.data.data["add"]; console.log("add: ", add, " atom: ", atom); window.selected_elements[atom] = add; } window.addEventListener("message", handleMessage); console.log("Listener Added"); } """ RETURN_SELECTION_JS = """ (input_file, input_protein_file, n_steps, n_atoms, samples, hidden) => { let selected = [] for (const [atom, add] of Object.entries(window.selected_elements)) { if (add) { console.log("Adding atom ", atom); selected.push(String(atom)); window.parent.postMessage({ name: "atom_selection", data: {"atom": parseInt(atom), "add": false} }, "*"); } } console.log("Finished parsing"); return [input_file, input_protein_file, n_steps, n_atoms, samples, selected.join(",")]; } """