ARL-TN-0687 ● AUG 2015

US Army Research Laboratory

Implementation of Shifted Periodic Boundary 

Conditions in the Large-Scale 

Atomic/Molecular Massively Parallel 

Simulator (LAMMPS) Software

by N Scott Weingarten and James P Larentzos

Approved for public release; distribution unlimited.
NOTICES

Disclaimers

The findings in this report are not to be construed as an official Department of the 

Army position unless so designated by other authorized documents.

Citation of manufacturer’s or trade names does not constitute an official 

endorsement or approval of the use thereof.

Destroy this report when it is no longer needed. Do not return it to the originator.
ARL-TN-0687 ● AUG 2015

US Army Research Laboratory

Implementation of Shifted Periodic Boundary 

Conditions in the Large-Scale 

Atomic/Molecular Massively Parallel 

Simulator (LAMMPS) Software

by N Scott Weingarten

Weapons and Materials Research Directorate, ARL

James P Larentzos

Engility Corporation

Approved for public release; distribution unlimited.
ii

REPORT DOCUMENTATION PAGE Form Approved

OMB No. 0704-0188

Public reporting burden for this collection of information is estimated to average 1 hour per response, including the time for reviewing instructions, searching existing data sources, gathering and maintaining the 

data needed, and completing and reviewing the collection information. Send comments regarding this burden estimate or any other aspect of this collection of information, including suggestions for reducing the 

burden, to Department of Defense, Washington Headquarters Services, Directorate for Information Operations and Reports (0704-0188), 1215 Jefferson Davis Highway, Suite 1204, Arlington, VA 22202-4302. 

Respondents should be aware that notwithstanding any other provision of law, no person shall be subject to any penalty for failing to comply with a collection of information if it does not display a currently valid 

OMB control number.

PLEASE DO NOT RETURN YOUR FORM TO THE ABOVE ADDRESS.

1. REPORT DATE (DD-MM-YYYY)

Aug 2015

2. REPORT TYPE

Final

3. DATES COVERED (From - To)

NA

4. TITLE AND SUBTITLE

Implementation of Shifted Periodic Boundary Conditions in the Large-Scale 

Atomic/Molecular Massively Parallel Simulator (LAMMPS) Software

5a. CONTRACT NUMBER

5b. GRANT NUMBER

5c. PROGRAM ELEMENT NUMBER

6. AUTHOR(S)

N Scott Weingarten and James P Larentzos

5d. PROJECT NUMBER

5e. TASK NUMBER

5f. WORK UNIT NUMBER

7. PERFORMING ORGANIZATION NAME(S) AND ADDRESS(ES)

US Army Research Laboratory

ATTN: RDRL-WML-B

Aberdeen Proving Ground, MD 21005

8. PERFORMING ORGANIZATION REPORT NUMBER

ARL-TN-0687

9. SPONSORING/MONITORING AGENCY NAME(S) AND ADDRESS(ES) 10. SPONSOR/MONITOR'S ACRONYM(S)

11. SPONSOR/MONITOR'S REPORT NUMBER(S)

12. DISTRIBUTION/AVAILABILITY STATEMENT

Approved for public release; distribution unlimited.

13. SUPPLEMENTARY NOTES

14. ABSTRACT

To observe screw dislocation motion on an infinite glide plane in atomistic simulations, shifted periodic boundary conditions

(sPBC) must be utilized. We have implemented this capability in the Large-scale Atomic/Molecular Massively Parallel 

Simulator (LAMMPS) software application code for use in classical molecular dynamics (MD) simulations. This report

presents the justification for utilizing sPBC, followed by a description of the implementation methodology. Dislocation 

velocities as a function of applied stress are obtained for screw dislocations in aluminum (Al) at a temperature of 300 K, and 

compared to prior results to verify our implementation.

15. SUBJECT TERMS

molecular dynamics, aluminum, dislocations

16. SECURITY CLASSIFICATION OF:

17. LIMITATION

OF ABSTRACT

UU

18. NUMBER

OF PAGES

26

19a. NAME OF RESPONSIBLE PERSON

N Scott Weingarten

a. REPORT

Unclassified

b. ABSTRACT

