In the previous post, we looked at the Ramachandran plot to understand the three-dimensional structure of proteins. But as I began trying to understand how proteins actually fold, and why they choose one particular structure from among so many possible ones, I eventually came up against one problem that could not be avoided: thermodynamics. To be honest, thermodynamics was a subject I would have preferred to avoid if possible. There are plenty of equations, and even the names of concepts such as entropy and free energy do not sound particularly inviting. But to properly understand the protein energy landscape, which I will discuss in the next post, there is no way around going down this road at least once. So, feeling somewhat as though I am being led to the slaughterhouse, I will first look at where the basic concepts of thermodynamics came from and how they developed.
I should make one thing clear from the beginning. Since the purpose of this post is to explain, step by step and as accessibly as possible, how the concepts and equations of thermodynamics are connected, I have not tried to cover every detailed condition, exception, and specialised discussion as a textbook would. This is not so much an attempt to simplify the subject itself as a deliberate choice to help general readers follow the core concepts, how they arose, and how they connect with one another. So a specialist may occasionally think, “There should be another condition attached here,” but I hope they will resist raising their eyebrows too high.
Where did thermodynamics begin?
When I hear the words Industrial Revolution, the first thing that comes to mind is a steam locomotive racing across the countryside, converting the steam produced by burning coal into mechanical motion. At the time, people had discovered the revolutionary idea of using heat to move machines, but even the best heat engine could not convert all of the heat energy supplied to it into work. How to reduce heat loss and achieve greater efficiency became one of the major questions of the day. This became the starting point of thermodynamics, a branch of physics that sought to understand the principles of energy conversion and the fundamental limitations of energy efficiency.
System
Before trying to understand thermodynamics, it is probably useful to sort out a few basic terms first. One word that appears repeatedly is system. In ordinary language, a system means a set of objects or elements distinguished for a particular purpose; in thermodynamics, it can be defined as the physical object or region we are interested in studying. For example, if we are studying gas inside a box, all of the gas inside the box becomes one system. If we are studying the human body, the entire body becomes one system. Thermodynamics divides the world into the system, the surroundings around that system, and the boundary separating the two. Systems are also classified according to how they exchange energy or matter with their surroundings: isolated systems, closed systems, and open systems. An isolated system exchanges neither energy nor matter with its surroundings. A closed system can exchange energy but not matter, while an open system can exchange both energy and matter. Because the universe has no outside, it can be regarded as the largest possible isolated system.
Thermodynamics also distinguishes between macroscopic and microscopic viewpoints. The macroscopic viewpoint deals with average physical quantities that we can directly measure or observe, such as temperature, pressure, and volume. The microscopic viewpoint, by contrast, concerns what happens at the level of individual atoms and molecules, such as their positions, velocities, and kinetic energies, which we cannot directly see. A similar distinction can also be made in biology. Observable physiological properties such as body temperature, blood pressure, and metabolism are macroscopic properties, while the movements of the proteins and molecules that determine them can be regarded as microscopic properties. Thermodynamics began as a science dealing with macroscopic phenomena, and later, through Boltzmann, developed towards explaining how those macroscopic phenomena emerge from the microscopic motions of enormous numbers of atoms and molecules.
The first law of thermodynamics: energy does not disappear
The first law of thermodynamics is the law of conservation of energy: within such a system, energy is neither created nor destroyed, but merely changes form.
\(\Delta U = Q - W\)
Here, $U$ is the internal energy of the system, meaning the total kinetic and potential energy of all the atoms and molecules that make up the system. $Q$ is the amount of heat transferred into the system, and $W$ is the amount of work the system performs on its surroundings. In other words,
Change in internal energy = heat transferred into the system − work done by the system on the surroundings
Suppose, for example, that we put water in a kettle and heat it. The heat transferred from the surroundings to the water increases the energy of the water, changing its internal energy $U$. Once the temperature rises sufficiently, the water begins to boil and some of it becomes steam. As the steam expands, it may do work on the surroundings by pushing up the kettle lid and making it rattle, or by using pressure to produce a whistling sound. The important point here is that not all the heat supplied to the kettle simply remains in the water, but neither does part of it disappear. Energy entering the system may remain as a change in the system’s internal energy, or it may be used by the system to do work on its surroundings. In other words, the energy has not been newly created or lost. It has moved between the system and the surroundings, appearing as changes in the system’s internal energy and as work transferred to the surroundings. The form of the energy has changed, but the total amount of energy remains conserved. This is the first law of thermodynamics.
Enthalpy: why add pressure and volume ($PV$) to internal energy?
The kettle example gives us a way to understand the first law of thermodynamics. When heat is supplied to the kettle, that energy increases the internal energy $U$ of the water, and when the water turns into steam and expands, some of that energy may also be used to do work on the surroundings. But here an important issue appears. When water in the kettle boils and becomes steam, its volume increases dramatically. As the steam expands, it increases its volume against the surrounding pressure and does work on the surroundings. Imagine a gas inside a cylinder fitted with a piston, and suppose that the gas is heated. As the gas expands, it pushes the piston upwards. The work done by the gas on the surroundings can be expressed in terms of pressure and the change in volume. If the gas expands against a constant external pressure and the only work performed by the system is this pressure-volume work ($PV$ work), we can write it as $W = P\Delta V$.
Here, $P$ is the external pressure that the system pushes against as it expands, and $\Delta V$ is the change in the system’s volume. In other words, when a gas is heated, the supplied heat is not used only to increase the internal energy of the gas. Some energy may also be used to increase its volume and push the piston upwards.
Why is the relationship between pressure and volume important?
With the appearance of steam engines and other heat engines during the Industrial Revolution, it became important for scientists to understand quantitatively how much actual work could be produced from heat. In heat engines such as steam engines, the crucial process involved hot steam or gas expanding and pushing a piston to produce work. Scientists therefore needed to consider not only how much heat was used to change the internal energy of a system, but also how much work the system performed as it expanded against the surrounding pressure. To deal conveniently with energy changes that also include this pressure-volume work, thermodynamics defined a new state function by adding the product of pressure and volume, $PV$, to the internal energy $U$. This is enthalpy.
\(H = U + PV\)
Internal energy $U$ is a quantity related to the microscopic energies of the particles that make up a system. One point to be careful about is that the $PV$ term in this equation does not mean that there is another separate form of energy stored inside the system in addition to $U$. Enthalpy is a state function describing the state of a system, and it is particularly useful for dealing with energy changes in processes that take place at constant pressure. So why is enthalpy related to the heat exchanged by a system at constant pressure?
Why does an enthalpy change represent the heat exchanged in a reaction?
Let us return to the first law of thermodynamics.
\(\Delta U = Q - W\)
If the only work performed by the system on the surroundings is pressure-volume work ($PV$ work), and the external pressure is constant,
\(W = P\Delta V\)
and therefore,
\(\Delta U = Q - P\Delta V\)
Rearranging this in terms of the heat $Q$ gives
\(Q = \Delta U + P\Delta V\)
According to the definition of enthalpy, $H = U + PV$, and for a process occurring at constant pressure $P$, the change in enthalpy is
\(\Delta H = \Delta U + P\Delta V\)
Comparing this with the expression obtained above, $Q = \Delta U + P\Delta V$,
\(Q_p = \Delta H\)
which gives us an important relationship.
The subscript $p$ in $Q_p$ means the heat exchanged between the system and the surroundings at constant pressure. In other words, if a chemical reaction takes place at constant pressure and the only work done by the system is $PV$ work, the amount of heat absorbed or released during the reaction can be represented by the enthalpy change $\Delta H$. Many chemical reactions take place under conditions close to constant pressure, such as atmospheric pressure, which makes this relationship especially useful for dealing with the transfer of heat in chemical reactions. In other words, we can use enthalpy changes to determine whether a chemical reaction is endothermic or exothermic. For example, if $\Delta H < 0$, heat is released from the system to the surroundings as the reaction proceeds, making it an exothermic reaction. Conversely, if $\Delta H > 0$, the system absorbs heat from the surroundings, making it an endothermic reaction. One point to remember, however, is that enthalpy itself does not mean the heat contained in a system. I once saw enthalpy described as a kind of “heat bag”, but strictly speaking, heat $Q$ is energy being transferred between the system and the surroundings, whereas enthalpy $H$ is a state function describing the state of the system. It is only under the condition of constant pressure, and when only $PV$ work is considered, that $\Delta H = Q_p$ holds. This is why, in chemistry, an enthalpy change can be interpreted as the amount of heat exchanged during a reaction.
Then, if we know $\Delta H$, can we tell whether a reaction will occur spontaneously? Not necessarily. Enthalpy tells us how much energy is released or absorbed during a reaction, but it cannot by itself explain completely which direction nature will actually take. Some processes occur spontaneously while releasing heat, whereas others can occur spontaneously under certain conditions even while absorbing heat. If energy changes alone cannot fully explain spontaneity, then what does nature use to determine the direction of change? To answer that question, we need to look at entropy as well.
Later, the American physicist Gibbs combined these two quantities, the enthalpy change $\Delta H$ and the entropy change $\Delta S$, into a single physical quantity that could be used to judge the direction of natural change at constant temperature and pressure. This is Gibbs free energy. This is also why I have explained enthalpy in some detail here alongside the first law of thermodynamics. To understand the free energy discussed at the end of this post, we first need to understand what an energy change means and under what conditions it can be expressed as $\Delta H$. Now let us slowly enter the world of the second law of thermodynamics and entropy.
The second law of thermodynamics: energy transfer has a direction
The first law of thermodynamics explains that energy does not disappear or suddenly come into existence, but simply changes form. It still does not explain, however, why all the heat supplied to a heat engine cannot be converted into work. Many scientists became involved in trying to understand the fundamental limitation that forces a substantial proportion of the heat supplied to any heat engine, including a steam engine, to be discarded and therefore greatly reduces its efficiency. One of the most notable among them was the French physicist Sadi Carnot.
In 1824, Carnot reasoned that just as a waterwheel produces work by using a difference in height between a high point and a low point, a heat engine must likewise have a temperature difference between a high-temperature reservoir and a low-temperature reservoir in order to produce work from heat energy. He imagined an ideal reversible heat engine that could not exist in reality, with no heat loss or friction at all, and calculated its thermal efficiency. Yet he showed that even such an ideal engine would have an efficiency determined by the absolute temperatures of the high- and low-temperature reservoirs, and that its efficiency could never reach 100%. The maximum thermal efficiency of an ideal Carnot engine is given by
\(\eta = 1 - \frac{T_C}{T_H}\)
Here, $T_H$ is the absolute temperature of the hot reservoir and $T_C$ is the absolute temperature of the cold reservoir. For example, if a heat engine operates between a hot reservoir at 500 K and a cold reservoir at 300 K, the maximum efficiency of a Carnot engine would be $\eta = 1 - (300 / 500) = 0.4$, or 40%. This means that even if a Carnot engine receives 100 J of heat, at most 40 J can be used to perform work, while the remaining 60 J must be released to the cold reservoir. Carnot thus showed mathematically that a heat engine must have somewhere to discard heat, and therefore that a heat engine with 100% efficiency is impossible. But he still could not explain the fundamental reason why even the most ideal heat engine could not convert all of the heat it receives into work. The question of why some heat must always be discarded led thermodynamic research onwards to Clausius.
Image 1: From Carnot’s reversible heat engine to Clausius’s entropy
The discovery of a new physical quantity: entropy
In 1865, the German theoretical physicist and mathematician Rudolf Clausius mathematically analysed the Carnot engine. A heat engine receives heat from a hot reservoir, performs work, releases the remaining heat to a cold reservoir, and then returns to its original state before repeating the process. The repeated operation of a car engine works in much the same way. One complete repetition of this process is called a cycle. At the end of the cycle, the pressure, volume, and temperature of the gas have all returned to their original values. In other words, the state of the system has returned to where it began. But heat has continued to move throughout the process. Clausius noticed something extremely important here. Rather than simply adding together the tiny amounts of heat entering and leaving the heat engine ($\delta Q$), he considered the amount of heat divided by the absolute temperature ($T$).
\(\frac{\delta Q}{T}\)
While analysing a reversible Carnot cycle, he found that when this quantity is added up over one complete cycle—in other words, integrated—the result is always zero.
\(\oint \frac{\delta Q_{\text{rev}}}{T} = 0\)
This has a very important implication. If the integral of a quantity around a complete cycle is always zero, that quantity can be used to define a new state function whose value depends only on the initial and final states, regardless of the path taken between them. Clausius named this new physical quantity entropy and defined it as follows.
\(dS = \frac{\delta Q_{\text{rev}}}{T}\)
Put simply, when a system reversibly exchanges a very small amount of heat, the corresponding change in entropy is the heat exchanged divided by the absolute temperature. Clausius did not begin by directly observing some visible physical quantity called entropy. Rather, while mathematically analysing the operation of heat engines, he noticed that the quantity $\frac{\delta Q}{T}$ had a special property and defined it as a new state quantity. In other words, Clausius’s entropy was not something that could be directly seen, but a concept mathematically defined to describe the movement of heat in nature.
Entropy explains the limits of heat engines
The first type of process Clausius analysed was an ideal reversible process. This is an idealised process assumed to take place so slowly that a very small change in the external conditions could reverse it almost perfectly. We might imagine, for example, a process with no friction at all and with such a tiny temperature difference that heat moves almost at equilibrium. In such an ideal process, even when heat is transferred, no additional entropy is generated overall. But is nature really like that? In the real world there is friction, heat transfer across temperature differences, and processes in which substances mix or diffuse. Once these processes occur, it is difficult to return everything perfectly to the initial state. In other words, they are irreversible processes, and in an irreversible process entropy is generated by the process itself in addition to the entropy associated with heat entering or leaving the system. Therefore, in the real world the following relationship applies.
\(dS \ge \frac{\delta Q}{T}\)
Here, the equality sign ($=$) applies to an ideal reversible process, while the inequality ($>$) applies to an irreversible process. In other words, in a reversible process entropy changes only by the amount associated with heat transfer, whereas in an irreversible process additional entropy is generated by the process itself. Why, then, do such irreversible processes occur in nature? Friction provides a simple example. When a car brakes, its kinetic energy is converted into heat energy by friction. The energy does not disappear. But once that heat spreads into the surroundings and becomes dispersed among the molecular motions there, could we gather all of it again and turn it back into the car’s kinetic energy? In practice, almost certainly not. If hot water and cold water are mixed, heat from the hot water spreads into the cold water, but the mixture does not spontaneously separate itself back into hot water and cold water. According to the first law of thermodynamics, the energy is conserved, but it has moved from a state in which it was concentrated and capable of doing useful work towards a state in which it is more widely dispersed. Additional entropy is generated during such processes. This is why real processes in nature proceed in the direction of increasing entropy.
Now consider an isolated system, which exchanges neither energy nor matter with the outside. Because no heat enters or leaves an isolated system, $\delta Q = 0$. Therefore,
\(\Delta S_{\text{isolated}} \ge 0\)
In other words, the entropy of an isolated system cannot decrease. In an ideal reversible process, entropy may remain unchanged, but in a real irreversible process entropy always increases. This is the core of the second law of thermodynamics. Interestingly, the entire universe in which we live can also be regarded as an isolated system. At least when thermodynamics treats the entire universe as one system, there is no outside from which energy or matter could enter or to which it could leave. We can therefore write
\(\Delta S_{\text{univ}} \ge 0\)
In other words, if we call the system and its surroundings together the universe, the total entropy of the universe can never decrease.
At this point, it is important to remember that an increase in entropy does not mean that energy disappears. According to the first law of thermodynamics, the total amount of energy always remains the same. Rather, it means that as energy spreads into the surroundings, it becomes more difficult, under the given conditions, to gather it together again and convert it into useful work. This is what explains why the efficiency of a heat engine can never reach 100%. A heat engine cannot turn all the heat supplied to it into useful work. Some heat must always be released elsewhere. The limit to thermal efficiency demonstrated by Carnot was therefore not simply a problem caused by inadequate technology, but an unavoidable limit imposed by the second law of thermodynamics. In other words, the second law tells us that energy does not disappear, but there is a fundamental limit to the extent to which that energy can be converted into useful work.
Entropy explains the direction of natural change
The second law of thermodynamics explains the directionality of many phenomena in nature. Why does heat move from a higher temperature to a lower temperature? Why does a hot cup of coffee cool down over time but never spontaneously become hot again? Why does perfume spread throughout a room but never spontaneously gather itself back into the perfume bottle? Clausius explained the directionality of these natural phenomena in terms of changes in entropy.
Let us take an example. Suppose we have hot water at 600 K and cold water at 300 K, and 100 J of heat is transferred from the hot water to the cold water. When heat is lost, $\delta Q$ is negative; when heat is gained, it is positive. The hot water loses 100 J of heat, so
\(\Delta S_{\text{hot}} = \frac{-100\text{ J}}{600\text{ K}} = -0.167\text{ J/K}\)
The cold water, by contrast, gains 100 J of heat, so
\(\Delta S_{\text{cold}} = \frac{+100\text{ J}}{300\text{ K}} = +0.333\text{ J/K}\)
The total change in entropy is therefore
\(\Delta S_{\text{total}} = -0.167 + 0.333 = +0.166\text{ J/K}\)
The entropy of the hot water has decreased, but the entropy of the cold water has increased by a much larger amount, so the total entropy increases. Now suppose the reverse happens and the cold water transfers 100 J of heat to the hot water. The entropy change of the cold water, which loses the heat, would be
\(\Delta S_{\text{cold}} = \frac{-100\text{ J}}{300\text{ K}} = -0.333\text{ J/K}\)
The hot water gains heat, so
\(\Delta S_{\text{hot}} = \frac{+100\text{ J}}{600\text{ K}} = +0.167\text{ J/K}\)
The entropy of the entire system would therefore be
\(\Delta S_{\text{total}} = -0.333 + 0.167 = -0.166\text{ J/K}\)
This process, in which total entropy decreases, does not occur spontaneously. By analysing various macroscopic natural phenomena in this way, Clausius established that spontaneous processes in nature proceed in the direction in which the total entropy of the system and its surroundings increases.
The coffee cools, but the entropy of the universe increases
Clausius showed that many macroscopic phenomena that occur spontaneously in nature proceed in a direction that increases total entropy. But there is an important point to keep in mind here. The object we are interested in observing—the system—is continuously connected with everything around it, the surroundings. We therefore cannot judge what is happening by looking at the system alone. We call the system and its surroundings together the universe, and this is the same idea behind Clausius’s statement that “the entropy of the universe tends to increase”. If we treat a cooling cup of coffee as the system, the entropy of that system may appear to decrease. But heat released from the coffee is transferred to the surrounding air, increasing the entropy of the surroundings. As we saw in the calculation above, for the same amount of heat, the increase in entropy is greater when the heat is received by the lower-temperature side. In other words, the increase in entropy of the surrounding air is greater than the decrease in entropy of the coffee. Therefore, when we add the decrease in entropy of the coffee to the increase in entropy of the surrounding air, the total entropy of the universe is positive and therefore increases.
\(\Delta S_{\text{total}} = \Delta S_{\text{system}} + \Delta S_{\text{environment}} \ge 0\)
In the end, the reason heat always flows from a higher temperature to a lower temperature, and the reason cooled coffee does not spontaneously heat itself back up, is clear. The only direction in which the total entropy of the system and its surroundings can increase is the transfer of heat from high temperature to low temperature. Nature does not look only at the entropy of one particular system. It always considers the total including the surroundings, and proceeds in the direction in which that total becomes positive ($+$). This is the fundamental criterion that determines spontaneity in nature.
The third law of thermodynamics: finding the zero point of entropy
The final piece of thermodynamics, the third law, is also about entropy. If the first law tells us that energy is conserved, and the second law tells us the direction in which entropy changes in nature, the third law concerns the reference point of entropy: where entropy becomes zero. Up to this point, we have discussed changes in entropy. We could calculate how much entropy increased or decreased during a process. But these were only changes in entropy; they did not tell us the absolute amount of entropy a substance possesses. Just as we first need to decide where 0 m is before measuring the height of a building, we need a reference point at which entropy is zero if we want to calculate the absolute entropy of a substance. The third law of thermodynamics provides that reference point.
As the temperature is lowered towards absolute zero ($0\text{ K}$, about $-273.15^\circ\text{C}$), the thermal motion of matter gradually decreases. According to the third law of thermodynamics, if a pure substance is assumed to be in a perfect crystal state at this point, its entropy approaches zero. This certainly does not mean that molecular motion comes to a complete stop, but the key point is that a perfect crystal can be defined by a single microstate. A single microstate can be assigned an entropy of zero. This can be explained using Boltzmann’s entropy equation, which we will look at later. Entropy is related to the number of microstates that can produce a particular macrostate. If a perfect crystal has only one possible microstate, then $W = 1$, and applying this to Boltzmann’s equation gives
\(S = k \ln W\)
\(S = k \ln 1 = 0\)
In other words, a state with only one possible microstate can be used as the reference point for zero entropy. This is the central idea of the third law of thermodynamics. Of course, real substances cannot perfectly reach absolute zero, and exceptional situations exist depending on the type of substance and its crystal structure. But what matters here is not those detailed exceptions. The important point is that an absolute reference point for entropy can be established. Once this reference existed, scientists were no longer limited to calculating only how much entropy changed. They could also calculate the absolute amount of entropy associated with a particular substance.
Let us briefly look back at how thermodynamics has developed so far.
Carnot discovered that there is a fundamental limit to the efficiency of heat engines, but he could not explain why. Clausius later analysed Carnot’s work and discovered the special mathematical relationship $\frac{\delta Q}{T}$, which led him to define a new state quantity called entropy. Through the second law of thermodynamics, he then formulated mathematically the idea that spontaneous processes in nature proceed in a direction in which total entropy does not decrease. But even Clausius could not physically explain why nature moves in the direction of increasing entropy, or where this directionality comes from. This question would later begin to be interpreted in an entirely new way from a microscopic perspective by Boltzmann.
What is interesting here is that the expectations of people at the beginning of the Industrial Revolution turned out to be very different from the conclusions reached by science. At the time, people expected that if better and better heat engines could be designed and built, perhaps one day they would achieve thermal efficiencies approaching 100%, and this was the direction of research. But as the research continued, scientists did not overcome the limits of heat engines. Instead, they discovered that the limitation itself was a law of nature. The second law of thermodynamics ultimately became a description of one of nature’s fundamental laws, a law that cannot be overcome no matter how far our technology advances. Today, the second law of thermodynamics is compatible with modern physics, including quantum mechanics and relativity, and physical theories that violate the law of increasing entropy in macroscopic systems are not accepted. Although the original goal of overcoming the limits of heat-engine efficiency was not achieved, the thermodynamic ideas developed during that research later evolved, through Boltzmann, into modern statistical mechanics and became one of the most important theoretical foundations for explaining natural phenomena around us, from chemical reactions and biological processes to protein synthesis.
In the next post, we will look at how Ludwig Boltzmann approached the question that Clausius still could not answer even after establishing through the laws of thermodynamics that nature moves in the direction of increasing entropy: “Why on earth does nature move in the direction of increasing entropy?” Rather than treating entropy simply as an abstract physical quantity calculated from heat and temperature, Boltzmann explained it in an entirely new way, as the statistical result of the microstates produced by enormous numbers of atoms and molecules. Clausius defined entropy in the language of thermodynamics; Boltzmann sought to explain why entropy exists and why it increases in the language of the microscopic world. With Boltzmann, thermodynamics now takes another step beyond a theory describing the macroscopic world and enters the invisible world of atoms and molecules.