Skip to content

Relative Free Energy

Relative Free Energy

Calculate the free energy difference between two similar molecules in water.

Relative Free Energy calculates the difference in solvation free energy between two similar molecules in water, reported as a free energy in kcal/mol.

Solvation free energy is the energy change when a molecule is moved from a vacuum into water. It tells you how comfortable the molecule is in water. This tool does not study a protein. It compares two molecules on their own in plain water.

It works by gradually morphing the first molecule into the second one inside water, an alchemical transformation, and measuring the free energy change along the way. Because the two molecules are similar, much of the calculation cancels out, which makes the result both cheaper to compute and more precise than running each molecule separately.

Use it when you want to compare two closely related molecules and see how a small chemical change shifts how well a molecule sits in water. The two molecules should share a common core so the morph from one to the other is well defined. If you want how strongly a molecule binds to a protein instead, use Absolute Binding Free Energy or Relative Binding Free Energy.

InputRequiredWhat it is
smiles_ayesSMILES string of the first molecule.
smiles_byesSMILES string of the second molecule.
assign_protonation_statesno, default trueProtonates both molecules automatically at the given pH. Turn off if your inputs are already protonated.
phno, default 7.0pH used to decide the protonation state.
equil_lengthno, default 0.08 nsEquilibration length per replica, in nanoseconds.
prod_lengthno, default 0.4 nsProduction length per replica, in nanoseconds.
platformno, default CUDACompute platform, one of CUDA, OpenCL, CPU, or Reference.
protocol_repeatsno, default 3, minimum 1Number of independent repeats used for the uncertainty estimate. More repeats give a smaller uncertainty.
keep_dirsno, default truePreserves the full simulation outputs so you can download them.

Longer simulation lengths and more repeats give more reliable numbers, but cost more runtime and credits.

Submit your two molecules from Azulene Studio, the Python SDK, or the CLI. New here? The Get started page walks through installing, logging in, and running a ready made example first.

Open Relative Free Energy from the tools list, then on the Inputs and Parameters step enter molecule A and molecule B as SMILES strings, adjust the pH and simulation lengths if you want, then Review and Submit.

from opal import jobs
result = jobs.submit(
job_type="relative_fe",
input_data={
"smiles_a": "c1ccccc1",
"smiles_b": "Cc1ccccc1",
"ph": 7.0,
"protocol_repeats": 3,
},
)

Pass the inputs as a JSON string.

Terminal window
opal jobs submit --job-type relative_fe \
--input-data '{"smiles_a": "c1ccccc1", "smiles_b": "Cc1ccccc1", "ph": 7.0, "protocol_repeats": 3}'

The main output is dg_solvation, the free energy difference between the two molecules in water, in kcal/mol, reported with its unit in dg_solvation_unit. The result also includes uncertainty and uncertainty_unit, the error estimate on that number, and smiles, the pair of molecules that were compared.

More protocol_repeats lower the uncertainty. The result also carries replica_transition_statistics, a record of how well the simulation mixed between its stages, which helps judge whether the run was reliable. If keep_dirs is on, the full simulation outputs can be downloaded from results_file.

Keep the simulation lengths short for a quick first run. For reliable numbers, use a longer prod_length and at least 3 repeats. This tool runs on a GPU, and runtime grows with the simulation lengths and the number of repeats. The two molecules need to share a common scaffold so the morph from one to the other is well defined. If your two molecules are too dissimilar, the result may not be reliable.