Unclassified

c. THIS PAGE

Unclassified

19b. TELEPHONE NUMBER (Include area code)

(410) 306-0718

Standard Form 298 (Rev. 8/98)

Prescribed by ANSI Std. Z39.18
iii

Contents

List of Figures iv

List of Tables iv

Acknowledgments v

1. Introduction 1

2. Implementation of Shifted Periodic Boundary Conditions in the 

LAMMPS Framework 4

2.1 Modification of the Domain Class 4

2.2 Modification of the AtomVec Atom Style Classes 5

3. Verification of the Implementation 6

4. Screw Dislocation Motion in Al 7

5. Conclusions 9

6. References 11

Appendix. The LAMMPS User Manual Documentation for the Boundary 

Command 13

List of Abbreviations, Acronyms, and Symbols 17

Distribution List 18
iv

List of Figures

Fig. 1 a) A depiction of PBC: a central simulation cell surrounded by 

replicates, with blue lines representing lattice planes. b) Same system, 

with the simulation cell having a shorter horizontal dimension. c) 

Implementation of shifted periodic boundary conditions (sPBC) results 

in alignment of lattice planes. ................................................................2

Fig. 2 a) A screw. b) A crystal system containing a single screw dislocation 

(gray dashed line), with the orientation of the lattice planes at the xboundaries indicated by red and blue lines. c) The same crystal system, 

viewed along the x-axis, with dashed red and blue lines indicating the 

average y-position of the lattice planes..................................................3

Fig. 3 A 2-D representation of the periodic images of a central cell for: a) 

traditional PBC and b) sPBC. The arrows are shown to indicate the 

amount in the y-direction that the particle has shifted relative to the 

central simulation cell (solid boundary). ...............................................5

Fig. 4 A plot showing the periodic nature of the relative lattice energy as the 

shift distance is varied. When the shift distance is a multiple of the 

lattice constant, the relative energy is zero. ...........................................6

Fig. 5 The position of the dislocation in Al at 1200 MPa for the larger system 

at 3 different times (as indicated) during the course of the simulation. 

Atoms are colored based on their centrosymmetry parameter...............9

Fig. 6 Dislocation position in Al as a function of time for the larger system 

for applied stresses of a) 60 MPa, b) 450 MPa, and c) 1,200 MPa. The 

slopes of the best fit lines are also shown. .............................................9

List of Tables

Table Dislocation velocities in Al as a function of applied stress at a 

temperature of 300 K, compared to a previous MD study.....................8
v

Acknowledgments

Computer support was provided by the Department of Defense Supercomputing 

Resource Centers at the US Army Research Laboratory and the Navy. We also 

acknowledge the computational resources and Productivity Enhancement, 

Technology Transfer and Training (PETTT) software support from the High 

Performance Computing Modernization Office (HPCMO).
vi

INTENTIONALLY LEFT BLANK.
1

1. Introduction

Dislocations play an important role in the response of crystalline materials during 

deformation. Multiple mechanisms, including dislocation nucleation, the motion of 

individual dislocations, or the collective motion of dislocation networks, can be 

involved during plastic deformation.

1 Mesoscale models, such as dislocation 

dynamics (DD), have been developed to obtain a better understanding of these 

mechanisms.

2

One key aspect of DD models is the mobility laws dictating the behavior of 

individual dislocations,

3 which determine how the force on a dislocation translates

into motion. This is achieved by defining the velocity as a function of applied stress 

and temperature, while taking into account the Burgers vector, orientation, and slip 

system of the dislocation. However, this information is not accessible from 

experiment, hence molecular dynamics (MD) simulations are typically used to 

determine mobility functions.

4

The MD simulation methodology involves introducing an individual dislocation to 

a single crystal system, and applying an external shear stress.

5 The dislocation will 

glide in response to the applied stress, and the velocity can be calculated. For any 

material system, edge and screw dislocations can occur on multiple slips systems, 

and for completeness, mobility laws must be determined for all possible 

dislocations in the material. The focus of this work is calculating accurate mobility 

laws for both edge and screw dislocations, which require different types of periodic 

boundaries. 

Simulations of edge dislocation glide make use of periodic boundary conditions 

(PBC) in the glide plane, which mimics a series of equally spaced infinitely long 

dislocations.

5 The implementation of PBC can be viewed as surrounding the 

simulation cell with replicates of the system. Simulations of a crystal typically 

require that the dimensions of the simulation cell are multiples of some periodic 

distance of the lattice (i.e., the unit cell). This is shown for a 2-D system in Fig. 1a, 

where the central box represents the simulation cell. The surrounding boxes, 

colored in a lighter shade, are replicates of the simulation cell. Lattice planes are 

depicted in blue, and while the lattice planes are not parallel to the boundaries, the 

dimensions of the system are such that the planes are consistent across the 

boundaries. In a simulation, PBC would result in atoms near a boundary interacting 

with atoms on the other side of the system as if they were nearby, and atoms leaving 

the simulation cell would reappear on the opposite side. This is a commonly used 

technique that allows for the simulation of an infinite bulk system.
2

Fig. 1 a) A depiction of PBC: a central simulation cell surrounded by replicates, with blue 

lines representing lattice planes. b) Same system, with the simulation cell having a shorter 

horizontal dimension. c) Implementation of shifted periodic boundary conditions (sPBC) 

results in alignment of lattice planes.

However, if the cell dimensions are not chosen carefully the lattice planes are not 

consistent across the boundaries. Such a situation is depicted in Fig. 1b, which is 

the same crystal system as Fig. 1a with the simulation cell having a shorter 

horizontal length. Inside the red circle, it is seen that the lattice planes do not align 

across the vertical boundaries. Note that the vertical dimension of the simulation 

cell has not been changed and the lattice planes are consistent across the horizontal 

boundaries. A possible remedy for the situation in Fig. 1b is to use shifted periodic 

boundary conditions (sPBC), which can be seen in Fig. 1c. The replicates to the 

right (left) of the simulation cell are shifted upwards (downwards) a small distance 

in order to align the lattice planes. During the course of a simulation, atoms 

interacting across the boundary must include this shift when calculating forces. In 

addition, when atoms cross the boundary, their vertical position is adjusted 

appropriately before reappearing on the other side. We would like to stress that 

sPBC would not be the typical means of addressing the problem in Fig. 1b, which 

would be more intuitively solved by using a simulation cell dimension that is 

periodic for the crystal structure and orientation, as seen in Fig. 1a.

While PBC can be used with edge dislocation glide, accurate screw dislocation 

mobility laws require the use of sPBC, since PBC are insufficient to model an 

infinite glide plane.

6 Figure 2a shows an illustration of a screw. The threads are 

tilted in opposing directions on opposite sides of the screw, and displaced by a small

distance represented by the dashed lines. Introducing an individual screw 

dislocation into a single crystal atomistic system results in a similar orientation of 

the lattice planes, which are depicted in Fig. 2b. In that figure, the dashed gray line

represents the dislocation line, akin to the screw in Fig. 2a. The slip system of this 

dislocation is defined by b, the Burgers vector (which aligns with the y-axis for this

screw dislocation), and the glide plane (of which the normal points in the z-
3

direction). The red and blue solid lines represent the orientation of lattice planes at 

the x-boundary. It is clear from Fig. 2b that the red and blue lines are tilted in 

opposite directions. Finally, Fig. 2c shows the same system as Fig. 2b, now viewed 

along the x-axis and projected onto the yz-plane. In addition to the same red and 

blue lines depicting the lattice planes, there are dashed lines representing the 

average y-positions of those planes. These dashed lines are separated by a distance 

equal to one-half the magnitude of the Burgers vector (b/2) of the screw dislocation.

Fig. 2 a) A screw. b) A crystal system containing a single screw dislocation (gray dashed 

line), with the orientation of the lattice planes at the x-boundaries indicated by red and blue 

lines. c) The same crystal system, viewed along the x-axis, with dashed red and blue lines 

indicating the average y-position of the lattice planes.

In response to an external shear stress applied to the system, the dislocation in Fig. 

2b is able to glide in the x-direction along an xy-plane. However, normal PBC will 

not allow for an infinite glide plane because the lattice planes are not consistent

