Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Extending and Modifying LAMMPS Writing Your Own Source Code

You're reading from   Extending and Modifying LAMMPS Writing Your Own Source Code A pragmatic guide to extending LAMMPS as per custom simulation requirements

Arrow left icon
Product type Paperback
Published in Feb 2021
Publisher Packt
ISBN-13 9781800562264
Length 394 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (2):
Arrow left icon
Jichen Li Jichen Li
Author Profile Icon Jichen Li
Jichen Li
Dr. Shafat Mubin Dr. Shafat Mubin
Author Profile Icon Dr. Shafat Mubin
Dr. Shafat Mubin
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Section 1: Getting Started with LAMMPS
2. Chapter 1: MD Theory and Simulation Practices FREE CHAPTER 3. Chapter 2: LAMMPS Syntax and Source Code Hierarchy 4. Section 2: Understanding the Source Code Structure
5. Chapter 3: Source Code Structure and Stages of Execution 6. Chapter 4: Accessing Information by Variables, Arrays, and Methods 7. Chapter 5: Understanding Pair Styles 8. Chapter 6: Understanding Computes 9. Chapter 7: Understanding Fixes 10. Chapter 8: Exploring Supporting Classes 11. Section 3: Modifying the Source Code
12. Chapter 9: Modifying Pair Potentials 13. Chapter 10: Modifying Force Applications 14. Chapter 11: Modifying Thermostats 15. Assessments 16. Other Books You May Enjoy Appendix A: Building LAMMPS with CMake 1. Appendix B: Debugging Programs 2. Appendix C: Getting Familiar with MPI 3. Appendix D: Compatibility with Version 29Oct20

Examining temperature and velocity distribution of particles

A system at thermal equilibrium at a constant temperature T is characterized by its Maxwell-Boltzmann velocity distribution. According to this distribution, the probability distribution of velocities in a single direction i (which can be x, y, z) of a system of particles of mass m each is given by the Gaussian function, illustrated here in Figure 1.2:

Figure 1.2 – The Maxwell-Boltzmann velocity distributions (left) and speed distributions (right)

Figure 1.2 – The Maxwell-Boltzmann velocity distributions (left) and speed distributions (right)

The preceding graph is plotted for the same system at three different temperatures .

The corresponding functional form that depends on the mass and temperature is shown here:

Here, is the Boltzmann constant. This distribution has a mean of and a standard deviation of . The shape of the Gaussian curve is determined by the ratio of . The velocity distribution of the velocity vector is given by the following formula:

In spherical coordinates, this distribution can be written in terms of the speed , as follows:

This is the Maxwell-Boltzmann speed distribution, also known as a Rayleigh distribution. The shape of the speed distribution changes with temperature, as shown in Figure 1.2, and the peak speed increases with temperature. The velocity distributions are wider at higher temperatures, and the speed distributions show larger peak speeds at higher temperatures. An algorithm that controls temperature in a molecular simulation must account for the preceding features regarding particle velocities.

So far, concepts that dictate the operation of an MD simulation have been discussed. These concepts are implemented in a computational environment through codes that will be discussed in later chapters. In the next section, we will discuss related computational concepts that are commonly encountered in MD simulations and that are prevalently used to enhance simulation performance.

You have been reading a chapter from
Extending and Modifying LAMMPS Writing Your Own Source Code
Published in: Feb 2021
Publisher: Packt
ISBN-13: 9781800562264
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime