Chapter 6: Understanding Computes

In the previous chapter, we explored some of the pair styles implemented in LAMMPS.

In this chapter, we will analyze some computes and gain a similar understanding of their source code. Computes return various quantities from the simulation run, and learning to understand the code that is responsible for the associated calculations is essential if we wish to write new computes for custom purposes.

We will cover the following topics in this chapter:

  • Reviewing the general structure of computes
  • Reviewing the compute KE class
  • Reviewing the compute group/group class
  • Reviewing the compute RDF class
  • Reviewing the compute heat flux class

By the end of this chapter, you will understand the inner mechanism of selected ...

Get Extending and Modifying LAMMPS Writing Your Own Source Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.