Create an interactive report from Melo-1 virtual screening results to compare candidate rankings, sort and filter metrics, and view each candidate's 3D structures and confidence. Each report is a single HTML file that can be opened offline and shared.
Prepare the report template and complete result ZIP, then follow the steps below.
Download the template
curl --fail --location \
'https://www.atomelody.com/templates/atomelody-virtual-screening-report-template.html' \
--output atomelody-virtual-screening-report-template.html
This template accepts complete Melo-1 virtual screening result ZIP files. Retain summary.csv and all candidate result ZIP files; no extraction is needed beforehand.
For a single structure prediction task, use the structure prediction report template.
Generate the report
- Follow the Virtual Screening Guide to obtain task results and download the complete ZIP from
output_url. Query the task again if the URL has expired. - Download the template above and place it in the same directory as the result ZIP.
- Run the Python example below to generate the report HTML. To include the model, task name, and input, also prepare the task details.
- Open the generated HTML in a browser and verify candidate rankings, structures, and confidence displays before sharing.
Sharing a report also shares its results and any task information you included. Do not embed API Keys or temporary download URLs.
Report data slot
Use these conventions when writing your own generator. With the Python example below, no manual template editing is needed.
<script id="reportData" type="application/json">null</script>
Replace null with a JSON object. The only required field is archiveBase64:
{"archiveBase64":"BASE64_OF_COMPLETE_SCREENING_ZIP"}
| Optional field | Purpose |
|---|---|
taskId | Task ID; hidden if omitted |
taskName | Task name displayed as the report heading; defaults to the ZIP filename without its extension |
model | Model name displayed at the top; hidden if omitted |
input | Original task input JSON object, collapsed by default and expandable in the report; the input section is hidden if omitted |
archiveName | ZIP export filename, without directories; defaults to <taskId>-output.zip, or output.zip if no valid task ID is provided |
generatedAt | Report generation time in ISO 8601 format; hidden if omitted |
For a custom generator, encode the complete ZIP as standard Base64 without line breaks and serialize the report data with a JSON tool. Before inserting JSON into HTML, replace every < with \u003c. Leave the rest of the template unchanged. The Python example already handles this.
Include task input
To display the model, task name, and input, query details for the same task, save the response as task-details.json, and change task_details_path below to Path("task-details.json"). Task details are optional.
The script reads model and input, and maps task_name to the report's taskName. A custom generator may also use saved original request parameters; make sure they belong to the same task as the results.
Task input is collapsed by default. Expand the task input section to inspect it. Collapsing it does not remove the data; shared reports still contain it.
Python example
Requires Python 3.9 or later, with no third-party dependencies. Update the filenames, then run:
python3 - <<'PY'
import base64
import io
import json
from pathlib import Path
import zipfile
archive = Path("screening-output.zip")
template = Path("atomelody-virtual-screening-report-template.html")
output = archive.with_name(archive.stem + "-report.html")
slot = '<script id="reportData" type="application/json">null</script>'
html = template.read_text(encoding="utf-8")
if html.count(slot) != 1 or 'data-report-kind="virtual-screening"' not in html:
raise ValueError("Use a virtual screening template with an empty data slot")
if archive.stat().st_size > 200 * 1024 * 1024:
raise ValueError("The result ZIP must not exceed 200 MiB")
with zipfile.ZipFile(archive) as batch:
total = sum(item.file_size for item in batch.infolist())
if total > 800 * 1024 * 1024:
raise ValueError("Total uncompressed size must not exceed 800 MiB")
if "summary.csv" not in batch.namelist():
raise ValueError("The result archive is missing summary.csv")
for item in batch.infolist():
if item.filename.lower().endswith(".zip"):
with zipfile.ZipFile(io.BytesIO(batch.read(item))) as candidate:
total += sum(entry.file_size for entry in candidate.infolist())
if total > 800 * 1024 * 1024:
raise ValueError("Total uncompressed size of the outer and candidate archives must not exceed 800 MiB")
report = {
"archiveBase64": base64.b64encode(archive.read_bytes()).decode("ascii"),
"archiveName": archive.name,
# "taskId": "ACTUAL_TASK_ID",
# "taskName": "My virtual screening report",
}
# Optional: use Path("task-details.json") to include the same task's model, name, and input.
task_details_path = None
if task_details_path is not None:
details = json.loads(task_details_path.read_text(encoding="utf-8"))
if not isinstance(details, dict):
raise ValueError("Task details must be a JSON object")
details = details.get("data", details)
if not isinstance(details, dict):
raise ValueError("Task details data must be a JSON object")
# The API uses snake_case; report data uses camelCase.
for key, report_key in (("model", "model"), ("task_name", "taskName"), ("input", "input")):
if key in details:
expected = dict if key == "input" else str
if not isinstance(details[key], expected):
raise ValueError(f"Incorrect type for task details field {key}")
report[report_key] = details[key]
payload = json.dumps(report, ensure_ascii=True).replace("<", "\\u003c")
filled = '<script id="reportData" type="application/json">' + payload + '</script>'
with output.open("x", encoding="utf-8") as file:
file.write(html.replace(slot, filled))
print(f"Report generated: {output.resolve()}")
PY
The script does not overwrite existing reports. To regenerate, change the output filename or move the old file. Python is not required to view the report.
Open and check
Double-click the HTML file to open it offline. The 3D viewer requires WebGL support. Before sharing, verify that:
- Candidate counts and success/failure states match the task results.
- You can switch candidates and structure samples, and view 3D structures and confidence metrics.
- Included task information is correct and the input section expands.
- You can export the entire batch, individual candidate results, and current structure.
Candidates are sorted by ranking score by default. You can select another metric, filter by status, or exclude candidates with clashes. Failed candidates are excluded from score comparisons; missing metrics appear as “—”. Prediction scores and confidence support screening and do not replace experimental validation.
The result ZIP must be at most 200 MiB. The total uncompressed size of the outer archive and all candidate archives must be at most 800 MiB, with up to 10,000 candidates. Larger reports take longer to load and need more browser memory.
The report can temporarily open another result ZIP using its open-results button. This does not save the new results; generate a new report for that task before sharing.