Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
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

Understanding rotational motion

Rigid bodies are often used to represent molecules with inactive vibrational degrees of freedom. In a rigid body, the locations of all constituent atoms are frozen with respect to the rigid-body coordinates. The intramolecular forces from bonds, angles, dihedrals, and impropers are assumed not to create any distortion of the rigid body. Therefore, for the purposes of MD, all intramolecular forces in a rigid body can be disregarded. Any force exerted on any constituent atom in a rigid body acts on the entire rigid body. In addition to changing its linear velocity, this force can create a torque on the rigid body and change its angular momentum and angular velocity. The total force on a rigid body composed of N particles is calculated using the following formula:

Using the displacement vector of particle i measured from the center of mass of the rigid body as the origin, the torque of the rigid body is calculated by the following formula:

The angular momentum of the rigid body is obtained from the time-integration of using the Velocity Verlet algorithm, as follows:

The angular velocity of the rigid body is obtained by a two-step procedure from using an intermediate step at a half-timestep and a second step at a full-timestep , which will be described in more detail when analyzing the dynamics of rigid bodies in Chapter 7, Understanding Fixes. The procedure is illustrated here:

Here, is the moment of inertia tensor of the rigid body.

For a system of point particles or rigid bodies, the average kinetic energy and the average speed or angular speed are determined by the system temperature. Therefore, controlling the temperature adequately is often essential when simulating a molecular system. The next section discusses the features of a molecular simulation determined by the temperature.

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
Banner background image