across the x-boundary, as seen in Fig. 2b and 2c. This is true for two reasons: they

are tilted in opposite directions, and they are displaced by a distance of b/2. 

Inconsistent lattice planes exist across the z-boundary as well (not shown in the 

figure), but the systems in our simulations have free surfaces separated by a vacuum 

in that direction. The tilt of the lattice planes decreases with increasing system size

(very large x-dimension), and flatness can be enforced with minimal effect on 

dislocation motion far away from the dislocation. But this does not account for the 

displacement of the lattice planes across the boundary, hence the need for sPBC in 

modeling screw dislocation glide on an infinite plane.

In the next section of this report, we describe the implementation of PBC in Largescale Atomic/Molecular Massively Parallel Simulator (LAMMPS),

7 and the 

changes made to the code to implement sPBC. This is followed by a description of 

MD simulations of screw dislocation mobility in aluminum (Al), which we have 

performed as verification. 
4

2. Implementation of Shifted Periodic Boundary Conditions in 

the LAMMPS Framework

The LAMMPS software package (http://lammps.sandia.gov) is one of the premier

MD codes for computational chemistry and materials science applications. 

LAMMPS is an open-source, highly scalable domain-decomposition-based 

software application developed by the US Department of Energy (DOE) at Sandia 

National Laboratories that is written with C++ object oriented programming. The 

modular nature of LAMMPS enables users to easily implement additional physics 

into the software. Extensive information on the structure and class hierarchy of the 

software is provided in the LAMMPS Developer Guide.

8 Specifically, the parallel 

implementation of the sPBC required modification of the Domain class and the 

AtomVec child classes. The relevant source code modifications are described in the 

following section and are current with the 9 December 2014 stable release version 

of LAMMPS. 

2.1 Modification of the Domain Class

The Domain class stores the simulation box geometry and applies PBC to the 

particles local to a given processor. Within the native LAMMPS source code, 

boundary conditions are specified through the boundary command in the input 

file, followed by keyword characters to specify whether the boundaries are periodic 

(p), fixed (f), shrink-wrapped (s), or shrink-wrapped with a minimum value (m).

The modified source code includes an additional keyword character, denoted by the 

w character, to specify the periodic direction to which the shifted boundary 

conditions are applied. Two additional arguments representing the shift distances 

are also expected. For example, shifted boundary conditions in the x-direction with 

a shift distance in the y-direction of 0.2 and a shift distance in the z-direction of 0.1 

are specified with the following command:

boundary w p p 0.2 0.1

The modified user manual documentation for the boundary command is provided 

in the appendix. Currently, the modified source code restricts the user to design the 

orthogonal simulation cells so that the shifted boundary conditions are in the xdirection (as specified in the above example). Hence, the w character can only 

appear as the first argument in the boundary command.
5

An illustration comparing PBC images and sPBC images is shown in Fig. 3, where 

the central simulation cell is depicted with a solid boundary. A positive shift in the 

y-direction is imposed when the particle crosses the yz-plane of the domain in the 

+x-direction and a negative shift is imposed when the particle crosses the yz-plane 

in the –x-direction. 

Fig. 3 A 2-D representation of the periodic images of a central cell for: a) traditional PBC 

and b) sPBC. The arrows are shown to indicate the amount in the y-direction that the particle 

has shifted relative to the central simulation cell (solid boundary).

2.2 Modification of the AtomVec Atom Style Classes

The AtomVec child classes store the atomic attributes (atomic positions, forces, 

velocities, charges, etc.). The choice of atom style depends on the type of simulation 

to be conducted in order to efficiently manage the amount of data that is 

communicated between processors. Within the AtomVec child classes, the forward 

communication buffering methods have been modified to apply sPBC to the 

periodic images. Forward communication refers to the flow of communication

going from the locally ‘‘owned’’ particles on one processor to the corresponding 

‘‘ghost’’ particles that reside on different processors within a domaindecomposition framework. The methods that are responsible for packaging the 

coordinates prior to the forward communication are the following: pack_comm, 

pack_comm_vel, pack_border, and pack_border_vel. Periodic image 

flags specify the location of the neighboring subdomain to which the particle 

