Exploring FE-Toolkit HTML Edge Reports

Zeke A. Piskulich1, Timothy Giese1, Patricio Barletta1, Ryan Snyder1, and Darrin M. York1
1Laboratory for Biomolecular Simulation Research, Institute
for Quantitative Biomedicine and Department of Chemistry and Chemical
Biology, Rutgers University, Piscataway, NJ 08854, USA

Learning objectives

  • Interpret an Edgembar HTML edge report for a real Tyk2 ABFE calculation.

  • Diagnose simulation quality from the report’s error and warning metrics (equilibration, statistical inefficiency, phase-space overlap).

  • Compare BAR vs. TI estimates and inspect the convergence, dV/dL, and replica-exchange plots to judge whether a calculation is trustworthy.

Activities

In this Activity, you will learn how to explore HTML edge reports generated with FE-Toolkit. This tutorial will guide you through the process of interpreting the various plots and tables included in the HTML report, and how to use this information to assess the quality of your free energy calculations.

FE-Toolkit HTML Reports

For this tutorial, we have provided the simulation output data from Absolute Binding Free Energy Calculations on Tyk2 for four ligands. In this tutorial, we will primarily use the files for the ligand ejm31; however, we have provided the other ligands as a reference (and as an opportunity for further practice).

The HTML report can be viewed here: Graph.html

Objective Function

The next plot you see in the edge report is the “Shifted Edge Objective Function”, which shows the objective function that was minimized across all samples of an edge to obtain a specific final value shown on the x-axis. The minimum value corresponds to an unconstrained variational solution of the MBAR or BAR equations. Other values correspond to constrained variational solutions (where the constraint is for the x-axis value).

Unless there are problems with the simulation data, this plot should be a quadratic function that can be pre-computed for each edge and used to efficiently solve the network-wide set of equations. The curve is fit to a quadratic and cubic function using the 5 points indicated. These fits should produce Pearson correlations greater than 0.99, and the cubic terms should be less than \(10^{-5}\).

Objective Function

Note

The edge objective function is only relevant for network-wide analysis; it does not affect any aspect of the edge report. The edgembar-WriteGraphHtml.py script performs network-wide analysis, and by default solves for the node free energies using a quadratic approximation for the edge objective functions. This is often sufficient. One can use --solver=nonlinear or --solver=mixed to solve with the cubic fits. The mixed version solves with the cubic fits but then does bootstrap error calculations using the quadratic fits. This --solver=nonlinear or --solver=mixed is not recommended because it is very slow and not necessarily more accurate unless there were severe discrepancies in the objective function fits shown in the edge report.

Overall results

Hint

** Troubleshooting Questions **

  1. Do your BAR and TI results in the table agree?

  2. How far does your fwdrev analysis deviate from production?

  3. Is there a significant trend in your first and last half analysis?

The next set of data you’ll see is a summary table of the free energy values, and-if you ran edgembar with - -fwdrev and - -halves -a pair of timeseries figures above it. The “Fwd & Rev Analysis” figure shown on the left compares the free energies calculated from the first X% of the data to those calculated from the last X% of the data. The “First- & Last-Half Analysis” figure shown on the right which excludes X% of the simulation from start as equilibration, and splits the remaining 100-X% of data into two halves and compares the free energy from each half.

Fwd & Rev and First- & Last-Half analysis

Most important is the table at the bottom, which gives you a summary of the values from analysis with Bennett’s Acceptance Ratio (BAR) [1], and Thermodynamic Integration (TI) [2].

Note

A key debugging tool is to check agreement between BAR and TI. If these values do not agree - it suggests a problem with either equilibration, replica exchange acceptances, or alchemical pathway.

The shaded bands around the lines are 95% confidence intervals, obtained by scaling the standard error of the mean by 1.96 - a factor that tends to underestimate the true confidence interval. When the fwdrev or halves lines separate from each other by more than these bands, it usually points to a problem with the simulation or its equilibration. In that situation, it helps to inspect the trajectory directly: the plots alone may not reveal whether the start of the simulation was insufficiently equilibrated or if something catastrophic happened in the middle to simulate it incorrectly near the end.

DV/DL Profiles and Replica Exchanges

Hint

** Troubleshooting Questions **

  1. Is your DV/DL profile smooth? Does it have weird discontinuities?

  2. Are there big differences in your DV/DL profiles between trials?

  3. Does your replica exchange acceptance ratio ever approach a low number (< 0.2?)

The next key set of plots that are found are the DV/DL profile, and the Replica Exchange Acceptance Ratios.

Header

In the above image, you can see a well-converged DV/DL profile. Note that the trials track pretty well along each other.

Recall that the dV/dL profile is intrinsically linked to the free energy by the equation:

\[\Delta G = \int_0^1 \left\langle \frac{\partial V(\mathbf{x}; \lambda)}{\partial \lambda} \right\rangle_{\lambda} d\lambda\]

Note

For ABFE calculations, the dV/dL profile is shifted by a constant number. This number originates from the correction to the free energy that comes from Boresch Restraints. Determining the Boresch Restraint Contribution to the Free Energy.

Now, the replica exchange acceptance ratio is included in the second plot, and it gives you information for each pair of lambda windows what percentage of exchanges were accepted. Here, the value of 0.5 suggests that there were sufficient exchanges.

Data Tables

Hint

** Troubleshooting Questions **

  1. Did a lot of simulation data get thrown out when selecting production regions?

  2. Did this trial have many (or most) of the warnings?

  3. Do you have single passes and round trips in your calculation?

The next major section of the file is a set of tables (per environment and per trial) that give summary information about the free energy calculation as a function of lambda.

Header

The columns of this trial data table are separated into three sections that report the same statistics computed over different subsets of the data. One section reports the statistics computed using only the “production region” (columns ending in _prod, such as <g_prod>). Another section reports the statistics computed when “all data” is considered (columns such as g). The “ana” section (columns ending in _ana, such as g_ana) reports the statistics for the data that are actually being analyzed, which could be either the “all data” or the “production region” depending on the analysis options used.

There is also a replica exchange data table that provides the data included in the acceptance ratio plot.

Header

The header of this table includes a few additional useful pieces of information:

  • Average single pass num. steps: The amount of time it takes for a replica to exchange all the way \(0 \rightarrow 1\) or \(1 \rightarrow 0\)

  • Round trips/replica: Total number of round trips divided by the number of replicas.

  • Total num. round trips: The number of times a replica traverses \(0 \rightarrow 1 \rightarrow 0\) or \(1 \rightarrow 0 \rightarrow 1\)

Troubleshooting

Hint

** Troubleshooting Questions **

  1. Does the window look converged?

  2. What is the scale of the dependence on the y-axis of the block average

Each lambda window that has a warning also gets a special section which includes information about the convergence of that window.

Header

This shows plots of block averages over time, data tables, etc that can be used for additional debugging.

Wrapping Up

In this activity, you walked through the pieces of an HTML report. Go through the troubleshooting questions at the top of each relevant section with that report. Does this pass as an okay simulation?

Relevant Literature