Running a LAMMPS simulation: a guide

To run a simulation in LAMMPS, both the input and data files must be placed in the same folder, and a terminal tab/command prompt in that particular folder must be invoked. Then, a correct LAMMPS simulation start-up command must be entered. The overall process to achieve this is similar in all operating systems, but there are certain differences.

 

For Windows users:

1.     Open the target folder.

2.     Click on the location bar in Windows Explorer.

3.     Type cmd.

4.     Press enter.

5.     Enter   mpiexec -np [number of assigned processors] lmp_mpi -in [input file]

mpiexec -np 4 lmp_mpi -in in.filename

 

For Mac users:

1.     Right click on the target folder.

2.     Hover over services in the right click menu.

3.     In the services list, select New Terminal Tab at Folder**.

4.     Enter   mpirun -np [number of assigned processors] lmp_mpi -in [input file]

mpirun -np 4 lmp_mpi -in in.filename

 

**If the option for New Terminal Tab at Folder does not exist:

                                 I.         Go to System preferences.

                               II.         Select Keyboard.

                             III.         Select Shortcuts.

                            IV.         Select Services.

                              V.         Find New Terminal Tab at Folder.

                            VI.         Click the box next to this option.

                          VII.         Go to step 1 in the previous section.

 

For Linux users:

1.     Open the files app

2.     Go to the location of the target folder

3.     Right click on the folder

4.     In the right click menu, select Open in Terminal

5.     Enter   mpirun -np [number of assigned processors] lmp_mpi -in [input file]

mpirun -np 4 lmp_mpi -in in.filename

 

 

After the input and data files have been generated, running the simulation seems to be the easiest steps of all. However, the first LAMMPS simulation attempt is rarely devoid of errors. While running that final line into the terminal window is the last step to run a simulation, it is also the first step into the realm of debugging and maintenance. To see a list of the most common errors in LAMMPS, see manual. To a see our comprehensive guide for dealing with errors, please visit this blog post.

Comments

Popular posts from this blog

Building a LAMMPS input file: a tutorial

New Beginnings