coordinates will be communicated. Based on the location of the periodic image, the 

particle coordinates are shifted accordingly and packaged into the buffer prior to 

communication.
6

3. Verification of the Implementation

To verify that the sPBC have been correctly implemented, a faced-centered cubic 

(FCC) crystal was generated to examine the single point energy of the system as 

the shift distance is increased. These calculations were performed on a single 

processor. The shift is in the y-direction and the distance was varied from 0.0 Å to 

a in intervals of 0.5 Å, where a is the value of the lattice constant

(a = 4.0 Å for this example). Although it may be unphysical to have such large 

shifts, this particular example tests whether the algorithm has been correctly 

implemented. At shift distances of 0.0 Å and 4.0 Å, the periodic images align as if 

no shift were specified; thus, the energies are equivalent, as seen in Fig. 4. The 

energy decreases as the shift distance is increased until a minimum is observed at 

half the lattice constant (2.0 Å), followed by a symmetric energy increase as the 

shift distance approaches a. This is the expected result given the periodic nature of 

the system and demonstrates that the periodic shift has been correctly implemented. 

Fig. 4 A plot showing the periodic nature of the relative lattice energy as the shift distance 

is varied. When the shift distance is a multiple of the lattice constant, the relative energy is 

zero.

The FCC crystal analysis was successfully repeated using multiple processors, 

indicating that the particle information is correctly communicated to neighboring 

processors. It is noted that the current implementation requires that the number of 

processors requested in the shift direction be set to 1 when the magnitude of the 

shift distance for that direction is greater than zero. The number of processors in 

-0.4

-0.35

-0.3

-0.25

-0.2

-0.15

-0.1

-0.05

0

0 2 4

Lattice Energy (eV)

Shift (Angstroms)
7

each dimension of the 3-D grid overlaying the simulation domain can be controlled 

through the LAMMPS processors command. For example, the following 

command is used to specify 1 processor for the y-direction: 

processors * 1 *.

In this case, LAMMPS determines the ideal number of processors in the x- and 

z-directions since they are specified by the wild card character (*).

4. Screw Dislocation Motion in Al

Shifted periodic boundary conditions (sPBCs) have been used in a number of

previous MD studies considering screw dislocation mobility.

6,9,10 For verification, 

we have performed MD simulations of screw dislocation glide in Al, for 

comparison to work done by Olmsted et al.10 Simulations are performed at a 

constant temperature and volume (NVT), using our modified version of LAMMPS.

The Ercolessi and Adams embedded atom method (EAM) potential is used,

11 which 

was fitted to numerous material properties of Al. The timestep is 1 fs, with a 

thermostating rate of 0.5 ps. A full neighbor list with a cutoff of 6.063 Å was 

constructed every time step. The system is oriented so that the �1 1 2�, �1 1 0�, and 

[1 1 1] crystal directions align with the x, y, and z-axes, respectively. Two system 

sizes were used: the crystal dimensions of the first are 119.05 Å × 28.64 Å × 84.18 

Å, resulting in 17,280 atoms; the larger second system has 69,120 atoms, with 

dimensions of 238.11 Å × 28.64 Å × 168.36 Å. A screw dislocation is introduced 

near the center of the single crystal systems via the displacement field





 



 = −

x

z

y b 1 tan (1)

so that the Burgers vector is in the y-direction, and the glide plane is normal to the 

z-direction. This results in glide along the (1 1 1)�1 1 2� slip system.

Shear stress is applied to the system in the direction of the Burgers vector, resulting 

in dislocation motion in the x-direction. This is achieved by adding a positive force 

to atoms at the top surface, and a negative force to those at the bottom.

5 Traditional 

PBC are used in the y-direction, which is the line direction for the dislocation, while 

sPBC are used in the x-direction. The z-surfaces are free to accommodate the 

motion of atoms in opposite directions as a result of the applied force, hence a 40 

Å vacuum region is introduced in this direction. The x-position of the dislocation 

is determined by averaging the location of all atoms associated with the dislocation 

core, defined by the centrosymmetry parameter, from which the dislocation 

velocity can be calculated.
8

Three different values of applied stress are considered, all at a temperature of

