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 computes and be able to make further modifications to the LAMMPS source code.