Energy, entropy, and free energy

Lesson 4.1 of Biology Primer for Computer Scientists. Download the code as a notebook.

Force fields, Rosetta's score function,Rosetta is a widely used software suite for protein structure prediction and design. and docking scores all turn atomic coordinates into a number in kcal/mol, and the methods built on them search for coordinates that make it small. The quantity they approximate is the free energy, G. Here is the puzzle it resolves: a folded 100-residue protein holds itself together with hundreds of hydrogen bonds and van der Waals contacts, yet it ends up only 5–15 kcal/mol more stable than a floppy, unfolded chain, about what a handful of hydrogen bonds are worth. Where did the rest go?

General chemistry defined it in a beaker: ΔH is the heat a reaction gives off (negative) or absorbs (positive), and a reaction runs on its own when ΔG=ΔH−TΔS<0. The same rules hold when the "reaction" is one molecule changing shape (unfolded to folded) or two molecules sticking together (a drug binding a protein).

Energy that can do work

The first law of thermodynamics states that in any energy conversion, energy is neither created nor destroyed.

Although energy cannot be created or destroyed, the second law of thermodynamics states that when energy is converted from one form to another, some of that energy becomes unavailable for doing work. In other words, no physical process or chemical reaction is 100% efficient; some of the released energy is lost to a form associated with disorder. Think of disorder as a kind of randomness that is due to the thermal motion of particles; this energy is of such a low value and so spread out that it is unusable. Entropy is a measure of the disorder in a system.

In any system, the total energy includes the usable energy that can do work and the unusable energy that is lost to disorder. In biological systems, the total energy is called enthalpy (H). The usable energy that can do work is called free energy (G). The unusable energy is represented by entropy (S) multiplied by the absolute temperature (T):

G=H−TS

Although we cannot measure G, H, or S absolutely, we can determine the change in each at a constant temperature. Such energy changes are measured in calories (cal) or joules (J); 1 cal = 4.184 J. The change in free energy (ΔG) of any chemical reaction is equal to the difference in free energy between the products and the reactants. At a constant temperature ΔG is defined in terms of the change in total energy (ΔH) and the change in entropy (ΔS):

ΔG=ΔH−TΔS
  • If ΔG is negative (ΔG<0), free energy is released.
  • If ΔG is positive (ΔG>0), free energy is required.

If a reaction increases entropy, its products are more disordered or random than its reactants. For example, when a protein is hydrolyzed to its amino acids (split apart by water, the reverse of the condensation that built the chain in lesson 2.1), the products have considerable freedom to move around. The disorder in a solution of amino acids will be large compared with that in the protein, in which peptide bonds and other forces prevent free movement. So in hydrolysis, the change in entropy (ΔS) will be positive.

Energy functions drop the pressure–volume term and, usually, the entropy term. (E is the internal energy, the energy stored in bonds and contacts, which is what a force field adds up.)

The change in the Gibbs free energy of a system is ΔG=(ΔE+P⋅ΔV)−T⋅ΔS, and since the change in volume is small for nearly all biochemical reactions, we can write ΔG=ΔE−T⋅ΔS.

Most free energy functions only model the internal energy E using inter- and intramolecular interaction terms (van der Waals, electrostatic, solvent, etc.). The entropy S is usually ignored because it is harder to compute, since it involves summing over an exponential number of terms. Another approach is to compute the free energy using statistical potentials derived from known protein structures (e.g., from the PDB). Such methods have the advantage that the derived potentials encode both the entropy S and the internal energy E. But there are several disadvantages, the most important being the fact that the observed interactions are usually not independent.

The scale: kcal/mol against RT