300 K: 60 MPa, 450 MPa, and 1200 MPa. The table shows the data from our 

simulations for both system sizes, as well as those from the previous study, which 

was similar in size to our 17,280 atom system. Agreement is perfect, except for our 

small system with an applied stress of 60 MPa, for which we did not observe 

dislocation glide. This is surprising considering the similarities in simulation size 

between the previous study and our small system. However, the x-dimension of the 

simulation cell (which is the direction of dislocation glide) listed in the work by 

Olmsted et al.10 is not a length compatible with the periodicity of the crystal 

structure. If that is indeed the length they used, then the shifted periodic boundary 

is actually a planar defect (i.e., a stacking fault), which would interact with the 

dislocation and influence its glide motion. The y-dimension in the work by Olmsted

et al.10 has the correct dimensions for repeatability, and the z-dimension has free 

surfaces, so compatibility across the boundary is not an issue. The data in the table 

corresponds to the correct crystal dimensions without a stacking fault, resulting in

a system of slightly different size from the previous paper.

Table Dislocation velocities in Al as a function of applied stress at a temperature of

300 K, compared to a previous MD study

Applied Stress 

(MPa) Previousa Velocity (nm/ps)17,280 atoms 69,120 atoms

60 MPa 0.8 0.0 0.80

450 MPa 1.9 1.93 1.92

1200 MPa 2.6 2.65 2.64

a Refer to reference 10.

Dislocation glide for the larger system with an applied stress of 1,200 MPa is shown 

in Fig. 5, which uses the OVITO visualization software.

12 Atoms are colored based 

on the value of their centrosymmetry parameter as calculated by LAMMPS during 

the course of the simulation. Note that atoms on the free surface (top and bottom) 

are correctly colored orange-red, while atoms in the interior appear blue despite the 

use of shifted boundaries in the x-direction. This indicates the correct 

implementation of sPBC in LAMMPS. The atoms associated with the dislocation 

core appear as light blue-green atoms near the center. Over the course of 4.0 ps, the 

dislocation travels approximately 110 Å in the positive x-direction.
9

Fig. 5 The position of the dislocation in Al at 1200 MPa for the larger system at 3 different 

times (as indicated) during the course of the simulation. Atoms are colored based on their 

centrosymmetry parameter.

A more robust calculation of the velocity for this system is shown in Fig. 6, where 

the dislocation position is plotted as a function of time over a longer interval. The 

applied stress and the slope of best-fit lines to the data are also shown in the figure

(same data that appears in the Table). Clearly, the velocity is constant for all three 

values of applied stress, and the values are in perfect agreement with Olmsted et 

al.10 The x-dimension of the simulation cell is 23.8 nm, hence the dislocation has 

passed through the shifted boundary multiple times during the course of each of the 

simulations represented in Fig. 6. The dislocation core structure changes as the 

dislocation passes through the boundary since tilted lattice planes can not be 

accommodated with sPBC. However, this has no effect on the average velocity of 

the dislocation over long time periods.

Fig. 6 Dislocation position in Al as a function of time for the larger system for applied 

stresses of a) 60 MPa, b) 450 MPa, and c) 1,200 MPa. The slopes of the best fit lines are also 

shown.

5. Conclusions

We have implemented sPBC in the LAMMPS software package to perform 

simulations of screw dislocation glide on an infinite plane. The implementation 

presented in this report is general with respect to the interatomic potentials 
10

available, and therefore to the types of materials that can be studied. The capability 

has only been implemented for one shift boundary (y- and/or z-shift across the xboundary). This is not a hindrance to the development of mobility laws since slip 

systems are considered individually in separate simulations, and the proper 

orientation of the system can be preconfigured. As verification, we have performed 

simulations of screw dislocation glide in Al. The dislocation velocities as a function 

of applied stress at T = 300 K are in perfect agreement with prior results.

10 These 

types of simulations enable the development of mobility laws for use in DD models.
11

6. References

1. Hirth JP, Lothe J. Theory of dislocations. 2nd ed. New York (NY): John Wiley 

& Sons; 1982.

2. Zbib HM, Rhee M, Hirth JP. On plastic deformation and the dynamic of 3D 

