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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.