-
Book Overview & Buying
-
Table Of Contents
Extending and Modifying LAMMPS Writing Your Own Source Code
By :
In this section, the parsing of input script commands is described as handled by the execute_command() method in input.cpp, along with the steps followed after each command.
The execute_command() method in input.cpp is responsible for parsing the first word of each line of the input script. This method contains a list of permitted commands that are compared with the first word of each line. An error is returned if there is no match, and pre-defined methods in input.cpp are called for each match. This method is called within the file() method and the one() method in input.cpp to facilitate parsing and execution.
The following screenshot shows the execute_command() method:
Figure 3.16 – The execute_command() method in input.cpp containing a list of permitted input script commands
As you can see, in the preceding screenshot, the command variable represents the first word of the line being parsed, and it is...