dislocations. Int. J. Mech. Sci. 1998;40:113–127.

3. Cai W, Bulatov VV. Mobility laws in dislocation dynamics simulations. Mat. 

Sci. Eng. A. 2004;387–389:277–281.

4. Chang J, Cai W, Bulatov VV, Yip S. Dislocation motion in BCC metals by 

molecular dynamics. Mat. Sci. and Eng. A. 2001;309–310:160–163.

5. Weingarten NS, Chung PW. a-Type edge dislocation mobility in wurtzite GaN 

using molecular dynamics. Scripta Mat. 2013;69:311-314.

6. Rodney D. Acta Mat. Molecular dynamics simulation of screw dislocations 

interacting with interstitial frank loops in a model FCC crystal. 2004;52:607–

614.

7. Plimpton SJ. Fast parallel algorithms for short-range molecular dynamics. J. 

Comput. Phys. 1995;117:1–19.

8. LAMMPS Developer Guide. 23 August 2011; [accessed 20 January 2015], 

lammps.sandia.gov/doc/Developer.pdf.

9. Groh S, Marin EB, Horstemeyer MF, Bammann DJ. Dislocation motion in 

magnesium: a study by molecular statics and molecular dynamics. Moldelling 

Simul. Mater. Sci. Eng. 2009;17:1–15.

10. Olmsted DL, Hector LG. Jr, Curtin WA, Clifton RJ. Atomistic simulations of 

dislocation mobility in Al, Ni, and Al/Mg alloys. Modelling Simul. Mater. Sci. 

Eng. 2005;13:371–388.

11. Ercolessi F, Adams, JB. Interatomic potentials from first-principles 

calculations: The force-matching method. Europhys. Lett. 1994;26:583–588.

12. Stukowski, A. Visualization and analysis of atomistic simulation data with 

OVITO-the open visualization tool. Modelling Simul. Mater. Sci. Eng. 

2010;18:015012.
12

INTENTIONALLY LEFT BLANK.
13

Appendix. The LAMMPS User Manual Documentation for the 

Boundary Command 

 

This appendix appears in its original form, without editorial change.
14

LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Commands

boundary command 

Syntax:

boundary x y z yshift zshift

• x,y,z = p or s or f or m or w, one or two letters 

• p is periodic 

• f is non-periodic and fixed 

• s is non-periodic and shrink-wrapped 

• m is non-periodic and shrink-wrapped with a minimum value 

• w is periodic shifted boundary condition 

• yshift is the shift distance in y and is only necessary when shifted 

boundary conditions are specified for x 

• zshift is the shift distance in z and is only necessary when shifted 

boundary conditions are specified for x 

Examples:

boundary p p f 

boundary p fs p

boundary s f fm 

boundary w p p 0.2 0.1 

Description:

Set the style of boundaries for the global simulation box in each dimension. A 

single letter assigns the same style to both the lower and upper face of the box. 

Two letters assigns the first style to the lower face and the second style to the 

upper face. The initial size of the simulation box is set by the read_data, 

read_restart, or create_box commands. 

The style p means the box is periodic, so that particles interact across the 

boundary, and they can exit one end of the box and re-enter the other end. A 

periodic dimension can change in size due to constant pressure boundary 

conditions or box deformation (see the fix npt and fix deform commands). The 

p style must be applied to both faces of a dimension. 

The styles f, s, and m mean the box is non-periodic, so that particles do not 

interact across the boundary and do not move from one side of the box to the 

other. For style f, the position of the face is fixed. If an atom moves outside the 

face it may be lost. For style s, the position of the face is set so as to encompass 

the atoms in that dimension (shrink-wrapping), no matter how far they move. 

For style m, shrink-wrapping occurs, but is bounded by the value specified in 
15

the data or restart file or set by the create_box command. For example, if the 

upper z face has a value of 50.0 in the data file, the face will always be 

positioned at 50.0 or above, even if the maximum z-extent of all the atoms 

becomes less than 50.0. 

The style w means the box is periodic, so that particles interact across the 

boundary, and they can exit one end of the box and re-enter the other end, but 

