Reading parameters from the input script
In this section, we will learn about parsing parameters entered by a user in the LAMMPS input script. In Chapter 3, Source Code Structure and Stages of Execution, the role of input.cpp
in parsing the first words of input script commands was discussed. In this section, we will discuss the methods responsible for parsing user-entered quantities associated with various commands.
User-entered parameters associated with various styles, such as numeric pair coefficient values in pair styles and force values in fixes, are parsed from the LAMMPS input script by the corresponding classes or their parent classes.
Important Note:
These methods are located in force.cpp
in the LAMMPS stable version, 3Mar20, whereas they have been moved to utils.cpp
in the stable version, 29Oct20. Please refer to Appendix D for more information about version compatibility.
The parsing of these quantities is performed by the force.cpp
class through several methods...