---
title: "Molecular Dynamics and Free Energy from Sampling"
description: "Integrating the equations of motion for a system of atoms produces a trajectory, and averages along that trajectory stand in for thermodynamic quantities. The result is only as good as the sampling, s"
canonical: https://lightmysky.com/learn/science/molecular-dynamics-and-free-energy-from-sampling-mt_ajdYrZOzEd
source: https://lightmysky.com/learn/science/molecular-dynamics-and-free-energy-from-sampling-mt_ajdYrZOzEd.md
retrieved: 2026-11-12
---

> **Agent view.** This is the Markdown twin of the page, for tools and assistants.
> When to use this site, and the call that answers each job: https://lightmysky.com/agent-instructions.md
> API description (OpenAPI 3.1): https://lightmysky.com/openapi.json · Authentication: https://lightmysky.com/auth.md
> Pricing: https://lightmysky.com/pricing.md · Catalog: https://lightmysky.com/llms.txt · Full catalog: https://lightmysky.com/llms-full.txt
> Every machine-readable file on this domain: https://lightmysky.com/.well-known/ai-catalog.json
> Ask for Markdown with `Accept: text/markdown`, a `.md` address, or `?mode=agent`.

# Molecular Dynamics and Free Energy from Sampling

Integrating the equations of motion for a system of atoms produces a trajectory, and averages along that trajectory stand in for thermodynamic quantities. The result is only as good as the sampling, so the questions that matter are about convergence and the force field.

Subject: Science · Area: Chemistry · Ages 23 to 24
Page: https://lightmysky.com/learn/science/molecular-dynamics-and-free-energy-from-sampling-mt_ajdYrZOzEd

## Ready when they can

- Explains what a thermostat does and why a raw trajectory needs one to represent a chosen ensemble
- Judges whether a simulation is converged from the behaviour of a monitored quantity
- Describes how biasing along a coordinate produces a free energy profile
- States which errors come from the force field and which from too little sampling

## Lesson: Running molecules and reading the average

You move every atom step by step under forces from the force field. Left to itself, that motion keeps the total energy fixed, so it samples a constant-energy ensemble, not a constant-temperature one. To represent a chosen temperature, you attach a thermostat that trades energy with an imaginary heat bath. The thermostat keeps the trajectory inside the ensemble that your averages assume.

**Example.** Suppose you watch the average energy as the run grows. Early on the line slopes downward, so you extend the run. Later it wiggles around a flat line, and only then do you read the average.

Some events are too rare to wait for. You add a bias along one coordinate, such as a distance, to push the system over the barrier. You then strip the bias out in analysis to recover how often the unbiased system would visit each point. The free energy at each point is -kT times the natural log of that probability, so the corrected histogram becomes the free energy profile.

Two kinds of error look alike, so you test them apart. Wrong bonded terms or charges mislead every run, however long, and that is force field error. A short run misleads even with a good model, and that is sampling error. You extend time to test sampling and you swap models to test the force field.

**Recap.** You hold temperature with a thermostat, grow the run until averages flatten, bias rare events to map free energy, and test sampling and force field apart.

## Practice

8 questions on this page, each with its working shown.

## Needs first

- [Putting the Solvent Into a Calculation](https://lightmysky.com/learn/science/putting-the-solvent-into-a-calculation-mt_3SCFfcvoei)
- [Molecular Mechanics: Force Fields and Conformational Searching](https://lightmysky.com/learn/science/molecular-mechanics-force-fields-and-conformational-searching-mt_s4C0T3zFlf)

## Optional connections

- [The Molecular Partition Function](https://lightmysky.com/learn/science/the-molecular-partition-function-mt_-TPTlb7zQ2)

## Opens up

- [Reaction Dynamics: Trajectories Across a Potential Energy Surface](https://lightmysky.com/learn/science/reaction-dynamics-trajectories-across-a-potential-energy-surface-mt_6ctTUYqYtS)