will be shifted a distance of yshift along the shifted y-axis and zshift along the 

z-axis. The current implementation enforces x to be the shifted boundary. As a 

particle enters/exits the yz face, the shift is applied in the y- and z-directions. 

The w style must be applied to both faces of a dimension.

For triclinic (non-orthogonal) simulation boxes, if the 2nd dimension of a tilt 

factor (e.g. y for xy) is periodic, then the periodicity is enforced with the tilt 

factor offset. If the 1st dimension is shrink-wrapped, then the shrink wrapping 

is applied to the tilted box face, to encompass the atoms. E.g. for a positive xy 

tilt, the xlo and xhi faces of the box are planes tilting in the +y direction as y 

increases. These tilted planes are shrink-wrapped around the atoms to 

determine the x extent of the box. 

See Section_howto of the doc pages for a geometric description of triclinic 

boxes, as defined by LAMMPS, and how to transform these parameters to and 

from other commonly used triclinic representations. 

Restrictions:

This command cannot be used after the simulation box is defined by a 

read_data or create_box command or read_restart command. See the 

change_box command for how to change the simulation box boundaries after it 

has been defined. 

For 2d simulations, the z dimension must be periodic. 

For the shifted boundary conditions, the simulations are restricted to orthogonal 

cells. In addition, only shifted boundary conditions for x are supported. When 

the yshift or zshift is > 0.0, the number of processors requested in the respective 

direction must be set to 1 with the processors command. 

This command must be used in conjunction with the newton off command to 

enforce construction of a full neighbor list.

Related commands:

See the thermo_modify command for a discussion of lost atoms. 
16

Default:

boundary p p p 
17

List of Abbreviations, Acronyms, and Symbols

Al aluminum

DD dislocation dynamics

DOE US Department of Energy

EAM embedded atom method

FCC faced-centered cubic

LAMMPS Large-scale Atomic/Molecular Massively Parallel Simulator

MD molecular dynamics

PBC periodic boundary conditions

sPBC shifted periodic boundary conditions
18

1 DEFENSE TECHNICAL

(PDF) INFORMATION CTR

DTIC OCA

2 DIRECTOR

(PDF) US ARMY RESEARCH LAB

RDRL CIO LL

IMAL HRA MAIL & RECORDS

MGMT

1 GOVT PRINTG OFC

(PDF) A MALHOTRA

2 SANDIA NATIONAL LABS

(PDF) A THOMPSON

S PLIMPTON

4 ENGILITY CORP

(PDF) G KEDZIORA

M LASINSKI

J LILL

J LARENTZOS

1 RENSSELAER POLYTECHNIC

(PDF) INSTITUTE

C PICU

1 UNIVERSITY OF MARYLAND

(PDF) P CHUNG

1 TU BERGAKADEMIE 

FREIBERG

(PDF) S GROH

1 MISSISSIPPI STATE 

(PDF) UNIVERSITY

M HORSTEMEYER

1 ECOLE POLYTECHNIQUE

(PDF) FEDERAL DE LAUSANE

W CURTIN

1 KENT STATE UNIVERSITY

(PDF) R SELINGER

2 LAWRENCE LIVERMORE 

(PDF) NATIONAL LABS

S AUBREY

T ARSENLIS

2 JOHNS HOPKINS UNIVERSITY

(PDF) T WEIHS

M FALK

1 UNIVERSITY OF LYON

(PDF) D RODNEY

1 ALABAMA A&M UNIVERSITY

(PDF) A SCOTT

24 DIR USARL

(PDF) RDRL CIH C

L MUNDAY

J CRONE

J KNAP

RDRL SED C

O BORODIN

RDRL SED E

K JONES

RDRL WM

P BAKER

B FORCH

S KARNA

RDRL WML

M ZOLTOSKI

RDRL WML B

I BATYREV

J BRENNAN

E BYRD

S IZVYEKOV

W MATTSON

B RICE

D TAYLOR

N TRIVEDI

N S WEINGARTEN

RDRL WMM C

C C WU

RDRL WMM F

M TSCHOPP

RDRL WMM G

J ANDZELM

T CHANTAWANSRI

B RINDERSPACHER

T SIRK