Energies are quoted per mole of molecules (6.022×1023, Avogadro's number), in kcal/mol, the unit of most modeling software, or kJ/mol (1 kcal = 4.184 kJ). The yardstick is the thermal energy, RT≈0.593 kcal/mol at 298 K, where R=1.987×10−3 kcal/(mol·K) is the gas constant. Per molecule the same quantity is written kBT, with Boltzmann's constant kB=R/NA. Collisions with water give every degree of freedom an energy of this order, constantly. An energy difference of RT shifts a population ratio by a factor of e≈2.7; a difference of 10RT, by about 22,000.

ThingEnergy (kcal/mol)
Thermal energy RT at 25 °C0.6
A hydrogen bond in water (net)about 0.5–2
Burying one methylene (–CH₂–) groupabout 1
Net stability of a folded proteinabout 5–15
Hydrolyzing ATP, the cell's energy-carrying molecule, under standard conditions7.3
Breaking a C–C covalent bondabout 83

At this temperature thermal motion breaks individual hydrogen bonds constantly and covalent bonds essentially never, so folding and unfolding happen entirely through noncovalent interactions.

Entropy counts states

Entropy, in the broad sense, reflects the thermodynamic favorability of disorder in a system. A change to a more disordered state (positive ΔS) results in a more negative, more favorable ΔG. One interpretation of disorder is the multiplicity W of a system, that is, the number of states readily available to the system. A toy example of multiplicity is a standard 6-sided die. For such a die, W=6 is the number of states possible, that is, the number of possible rolls. From the multiplicity W of a system, we can determine a measure of the system's entropy:

S=Rln⁡W

where R is the universal gas constant. If not all states of a system are equally accessible or equally populated, a modified version of this equation is used:

S=−R∑jpjln⁡pj

where pj is the probability of state j being occupied, and the summation is over all states.

The second formula is Shannon's entropy, in nats, scaled by R. Apply the first to a protein chain. If each residue's backbone can sit in about three regions of φ/ψ (lesson 3.2 shows why), an unfolded chain of n residues has W=3n arrangements and the folded chain essentially one:

import math

R = 1.987e-3           # kcal/(mol K)
T = 298.15             # K
print(f"RT at {T} K = {R * T:.3f} kcal/mol = {R * T * 4.184:.2f} kJ/mol")
print(f"RT ln 10    = {R * T * math.log(10):.2f} kcal/mol   (one factor of ten in a ratio)")

for n in (50, 100, 300):
    S = R * n * math.log(3)            # entropy of 3^n arrangements
    print(f"n = {n:3d}: W = 10^{n * math.log10(3):.0f}, T*S = {T * S:5.1f} kcal/mol lost on folding")
RT at 298.15 K = 0.592 kcal/mol = 2.48 kJ/mol
RT ln 10    = 1.36 kcal/mol   (one factor of ten in a ratio)
n =  50: W = 10^24, T*S =  32.5 kcal/mol lost on folding
n = 100: W = 10^48, T*S =  65.1 kcal/mol lost on folding
n = 300: W = 10^143, T*S = 195.3 kcal/mol lost on folding

That is roughly 0.65 kcal/mol per residue, or 65 kcal/mol for 100 residues, paid in entropy when the chain folds. Folding has to earn it back in enthalpy and in water's entropy.

Loading the interactive figure…

Folded is 60 kcal/mol lower in energy and has one arrangement; unfolded has 1043 (about 390). Drag the temperature up until the bars swap. Each state's free energy is G=E−RTln⁡W, so heat favors the state with more arrangements. At the melting temperature Tm=ΔH/ΔS ("melting" means unfolding by heat) the two free energies are equal and half the molecules are unfolded.

A small difference of large numbers

Now the puzzle from the top. Folding a 100-residue protein forms hundreds of hydrogen bonds and van der Waals contacts and buries a core. Those terms favor folding by many tens of kcal/mol, and the chain's lost entropy, the 65 kcal/mol you just computed, opposes it by almost as much. The net ΔG is typically only −5 to −15 kcal/mol, so a 5% error on each large term can flip the sign of the answer; this is why stability and affinity prediction are hard. And changes that gain enthalpy, such as a tighter contact, usually freeze motion and lose entropy, so the net change is smaller than the contact count suggests (enthalpy–entropy compensation).

In these terms the hydrophobic effect (lesson 1.5) is entropic. Moving a nonpolar group out of water at room temperature has ΔH≈0 and is favorable because of −TΔS: water around exposed nonpolar surface is held in more ordered arrangements, and burying the surface releases it. The water gains that entropy, but only the chain appears in a PDB file, so energy functions add implicit-solvation terms for the water nobody modeled.

Order without breaking the second law

A folded protein is more ordered than an unfolded one, and a replicated DNA strand is more ordered than loose nucleotides. Copying DNA shows how that order is paid for. Nucleotides arrive as triphosphates (three phosphate groups each), and adding one to the growing strand cuts off two of them as a unit, pyrophosphate:

One may observe that DNA replication is a process where a random mixture of triphosphates gets organized as the precise copy of a given DNA sequence. Locally we have the transition from disorder to order, a process that apparently contradicts the second principle of thermodynamics. If one considers the extended process, of which the actual copy process is simply an intermediate step, one recognizes an overall transformation of "high-quality" energy into "low-quality" energy. Triphosphates intervene in DNA replication and generate pyrophosphates, which are promptly hydrolyzed with the production of heat (low-quality energy). Heat is then absorbed by the environment. The overall cycle involves degradation of energy to heat, with the intermediate product of a highly ordered structure, in total agreement with the second law of thermodynamics.

Free energy makes this accounting exact. Heat −ΔH released by a molecule raises the entropy of its surroundings by −ΔH/T, so the total entropy change is ΔS−ΔH/T=−ΔG/T, and ΔG<0 is the second law stated for a system that exchanges heat with its surroundings. A structure file is one set of coordinates: enough for a force field to compute an energy E, not a free energy, which depends on every arrangement each state can reach.

Check yourself

A protein's folding has ΔH=−50 kcal/mol and ΔS=−0.15 kcal/(mol·K). Is it folded at 25 °C? At what temperature does it melt?

Reasoning

At 298 K, ΔG=−50−298×(−0.15)=−50+44.7=−5.3 kcal/mol, so it is folded (about 5 kcal/mol is a typical stability). It melts where ΔG=0: Tm=ΔH/ΔS=50/0.15≈333 K, or 60 °C. Enthalpy favors folding and entropy favors unfolding; above 333 K the −TΔS term is the larger.

A designer adds a disulfide bond that connects two loops far apart in sequence. The folded structure is unchanged and its energy is about the same, yet the protein becomes more stable. Using only the entropy of the unfolded state, explain why.

Reasoning

A disulfide is covalent, so it stays in place when the protein unfolds. In the unfolded state it ties two distant points of the chain together, which removes a large number of unfolded arrangements. Fewer unfolded microstates means lower unfolded entropy, so less entropy is lost on folding. −TΔSfold becomes less unfavorable and ΔGfold more negative, without any change to the folded structure.

A docking program reports that ligand A makes six hydrogen bonds with a pocket and ligand B makes two. A colleague concludes that A binds more tightly. What two things does that argument leave out?

Reasoning

First, desolvation. Each polar group on the ligand and in the pocket was hydrogen bonded to water before binding, and those bonds are lost. A new hydrogen bond to the protein often only replaces one to water, so the net gain per bond is small. Second, entropy. Making six specific contacts usually freezes the ligand's rotatable bonds and the pocket's side chains, an entropy cost that offsets much of the enthalpy gained. Counting contacts measures only one of the large terms whose difference is the binding free energy.

Most "free energy" functions model only the internal energy E and ignore S. For which of these tasks is that omission most dangerous: (a) choosing between two side-chain rotamers in a tightly packed core, or (b) predicting whether a long, flexible loop prefers to be ordered or disordered?

Reasoning

(b). In a tightly packed core, both rotamers are single well-defined arrangements, so their entropies are similar and the energy difference decides. A flexible loop's disordered state is a huge number of arrangements, so its entropy is large, and an energy-only function will always prefer whatever ordered conformation has the best contacts, and wrongly predict the loop to be ordered.