Summary
In this chapter, we saw some examples of custom-written pair styles that illustrate the process of selecting an appropriate pair style and making modifications at the correct sections to generate the required forces and potentials. In addition, the mathematical background behind these pair styles have been provided to help you to see the connection from theory to source code implementation.
In this chapter, you have learned to choose existing pair styles and to create new pair styles by adding proper modifications. Other than modifying input parameters to parse, the force and potential functions usually need to be modified when creating a new pairwise potential. You have also seen examples of non-pairwise potentials being modified to implement location-dependence and frictional forces.
In the next chapter, we will write custom fixes that can perform user-defined maneuvers during a simulation run to suit user requirements.