Simulating the Atomic Assembly of Gallium Arsenide

Simulating the Atomic Assembly
of Gallium Arsenide
A Dissertation Presented to
the Faculty of the School of Engineering and Applied Science
University of Virginia
In Partial Fulfillment of
the Requirements for the Degree
Doctor of Philosophy in Engineering Physics
by
Dewey Andrew Murdick
January 2006
APPROVAL SHEET
The dissertation is submitted in partial fulfillment of the requirements for the degree of
Doctor of Philosophy in Engineering Physics
Dewey Andrew Murdick
This dissertation has been read and approved by the Examining Committee:
Haydn N. G. Wadley, Materials Science, Advisor
Leonid V. Zhigilei, Materials Science, Chairman
Robert E. Johnson, Engineering Physics
John Ruvalds, Physics
Xiaowang Zhou, Materials Science
Accepted for the School of Engineering and Applied Science:
James H. Aylor, Dean
January 2006
iii
Abstract
A molecular dynamics (MD) atomistic modeling and simulation approach is used to
study the assembly mechanisms of homoepitaxial GaAs vapor deposition as a function of
temperature and flux composition. This study requires interatomic potentials that are able
to reasonably predict the structures and energies of small clusters, bulk crystal lattices, and
surface binding. Eleven GaAs interatomic potentials were evaluated for their applicability
to MD simulations of GaAs atomic assembly. Of these potentials, one parametrization of
the Tersoff potential and two parametrizations of the Stillinger-Weber (SW) potential were
identified and systematically evaluated. It was observed that bulk and molecular arsenic
properties calculated by the Tersoff parametrization matched ab initio and experimental
data significantly better than either of the SW parametrizations. Simulations of arsenic
dimer bonding with gallium-rich GaAs (001) surfaces indicate a high sticking probability
for SW potentials. This is in good agreement with experimental observations at low growth
temperatures. However, the Tersoff parametrization resulted in a nonphysically high As 2
desorption probability over a wide range of surface temperatures. Using the more accurate
of the two SW potential parametrizations, the low-temperature atomic assembly of GaAs
thin films with an equiatomic vapor was investigated. Crystalline growth was observed for
substrate temperatures above 35% of the melting temperature. Below this temperature, the
critical epitaxial thickness began to rapidly decrease as defects were increasingly incorporated and eventually nucleated an entirely amorphous structure. The adsorption process
of arsenic dimers was evaluated and found to show an orientation dependence. Atomic
processes responsible for the formation of the gallium vacancy defects were examined,
and the influence of growth temperature on defect formation was also identified. It was
found that none of the compound semiconductor potentials available in literature correctly
predicted the experimentally-observed surface reconstructions. This is because these po-
iv
tentials do not address the electron occupancies of dangling bonds associated with surface
atoms and their well-established role in the formation of low-energy surfaces. An electron
counting rule accounts for electron redistribution among covalent and dangling bonds of
III-V systems. A simple method for linking this electron counting constraint with interatomic potentials is proposed and used to investigate the energetics of various atomic-scale
structures on the GaAs (001) surface.
An analytic, bond-order potential (BOP) is proposed and parametrized for the GaAs
system that improves upon many of the shortcomings of the previous potentials. The potential was derived from a tight-binding description of bonding in a manner that addresses
the valence-dependent character of heteroatomic primary and secondary bonding. Predictions using the potential were systematically evaluated and the structural and binding
energy trends of the GaAs BOP were found to match experimental observations and ab
initio calculations. Furthermore, with the aid of the electron counting potential, the relative stabilities of the (001) surface reconstructions of GaAs were well predicted, especially
under high arsenic overpressure conditions. Using the BOP, the homoepitaxial assembly
on a (001) GaAs surface from atomic gallium and molecular As 2 vapor fluxes was investigated. During simulation of epitaxial growth, a temperature-dependent arsenic solubility
limit was observed consistent with experimental results. The As 2 sticking probabilities
and dimer binding energy states for both gallium- and arsenic-terminated (001) surfaces
were also explored. On gallium-terminated surfaces, significant switching between two
weakly-bound precursor states and an intermediate chemisorbed state was observed during
the surface diffusion of arsenic dimers. The switching frequency was strongly temperature dependent. The arsenic dimers bound to arsenic-terminated surfaces were found to be
more likely to desorb (instead of diffuse) when thermally perturbed from their adsorption
sites. This sticking probability was strongly dependent upon surface temperature, atomic
adsorption site environment, and the orientation of the incoming dimer.
v
Acknowledgments
This dissertation would not have come together without the combined labors of a large
group of dedicated people. Of this group, the efforts of Haydn Wadley, my advisor, have
been deeply appreciated. I am thankful for the funding he secured and the computational,
software, and travel resources that he provided, which were necessary for the completion
of our research goals. I am also indebted to his determined efforts to teach me to think
deeply, perform insightful research, and write clearly as a scientist. I am grateful to Xiaowang Zhou for the substantial time he spent training me in simulating vapor deposition,
answering my questions, and transforming my ideas into plausible research plans. I thoroughly enjoyed working with Xiaowang and have been impressed by the level of selflessness exhibited in his science, which allows him to put ego behind the pursuit of knowledge
and understanding. I have benefited from the computational materials science tutelage of
Leonid Zhigilei both in and outside of the classroom. Furthermore, the significant amount
of time answering questions, critiques, and the professional friendships of David Pettifor,
Ralf Drautz, Duc Nguyen-Manh, Mike Finnis, Robert A. Johnson, Phil Parrish, Robert E.
Johnson, John Ruvalds, Junjie Quan, and Brian Gillespie were enormously helpful.
Computation is at the heart of the work within this dissertation and could not have
been accomplished without the help of Rich Gregory, Ed Hall, and Katherine Holcomb.
They have spent many hours answering my questions and finding additional computing
resources. I am also grateful to M. M. Morgan and A. S. Grimshaw of the Virginia Center for Grid Research at the University of Virginia for their generous allotment of more
than 12 years of computing time on the 64-node Centurion Opteron cluster. Additionally,
Sherri Thompson, Teresa Morris, and Carolyn Frey of the IPML office staff and Vickie
Thomas, Sandy Maslen, and Pat Parham of the MSE department have made the normally
tiresome details of forms, paychecks, regulations, reimbursements, and purchasing much
vi
more enjoyable and pleasant.
The person who played the most pivotal role in the progression from admission, to
classes, to comprehensive exams, to research and writing was Joanna Carter Murdick, my
wife. Without her encouragement, sacrifice, and love, I do not believe I would have made
it through this process. She has offered her ideas for improving working efficiency, presentations, and written content. She has also sacrificed many hours of her time by making
review sheets for the APMA and physics classes, editing my writing, entering changes to
drafts, and listening to presentation after presentation. Her love and endurance throughout
this process have been sincerely treasured—may she be blessed for her patience. I also
want to thank my family for all their support and encouragement throughout this process.
Finally, this work has been the product of much prayer; therefore, I would like to thank my
God for answering the many requests for help.
Contents
Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
iii
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii
List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
1 Introduction
1
1.1
GaAs applications and devices . . . . . . . . . . . . . . . . . . . . . . . .
1
1.2
GaAs vapor deposition . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2
2 Modeling Interatomic Bonding
6
2.1
The multiscale approximations of materials modeling . . . . . . . . . . . .
6
2.2
Electronic structure methods . . . . . . . . . . . . . . . . . . . . . . . . .
8
2.2.1
Density functional theory . . . . . . . . . . . . . . . . . . . . . . .
8
2.2.2
Tight binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3
Classical interatomic potential energy functions . . . . . . . . . . . . . . . 12
2.4
Molecular assembly modeling methods . . . . . . . . . . . . . . . . . . . 15
2.5
2.4.1
Molecular dynamics . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.4.2
Statistical approach to modeling surface dynamics . . . . . . . . . 17
2.4.3
Continuum methods for growth front simulation . . . . . . . . . . 18
Selecting a simulation approach . . . . . . . . . . . . . . . . . . . . . . . 19
vii
viii
2.6
Molecular dynamics methods for vapor deposition . . . . . . . . . . . . . . 20
3 Assessments of Empirical Interatomic Potentials
24
3.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.2
Atomic volume and cohesive energy . . . . . . . . . . . . . . . . . . . . . 25
3.3
Elastic constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.4
Point defect energetics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.5
Melting temperature . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.6
Arsenic dimers and tetramers . . . . . . . . . . . . . . . . . . . . . . . . . 37
3.7
Surface structure assessments . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.8
Sticking ratio during arsenic dimer vapor deposition . . . . . . . . . . . . . 42
3.9
Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.10 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4 Low-Temperature Atomic Assembly from an Equiatomic Vapor
54
4.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.2
Vapor deposition simulation . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.3
Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.4
4.3.1
Crystalline order and temperature . . . . . . . . . . . . . . . . . . 56
4.3.2
Arsenic adsorption and desorption mechanisms . . . . . . . . . . . 58
4.3.3
Point defect formation . . . . . . . . . . . . . . . . . . . . . . . . 63
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5 Surface Free Energies and Electron Counting
72
5.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.2
(001) surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.2.1
Surface reconstructions . . . . . . . . . . . . . . . . . . . . . . . . 73
ix
5.2.2
Surface free energy diagrams . . . . . . . . . . . . . . . . . . . . . 76
5.3
Calculations using conventional potentials . . . . . . . . . . . . . . . . . . 81
5.4
Bond and dangling bond energy levels . . . . . . . . . . . . . . . . . . . . 84
5.5
Electron counting model . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.6
Potential energy functions with electron counting . . . . . . . . . . . . . . 89
5.7
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
6 An Analytic Bond-Order Potential
94
6.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94
6.2
Bond-order potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
6.3
6.4
6.2.1
Potential format . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
6.2.2
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Evaluation of the potential . . . . . . . . . . . . . . . . . . . . . . . . . . 106
6.3.1
Small cluster properties . . . . . . . . . . . . . . . . . . . . . . . . 107
6.3.2
Bulk lattice structures . . . . . . . . . . . . . . . . . . . . . . . . 111
6.3.3
Crystalline data summary . . . . . . . . . . . . . . . . . . . . . . 115
6.3.4
Melting temperature . . . . . . . . . . . . . . . . . . . . . . . . . 116
6.3.5
Point defects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118
6.3.6
GaAs surfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
7 Condensation Mechanisms of an Arsenic-Rich Vapor on GaAs (001) Surfaces 129
7.1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
7.2
Computational methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
7.3
Vapor deposition simulations . . . . . . . . . . . . . . . . . . . . . . . . . 132
7.4
Arsenic dimer mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . . 137
7.4.1
Gallium-terminated surfaces . . . . . . . . . . . . . . . . . . . . . 139
x
7.4.2
7.5
7.6
Arsenic-terminated surfaces . . . . . . . . . . . . . . . . . . . . . 145
Sticking ratio estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
7.5.1
Gallium- and arsenic-terminated surfaces . . . . . . . . . . . . . . 150
7.5.2
Arsenic dimer orientation effects . . . . . . . . . . . . . . . . . . . 155
Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
8 Discussion
158
9 Summary
167
A Crystal Lattice and Properties
172
A.1 Crystal basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
A.2 Orthogonal conventional unit cells . . . . . . . . . . . . . . . . . . . . . . 176
A.3 Distances and angles within the crystal cell . . . . . . . . . . . . . . . . . 180
B Molecular Statics
182
C Potential Energy Function Summary
185
D Stillinger-Weber Potential Energy Function
188
E Tersoff Potential Energy Function
190
F Crystalline Order Parameter
192
G Bond-Order Potential Parametrization Methods
194
H Electron Counting Potential
201
I
206
Molecular Dynamics Code
I.1
FORTRAN subroutine and function map . . . . . . . . . . . . . . . . . . . 206
xi
I.2
I.3
Include files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
I.2.1
Stillinger-Weber potential . . . . . . . . . . . . . . . . . . . . . . 209
I.2.2
Tersoff potential . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
I.2.3
Bond-order potential . . . . . . . . . . . . . . . . . . . . . . . . . 211
FORTRAN functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
I.3.1
Setup and input subroutines and functions . . . . . . . . . . . . . . 214
I.3.2
Lattice generation subroutines and functions . . . . . . . . . . . . 235
I.3.3
Timing routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
I.3.4
Miscellaneous subroutines and functions (sorting, Gaussian, scaling, and periodicity) . . . . . . . . . . . . . . . . . . . . . . . . . 252
I.3.5
Constraints and temperature control subroutines . . . . . . . . . . . 256
I.3.6
Neighbor list subroutines . . . . . . . . . . . . . . . . . . . . . . . 265
I.3.7
Molecular statics subroutines and functions . . . . . . . . . . . . . 278
I.3.8
Molecular dynamics subroutines . . . . . . . . . . . . . . . . . . . 283
I.3.9
Output subroutine . . . . . . . . . . . . . . . . . . . . . . . . . . 296
I.3.10 Electron counting subroutines and functions . . . . . . . . . . . . . 298
I.3.11 Potential energy subroutines . . . . . . . . . . . . . . . . . . . . . 324
I.3.12 Stillinger-Weber potential subroutines . . . . . . . . . . . . . . . . 329
I.3.13 Tersoff potential subroutines . . . . . . . . . . . . . . . . . . . . . 333
I.3.14 Bond-order potential subroutines . . . . . . . . . . . . . . . . . . . 338
J Molecular Dynamics Code: Potential Parameters
J.1
J.2
376
Stillinger-Weber potential . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
J.1.1
Parameter code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376
J.1.2
Include file (inc.sw) . . . . . . . . . . . . . . . . . . . . . . . . . 379
Tersoff potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
xii
J.2.1
Parameter code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
J.2.2
Include file (inc.tersoff) . . . . . . . . . . . . . . . . . . . . . . . 384
J.3
Bond-order potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
J.4
Electron counting potential . . . . . . . . . . . . . . . . . . . . . . . . . . 390
J.4.1
Parameter code . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
J.4.2
Include file (inc.ec) . . . . . . . . . . . . . . . . . . . . . . . . . . 395
K Molecular Dynamics Code: Input Files
396
K.1 Input file (a.i) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
K.1.1 Brief tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
K.1.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
K.2 Restart file (r) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
L Molecular Dynamics Code: Output Analysis
409
L.1 Print and restart files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
L.2 Binary file and the cread program (cread.f90) . . . . . . . . . . . . . . . . 409
L.3 Include file (cread.h) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Bibliography
425
List of Figures
1.1
Schematic illustration of the molecular beam epitaxy of GaAs . . . . . . .
3
2.1
Molecular orbital theory as utilized by the BOP . . . . . . . . . . . . . . . 14
2.2
Computational cell for MD vapor deposition simulation . . . . . . . . . . . 21
3.1
Bulk crystalline atomic volume and cohesive energy properties as predicted
by the three empirical potentials . . . . . . . . . . . . . . . . . . . . . . . 28
3.2
Three region melt as predicted by TR-ANNK . . . . . . . . . . . . . . . . 37
3.3
Selected GaAs (001) surface reconstructions . . . . . . . . . . . . . . . . . 39
3.4
Low-energy surface structures predicted by the three empirical potentials . 41
3.5
As2 sticking ratio for the three empirical potentials . . . . . . . . . . . . . 43
3.6
Cutoff trends for GaAs as predicted by the three empirical potentials . . . . 51
4.1
As-grown GaAs films as predicted by the SW potential . . . . . . . . . . . 57
4.2
Crystalline order for the SW potential . . . . . . . . . . . . . . . . . . . . 58
4.3
Snapshots of the incorporation of As 2 into a gallium-rich surface using the
SW potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.4
Binding energy and distance above the surface during incorporation of As 2
into a gallium-rich (001) surface using the SW potential . . . . . . . . . . . 61
4.5
Snapshots of the incorporation of one atom from an arsenic dimer into a
gallium-rich surface using the SW potential . . . . . . . . . . . . . . . . . 62
xiii
xiv
4.6
Binding energy and distance above the surface during incorporation of one
of the atoms from an arsenic dimer into a gallium-rich (001) surface using
the SW potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.7
Point defect formation energies predicted by the SW potential . . . . . . . 66
4.8
Point defect concentrations as a function of temperature as predicted by the
SW potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.9
The formation of gallium vacancies observed in a time-series sequence using the SW potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.1
Suggested and observed GaAs (001) surface reconstructions . . . . . . . . 74
5.2
Surface free energy for the GaAs (001) surface reconstructions, as predicted by DFT and three empirical potentials . . . . . . . . . . . . . . . . . 80
5.3
The energy level diagram for a GaAs surface . . . . . . . . . . . . . . . . 86
6.1
A schematic representation of the hopping paths that sample the local atomic
configuration with the σ and π bond-orders of the BOP . . . . . . . . . . . 98
6.2
Four-body dihedral angle . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
6.3
GaAs, gallium, and arsenic bulk properties from experiments, DFT, and the
BOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
6.4
GaAs (001) surface free energies for select surface reconstructions as predicted by the BOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
6.5
GaAs (001) relative surface free energies predicted by DFT and the BOP+EC
calculations for selected surface reconstructions . . . . . . . . . . . . . . . 125
7.1
As-grown GaAs thin film structures after 10 ns of deposition at (a) 850 K
and (b) 1500 K using the BOP . . . . . . . . . . . . . . . . . . . . . . . . 133
xv
7.2
Arsenic composition of as-grown thin films as a function of As:Ga flux
ratio, R, and substrate temperature, T , using the BOP . . . . . . . . . . . . 134
7.3
The arsenic atomic fraction of thin films deposited at 850 K and 1500 K
using the BOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136
7.4
Binding dynamics (dimer binding energy and vertical position) of As 2 on a
gallium-terminated (1 × 2) surface at 900 K using the BOP . . . . . . . . . 140
7.5
Configurations of local atomic binding states for As 2 on a gallium-terminated
(1 × 2) surface using the BOP . . . . . . . . . . . . . . . . . . . . . . . . 142
7.6
The dimer binding state occupation probability distribution at 300 K, 900
K, and 1200 K during 104 ps of dimer/surface binding using the BOP . . . 144
7.7
A rapid As2 desorption event from an arsenic-terminated (2 × 1) surface at
500 K using the BOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
7.8
Adsorption of As2 onto the arsenic-terminated (2 × 1) surface at 500 K
using the BOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
7.9
The temperature dependence of the sticking ratio of an As2 vapor flux on (a)
a gallium-terminated (1 × 2) surface and (b) an arsenic-terminated (2 × 1)
surface using the BOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
7.10 Sticking ratio of As2 on the arsenic-terminated (2 ×1) surface as a function
of the initial orientation angle of the dimer using the BOP . . . . . . . . . . 156
8.1
Summary of (a) atomic volume, (b) cohesive energy, and (c) elastic constants for a variety of gallium, arsenic, and GaAs phases for DFT, SWAMG+, TR-ANNK, and the BOP. In panel (d) gallium-rich and arsenicrich defect formation energies in the zb GaAs lattice are shown . . . . . . . 159
xvi
8.2
Relative surface energy of the lowest-energy (001) GaAs surfaces as a function of the relative, normalized arsenic chemical potential for DFT, SWAMG+, TR-ANNK, and the BOP . . . . . . . . . . . . . . . . . . . . . . 162
A.1 Conversion of a hexagonal close-packed (hcp) unit cell into an orthorhombic conventional cell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
G.1 Bond energy and curvature versus equilibrium bond length curves representing the best fit of the GSP-based two-body functions for the BOP . . . . 198
I.1
Map of subroutines and functions for the MDvap96 FORTRAN code . . . 207
K.1 The computational cell used to simulate vapor deposition in the MDvap96
FORTRAN code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 397
List of Tables
2.1
Modeling hierarchy for epitaxial growth modeling . . . . . . . . . . . . . .
3.1
Gallium bulk elastic moduli data for the three empirical potentials, experi-
7
ments, and DFT calculations . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.2
Arsenic bulk elastic moduli data for the three empirical potentials, experiments, and DFT calculations . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3
GaAs zb elastic constants for the three empirical potentials, experiments,
and DFT calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
3.4
Defect formation energies for the three empirical potentials and DFT calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.5
Calculated melting temperatures of GaAs for the three empirical potentials
compared with experimental values . . . . . . . . . . . . . . . . . . . . . 36
3.6
Arsenic dimer and tetramer binding energies and spacing for experiments
and predicted by the three empirical potentials and DFT calculations . . . . 38
5.1
Predicted GaAs equilibrium properties for three empirical potential energy
functions and experimental data . . . . . . . . . . . . . . . . . . . . . . . 82
5.2
Nearest-neighbor equilibrium interatomic spacings for bulk phases and surface dimers from experiments and three empirical potentials . . . . . . . . 83
xvii
xviii
5.3
First principle third generation LMTO tight-binding parameters for GaAs
zb, gallium dc, and arsenic dc crystals . . . . . . . . . . . . . . . . . . . . 85
5.4
EC parameters for each empirical potential energy function . . . . . . . . . 90
5.5
EC adjustments to surface energy for three empirical potentials . . . . . . . 92
6.1
Bond-dependent BOP parameters for GaAs . . . . . . . . . . . . . . . . . 106
6.2
BOP angular parameters for GaAs . . . . . . . . . . . . . . . . . . . . . . 106
6.3
Gallium cluster properties from DFT and the BOP . . . . . . . . . . . . . . 108
6.4
Arsenic cluster properties from experiments, DFT, and the BOP . . . . . . 109
6.5
GaAs cluster properties from DFT and the BOP . . . . . . . . . . . . . . . 110
6.6
GaAs zb single crystal elastic constants as predicted by the BOP and DFT
calculations and observed in experiments . . . . . . . . . . . . . . . . . . 114
6.7
Summary of bulk properties for the GaAs system using the BOP . . . . . . 117
6.8
Point defect formation energies and structures predicted by GaAs BOP and
DFT calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
8.1
The desorption activation barrier and pre-exponential factor as fitted to an
Arrhenius-based time-dependent kinetic model using the BOP, SW-AMG+,
and TR-ANNK potentials and experimental data . . . . . . . . . . . . . . . 162
A.1 The fourteen Bravais lattice parallelepipeds . . . . . . . . . . . . . . . . . 174
A.2 Crystal system notation used in the Pearson and space group systems . . . . 175
A.3 Elemental crystal structures within an orthonormal conventional cell . . . . 178
A.4 Binary crystal structures depicted within an orthonormal conventional cell . 179
C.1 Summary of potential energy functions proposed for the GaAs system . . . 186
D.1 The SW-WS and SW-AMG+ parameter values used in the SW potential
form for the GaAs system . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
xix
E.1 The TR-ANNK parameter values used in the Tersoff potential format for
the GaAs system . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
H.1 Expressions and quantities necessary for the calculation of the electron
counting potential . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
H.2 Electron counting potential parameters . . . . . . . . . . . . . . . . . . . . 205
I.1
Groups of subroutines and functions in the MDvap96 FORTRAN code . . 208
Chapter 1
Introduction
1.1 GaAs applications and devices
GaAs microelectronic devices are widely used in defense and consumer technologies. They
represent a market of US$2.9 billion in 2004 [1] with a projected growth of 54% between
2003 and 2008 [2]. GaAs heterostructures are used to create light-emitting diodes, lasers,
infrared detectors, and solar cells [3]. GaAs-based metal semiconductor field effect transistors (MESFETs) are one of the most widely utilized devices in this field. They are an
integral part of cellular phones and wireless communication products, direct broadcasting
systems, global positioning systems, fiber optic drivers and receivers, and collision avoidance and phased array radars [4]. GaAs thin films doped with transition metals, such as
manganese, have recently attracted considerable interest as ferromagnetic semiconductors
for controlled spin injection applications [5]. These thin film devices are manufactured by
vapor deposition methods. The processing conditions used to grow these thin films significantly influence defect concentrations [6], crystallinity [7], and growth stresses within the
films [8] and therefore device performance.
GaAs and its methods of growth from the vapor phase are very well-studied [9]. Never1
CHAPTER 1. INTRODUCTION
2
theless, a better understanding of the atomic-scale assembly mechanisms that occur during
vapor deposition is paramount to the development of processing techniques that can better
control residual stress formation, growth modes, surface reconstruction, surface roughness,
and defect populations [7].
In this dissertation, an atomistic modeling and simulation approach is used to study the
atomic assembly mechanisms during homoepitaxial GaAs vapor deposition as a function
of processing conditions. Interatomic potentials for modeling the Ga-Ga, As-As, and GaAs interactions are evaluated and a new interatomic potential energy function is developed.
This work, then, seeks to identify the fundamental mechanisms of atomistic assembly on
the GaAs (001) surface and the macroscopic variables that control them.
1.2 GaAs vapor deposition
GaAs thin films can be grown by a variety of physical vapor deposition methods [5, 7],
including molecular beam epitaxy (MBE), digital alloy deposition with annealing [10], and
pulsed-laser melting [11]. All proceed under ultra-high vacuum conditions. The major
differences between the methods are the chemical form in which the gallium and arsenic
species arrive at the growth surface and the growth surface’s atomic structure. The surface
atomic structure depends in turn on the growth temperature and the relative concentration
of the vapor phase species [12, 13].
GaAs thin films are typically grown for device applications with MBE [7], as first
demonstrated by Cho [14]. MBE is essentially a ballistic vapor deposition technique. However, even at high deposition temperatures and low deposition rates, the MBE growth of
GaAs alloys is a far-from-equilibrium process, complicating its analysis [15, 16].
Examination of a schematic picture of GaAs MBE growth is shown in Fig. 1.1. In
MBE, gas or solid effusion cells produce a directed flux toward a substrate where growth
CHAPTER 1. INTRODUCTION
3
Figure 1.1: Schematic illustration of the molecular beam epitaxy of GaAs. Effusion cells
direct evaporated elemental gallium and molecular arsenic to the rotating substrate.
occurs. During vapor deposition of GaAs thin films, arsenic and gallium are co-deposited
and self-assemble on the film surface to form GaAs. The incident gallium flux is generated
by heating gallium to 1150–1250 K in a Knudsen cell, or K-cell. The resulting flux is
roughly 1–10 × 1014 cm−2 sec−1 (equivalent to a pressure of 5 × 10−5 Pa). The arsenic
is deposited onto the GaAs surface in either dimer (As 2 ) or tetramer (As4 ) form [17]. The
tetramer structure is the form most often produced in a K-cell. The arsenic flux from
such a cell is generally between 1015 atoms cm−2 sec−1 and 1016 atoms cm−2 sec−1 for
effusion temperatures of 600–640 K. The dimer form is created in a cracking zone within
which the tetramer is broken into dimers [18]. The substrate is rotated during deposition
to reduce the effect of non-uniform spatial distribution of gallium and arsenic fluxes. The
cell temperature controls both the flux and the kinetic energy of the depositing species. The
experimental growth rate lies in the 0.03–3.00 nm/sec range and is strongly influenced by
the gallium flux [17].
Historically, the study of gallium and arsenic incorporation dynamics has largely fo-
CHAPTER 1. INTRODUCTION
4
cused on highly crystalline high-temperature (HT) epitaxially grown GaAs with a (001)
surface orientation. HT MBE films are most commonly grown between 855 K and 875 K,
but the region can extend from 775 K to 915 K [17]. Under these conditions, the growth
rate is determined by the gallium flux, and stoichiometric films can only be grown using
an As:Ga flux ratio much greater than unity [19, 20]. Furthermore, it was determined that
the sticking ratio of As2 was zero in the absence of an exposed gallium atom population on
the surface [21]. It was also observed that nearly 100% of gallium atoms stuck to the surface for temperatures below 915 K [22]. Oscillations in the reflection high energy electron
diffraction (RHEED) patterns in conjunction with scanning tunneling microscope (STM)
images helped identify the range of processing conditions that allowed two-dimensional
(2D) layer-by-layer growth via 2D nucleation and step propagation [23].
Under arsenic-rich conditions, the 2D layer-by-layer growth continued until the temperature was reduced below 773 K, where RHEED oscillations stopped [24]. The electrical and optical characteristics were adversely affected as temperatures dropped to 725
K [25]. As the temperature was reduced further into low-temperature (LT) MBE range,
highly defective deposited structures emerged. These trends correspond to excess arsenic
incorporation in the as-grown GaAs films. The temperature dependence of the As 2 sticking
ratio was observed to strongly increase as temperature was lowered from 853 K to 673 K
[26], which helps explain the excess arsenic incorporation. The LT growth domain, with
temperatures of 500–625 K, was initially studied with similar arsenic overpressures used
under HT MBE [24]. However, experimental observations indicate that the arsenic concentration increased as the temperature was decreased [24]. At 525 K, for example, an excess
of 1–1.5% of arsenic was trapped in the as-grown films [27].
LT growth conditions are often used when a large concentration of dopants needs to
be added to GaAs [28]. Low temperatures [29] enable kinetic trapping of dopants and impede the clustering and surface segregation that normally follows when doped materials
CHAPTER 1. INTRODUCTION
5
are processed at a high temperature [28]. This is especially relevant to the growth of some
spintronic materials, such as manganese-doped GaAs alloys, where the clustering of manganese atoms in Ga1−x Mnx As alloys can destroy the ferromagnetic properties of interest
[5, 30, 31, 29]. Under LT MBE conditions, stoichiometric GaAs can only be grown when
the As:Ga ratio of the vapor flux is near unity [25, 32]. If high As:Ga flux ratios are used,
the arsenic concentration in the sample becomes elevated [33]. Therefore, the upper temperature limit of doped GaAs films is set to restrict dopant migration and the lower limit is
set to avoid the onset of amorphous film growth under an equiatomic flux [34].
This amorphous/crystalline transition between growth modes is a function of the deposition rate, temperature, and As:Ga flux ratio [17, 24]. Experimentally, the transition is
assessed from estimates of the maximum thickness that an epitaxial film can be grown—
the critical epitaxial thickness (yepi ) [34]. Using such an approach, epitaxial growth under
MBE growth rates has been shown to require a growth temperature of around 480 K [34].
Like crystallinity, the concentration of defects is also strongly dependent upon the deposition rate, growth temperature, and flux composition [6, 25, 34]. Experimentally, defect
concentrations are below 1014 cm−3 for high growth temperatures, while defect concentrations are on the order of 1018 –1020 cm−3 for low growth temperatures around 580 K
[25].
Chapter 2
Modeling Interatomic Bonding
2.1 The multiscale approximations of materials modeling
Simulation of molecular assembly during vapor deposition requires accurate modeling of
the dynamic formation and breaking of bonds. The exploration of these often complex
processes requires significant computation depending on the level of detail that needs to be
known about the system and the complexity of the bonds formed and broken.
Quantum theory has provided a fundamental understanding of a wide range of atomic
phenomena, including predictions of the energy levels of orbitals, covalent bonds, and the
mobility of electrons in metals and insulators [35]. However, the exact analytical treatment
of the Schrödinger equation is only possible in a few simple situations [35]. Numerical
treatments extend atomic quantum mechanical calculations to molecular systems with a
few atoms. The calculation of solid-state system properties can be performed only if a
large number of approximations to quantum theory are applied. In choosing the level of
approximation, the balance of model accuracy versus calculation cost must be carefully
considered. For example, only atomic spatial resolution is needed to understand the kinetic
processes on surfaces during thin film growth. However, calculation of carrier density for
6
CHAPTER 2. MODELING INTERATOMIC BONDING
7
Table 2.1: A hierarchy of approximations that can be used to simulate different aspects of
vapor deposition. Methods that can simulate interaction forces between nuclei or atoms
are marked with “MD” for molecular dynamics. The four categories involve the explicit
treatment of: nuclei and electrons (Electronic), atoms (Atomic), statistical events (Statistical), and surface profile evolution during growth (Continuum). Computational expense
decreases down the table, which represents an increasing level of approximation.
Theory/Method
Category
Major approximations
Many-body quantum
Electronic
Exact (within limits of theory)
Density functional
Elect./MD
Effective one-electron model and
non-local potential
Tight-binding
Elect./MD
Overlap and Hamiltonian parameters
Bond-order potential
Atomic/MD Coarse-grained electronic structure
Empirical potentials
Atomic/MD Empirical interactions
Kinetic Monte Carlo
Statistical
Thermally-activated surface diffusion
Partial differential equations Continuum Continuous media (no atomic resolution)
different surface structures requires the utilization of electronic structure.
Modeling approaches that govern interaction forces between atoms can be implemented
via molecular dynamics (MD), which solves the equations of motion for the nuclei as a
function of time [36]. A hierarchy of modeling approaches spanning quantum, atomistic,
statistical, and continuum methods are summarized in Table 2.1. The computational expense of a given modeling method often is a dominant factor in the selection of the method
when dynamic processes are considered.
The epitaxial growth of semiconductors involves many timescales [37]. The collision of
adatoms with the substrate surface occurs with timescales on the order of 10 −13 sec. These
collisions result in either initial sticking or reflection of the adatoms or molecules. Local
surface relaxation takes place on the order of 10−12 sec after the collision, while surface
diffusion, desorption, and other reactions take place with timescales that extend from 10 −12
to 10−6 sec. The time between the introduction of deposited atoms and molecules can be
(depending on the deposition rate) several magnitudes longer than that of diffusion to step
edges or ledges. This means that substantial adatom migration can occur between adatom
CHAPTER 2. MODELING INTERATOMIC BONDING
8
arrival and incorporation or desorption [38].
With these wide ranges of time and length, modeling the complete range of dynamics
of the atomic assembly processes with any one modeling method is difficult to impossible.
Various modeling and simulation techniques have been used to understand and improve
thin film deposition processes. A brief survey of methods that can be used to study vapor
deposition is presented in the following sections.
2.2 Electronic structure methods
2.2.1 Density functional theory
Many-body quantum mechanics can be approximated with single-electron ab initio methods. These methods have no free parameters and contain electronic structure information.
There are various first principle methods for calculating the ground-state electronic structure of many-body condensed matter systems. Density functional theory (DFT), which
rests on the first principle theory of Kohn and Sham [39, 40], is the leading method for
simplifying electron-electron interaction in solid-state systems. The interactions within the
gas of electrons are accounted for by exchange interactions between electrons of the same
spin and correlated movement of electrons of different spin. DFT exactly maps the strongly
interacting electron gas onto a single electron moving in an effective non-local potential.
Thus, the Hamiltonian and the effective potential can in principle be solved to find the
system energy.
The non-local potential can be approximated locally by assuming a homogeneous electron gas with constant density. This is called the local density approximation (LDA)
[35, 40]. The success of the LDA and the spin analog local spin density approximation
(LSDA) has exceeded even the expectations of its proposers, Kohn and Sham [40], in its
CHAPTER 2. MODELING INTERATOMIC BONDING
9
ability to describe the ground-state properties across a large range of material systems [41].
However, the method is not foolproof. The predicted binding energies and the differences
between polymorphs of compounds can in some instances deviate from experimental values significantly [41].
Improvements to LDA are continuously being developed. One widely-used improvement is the generalized gradient approximation (GGA), which takes the magnitude and
gradient of the local electron density into the approximation [42]. Another method approximates the interacting electron gas with a pseudopotential defined for the valence electrons
and the ion core. The pseudopotential introduces material-specific parameters into the ab
initio approach.
In the pseudopotential approximation, the strong electron-ion potential is replaced with
a much weaker pseudopotential that describes the most important features of a valence
electron moving through a solid [35]. This allows the Schrödinger equation to be solved
more quickly. The pseudopotential method can have limitations when applied to large
systems of first row elements and 3d-transition metals [36]. However, recent advances
have extended the range of application to some noble atoms, transition metals, first row
elements, and oxygen, but care must always be taken in these regions [43]. The deduction
of the pseudopotentials is not a well-defined science and this must be kept in mind when
the utility of the approach for a specific problem is being evaluated.
DFT calculations are most often used in an energy minimization or molecular statics
(MS) approach. MS methods are used to calculate material properties at 0 K temperature.
The material properties that can be estimated include: cohesive energy, atomic volume,
and elastic constants of bulk phases [44, 45]; cluster binding energies and structures [46];
surface energy of (001) surface reconstructions [47]; defect formation energies [48, 49];
and surface bonding energies of vapor molecules on reconstructed surfaces [50]. The calculation of each of these properties requires that atoms in the computational cell be moved
CHAPTER 2. MODELING INTERATOMIC BONDING
10
and the electronic ground state be determined until the system energy is minimized.
In general, DFT can be expected to calculate the total energy of a given system to within
a few percent of the real value, while the lattice parameters are good to within 1–5% and
cohesive energies1 are reliable to within 10%. Even with improved approximations that
increase speed, the calculation of properties of interest requires significant computational
costs that are proportional to the cube of the number of electrons [35].
2.2.2 Tight binding
The tight binding (TB) formalism further approximates many-body quantum mechanics
and treats electrons as tightly bound to their respective atoms. As the atoms bond, an overlap correction is used, which becomes more and more significant as electronic states from
neighboring atoms increasingly overlap. Like DFT, the TB formalism includes the electron
degrees of freedom and can be deduced from a Kohn-Sham Hamiltonian. Pioneering work
in this method was done by Slater and Koster [51].
TB is based on the computation of parameters of the Hamiltonian (simplified from
DFT) and overlap matrix elements. The TB Hamiltonian consists of on-site terms and
hopping terms. On-site terms include the atomic contribution, crystal and molecular fields
from neighboring atoms, and some exchange-correlation effects. Hopping terms, on the
other hand, make up the attractive band energy. Hopping integrals are related to the probability that an electron will hop from one orbital to another [52]. Hopping terms depend
on nearest-neighbor distance and types of orbitals and include kinetic and potential energy
from ions and other electrons. The hopping, or bond, integrals approximate the hopping
matrix elements with an integral that depends only on the interactions between two atoms
1
Cohesive energy is a common measure of energy per atom in a bulk crystal. It is the difference between
the energy per atom of free atoms (un-bonded) and the energy per atom of the same atoms bonded in a crystal.
It is a negative quantity [35].
CHAPTER 2. MODELING INTERATOMIC BONDING
11
with the vector, rij . This is called a two-center bond integral. Additionally, a short-range,
two-body repulsive potential is added to approximate the interactions between the ion-cores
and a correction term for the electron Coulomb repulsion [36]. In many TB calculations,
the dependence of atomic separation distances is handled by a two-body function designed
by Goodwin, Skinner, and Pettifor [53] and later refined to include smooth, short-range
cutoffs [54]. Alternatively, environmentally-dependent terms can be used to account for
local atomic structure in the bond length dependent terms [55].
The TB parameters for on-site and hopping terms, as well as the parameters for GSP
radial terms, are calculated from ab initio data or obtained from empirical observations.
Usually, the band structure is fit via ab initio parametrization, while the repulsive potential
is parametrized for a blend of accuracy and transferability by fitting the total energy curve
for a number of structures [52]. Developing a parameter set that is sufficiently transferable
between different bonding environments is a significant issue and must be addressed in all
TB parametrizations.
To improve calculation efficiency, an orthogonal basis set can be assumed [52]. The orthogonal TB approximation has been shown to sufficiently explain structural trends across
the periodic table [56]. With the assumption of orthogonal basis sets and two-center approximations, TB can tackle clusters and periodic systems with hundreds to thousands of
atoms. While systems larger than ab initio calculations can be simulated, it is still quite limiting. Eigenvalues and eigenvectors are solved using matrix diagonalization methods with
a computational efficiency that scales with the cube of the number of atoms; thus, finding
the eigenvalues and eigenvectors of the Hamiltonian is time-intensive [36]. Many methods
have been explored to improve this computational efficiency so that it scales directly with
the number of atoms [36, 52].
CHAPTER 2. MODELING INTERATOMIC BONDING
12
2.3 Classical interatomic potential energy functions
To extend the size and scope of the simulations, further approximations to the many-body
system must be used. One of the most time-consuming calculations in quantum mechanics
is finding the electronic ground state for a given structure. These degrees of freedom can be
handled in an approximate way with classical interatomic potentials. The quality of this approximation is dependent upon the functional form of the potential and the parametrization
of the model parameters. The resulting potential energy functions, or simply potentials, are
deterministic and are defined by interatomic interactions.
The interatomic potentials most widely used in the past were written down empirically.
Scores of material-specific potential formats have been created based on empirical trends
in the material systems of interest; however, only the most common ones are mentioned
here. The close-packed metals were initially modeled with a simple two-body pair potential, such as Lennard-Jones [57, 58], which includes a simplified attractive bonding term
and a repulsive term. A spherically symmetric many-body potential, such as the embedded atom method (EAM) [59, 60, 61], provides a much improved approximation of closepacked systems. Metal oxides require the effects of charge transfer to be introduced into
the potential, and a recent formalism that combines the EAM approach with a charge transfer ionic potential has been proposed for the study of a range of metal oxide compounds
[62]. Highly polar systems are approximated reasonably well with various forms of the
rigid-ion [63] or shell models [64, 65]. The group IV semiconductors (covalently-bonded
materials) are more complex because they require angular-dependent potentials. StillingerWeber and Tersoff potentials have been widely used for the study of the bulk properties
of these materials [66, 67, 68, 69, 70]. Many interatomic potentials and parametrizations have also been proposed to model compound semiconductor interactions. Potentials
parametrized for GaAs include Tersoff (empirical) [71, 72, 73, 74], Stillinger-Weber (em-
CHAPTER 2. MODELING INTERATOMIC BONDING
13
pirical) [75, 76, 77, 78, 79, 80], Axilrod-Teller (empirical) [81, 82], Ito-Khor-Das Sarma
(empirical) [83, 84, 85, 86], and a second moment bond-order potential with tight-binding
parameters (derived in conjunction with David Pettifor) [87].
Moving beyond these empirical potentials, a physically justified bond-order potential
(BOP) formalism was developed by David Pettifor and coworkers. The functional form
was derived from orthogonal TB by Pettifor et al. [88, 89, 90, 91]. The formalism includes
the equations of the bond order for both σ and π bonding [90], which reflects the ubiquitous
single, double, and triple bond behavior of chemistry. 2 In the tetrahedral four-fold diamond
crystal structure, the strong single covalent bonds (σ bonds) arise from overlapping sp 3 hybrids. The weaker resonant secondary bonds (π bonds) arise from overlapping p z orbitals,
see Fig. 2.1.
The BOP approach essentially coarse grains and links the electronic structure inherent
in the TB approximation to the local atomic configuration around each bond (i.e., atomcentered moments and bond-centered interference hopping paths). The BOP format is
an area of active research [92, 93] (and references within). The fact that the format is
derived from sound physical principles should significantly impact the area of interatomic
potential development by providing innovative physical insights into the functional form
development.
Each interatomic potential format, whether BOP or empirically determined, must be
fitted to material properties. The performance of each potential and parametrization must
be fully evaluated to identify the region in which it performs well. As the level of approximation extends further from many-body quantum mechanics, more care must be taken
in making sure the potential does not produce nonsense in the area where the model is
to be applied. When an adequate potential format and parametrization are developed, the
2
The bond order is the number of electrons in the anti-bonding state minus the number of electrons in the
bonding state and is analogous to the strength of a given bond.
CHAPTER 2. MODELING INTERATOMIC BONDING
orbitals
14
bonding/anti-bonding
I bonding
or I bonding
or or I bonding
F bonding
Figure 2.1: Bonding and anti-bonding orbitals are shown for primary, σ, and secondary, π,
bonds.
CHAPTER 2. MODELING INTERATOMIC BONDING
15
simulated timescales extend well beyond those of DFT or TB.
2.4 Molecular assembly modeling methods
2.4.1 Molecular dynamics
The energies and forces between atoms (and electrons) can be defined by DFT, TB, or
interatomic potential methods. Each of these methods can be implemented into various
MD schemes to simulate the molecular assembly process during GaAs thin film growth.
In MD, kinetic and potential energy terms are written in the Lagrangian form [94]. The
kinetic term is a function of atom velocity and the potential energy term is a function of
position (atomic and, in the case of DFT or TB, electronic). The equations of motion are
obtained by integrating the Lagrangian as a function of time. Various MD algorithms allow
for variation of temperature, volume, pressure, and the number of particles [95, 96]. In
principle, MD simulation of surface growth allows the study of atomic assembly, surface
and interface morphology, and modification of already-assembled structures as a function
of temperature and vapor flux properties, such as flux ratios of different species, adatom
energy, and adatom incident angle; see for example Ref. [97].
The majority of DFT calculations are performed at zero pressure and temperature to
calculate equilibrium energies and structure [44, 47, 48, 49, 50, 98, 99, 100]. However, Car
and Parinello [101] transformed quantum-mechanical calculations with their ab initio MD
when used with pseudopotentials [102]. They proposed a novel approach to integrate the
Lagrangian for both electronic wave-functions and atomic coordinates. Hence, the use of
pseudopotentials allows an expanded range of calculations: total energy and structure for
larger systems, non-zero temperature simulations, and tractable ab initio quantum mechanics simulations of crystals, surfaces, and clusters. The newer and faster pseudopotentials
CHAPTER 2. MODELING INTERATOMIC BONDING
16
allow for more efficient ab initio MD calculations [35, 103]. In practice, ab initio MD can
simulate hundreds of atoms for 10 ps, depending on the computing resources. Very short ab
initio MD calculations can be performed at finite temperatures, which can, at best, model
single collisions between a vapor molecule and the surface.
Forces for TB are calculated in a straightforward manner via the Hellmann-Feynman
theorem [52], which takes derivatives with respect to explicit atomic coordinates. The
resulting equations of motion can be numerically calculated using the Verlet algorithm
[36]. Thus, TB-MD can be performed over time at finite temperatures [104, 105]. Due
to the orthogonal basis sets and two-center approximations, TB can tackle clusters and
periodic systems with hundreds to thousands of atoms. Nevertheless, the computation of
forces on the particles with their respective electrons in TB is time-consuming [36].
MD simulations that use interatomic potentials provide a microscopic approach for
studying atomic assembly at nanometer length and nanosecond timescales. The approach
is very similar to the MD simulations done using ab initio and TB methods, except the
steps relating to charge and electronic wave-functions are omitted. The Lagrangian system
of equations are usually numerically integrated using a Nordsieck fifth-order predictorcorrector algorithm [106, 107] or a Verlet algorithm to solve the particle dynamics [58,
108, 109]. The classical equations of motion for N atoms are thus solved at femtosecond
time steps. The number of atoms, N, typically ranges from thousands to tens of thousands,
or even millions, of atoms [110, 111].
As was discussed earlier, surface reactions take on the order of pico- to microseconds
to occur [38]. This time span can be reached by the MD method with a classical potential.
Therefore, this method can be potentially used to explore the atomic assembly and surface
reaction events of atoms and molecules. While the longer MD simulation times can be
reached with classical potentials (10–1000 ns), this is still many orders of magnitude less
than the timescales of real MBE growth (10–100 s). This issue is currently addressed by
CHAPTER 2. MODELING INTERATOMIC BONDING
17
using an accelerated rate of deposition and interpreting the results accordingly.
2.4.2 Statistical approach to modeling surface dynamics
A large number of particles on the order of Avogadro’s number (∼ 1023 atoms) are difficult
to simulate even when they obey the simple equations of motion of a gas. Mathematical
expressions can be written down, but the sheer number of equations makes exact solutions
impossible. This is where statistical mechanics methods become very useful for understanding macroscopic properties. Average properties of gases, solids, or any large system
are calculated very efficiently by treating the problem in a probabilistic fashion rather than
attempting to treat microscopic molecular motion from a deterministic perspective. Exact
solutions are not sought. Instead, the probability of a system being in one state or another
is studied. The expectation value for a given system property is calculated as an average
property over a large number of identical systems in statistically distributed states or as a
time average of the property when the system has passed through a representative selection
of states.
One very useful method for handling these calculations is Monte Carlo simulation,
which rests on statistical mechanical treatment of condensed matter systems with regular
lattice structures [112]. A similar kinetic Monte Carlo (kMC) [112] method can be used
to model thermally-activated surface diffusion on crystalline surfaces in epitaxial growth
of metals and semiconductors at realistic temperatures. The kMC approach does not include the explicit details of interatomic interactions but requires the calculation of effective
kinetic parameters prior to use in the model [37]. The method permits larger length scale
and longer time simulations than MD simulations, which makes it easier to compare simulated data to experiments. The layer-by-layer growth via two-dimensional (2D) nucleation
and step propagation have been accurately modeled by kMC simulations that essentially
CHAPTER 2. MODELING INTERATOMIC BONDING
18
capture the thermally activated surface diffusion that is key to the understanding of island
density and size distributions [113, 114, 115].
Although kMC has proven a very useful tool for studying surface diffusion-based growth
kinetics [113], it suffers from several limitations. For instance, the kMC simulation of MBE
on GaAs (001) surfaces is not as straightforward as it would be for metals, because the
GaAs (001) surface usually reconstructs and also produces strain fields around islands. 3
In addition, the kMC method requires prior knowledge of the dominant diffusion paths
and their energy barriers [113, 114, 117, 118, 119]. This information is difficult to completely determine. For simplification and computational speed, only a few diffusion paths
are identified and their diffusion barriers calculated. The activation energy barriers for selected diffusion paths are calculated using methods such as the DFT+kMC hybrid model
[115, 120, 121, 122]. Furthermore, the restriction of the Ising model approach on the choice
of a virtual lattice artificially precludes the formation of lattice modifying defects, dislocations, and grain boundaries during the simulations [112]. Thus, kMC simulations sidestep
growth stress effects and the large-strain mismatch phenomena that accompany the growth
of heteroepitaxial systems. Environmental vibration effects and collision information are
also lost in the coarse graining of lattice vibrations. Hence, this approximate approach may
be best utilized when exploring processes governed entirely by surface diffusion.
2.4.3 Continuum methods for growth front simulation
Surface growth through atomic deposition can be modeled with varying degrees of accuracy by using both linear and non-linear terms in partial differential equations [123, 124].
3
These issues can be treated in principle within kMC, even though it is necessary that kMC be performed
on a strict lattice in the interest of computational speed. One approach for modeling a strain field is to bias
the diffusion energy barrier in the region surrounding an island. This gives preferential jumping either away
or toward the island depending on the bias being studied. One example of such a system was used in a study
of a periodically strained surface [116].
CHAPTER 2. MODELING INTERATOMIC BONDING
19
Local physical processes, such as nearest-neighbor relaxation, desorption, diffusive noise,
and short-range diffusion, are included in the model [125]. Continuum approaches can
not be applied at high temperatures because interface roughness oscillates with time from
perfectly flat to rough according to RHEED measurements [123]. Instead, when the temperature is lowered, the surfaces become rough, which is where continuum theories apply.
The lack of atomic-scale resolution precludes this method from helping develop nanoscale
multilayer devices, which are on the scale of atoms in width.
Another continuum method that has better atomistic resolution of epitaxial growth is
the level set model, which describes the creation and subsequent motion of island boundaries [126, 127, 128]. Level set models have discrete atomic layers in the growth direction, but the boundary of the layers or islands in the lateral directions is continuous and
uses continuum growth equations to govern the boundary dynamics (i.e., island nucleation,
evaporation, and mergers). Material-specific properties for compound semiconductors can
be included in the model; however, the method has currently only been applied to metals.
The island growth behavior of GaAs is significantly more complex due to the propensity
to reconstruct the surface. Thus, the level set method is also not of interest for the study of
the atomistic scale assembly phenomena of GaAs in its current state of maturity.
2.5 Selecting a simulation approach
The predictive process modeling of vapor deposition can play a significant role in materials
development. In particular, modeling allows for detailed exploration of a wide range of processing conditions, even those that are not accessible with currently available experimental
settings. It is envisioned that simulations will give insight for improving the processing
methods for desired GaAs-based device systems.
The goal of this dissertation is to understand the dynamics of molecular assembly in ho-
CHAPTER 2. MODELING INTERATOMIC BONDING
20
moepitaxial GaAs. Of the many options for modeling these processes, classical MD, with
well-defined interatomic potentials, appears to be the most useful. It allows for the furthest
timescale view into the vapor deposition process while keeping full dynamic motion and
atomistic resolution. In addition, the femtosecond time-scale and ångstrom length-scale
resolution afforded by MD provides a great deal of information about surface structures
and defects [129].
The validity of the results is highly dependent upon the fidelity with which interatomic
forces are modeled by the potential. The predictive capacity of each potential must be
fully probed to know its strengths and weaknesses. Therefore, providing a potential can
be developed that is sufficiently reliable, the classical MD approach should yield the most
useful information in regard to atomic assembly mechanisms.
2.6 Molecular dynamics methods for vapor deposition
Within this dissertation, MD simulations were performed for the GaAs system using the
interatomic potentials available in literature and that were newly derived for this work. The
FORTRAN code for simulation of MD and the energy minimization calculations (molecular statics) is found in Appendix I. The FORTRAN code for the interatomic potential formats utilized in this work can be found in Sections I.3.12, I.3.13, and I.3.14. The potentialspecific input files are generated by programs recorded in Appendix J. A brief tutorial and
examples of the input file formats are included in Appendix K. The code used to analyze
the binary output file generated by the FORTRAN code is attached in Appendix L.
The equations of motion were numerically solved at femtosecond time steps using the
Nordsieck predictor corrector algorithm [107]. MD calculations were used to simulate both
vapor deposition and single impact dynamics. An example initial substrate with periodic
boundary conditions is shown in Fig. 2.2. In this image, an arsenic-terminated β(2 × 4)
CHAPTER 2. MODELING INTERATOMIC BONDING
φ
-E
Free surface
Fixed
Temp.
control*
Free
layers
θ
21
*Width of region is proportional to the number of atoms deposited
Figure 2.2: The periodic computational cell for MD simulation of vapor deposition is
shown for the GaAs zinc blende crystal structure. Periodic boundary conditions are applied in the [110] and [1̄10] directions while a free surface is present in the [001] direction.
Atoms or dimers are deposited on the surface with an incident angle, θ, and initial kinetic
energy, Ei . Temperature control is initially applied to four layers. This thermostated region
grows proportionally to the number of atoms added during vapor deposition. A region of
fixed atoms approximates the bulk in epitaxial growth.
CHAPTER 2. MODELING INTERATOMIC BONDING
22
surface reconstruction with 75% coverage is shown [13]. The initial substrate measures
11.3 Å thick and are divided into three regions: the bottom two layers were fixed during
simulation to mimic the bulk nature of the substrate, the next four layers were thermally
controlled, and the remaining top layers were unconstrained.
During vapor condensation on a growth surface, the latent heat release, and to a lesser
extent the species kinetic energy, is partitioned into the vibrational modes of the lattice.
This excess energy causes an increase in surface temperature. To avoid possible unrealistic
overheating due to an accelerated vapor flux that has to be used in simulations, the first
four substrate layers above the fixed layer were thermally controlled via a Nosé-Hoover
thermostat algorithm [96]. In this approach, a dragging force is applied to each atom.
The force was proportional to (Tactual − Tgoal ) /q, where Tactual is the actual temperature
of the thermostated region, Tgoal is the desired temperature of the system, and q is the
drag coefficient (which is a function of the time step, desired temperature, and the mass of
the atom). As the system evolved over time, the thickness of the temperature-controlled
region grew proportionally to the number of atoms added to the thin film through vapor
deposition so that a near constant distance between the surface and the thermostated region
was maintained.
The small computational cell, shown above with a free (001) surface plane, utilizes
periodic boundary conditions, see Appendix A. This means that the supercell of atomic
positions is copied periodically in two (surface properties) or three (bulk properties) dimensions, thus eliminating edge effects in those directions. This approach can speed up dynamics simulation of bulk and surface structures by reducing the number of atoms needed in
the calculation. The size of the supercell must be carefully selected so as to not adversely
affect the properties or the computational efficiency by being too small or too large, respectively. Using this method, supercells on the order of 10 2 –104 atoms can lead to calculation
of solid, liquid, and surface properties. This supercell approach will be used throughout
CHAPTER 2. MODELING INTERATOMIC BONDING
23
this dissertation for the calculation of materials properties, see Appendix B.
During simulated vapor deposition, an atom or dimer is added to the system either once
(single impact dynamics calculations) or repeatedly (vapor deposition growth). A single
atom or dimer with a random position and random orientation (dimer) over the surface was
initially injected to the surface with a translational kinetic energy and an incident direction
normal to the surface. Arsenic dimers were given an average internal vibrational kinetic
energy with no angular momentum. The vibrational energy given to the arsenic dimers
was created by statistically stretching the dimer length around its equilibrium value. The
specific kinetic and vibrational energies are detailed within each chapter.
During simulated thin film growth, a gallium atom or arsenic dimer was added roughly
every 14 ps. At experimental growth rates, the time between impacts is roughly ≥ 10 ms
for a similar sample size. Therefore, atom migration after adatom impacts was significantly
constrained for our MD simulations. As a consequence, higher simulation temperatures
were required to approximately recover the atomic mobility of the equivalent experimental
system.
Chapter 3
Assessments of Empirical Interatomic
Potentials1
3.1 Introduction
The validity of molecular dynamics (MD) simulations is largely determined by the potential
energy function used to define interatomic interactions. Simulating the atomic assembly of
a thin film using MD methods is one of the most demanding uses of interatomic potentials.
The potentials need to be carefully fitted to ab initio and experimental data in such a way
that the bulk structures are modeled sufficiently well so that the lattice cohesive energy,
elastic constants, and defect energetics are well approximated. They must also correctly
predict the energetics of the highly defective surface during the growth processes. An
assessment of the many proposed GaAs potentials (see Appendix C) suggests that three
potentials offer the most promise for simulating the vapor deposition of GaAs. The Tersoff
potential [70, 131, 132] as parametrized by Albe et al. (TR-ANNK) [71] and the StillingerWeber (SW) potential [68] as parametrized by Wang and Stroud (SW-WS) [80] and Angelo
1
This chapter is based on work published in Phys. Rev. B 72 (2005), 205340, see Ref. [130].
24
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
25
and Mills and Grein et al. (SW-AMG+) [75, 76] are studied in detail. The formats and
parameters for these potentials are recorded in Appendices E and D. The utility of the
various potentials and their parametrizations are systematically investigated for their ability
to model GaAs properties. Particular attention is given to properties that affect MD studies
of thin film growth.
3.2 Atomic volume and cohesive energy
During vapor deposition, deposited atoms and molecules sample many different bonding
environments before finding their final configuration. One useful way to assess a GaAs
interatomic potential is to calculate the atomic volume and cohesive energy of various
GaAs phases with coordinations from 4 to 12 and to compare these to experimental data
and ab initio (density functional theory (DFT)) calculations.
At atmospheric pressure and for temperatures below the melting temperature, the lowestenergy crystalline phase of GaAs has a zinc blende (zb) structure [133, 134]. The lowestenergy solid structures (at low pressure) for pure gallium and arsenic are the orthorhombic
αGa (A11, Cmca) and the rhombohedral αAs (A7, R3̄m) crystal phases [135]. The zb
atomic volume for GaAs is 22.46 Å3 /atom [134], while the elemental phases have atomic
volumes of 19.34 Å3 /atom and 21.30 Å3 /atom for the αGa and αAs phases, respectively
[135]. Lattice parameters for the elemental structures have been summarized by Donohue
[135] as a function of temperature.
Enthalpies are measured experimentally with respect to standard temperature and pressure conditions for gallium, arsenic, and GaAs phases [136, 137]. Theoretical calculations
based upon DFT or interatomic potentials are usually calculated under zero temperature
and pressure conditions. These calculated relative energies, or cohesive energies, are reported as the energy difference between a collection of free atoms and the atoms bound in
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
26
their lowest-energy solid phase. Comparison, with respect to the same reference state, can
be made between experimental enthalpy (ΔH) and calculated energy (ΔE) values through
the thermodynamic relation, ΔH = ΔE + Δ(P V ), where P is the pressure and V is the
volume of the system. The Δ(P V ) term is usually small compared to ΔE for condensed
matter systems at constant pressure in the free atom reference state. Hence, for a solid phase
at a temperature (T ), ΔH T ≈ ΔE T is a reasonable approximation. This approximation
becomes exact at 0 K.
The experimental enthalpies at 298 K and atmospheric pressure are −6.690 eV per
formula unit (fu) for GaAs, −2.819 eV/fu for gallium, and −3.135 eV/fu for arsenic, with
respect to the free atom reference state [137]. The values for gallium and arsenic at 0 K
have been reported as −2.812 ± 0.022 eV/fu and −2.959 ± 0.026 eV/fu, respectively [138].
For GaAs, the conversion from 298 K (ΔH 298K ) to 0 K (ΔH 0K ) can be performed by
integrating the constant pressure specific heat, ΔCp , with respect to temperature [139]:
ΔE
0K
= ΔH
0K
= ΔH
298K
298K
−
ΔCp (T )dT ,
(3.2.1)
0K
GaAs(s)
where ΔCp (T ) = Cp
Ga(g)
(T ) − Cp
As(g)
(T ) − Cp
(T ). The specific heat of each comGaAs(s)
ponent must be accounted for when calculating the enthalpy at 0 K. Data for C p
(T )
have been tabulated by Adachi [140], and specific heats for gallium and arsenic gases can
be derived assuming an ideal gas [136]. This results in an enthalpy temperature correc 298
tion of 0 ΔCp (T ) dT ≈ 0.030 eV/fu. The change in GaAs enthalpy from 298 K to
0 K is less than 1%. Likewise, the change in enthalpy between 298 K and 0 K is less
than 1% for gallium and about 6% for arsenic. This is within the uncertainty of cohesive
energy calculations for most DFT methods [35]. Therefore, for simplicity and source consistency, the cohesive energies (E) are approximated here using the enthalpy data at 298 K
as: EGaAs = −6.690 eV/fu, EGa = −2.819 eV/fu, and EAs = −3.135 eV/fu [137].
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
27
The crystal structures used to evaluate the potentials’ bulk properties are identified using
the common name, Stukturbericht designation, Pearson symbol, and space group notation
[134, 141, 142]. The atomic volume and cohesive energies have been calculated for the
zb (B3, cF8, F4̄3m), NaCl (B1, cF8, Fm3̄m), NiAs (B81 , hP4, P63 /mmc), and CsCl (B2,
cP2, Pm3̄m) structures of GaAs using the local density approximation (LDA) DFT method
[143]. The elemental diamond cubic (dc) (A4, cF8, Fd3̄m), face-centered cubic (fcc) (A1,
cF4, Fm3̄m), simple cubic (sc) (Ah , cP1, Pm3̄m), body-centered cubic (bcc) (A2, cI2,
Im3̄m), Ga-II (cI12, I4̄3d), αGa (A11, oC8, Cmca), and αAs (A7, hR2, R3̄) structure parameters and energies were calculated in a similar manner by Albe et al. [71] for gallium
and arsenic. The cohesive energies for elemental gallium and arsenic were calculated relative to αGa and αAs structures. The reported elemental gallium data [71] was augmented
by the LDA (ultra-soft pseudopotential) [144] calculation of the gallium bcc phase atomic
volume, cohesive energy, and bulk modulus (see Section 3.3) with the Vienna ab initio
simulation program (VASP) [145, 146, 147, 148].
The predicted atomic volumes and cohesive energies using the three potentials were
determined using molecular statics methods described in Appendix B. Fig. 3.1 shows a
comparison of the calculated, experimental, and DFT data. It can be seen that the SWWS potential consistently overestimated the atomic volume (by about 160%) and underestimated the cohesive energy (by ∼ 50%) for all the phases evaluated. The SW-AMG+
potential overestimated the arsenic atomic volume (by 120–180%) and underestimated the
elemental cohesive energies (by 11–64%). The TR-ANNK potential closely matched both
experimental and DFT data.
The cohesive energy and atomic volume of crystalline structures predicted by each potential provided insight about the gallium and arsenic atom response to changes in homo- or
heteropolar bonding environments. The arsenic and gallium elemental results indicate that
homopolar bonds were not well modeled by either of the SW parametrizations, Fig. 3.1.
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
/=)I
Atomic Volume HÞ3atomL
50
Material and Structure
/=
28
)I
zb sc16 B1 NiAs B2 =GaGaII fcc bcc sc dc =As sc bcc fcc dc
SW-WS
SW-AMG+
TR-ANNK
DFT
Experiment
45
40
35
30
25
20
15
Cohesive Energy HeVatomL
-0.5
-1.0
-1.5
-2.0
-2.5
-3.0
-3.5
zb sc16 B1 NiAs B2 =GaGaII fcc bcc sc dc =As sc bcc fcc dc
/=)I
/=
Material and Structure
)I
Figure 3.1: The (a) atomic volume (Å3 /atom) and (b) cohesive energy (eV/atom) predictions for the SW-WS, SW-AMG+, and TR-ANNK potentials are plotted for selected
GaAs, gallium, and arsenic phases. Experimental [134, 135, 137, 138, 140] and LDA DFT
[71, 143] data are also shown to assess the potentials’ predictions.
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
29
The lowest-energy phases for gallium and arsenic were predicted to be either tetrahedral
dc (SW-WS, As and Ga; SW-AMG+, Ga) or close-packed fcc (SW-AMG+, As) structures.
Neither of these predicted structures match the experimentally-observed crystalline structure of αGa or the buckled planes of αAs [135].
Clearly, care needs to be taken when using either of the SW parametrizations to model
processes that require an accurate representation of Ga-Ga and As-As interactions. The
TR-ANNK potential correctly predicted αAs as the lowest-energy phase for arsenic. The
experimentally-determined, lowest-energy αGa phase was predicted to be only 0.011 eV/atom
less stable than the gallium bcc crystal. Taking into account the many gallium metastable
phases that have energies within 0.08 eV/atom of αGa [71, 149, 150], the TR-ANNK potential’s prediction of gallium crystal stability appears to be reasonable, particularly for an
element that is difficult to model.
All three potentials correctly predicted that the lowest-energy phase of GaAs is the
zb structure. The SW-WS potential failed to predict the correct cohesive energy and volume for heteropolar GaAs, which limits its usefulness in simulating crystalline GaAs. The
GaAs zb phase predicted by the SW-AMG+ potential is anticipated to dominate during
MD simulations of GaAs thin film growth because elemental interactions are unduly weak.
It is therefore concluded that the TR-ANNK potential is likely to be the best choice for
modeling atoms where there is a wide range of homo- and heteropolar coordinated bulk
environments.
3.3 Elastic constants
During atomic assembly, the incorporation of defects (e.g., arsenic interstitials) or lattice mismatch strains (during heteroepitaxial growth) introduces significant internal stress,
which affects the formation of defect structures [151]. Hence, potentials need to predict
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
30
Table 3.1: Gallium bulk elastic moduli data for the three empirical potentials, experiments,
and DFT calculations. Data for selected elemental gallium crystal structures is summarized.
All data have units of GPa. Dashes (—) indicate that no data is available.
αGa
dc
fcc
sc
bcc
Experimenta 61.3
—
—
—
—
b
DFT
67.4 46.5
65.2 61.3 65.5
SW-WS
58.7 23.8 175.9 44.8 173.2
SW-AMG+ 22.3 44.1
82.1 74.6 493.5
TR-ANNK
43.4 28.0 1127.9 43.1 55.9
a
b
Reference [152].
Reference [71].
Table 3.2: Arsenic bulk elastic moduli data for the three empirical potentials, experiments,
and DFT calculations. Data was selected for elemental arsenic crystal structures. All data
have units of GPa. Dashes (—) indicate that no data is available.
αAs
dc
fcc
sc
bcc
a
Experiment 58.0
—
—
—
—
DFTb
58.0 52.6 93.0 96.8 96.8
SW-WS
51.7 26.8 193.4 51.7 195.1
SW-AMG+ 92.4 40.5 81.3 92.4 945.0
TR-ANNK
76.5 47.5 87.8 81.1 109.2
a
b
Reference [153].
Reference [71].
reasonably precise elastic constants.
The bulk elastic moduli of gallium and arsenic crystal structures calculated by the three
potentials have been compared to LDA DFT [71] calculations in Tables 3.1 and 3.2.
It
is evident that the SW-WS potential poorly predicts the elastic constants of all phases of
both elements. Closely-packed structures (bcc and fcc) were two to three times too stiff,
while open structures (dc and sc) were much too soft. The SW-AMG+ parametrization
predicted elastic moduli for the dc, fcc, and sc phases, which were all within 25% of LDA
DFT data. For arsenic, the αAs and bcc phases were two and eight times stiffer than the
DFT calculations. The TR-ANNK potential’s bulk elastic moduli were all within 40% of
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
31
Table 3.3: Single crystal elastic stiffness constants for the zb structure of GaAs. Calcula(0)
tions of c44 that do not allow internal relaxation are labeled c 44 . All data have units of GPa.
Dashes (—) indicate data is not available.
cij Expt. (298K)a DFTb SW-WS SW-AMG+ TR-ANNK
c11
118.1 123.0
41.9
129.2
124.4
c12
53.2
58.0
21.0
50.3
48.4
59.2
62.0
16.1
55.2
39.1
c44
(0)
c44
—
75.0
30.3
85.2
73.7
a
b
Reference [154].
Reference [45].
DFT predictions, with the notable exception of the fcc gallium structure, which was much
too stiff.
Data for the three independent elastic constants of the GaAs zb structure are shown in
Table 3.3. The unrelaxed and relaxed elastic constant data were calculated using molecular
statics methods discussed in Appendix B. The SW-WS potential predicted moduli that
are much softer than the experimental values or DFT calculations. Clearly, in studies that
require deformation or the sampling of environments where atoms reside in highly strained
(off-lattice) sites, the SW-WS parametrization is a poor modeling choice because of its
(0)
inaccurate prediction of elastic constants. Table 3.3 shows that the c 11 , c12 , and c44 elastic
constants determined by the SW-AMG+ and TR-ANNK potentials were quite similar to
the DFT predicted and experimentally measured moduli for the GaAs zb phase. However,
the relaxed c44 elastic constant was predicted most accurately by the SW-AMG+ potential.
3.4 Point defect energetics
The assembly of GaAs from a vapor on a (001) surface results in the incorporation of
point defects, such as antisites, interstitials, and vacancies. The concentration of each point
defect type is sensitive to growth conditions, such as temperature, As:Ga flux ratio, and
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
32
deposition rate [6, 34]. The probability that a given defect will form is dependent upon
the defect formation energy. These defect formation energies can be estimated using the
methodology of Zhang and Northrup [48, 155].
The energy of formation of point defects (or defect complexes) can be written for a
system of i atom types as:
Ω (μe , μi ) = ED + QD μe −
ni μi ,
(3.4.1)
i
where ED is the total energy of a supercell containing a defect, QD is the charge state of the
defect, μe is the relative electron chemical potential, ni is the number of atoms in the defect
cell for each atom type i, and μi is the corresponding atomic chemical potential for each
atom type i. We can omit the charge state term and let QD μe → 0, because the potentials
discussed here do not explicitly account for local electronic charge.
Under equilibrium conditions, the sum of chemical potentials for gallium and arsenic
atoms in the reservoir equals the bulk chemical potential of the GaAs system, μ Ga + μAs =
(bulk)
μGaAs . Following Ref. [48], Eq. 3.4.1 can be rewritten as:
−
Ω (μe , Δμ) = ED
1
(nGa − nAs ) Δμ ,
2
(3.4.2)
where
1
(bulk)
(nGa − nAs ) μGaAs
2
1
(bulk)
(bulk)
− (nGa − nAs ) μGa − μAs
2
= ED −
ED
and
(bulk)
(bulk)
.
Δμ = (μGa − μAs ) − μGa − μAs
(3.4.3)
(3.4.4)
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
33
Table 3.4: Defect formation energies for the three empirical potentials and DFT calcula
) are reported in eV for simple point defects in GaAs. The
tions. Formation energies (ED
defect formation energies were estimated in a periodic computational cell made of 512
atoms (empirical potentials) and 64 atoms (DFT calculations).
Predicted Formation Energy (eV)
a
DFT SW-WS SW-AMG+ TR-ANNK
Defect Type
Ga vacancy, VGa
3.15
1.44
2.62
2.16
As vacancy, VAs
3.10
1.62
2.69
2.46
Ga antisite, GaAs
2.12
0.47
2.53
1.53
2.48
0.48
6.00
5.58
As antisite, AsGa
2.98
2.28
5.69
1.09
Ga interstitial, Gai
As interstitial, Asi
4.07
2.17
10.26
5.91
a
References [100] and [156].
(bulk)
The chemical potential difference, Δμ, is limited by the inequalities μ i ≤ μi
for
i atom types gallium and arsenic. These constraints help determine the allowed range of
Δμ between ±ΔHf . The heat of formation, ΔHf , for the As + Ga → GaAs reaction at
standard temperature and pressure can be estimated with:
(bulk)
(bulk)
ΔHf = EGaAs − EGa
(bulk)
where Ei
(bulk)
(which is equivalent to μi
(bulk)
− EAs
,
(3.4.5)
at 0 K) is the cohesive energy of the most
stable GaAs, gallium, and arsenic phases. The validity of this approximation is based on
the small change in enthalpy between 298 K and 0 K for solid phase gallium, arsenic, and
GaAs.
( Ω|Δμ=0 ), were calculated for gallium and arsenic
The defect formation energies, ED
vacancies (VGa and VAs ), both gallium and arsenic interstitials (Ga i and Asi ), and the two
antisite defects (GaAs and AsGa ), see Table 3.4. The samples were first annealed at 800 K
for 10 ps and then cooled to 0 K by energy minimization methods. This two-step process
allows metastable sites to be avoided. The formation energies calculated here are consistent
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
34
with those previously determined for Tersoff-based potentials [156].
DFT defect formation energy calculations [100, 156] are also shown in Table 3.4. The
DFT results indicate that the antisite substitutional defects for gallium and arsenic are the
most likely to form (under gallium-rich and arsenic-rich environments, respectively). Other
point defects, such as the gallium-rich Ga i or VAs , have higher formation energies than
the gallium antisite and therefore the concentration of these defects is likely to be less.
Moreover, arsenic interstitial point defects would likely have even lower concentrations
unless, for example, the environment was extremely arsenic-rich and defects were kinetically trapped.
Although the SW-WS potential predicts defect energies that are unusually small for
antisite defects, it correctly predicts that they have the lowest formation energy. In fact,
the SW-WS potential predicts the defect formation energy trends better than either of the
other two potentials. However, the extremely low formation energies would likely lead to
a significant overprediction of defect concentrations.
The SW-AMG+ potential predicts that gallium antisites and gallium vacancies are the
most likely defects to form. The SW-AMG+ potential predicted formation energies for the
arsenic antisite and interstitial point defects to be anomalously high. Therefore, concentrations of these defects during simulation would likely be much lower than would be expected
based on DFT results. Due to its inability to incorporate the excess arsenic into point defects without imposing large energy penalties, SW-AMG+ would not be able to accurately
simulate low-temperature growth of GaAs under high arsenic overpressures [24, 26]. However, the fact that the gallium antisite has the lowest formation energy does match DFT data
well.
The defect formation energies of gallium antisites and interstitials predicted by the Tersoff potential parametrized as TR-ANNK are low. Thus, calculations with this potential
are likely to result in erroneously high concentrations of gallium interstitial and antisite
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
35
defects. In arsenic-rich environments, excess arsenic faces a very large defect formation
energy for interstitial and substitutional antisite defects that would reduce the probability
of encountering these defects at the levels expected by DFT predictions.
In summary, the SW-WS potential is not a strong choice based on the fact that defect
formation energies are extremely low and would likely yield unphysically high concentrations of most point defect types. If the SW-AMG+ potential was used in a stoichiometric
or gallium-rich environment, the formation energy magnitudes for gallium-based defects
would seem to indicate that this was a reasonable potential choice; however, the potential
would likely fail to predict accurate defect concentrations in arsenic-rich environments.
The TR-ANNK potential would likely overpredict gallium-based defect concentrations
while underpredicting arsenic interstitial concentrations. For a wide range of processing
conditions, there is no potential that is clearly superior.
3.5 Melting temperature
The melting temperature is an indirect measurement of the strength of the interatomic bond
(the depth of the interatomic potential well) and the shape of the potential at large interatomic separation excursions. The information reflected in the melting temperature is based
on the dynamic sampling of the topology of the bonding energy around each atom. Thus,
the predicted melting temperature for a given potential provides an indication of the overall
utility of the potential for modeling vapor deposition.
The melting temperature for each potential was calculated by MD using a method developed by Morris et al. [157] in which a half-liquid and half-crystalline supercell is allowed
to reach an equilibrium temperature under constant pressure. They showed that the temperature of the two-phase system is then a good approximation to the melting temperature.
Using a supercell of 6400 atoms (100 planes with 64 atoms/plane) and a system-wide tar-
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
36
Table 3.5: Calculated melting temperatures of GaAs for the three empirical potentials compared with experimental values. Calculations were performed by the equilibrium coexistent
phase method introduced by Morris et al. [157]. Dashes (—) indicate that no previous calculations were found in literature.
Potential
Tmelt (K)
Refs.
Experiment
1513
[158]
SW-WS
1020 ± 100
—
SW-AMG+ 2620 ± 100
—
TR-ANNK 1900 ± 100 [71]
get pressure of 1 atm, simulations were conducted for 1000 ps of simulated time and are
summarized in Table 3.5. The predicted melting temperature values have an uncertainty
of ± 100 K. The uncertainty range was partially based on pressure oscillations during the
calculations and the variation in equilibrium temperatures from repeated runs with different
initial conditions.
The melting temperature of GaAs at atmospheric pressure was experimentally determined to be 1513 K [158]. The SW-WS prediction underestimated the experimental melting temperature by 33% but was still reasonably close to the measured value. The SWAMG+ potential significantly overestimated the phase transition temperature by 73%. The
melted crystal and composition profile are shown for a sample calculation of the melting
temperature for the TR-ANNK potential, see Fig. 3.2. Our calculations measured the temperature and pressure of this phase system after 1 ns of simulation time for runs with three
different initial average temperatures and found the final temperature to be 1950 ± 150
K and the pressure to oscillate around 1 atm. This value was consistent with the Albe et
al. [71] estimation of the melting temperature of T melt = 1900 ± 100 K. The TR-ANNK
potential simulations resulted in a system consisting of a stoichiometric GaAs solid and a
gallium-rich liquid that was separated by a region of pure arsenic liquid.
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
37
Figure 3.2: The GaAs melt at 1904 K in equilibrium, as predicted by TR-ANNK using the
method proposed by Morris et al. [157]. The arsenic composition profile clearly identifies
the three regions of stoichiometric GaAs, gallium-rich liquid, and pure arsenic liquid.
3.6 Arsenic dimers and tetramers
During the vapor deposition of GaAs thin films, arsenic and gallium are co-deposited and
assemble on the film surface to form GaAs. The arsenic is in either dimer or tetramer form
[17]. The impact dynamics and initial assembly processes are expected to be sensitive to
the structure of these incident molecules as well as to that of the surface upon which impact
occurs. It is therefore important that the structure and bond energies of the free molecules
be reasonably approximated by the potentials used for simulations of thin film growth.
The molecular binding energy, EB (i.e., the total energy of isolated atoms minus the total
energy of the atoms in the bound state), and the interatomic spacing, r 0 , were calculated
and compared with experimental data [159, 160] and DFT calculations [46] in Table 3.6.
The dimer and tetrahedral structures and binding energies in Table 3.6 indicate that
the As-As bonding interactions in small arsenic clusters are too weak when calculated
using the SW-WS and SW-AMG+ parametrizations. This effect was already discussed
for crystalline solids and continues as arsenic atoms encounter lower coordinations, see
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
38
Table 3.6: Structure, total binding energy (EB in eV), and average interatomic spacing (r0
in Å) for As2 and As4 .
Source
Dimer
Tetrahedron
Square
EB
r0
EB
r0
EB
r0
Experimenta 3.96 2.10 10.21 2.44
—
—
DFTb
4.05 2.12 10.72 2.46
—
—
SW-WS
0.94 2.86 2.91 3.28 3.51 2.90
SW-AMG+ 0.75 3.61 2.74 3.31 2.25 3.18
3.96 2.10 9.36 2.44 10.15 2.27
TR-ANNK
a
b
References [159] (dimer) and [160] (tetrahedron).
Reference [46].
Fig. 3.1. The TR-ANNK potential, on the other hand, offers a more accurate prediction
of As-As bonding, even in arsenic dimers and tetramers. It should be noted that the dimer
properties match experimental data exactly for the TR-ANNK potential because of the
fitting method employed [71]. Although the bonding energy for As 4 is well predicted by
the TR-ANNK potential, the most stable four-atom structure was a planar square structure
rather than the experimentally observed tetrahedron arrangement. This occurs because the
lowest-energy As-As-As angle is only slightly more than 90 ◦ , promoting an arsenic square
over the tetrahedron structural form.
Molecular arsenic has very strong bonds, which directly impacts the mechanism by
which the molecules are incorporated into the surface. Therefore, the most accurate vapor
deposition simulations with molecular arsenic require that the potentials model these strong
molecular bonds well. For the SW parametrizations explored, it is clear that elemental
interactions are not well predicted. The strong bonding of arsenic molecules was, however,
well predicted by the TR-ANNK potential.
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
(b) a2(2x4)
(a) (2x1)
[110]
[110]
(c) b2(2x4)
[110]
[110]
[001]
[110]
[110]
[001]
[001]
[110]
39
[110]
[110]
(e) z(4x2)
(d) c(4x4)-75%
Ga
As
atom atom layer
[110]
top
bottom
[110]
[110]
[001]
[110]
[001]
[110]
[110]
Figure 3.3: Top and side projections of GaAs (001) surface reconstructions. Unit cells are
marked in black.
3.7 Surface structure assessments
Surface free energy calculations provide a means for determining the dominant surface
structure under a range of environmental and surface composition conditions. Accurate
predictions of the lowest-energy surface structure are essential for high fidelity estimates
of the energy barriers and the incorporation paths encountered by gallium or arsenic during
atomic assembly on either arsenic- or gallium-rich surfaces.
The GaAs (001) surface structure has been extensively studied using numerous experimental and computational methods [12, 13, 161, 162]. Fig. 3.3 shows selected surface
reconstructions that are important to subsequent discussions. The generally accepted surface reconstructions for the (001) surface are the arsenic-terminated β2(2 × 4), Fig. 3.3(c)
[163, 164, 165], the arsenic-terminated α2(2×4), Fig. 3.3(b) [166], the arsenic-rich c(4×4)
[167], Fig. 3.3(d), and the gallium-rich ζ(4×2) [47], Fig. 3.3(e), reconstructions. The pres-
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
40
ence of these surface reconstructions depends on the surface temperature and the pressure
and composition of the vapor (As:Ga flux ratio) [168].
Provided that the surface is in equilibrium with the vapor, a simple thermodynamic
analysis can be used to calculate changes in the total free energy as arsenic and gallium
atoms are interchanged between a bulk material (thermodynamic reservoir) and an atmospheric vapor (atom reservoir) at the surface [169, 170], see Chapter 5 for a more detailed
derivation. Stable surfaces are predicted by minimizing the surface free energy per unit area
with respect to surface composition and geometry. When in thermodynamic equilibrium
with its vapor, the surface free energy can be written as a function of the relative arsenic
(bulk)
chemical potential (μAs − μAs
), which ranges between 0 and ΔHf [170]. This range
effectively limits the formation of pure arsenic or gallium on the GaAs (001) surface in the
presence of both arsenic and gallium sources at equilibrium [169].
Using this technique, Lee et al. predicted the surface free energies of different surface
reconstructions with generalized gradient approximation(GGA) DFT [47], see Fig. 3.4. A
similar approach can be used to determine the predicted surface energies of the various
reconstructions using interatomic potentials, also shown in Fig. 3.4. The total energy of
a computational supercell for each reconstructed surface was determined using a slab of
1500–1700 atoms (25–27 layers with 64 atoms/layer measuring 32 Å × 32 Å) with an
identical top and bottom surface. The central plane was fixed and the entire system was
then relaxed using energy minimization (see Appendix B). The surface area, bulk cohesive
energies, and the number of atoms on each surface were then used to calculate the surface
free energy [98, 170].
All three potentials predict stable (1 × 2) gallium-rich and (2 × 1) arsenic-rich surfaces. These structures are composed of simple dimer rows instead of the (2 × 4) family of
surface reconstructions with missing dimers seen in DFT calculations, see Fig. 3.3(a)-(c).
DFT predicted that the lowest-energy surface reconstructions are the ζ(4 × 2), α2(2 × 4),
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
DB
41
DB DB DB
g HmeVÞ2L
a
z
!
b
m As - m(bulk)
As (eV/fu)
Figure 3.4: The surface free energy (γ) for low-energy GaAs (001) surface reconstructions
plotted versus the arsenic chemical potential. DFT data [47] are compared to the predictions
of the SW-WS, SW-AMG+, and TR-ANNK potentials. The GaAs heat of formation, ΔHf ,
is shown in the upper horizontal axis for the DFT model and each interatomic potential.
Experiments report ΔHf = −0.74 eV/fu [137].
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
42
β2(2 × 4), and c(4 × 4) as one moves from a gallium-rich to an arsenic-rich surface condition, Fig. 3.4. All of these DFT-predicted, low-energy surfaces have been experimentally
observed on GaAs (001) surfaces [12, 13, 161, 162, 166]. These lowest-energy surface
reconstructions on the GaAs (001) surface were clearly not obtained using any of the three
interatomic potentials. The poor agreement between the interatomic potential and DFT
predictions is understandable since (001) surfaces are polar and electrons are not explicitly
addressed by any of the potentials [171, 172, 173].
The inability of any of the potentials to account for the complexities of GaAs (001)
surfaces will clearly limit the fidelity of some MD studies of thin film growth. For example, the topology of the surface energy profile will be significantly altered when the extra
trenches of the β2(2 × 4) surfaces, Fig. 3.3(c), are not present in a simulation. The resulting energy barriers and transition pathways for gallium or arsenic diffusion on arsenic- and
gallium-rich surfaces are then likely to be inaccurately represented. This may be especially
critical for simulations of high temperature, low deposition rate thin film growth, where
surface kinetics are sufficiently rapid that complex surface reconstructions can occur during deposition. Simulations at lower temperatures where the atom mobility is significantly
lower may be less affected since the slower kinetics can impede the reorganization of the
surface structure.
3.8 Sticking ratio during arsenic dimer vapor deposition
Further insights into the utility of current interatomic potentials for simulating the vapor
deposition of GaAs can be gained by investigating the sticking of As 2 on the low-energy
gallium-rich GaAs (001) surface. During molecular beam epitaxy, gallium has a nearly
100% sticking probability for surface temperatures below 915 K [26]. The sticking ratio
of As2 , however, is highly sensitive to surface temperature and surface composition. The
Sticking Ratio, SAs
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
1.0
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
43
SW-WS
SW-AMG+
TR-ANNK
Experiment
0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0
Homologus Temperature, TZTmelt
Figure 3.5: Arsenic dimer sticking fraction, S As , on a gallium-rich surface is calculated
for the three potentials (SW-WS, SW-AMG+, and TR-ANNK) and is compared with an
empirically fit expression (solid black line). Simulated homologous temperatures are used
to equate temperatures for each potential.
arsenic dimer sticking probability on both gallium- and arsenic-terminated GaAs (001) surfaces has been found to be quite high for deposition temperatures between 650 K and 750
K [113, 174, 175]. However, as the surface temperature increases, the sticking probability
rapidly decreases.
An arsenic sticking ratio, SAs , can be defined as the number of arsenic atoms that stick
to the surface divided by the number of atoms that impact the surface from an incident
As2 flux (0 ≤ SAs ≤ 1). Tok et al. collected experimental sticking probability data on a
gallium-rich (4 × 2) surface reconstruction where Ga-As dissociation was assumed to be
negligible [26]. Their sticking probability data for three fluxes were fitted to an Arrhenius
expression (with an activation energy of 0.91 ± 0.08 eV) between 673 K and 853 K and is
plotted as the solid black line in Fig. 3.5.
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
44
The As2 sticking ratio predictions for the three potentials were calculated using MD
simulations, see Fig. 3.5. These MD simulations utilized a nine-layer substrate with the
bottom two layers fixed. Four middle layers were under temperature control to maintain a
constant substrate temperature [95] and the top three layers were thermally unconstrained.
The computational cell had in-plane periodic boundary conditions. The in-plane dimensions of the cell were 16 Å × 16 Å. The top (001) (1 × 2) surface was gallium-terminated.
An arsenic dimer was deposited 100–500 times on an identical (fresh) surface at random
atom positions normal to the (1 × 2) gallium-rich (001) surface. Deposited dimers were
given an initial translational energy of 0.1 eV/atom. An average kinetic energy of 0.1
eV/atom is comparable to a temperature of 1160 K, which is reasonably close to the evaporation cell temperature of gallium [17].
Desorption events were monitored for up to 100 ps following the initial impact. This
relatively short monitoring time does not allow for a direct comparison between experimental and simulated sticking ratios; however, it does help identify surface binding trends,
see Chapter 7. The sticking probability was then determined and the series of simulations
repeated for simulation temperatures, T , between 300 K and 1500 K at temperature steps
of 25–100 K. The corresponding homologous temperature, T /T melt , was obtained using
the potential’s predicted GaAs melting temperature (Table 3.5). The average sticking ratio,
SAs , for each potential is plotted against the homologous temperature in Fig. 3.5.
Evaporation was observed to begin at ∼ 147% Tmelt for the SW-WS potential and ∼
69% Tmelt for the SW-AMG+ potential. The arsenic dimer sticking ratio predicted by the
SW parametrizations was nearly constant below the evaporation temperature, T evap . At
low temperatures, the vast majority of all arsenic dimers were incorporated into the (001)
surface. This agrees well with the experimental data at low temperatures where the sticking
probability is both predicted and experimentally observed to be near unity.
The TR-ANNK potential incorrectly predicts significant As 2 desorption over the entire
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
45
temperature range. In fact, internal molecular energies and translation energies of 0.5 eV
were required to produce a sticking ratio of 6% at a scaled equivalent temperature of 300
K, shown in Fig. 3.5. The case of 0.1 eV of translational energy with no internal dimer
energy (as was the case for the two SW parametrizations) predicted a sticking ratio below
0.1%. Experimentally, significant As 2 desorption occurs at temperatures only above 800 K
[17]; however, the TR-ANNK potential underestimates the As 2 binding energy over most
of the temperature range.
The dynamic study of the bonding of arsenic dimers on gallium-rich surfaces separates the three potentials into two categories. The first group is defined by the two SW
parametrizations, which predict strong As 2 /gallium-terminated (1×2) surface bonding that
does not break until the temperature approaches the melting temperature. The TR-ANNK
parametrization of the Tersoff potential falls into the second category, where As 2 /galliumrich (1×2) surface bonding is weak and desorption is the dominant process. These dramatic
differences in the bonding of As2 to gallium-rich (001) surfaces can not be understood only
from bulk property predictions; hence, surface bonding must be understood for the accurate
simulation of vapor deposition.
3.9 Discussion
A large body of literature has been produced to simulate GaAs using classical interatomic
potentials. From these potentials (Appendix C), three potentials (SW-WS [80], SW-AMG+
[75, 76], and TR-ANNK [71]) have been evaluated in detail for their ability to predict bulk,
arsenic vapor, and surface properties. Atomic volumes, cohesive energies, and elastic properties of GaAs were used to quickly assess the strengths and weaknesses of each potential
for coordinated environments between 4 and 12. The study of arsenic clusters and (001)
surfaces helped explore each potential’s response to lower coordinated environments.
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
46
The SW parametrizations studied do not predict the complexities of bonding environments when they significantly deviate from tetrahedral or, in the case of a weak angular
term, close-packed fcc structures (as was the case for arsenic interactions of SW-WS). The
SW-WS potential predicted weak bonding and elastic constants for all structures and should
likely be avoided. The SW-AMG+ predicted reasonably good bulk and elastic properties
for the zb structure, but elemental properties were poorly predicted. The sticking ratio
trend of As2 to the (001) gallium-rich surface as a function of temperature was similar to
the measured experimental values.
The Tersoff potential, as parametrized by Albe et al., predicts a much larger assortment
of crystalline bonding and structures than do either of the SW parametrizations. TR-ANNK
also allows desorption, which is very useful in studying surface interfaces at extremely high
temperatures. However, desorption was overpredicted due to the unphysically weak molecular arsenic/(001) surface bonding, as demonstrated in the sticking ratio calculations. 2
The SW parametrizations were shown to predict high As2 sticking probabilities when
the simulation data were compared to experimental data, while the Tersoff parametrization predicted a low estimate with significant As 2 desorption over the entire temperature
range. These dramatic differences in surface bonding of As2 to gallium-rich (001) surface
reconstructions predicted by the potentials can not be captured by simply checking the bulk
properties used to develop the parameters. Therefore, surface bonding interactions should
be tested before current and future potential parametrizations are utilized.
All potentials studied were shown to incorrectly predict the simple dimer row surfaces
as the most stable (001) surface reconstructions over the more complex structures seen
in experiments and as predicted in DFT calculations. This effect is especially critical for
high temperature vapor deposition, where surfaces can quickly respond to atmospheric
2
It is possible that this potential could be used for atomic arsenic deposition studies, as was utilized in
Ref. [176].
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
47
and temperature conditions to form a variety of complex surface reconstructions. Lower
temperatures decrease the atom mobility and reconstruct less dramatically; nevertheless,
accurate surface bonding is important to modeling vapor deposition simulations.
The ability of each potential format to represent salient physics for bulk, surface, and
molecular bonding directly impacts its ability to model the GaAs system. The major deficiencies with each potential can be generally related back to an absence of physics in the
model format. The SW (Appendix D) [68] and Tersoff (Appendix E) [70, 71, 132] potential formats represent two approaches to capturing the physics of bonding. The SW format
involves an empirical combination of two-body energy terms (φ) and a three-body angular
term (cos θ + 1/3) [68],
ESW
2 1 1
φR,ij − φA,ij +
.
=
φB,ij φB,jk cos θjik +
2 i j,j=i
3
k,k=i,j
(3.9.1)
The first term, φR,ij , is a two-body pair function that approximates the increase in energy
produced by the overlap of valence and core electron shells of the bonding atoms (i and
j) due to the Pauli exclusion principle and an electron Coulomb repulsion [36, 57]. The
attractive two-body energy, φA,ij , and the three-body term serve to stabilize the open structure phases for the SW approximation. For the GaAs system, the bonding type includes
sp-valent (metallic and covalent) bonding. In general, the spherically symmetric two-body
attractive terms can accurately predict van der Waals forces [57]. Angular-dependent covalent bonding is approximated with the three-body angular term (centered around atom i and
to atoms j and k) and a pairwise function, φ B . This three and ik
involving the vectors ij
body term provides a positive energy for any structure that does not have the prescribed
equilibrium angle. Stillinger and Weber fixed this at arccos 1/3 = 109.47 ◦ (the tetrahedral
bond angle) [68]. The angular term also defines how the energy behaves as the tetrahedral
bonds are distorted. In principle, the equilibrium angle could be changed to accommodate
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
48
other structures [177]; however, most phases have more than one angle, which may make
the SW approach less applicable to these more complex structures.
Silicon [68] and germanium [178] parametrizations of the SW format have proven useful in modeling vapor deposition on the (001) surface [38, 179, 180, 181, 182]. These
material systems strongly favor tetrahedral bond angles and thus this approximation is
adequate—although the bond angles have been reported to be too stiff when compared
to tight-binding theory calculations [183]. Furthermore, the simplicity of the SW potential
makes fitting the free parameters a straightforward task for a tetrahedral solid, because the
independent free parameters can be determined by fitting the lattice parameter, cohesive
energy, and three elastic constants. In such a manner, the low-energy GaAs zb structure,
stability, and elastic constants were effectively captured in the SW-AMG+ parametrization.
However, As-As and Ga-Ga interactions are more complex in their bonding preferences,
and the SW approximation becomes less effective in such elemental environments, as was
demonstrated in previous sections.
Upon inspection of Eq. 3.9.1, it stands to reason that the lowest-energy phases that
can be predicted by this format for nearest-neighbor systems have either tetrahedral (if the
three-body term is strong) or close-packed (if the three-body term is quite weak) structures.
The two examples of SW parametrizations shown above follow these trends. Clearly, if
a more accurate potential is required for elements and alloys not in column IV, a more
transferable model must be used; however, if a simple model is needed to simulate single
phase dynamics, then the SW approach can be quite useful.
Like the SW potential, the Tersoff potential is based on repulsive (φ R ) and attractive
(φA ) two-body terms, but also includes a term sensitive to the bonding environment, B̄,
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
49
which multiplies the attractive pair-wise energy term, φ A,ij [70, 131],
ETR =
1 φR,ij − B̄ij φA,ij .
2 i j,j=i
(3.9.2)
This concept was originally proposed by Abell [184] and can be an effective way of capturing a wide range of structural properties within a simple format.
The format of the many-body term as empirically expressed by Brenner [132] can be
related to the analytical second moment term of the bond-order potential (BOP) derived
from tight binding theory by Pettifor et al. for covalent systems with half-full sp-valence
shells [89]. The second moment bond-order term, Θ ij , for the BOP takes the general form
of:
− 12
Φij + Φji
,
Θij = 1 +
2
(3.9.3)
while the empirical Tersoff bonding term takes the following form,
1 − 12
− 12
B̄ij =
.
(1 + χij ) + (1 + χji )
2
(3.9.4)
The BOP derivation was based on the bond-centered perspective; however, an atom-centered
form can also be used [88], which yields a many-body format that more closely approximates the Tersoff term as expressed by Brenner [70, 132]. Assuming Φ ≈ χ, then equivalence of the simplified BOP and Tersoff formats can be established. Based on the similarity
of the empirical Tersoff format to the derived BOP covalent σ bond format, it is plausible
that the Tersoff format approximates σ bonding to the level of the two self-returning hops,
which are equivalent to approximating the second moment of the density of states, i.e., the
mean square width [89]. Additional sampling of the local environment based on derivations
by Pettifor et al. may prove useful for better approximations of metallic and the primary
(σ) and secondary (π) covalent bonding for sp-valent materials [90]. This may especially
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
50
be true for arsenic, which is strongly dependent on π bonding [185, 186]. The inclusion
of four-body angles (included in the π bond order) might also help predict higher stacking
fault energies, which are likely to be very small in their absence [187]. Another suggestion
to help improve the Tersoff format’s prediction of defect formation energies and molecular/surface bonding properties would be to expand the atom-type dependence of the angular
parameters from only i and k atom types to all the i, j, and k atom types.
The work above clearly shows that the Tersoff potential successfully predicted a large
number of bulk structures when parametrized by Albe et al. [71]. However this transferability requires careful parametrization. For example, the TR-ANNK parametrization had
a previously unreported low-energy bcc gallium phase. Therefore, when fitting the Tersoff
or BOP model parameters, a large number of structures should be rigorously evaluated due
to the flexibility of this format. Furthermore, care should be taken to not force a fit to a
particular format that does not capture the physics of the bonding (e.g., arsenic bonding
without the secondary covalent π bonding).
While the choice of the functional form of the two-body terms and its cutoff is quite
flexible, a few general guidelines can be gleaned from the parametrizations discussed in
this paper. To illustrate this point, the pair potential energy wells ( B̄ = 1 for Tersoff and
φB = 0 for SW) are shown in Fig. 3.6. The Tersoff functional form [70] has a strong
trigonometric cutoff term that can be used to bring the two-body functions quickly to zero.
As can be seen in Fig. 3.6, the energy versus interatomic spacing curve predicted by the
TR-ANNK parametrization has a more abrupt change in slope than either of the SW potential parametrizations. Such sharp changes in slope can cause difficulties in the numerical
calculation of energies and forces in simulations that sample this tail of the energy curve
frequently. In response, a smaller time step must be used, which makes simulation less
time efficient. We have found that short cutoffs also play a part in increasing the quantity of metastable surface sites. The use of a short cutoff can also be the product of an
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
51
Energy (eV/pair)
2.0
2.5
3.0
3.5
!
4.0
Figure 3.6: The energy curves for GaAs dimers for the SW-WS, SW-AMG+, and TRANNK potential parametrizations.
attempt to force a format to capture desired bulk properties—this should be avoided. The
SW potentials have had reasonably good success in modeling melted systems [68]; the use
of longer-range, smoother cutoffs may play a part in this success.
Lastly, in an attempt to address the incorrect surface reconstruction of phases demonstrated by both the SW and Tersoff potentials, one might pursue an explicit electron accounting scheme. Such a model is empirically quantified by the electron counting rule
[172, 173]. In this scheme, the total number of electrons donated by each atom is required
to match the number of electrons in each covalent bond. This requirement disallows the
(1 × 2) and (2 × 1) dimer-row surface reconstructions that were dominant for all the potentials discussed previously, see Chapter 5. If an effective means for converting this rule
into an energy was developed during MD simulation, then it stands to reason that a more
accurate surface free energy diagram could be constructed.
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
52
3.10 Conclusions
1. The Stillinger-Weber (SW) potentials parametrized respectively by Wang and Stroud
(SW-WS) [80] and by Angelo et al. and Grein et al. (SW-AMG+) [75, 76], and a Tersoff function parametrized by Albe et al. (TR-ANNK) [71] have been evaluated for
their suitability for simulating thin films in the GaAs system. The elemental and binary bulk properties predicted by these three potentials have been compared with experimental and ab initio results. The TR-ANNK potential yielded the closest agreement and the SW-WS potential was unable to reproduce energies, volumes, and elastic constants consistent with experimental and ab initio values. Simulations involving
homopolar bonding were poorly predicted by both the SW-WS and SW-AMG+ potentials. Defect properties were best predicted by the SW-AMG+ potential (under
limited environmental conditions); however, none of the potential parametrizations
performed well in this regard.
2. The complexities of the GaAs (001) surface reconstruction were not captured by
any of the interatomic potentials. Further work is needed to develop potentials that
introduce the physics responsible for the appearance of dimer trenches on the β2(2 ×
4) and ζ(4 × 2) reconstructions on the (001) surfaces of GaAs.
3. The temperature dependence of the arsenic dimer sticking probability was evaluated.
Homologous temperatures were defined to relate experimental and predicted temperatures. Simulations of arsenic dimer deposition onto gallium-rich GaAs (001)
surfaces indicated that the SW potential parametrizations predict near 100% sticking
probability. This is experimentally valid at temperatures below ∼ 600 K [17]. The
TR-ANNK potential predicts a high rate of desorption, so much so that it can not be
used to simulate vapor deposition with molecular arsenic.
4. Due to its difficulty with bulk properties, the SW-WS potential should be avoided
CHAPTER 3. ASSESSMENTS OF EMPIRICAL INTERATOMIC POTENTIALS
53
and the SW-AMG+ potential used in its place. The use of the SW-AMG+ potential
should be limited to Ga-As interactions because elemental interactions were poorly
modeled. Thus, the SW-AMG+ parametrization might be useful for stoichiometric
GaAs thin film growth under equiatomic flux conditions. The TR-ANNK potential had great success in many areas; however, (001) surface/molecular bonding was
poorly captured. Therefore, the TR-ANNK parametrization may best perform in
atomic flux growth conditions. Nevertheless, there is much room for improvement
in the modeling of GaAs properties and care should be taken in applying these and
other interatomic potentials to vapor deposition studies.
Chapter 4
Low-Temperature Atomic Assembly
from an Equiatomic Vapor1
4.1 Introduction
The atomic-scale mechanisms responsible for crystalline/amorphous growth mode transition and defect trapping are not well understood in the GaAs system. Here we use a
molecular dynamics (MD) modeling approach to explore some of the atomic-scale assembly mechanisms and their connection to film growth conditions. Particular attention is paid
to the growth of GaAs thin films with a near equiatomic Ga:As flux, which is relevant to
the low-temperature (LT) growth of highly doped crystalline films [25, 28, 34].
Here, a potential function proposed by Stillinger and Weber (SW) [68] and parametrized
by Angelo and Mills [75] and by Grein et al. [76] (SW-AMG+) was utilized here for simulations of GaAs film growth. The suitability of this potential for GaAs simulations was
assessed in Chapter 3 and was shown to be the best available potential for simulations of
LT GaAs (001) growth under equiatomic conditions.
1
This chapter is based on work in press for publication in J. Cryst. Growth, see Ref. [129].
54
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
55
4.2 Vapor deposition simulation
The MD simulations were conducted using the Nordsieck predictor corrector algorithm
with a 2 fs time step [107]. The initial GaAs substrate had a (001) surface that measured
32 Å × 32 Å. An arsenic-rich bulk-terminated (001) surface was initially created. Upon
annealing prior to the start of deposition, it reconstructed to form a (1 × 2) dimer row
surface [130]. The substrate consisted of six layers and each layer contained 64 atoms per
(001) plane. The bottom layer was fixed and the five layers above were free to vibrate.
Simulations of vapor deposition were conducted for 10 ns of real time, which is sufficient
for the deposition of a film with more than 12 monolayers. Many of the simulations were
repeated 7–10 times to generate more statistically reliable results.
The timescales available to MD simulations require the use of an accelerated deposition
rate, as compared to those used in experimental MBE. During an MD simulation, either a
gallium atom or an arsenic dimer was deposited normal to the surface every 14 ps. Each
atom or molecule was given an initial translational energy of 0.17 eV. No rotational energy
was initially given to the molecules. The average internal (vibrational) energy of the As 2
molecules was equivalent to a vapor temperature of around 1100 K (0.25 eV/atom). The total (translational and vibrational) energy was comparable to the kinetic energies of gallium
atoms and arsenic dimers emitted from effusion cells [7, 17].
One approach for estimating the equivalent experimental temperatures is to equate the
simulated and experimental homologous temperatures. The homologous temperature is
calculated by scaling the substrate temperature by the melting temperature. The melting
temperature of the SW potential has previously been determined to be T m = 2620 ± 100
K [130], which is higher than the experimental GaAs melting temperature, T mexp = 1513
K [158], so that Tmexp /Tm = 0.577 ± 0.066. For this particular potential, with an overestimated melting temperature, this approach is likely a reasonable approximation. Therefore,
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
56
unless otherwise indicated, the temperatures will be reported using these homologous temperatures, T /Tm .
The resulting homologous definition is utilized in identifying the high-temperature
(HT) and LT growth vapor deposition condition ranges mentioned in Chapter 1. Using
this definition, HT molecular beam epitaxy (MBE) is performed at temperatures 0.45 <
T /Tm < 0.60 [7, 17, 24], where T is the absolute growth temperature and T m is the absolute melting temperature. LT MBE typically occurs at growth temperatures in the range
0.34 < T /Tm < 0.38 [7, 24].
4.3 Results
4.3.1 Crystalline order and temperature
Two representative LT simulation results are shown in Fig. 4.1 using equal As and Ga
fluxes. Over the range of temperatures subsequently investigated, the deposited films had
an equiatomic (stoichiometric) composition, consistent with experimental observations of
growth under these LT conditions [25].
To quantify the crystallinity of the as-grown films, a dimensionless crystalline order
parameter, S, was defined such that a non-vibrating bulk crystal, with all lattice sites occupied, has a value of unity, while a system with no atoms on a crystal lattice has a value
of 0 (see Appendix F for its definition). The crystallinity parameter is shown as a function
of temperature in Fig. 4.2. Atomic position resolved images of these thin films indicate
that crystalline films were grown when the order parameter, S, was greater than 0.5, while
increasingly disordered films were produced when S was below this value.
The simulated amorphous/crystalline structure transition temperature occurred near
T /Tm = 0.35 ± 0.04 for S ≈ 0.5. The large error bars shown in Fig. 4.2 around this
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
= > 57
Figure 4.1: Simulated GaAs thin films are shown for (a) T /Tm = 0.27 (mostly amorphous
growth) and (b) T /Tm = 0.38 (crystalline growth), where T is simulated growth temperature and Tm is the melting temperature predicted by the SW potential. The As:Ga flux ratio
is close to 1. The initial substrate is marked with a reflective plate placed behind the lattice.
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
58
Crystalline Order, S
Equivalent Experimental Temperature
100 200 300 400 500 600 700 800 900
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0.0
Amorphous
0.1
Crystalline
0.2
0.3
0.4
0.5
Homologous Temperature, TZTmelt
0.6
Figure 4.2: The crystalline order parameter, S, for simulated GaAs thin films as a function
of growth temperature, T /Tm , using the SW potential. The As:Ga flux ratio was held close
to unity, and the order parameter was calculated after cooling the lattice to 0 K.
transition temperature illustrate the significant randomness of amorphous growth nucleation near the transition temperature. In this region, the degree of crystalline growth is
sensitive to the random creation of atomic-scale defects. In addition to direct measurement
of crystalline order, the critical epitaxial thickness (y epi ) was measured for the simulated
samples. We found that yepi for the simulated films changed from 12.7 Å at T /Tm = 0.34
to the full film thickness at T /Tm = 0.38. Experimentally, crystalline growth is observed
for T /Tm > 0.32 [34], which is below the simulated transition temperature estimate.
4.3.2 Arsenic adsorption and desorption mechanisms
The mechanisms of molecular arsenic adsorption and desorption can be investigated using
time resolved imaging of atom locations. Two mechanisms were identified for As 2 incorporation under LT MBE conditions. One mechanism incorporated both atoms of the dimer
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
59
into the film and occurred the majority of the time (96 ± 3% of dimer impacts) during LT
MBE. The time resolved atom position sequence shown in Fig. 4.3 summarizes this mechanism. The arsenic dimer (atoms marked 1 and 2) vertically approached the (001) surface
with the dimer at an angle of about 45◦ to the surface normal, Fig. 4.3(1). This dimer was
introduced with little internal vibrational energy and no angular momentum, and it retained
these characteristics as it approached the surface. Upon impact, both arsenic dimer atoms
bonded rapidly to the surface (atoms 3 and 4), Fig. 4.3(2). They then slowly reoriented to
form a second pair of strong bonds to atoms 5 and 6, Fig. 4.3(2–6).
The binding energy and dimer position above the surface for this adsorption and reorientation sequence are shown in Fig. 4.4. The “surface/dimer binding energy,” Fig. 4.4(a),
was determined at each time step by calculating the difference in the total energy between
two identical systems with the dimer removed to a position far above the surface and with
the dimer at the position indicated in Fig. 4.4(b). After the initial contact between the arsenic dimer molecule and two surface atoms, Figs. 4.3(2) and 4.4(2), the arsenic atoms
reoriented to form bonds with additional surface atoms. During this reorientation, the
dimer/surface binding energy data exhibited a temporary transitional bonding plateau that
persisted for 1.5–2.0 ps. The dimer/surface binding energy of this transitional bonding state
was roughly 70% less than the stable fully adsorbed state, Fig. 4.3(6). The existence of such
a transitional state during GaAs vapor deposition is consistent with DFT calculations [50].
A second mechanism of partial arsenic dimer incorporation was also observed, but it
occurred infrequently (4 ± 3% of dimer impacts), Fig. 4.5. This mechanism is very sensitive to the strength of the dimer bond, which is underestimated by the potential used here.
We therefore suspect that the observed probability of this mechanism may be substantially
overestimated [130]. Further work with enhanced potentials will be needed to ascertain its
true significance. For this mechanism, the arsenic dimer (atoms 1 and 2) approached the
surface vertically with a dimer bond angle that was almost perpendicular to the (001) sur-
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
60
~45°
0.5 nm
Figure 4.3: Incorporation of As2 into a gallium-rich surface at T /Tm = 0.34 over 5 ps with
1 ps time-series snapshots of surface bonding using the SW potential.
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
Distance Above Surface HÞL
Dimer/Surface
Binding Energy (eV)
0
0.0
-0.5
-1.0 (1)
-1.5
-2.0
-2.5
-3.0
-3.5
-4.0
-4.5
-5.0
-5.5
1
Time (ps)
2
3
4
(2)
(3)
(5)
(4)
(6)
Complete adsorption
(b)
0
5
Transitional bonding
(a)
8
7
6
5
4
3
2
1
61
Atom #1
Atom #2
1
2
3
Time (ps)
4
5
Figure 4.4: Incorporation of As2 into a gallium-rich (001) surface at T /Tm = 0.34: (a)
dimer binding energy and (b) distance above the surface. The vertical dashed lines are
numbered to match the snapshots shown in Fig. 4.3.
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
62
~5°
0.5 nm
Figure 4.5: Incorporation of one of the atoms from an arsenic dimer into a gallium-rich
surface at T /Tm = 0.34 over 1 ps with 0.2 ps time-series snapshots of surface bonding
using the SW potential.
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
63
face, Fig. 4.5(1). Atom 1 initially bonded to surface atom 3, Fig. 4.5(2). Atom 2 remained
vertical and unbonded to the surface, while the kinetic energy of the dimer pushed atom
3 into the surface, Fig. 4.5(3). Atom 1 then began to reorient on the surface and eventually bonded to atom 4, Figs. 4.5(4)-(5). Although, the separation between atoms 1 and 2
reduced during the initial impact, it was eventually kicked off and desorbed, Fig. 4.5(6).
Atom 2 desorbed with an extra ∼ 0.3 eV of energy more than it had initially.
The dimer binding energy and distance above the surface are plotted as a function of
time in Fig. 4.6. A transitional bonding state was again seen, Fig. 4.6(a), but this time it persisted for only about 0.6 ps, which was sufficient for the dimer atoms to find a low-energy
binding site on the surface (as opposed to two atoms in the previous mechanism). During
the period of time that atom 1 bonded with atoms 4 and 5, the potential energy between
atoms 1 and 2 increased as evidenced by the decreasing distance between the atoms in
Fig. 4.5(b). The first dimer atom then received a thermal kick, which when combined with
the increased potential energy was sufficient to break the dimer bond and enable desorption
of atom 2. The initial orientation of the incoming arsenic dimer appeared to determine the
likelihood that this mechanism occurred.
4.3.3 Point defect formation
The assembly of atoms and dimers on the GaAs (001) surface is a random process that
can introduce defects under LT growth conditions. The defect formation energy directly
impacts the likelihood that a point defect will form and contributes to the concentration
of each point defect type. The defect formation energy, Ω, can be calculated following a
method proposed by Zhang and Northrup [48, 155]. They showed that the defect formation
energy in a binary system is not only determined by the calculated change in system energy,
but is also strongly impacted by the environmental conditions above the grown surface. The
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
Dimer/Surface
Binding Energy (eV)
-0.0
Time (ps)
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1
(a)
-0.5
Transitional bonding
-1.0
-1.5
64
Complete
adsorption
(1)
(2)
(3)
(4)
(5)
(6)
-2.0
Distance Above Surface HÞL
-2.5
8
7
6
5
4
3
2
1
(b)
Atom #1
Atom #2
0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1
Time (ps)
Figure 4.6: Incorporation of one of the atoms from an arsenic dimer into a gallium-rich
surface at T /Tm = 0.34: (a) dimer binding energy and (b) distance above GaAs (001)
surface. The light gray dashed lines are numbered to match the snapshots shown in Fig. 4.5.
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
65
defect formation energy is calculated by:
−
Ω = ED
1
Δn Δμ ,
2
is the defect formation energy calculated for the computational cell, Δn is the
where ED
difference between the number of gallium and arsenic atoms (nGa − nAs ) in the computational cell, and Δμ is the relative chemical potential that accounts for the effect of relative
partial pressures of arsenic and gallium in the vapor environment above the surface. A
neutral charge state for each defect was assumed.
, was previously reported for vacancies (VGa and VAs ),
The defect formation energy, ED
antisites (GaAs and AsGa ), and simple tetrahedral interstitials (Gai and Asi ) [156, 130].
It was calculated at 0 K using a conjugate gradient energy minimization algorithm [188].
The chemical potential, Δμ, was varied between ±ΔHf , where ΔHf = −2.53 eV per
formula unit (fu) is the heat of formation for the GaAs zinc blende (zb) structure [130]. The
defect formation energies are shown over a range of arsenic- to gallium-rich equilibrium
environments in Fig. 4.7. The equiatomic vapor condition used in this study was neither
significantly arsenic- or gallium-rich. The expected environment therefore lies somewhere
between these two extremes.
The defect concentration is also dependent upon kinetic factors during film growth,
such as deposition rate and growth temperature as well as vapor flux composition [6, 25,
34]. For films grown at constant As:Ga flux ratio and deposition rate (as is the case for
this computational study), the sensitivity of defect concentration to temperature can be
explored. The defect concentration is plotted as a function of temperature for gallium
vacancies (VGa ), arsenic vacancies (VAs ), gallium antisites sitting on arsenic sites (Ga As ),
and arsenic antisites sitting on gallium sites, Fig. 4.8. For crystalline samples with S > 0.5,
the occurrence of gallium and arsenic interstitials was not observed sufficiently frequently
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
As-rich
Defect formation energy (eV)
10
9
8
7
6
5
4
3
2
1
0
66
Ga-rich
As i
As Ga
Ga i
VAs
VGa
Ga As
-2.53 -1.90 -1.27 -0.63
0
0.63
1.27
1.90
2.53
Chemical potential (Δμ)
Figure 4.7: The defect formation energies for gallium and arsenic vacancies (VGa and VAs ),
antisites (AsGa and GaAs ), and interstitials (Gai and Asi ) are plotted as a function of chemical potential, Δμ.
Equivalent Experimental Temperature
Defect concentration (10 20cm-3 )
500
600
700
800
900
Ga vacancy
As vacancy
Ga antisite
As antisite
30
25
20
15
10
5
0
0.35
0.40
0.45
0.50
Homologous Temperature, TZTmelt
0.55
Figure 4.8: Defect concentrations for vacancy and antisite defects are plotted as a function
of temperature, T /Tm . As:Ga flux ratio was held near unity during the simulated GaAs thin
film growth.
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
67
to plot as a function of temperature. In fact only a single gallium interstitial was observed
in these simulations. Defect complexes were also observed including a V Ga -Asi defect
complex.
Lattice defect concentrations were measured by counting the gallium and arsenic atoms
for eight of the grown layers above the substrate. These layers were sufficiently below the
surface to avoid the disorder inherent in free surfaces. Lattice vibration was removed from
the system by first minimizing the system energy to help the atoms find their local lowenergy positions. The method was quite effective for films grown with S > 0.5 (T /T m ≥
0.34). The defect concentration detection limit for each run was 8.6 × 1019 cm−3 due to
the limited film thickness sampled. By increasing the number of simulations at a given
temperature, this was reduced to 1.3 × 1019 cm−3 .
The defect concentration for all four defect types dropped as the growth temperature
was increased. The defect concentrations for both antisite defects dropped to levels at or
below the defect detection limit for T /Tm > 0.40. Gallium antisites were slightly more
prevalent at the lower temperatures. The arsenic vacancies showed a slightly higher concentration than either of the antisite defects. The fact that the concentration of arsenic
vacancies was higher than the gallium antisites is interesting, because the defect formation
energy of GaAs is less than that of VAs for these two gallium-rich point defects. Clearly,
kinetic processing slightly favors the formation of vacancies for simulations with the SW
potential. Gallium vacancies were commonly observed for the growth conditions simulated. Concentrations reached 3.4 × 1021 cm−3 at T /Tm = 0.35. This is higher than the
concentration of gallium vacancies (1–5 × 1018 cm−3 ) reported experimentally at a similar
temperature [25]. The defect concentrations were the highest (∼ 5 × 1021 ) for films grown
very close to the transition temperature. This is higher than the defect concentrations of
1018 –1020 cm−3 for low growth temperatures (T /Tm ≤ 0.38) [25]. The onset of amorphous growth, Fig. 4.2, is directly related to the concentration of defects in the as-grown
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
68
film, Fig. 4.8. Therefore, the elevated amorphous/crystalline transition temperature, which
was noted earlier, can now be explained in terms of the overprediction of defect concentration that drives the amorphous/crystalline transition in simulated thin films.
Several factors may have influenced the high defect concentrations seen in the LT simulations. Firstly, the accelerated deposition rates used in our simulations would likely trap
a higher concentration of defects than experimental MBE growth rates. Secondly, the vacancy defect formation energies predicted by the potential were reduced by 17% for gallium
and 13% for arsenic when compared to formation energies predicted by density functional
theory (DFT) [156, 130]. This discrepancy will, therefore, cause vacancy formation to be
overpredicted. Thirdly, in regard to the high arsenic antisite concentration, arsenic atoms
around a gallium vacancy are often displaced. This increases the probability of finding
the neighboring arsenic atoms in defect positions. In this way, arsenic atoms can form defect complexes with gallium vacancies. Such a formation mechanism would help account
for the observation of arsenic antisites despite their prohibitively large formation energy.
Lastly, the 9% variation of the As:Ga ratio for the 64 runs analyzed represents a deviation
from stoichiometric growth conditions and could increase the defect concentration.
Gallium vacancies were the most common defects observed in the simulation. The
formation of such a defect at discrete time steps during film growth is shown in Fig. 4.9. A
single cross-sectioned plane of the thin film is shown over 4000 ps of simulation time. In
all the snapshots, atoms oscillated in and out of the cross-sectioned plane. This oscillation
(and the related surface diffusion) was particularly evident at surfaces and around defects
as is clearly seen in Fig. 4.9(a) and (d). Initially (Fig. 4.9(a)), As2 was deposited and one
of the arsenic atoms (atom 1) entered the shown plane. Atom 1 was strongly bonded to
a gallium atom to the left (not shown) and very weakly bonded to the arsenic atom to the
right. (Note that in these figures the strength of the bond is proportional to the width of
the connecting bar.) In frame (b), an additional arsenic atom (atom 2) trapped a gallium
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
"
"
!
69
!
"
#
$ ! % '
&
#
"
$
!
%#
1 nm
'
&
Figure 4.9: The formation of gallium vacancies is observed in a time-series sequence. The
images were prepared by cross-sectioning the simulation computational cell. The film was
grown at T /Tm = 0.41 with an As:Ga flux ratio of 1.
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
70
vacancy and the system of two atoms and a vacancy was capped by atoms 3 and 4. In frames
(c) and (d) of Fig. 4.9, additional atoms (5–10) were added that trapped another gallium
vacancy. The double vacancy induced some further disorder in the cross-sectioned plane,
see atoms 6 and 7 in Fig. 4.9(d). In Fig. 4.9(e), atom 3 and one of the gallium vacancies
switched places, as indicated by the arrow in the previous panel (d). This migration of
vacancies toward the surface was temperature dependent and becomes more common as
temperature increases. The final snapshot shows two gallium vacancies. Atoms 6 and 7,
which surrounded the upper gallium vacancy, were displaced more than atoms 2 and 8,
which were more embedded in the bulk.
It is clear from Fig. 4.9 that the formation of defects in GaAs semiconductors takes
thousands of picoseconds. Essentially the formation is driven by an initially misplaced
atom, which is capped sufficiently rapidly that the defect does not have time to move over
the surface to a more highly coordinated site during growth. The concentration of defects
would therefore be related to deposition rate and temperature, as was observed to be the
case for gallium vacancies. This is largely a kinetic effect and could be annealed out at
higher temperatures. Defect concentration clearly increased when the growth temperature
was lowered and is likely to be the dominant factor in crystalline to amorphous growth
[6, 8, 25].
4.4 Conclusions
1. The Angelo, Mills, Grein et al. [75, 76] parametrization of the Stillinger-Weber (SW)
[68] potential energy function was utilized to simulate stoichiometric growth from a
vapor phase.
2. The potential predicted crystalline thin films for temperatures above T /T m ≈ 0.35
CHAPTER 4. LOW-TEMPERATURE ATOMIC ASSEMBLY . . .
71
and below the evaporation temperature. Increasingly amorphous growth was observed for T /Tm < 0.34.
3. Incorporation of arsenic dimers was the dominant mechanism observed. A secondary
mechanism (and much less frequent) of a single arsenic atom incorporation was also
identified, but was likely overpredicted by the SW potential. Initial dimer orientation
was observed to play a significant role in this assembly mechanism.
4. Gallium vacancy defects have the lowest formation energies and dominate during
low-temperature stoichiometric vapor deposition. The formation of gallium vacancies during film growth was accomplished by capping vacancies before surface diffusion filled them.
5. The SW potential has limitations with regard to the modeling of elemental binding
energies [130]. These properties, among others, should be improved to increase the
confidence in the veracity of the observed arsenic molecular bonding and desorption
mechanisms.
Chapter 5
Surface Free Energies and Electron
Counting1
5.1 Introduction
The use of classical interatomic potentials in molecular dynamics (MD) simulations provides a practical compromise between efficiency and accuracy, provided high fidelity potential energy functions are available [190]. However, in the modeling of the vapor-phase
epitaxial growth of semiconducting materials under certain conditions, it is important to
correctly predict surface structure and energy.
An evaluation of the surface free energy for the low-energy structures was discussed in
Chapter 3 for many of the available GaAs potentials. The Albe et al. [71] parametrization
of Tersoff’s potential (TR-ANNK) [70, 132] and two parametrizations of the StillingerWeber (SW) [68] potential format by Wang and Stroud (SW-WS) [80] and by Angelo
and Mills [75] and Grein et al. (SW-AMG+) [76] were found to be best suited for MD
1
This chapter is based on work published in J. Phys.: Condens. Matter 17 (2005), 6123-6137, see
Ref. [189]. The LMTO calculations performed within this chapter were generated by Duc Nguyen-Manh.
72
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
73
simulations of GaAs surfaces. All three potentials were shown to be unable to predict any
of the complex surface reconstruction structures that have been observed for the GaAs (001)
surface [13, 161, 12, 162]. In fact, no potential reported to date has been shown to correctly
predict the experimentally-observed and density functional theory (DFT) calculated (001)
surface reconstructions of GaAs.
The free surface of bulk-terminated polar semiconductors, such as GaAs, is driven to
relax and reconstruct its surface geometry in order to reduce the number of electrons in
high-energy sp3 dangling bond hybrid orbitals. On the GaAs (001) surface, this results in
surface dimerization of arsenic and gallium atom pairs and electron transfer from high- to
low-energy dangling bonds [171]. This was not accounted for in the empirical potentials
discussed so far. The electron counting (EC) rule [172, 173] has provided a simple means
for the identification of surface structures that minimize the occupancy of high-energy dangling bonds. Here, a method for linking the notion of electron counting with classical
potentials is developed and its utility for predicting the GaAs (001) surface reconstructions
is explored for three potential parametrizations. The addition of an EC rule motivated energy term to the potentials is shown to improve the ability of the modified potentials to
predict GaAs (001) surface structures.
5.2 (001) surfaces
5.2.1 Surface reconstructions
Approximately 100 surface structures have been proposed for the GaAs (001) surface and
about a dozen surface reconstructions have been experimentally observed [168]. Each
of the observed structures has been shown to be dependent upon the vapor and surface
composition and surface temperature. Several of the GaAs (001) surfaces most germane to
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
(a) (1x1) As-rich
(b) (2x1)
[110]
(e) b(2x4)
[110]
(i) g(2x4)
(d) z(4x2)
(c) (1x2)
[110]
(f) b2(2x4)
[110]
[110]
(g) a(2x4)
[110]
(j) c(4x4)-75%
(h) a2(2x4)
[110]
As-rich
[110]
Ga-rich
[110]
Ga
As
atom atom layer
TOP
(001)
Surface
[110]
[110]
Atom Legend
[110]
TOP
(001)
Surface
[110]
74
[001]
[110]
top
bottom
[001]
SIDE
SIDE
[110]
[110]
Figure 5.1: Suggested and observed GaAs (001) surface reconstructions. Top and side
projections are shown. Unit cells are marked in black. Arsenic-rich surfaces are shown in
(a), (b), and (e)-(j). The gallium-rich surfaces are shown in (c) and (d), and their lattices can
be constructed from the arsenic-rich surfaces by rotating the surface 90◦ counterclockwise
around the [001]-axis, as shown in the legend box.
subsequent discussions are shown in Fig. 5.1. Not all of the (001) surface reconstructions
shown have been experimentally validated; the selections were used to highlight the wide
range of possible surface configurations that a GaAs (001) surface can assume.
The bulk-terminated (1 × 1) (001) surface, Fig. 5.1(a), is the simplest surface structure
to consider. It is created by cleaving the Ga-As bonds of a zinc blende (zb) GaAs crystal
to expose a layer of either arsenic or gallium atoms. The as-cleaved arsenic-terminated
surface is shown in Fig. 5.1(a). The gallium-terminated surface is essentially the same as
the arsenic-termination but with the atom type swapped. This (1 × 1) surface has been
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
75
experimentally reported using in-situ reflection high energy electron diffraction (RHEED)
only during low-temperature (523 K) MBE growth [29].
The arsenic-rich (2 × 1), Fig. 5.1(b), and gallium-rich (1 × 2), Fig. 5.1(c), surfaces
have rows of either arsenic or gallium dimers. This dimerization reduces the number of
dangling bonds and has a lower energy than the bulk-terminated structures. While these
configurations have been experimentally observed on Si(001) surfaces [191, 192], there are
no reports of their presence on pure GaAs (001) surfaces [163].
Gallium-rich surfaces appear when the (001) surface of a GaAs crystal is annealed
in ultra-high vacuum, which facilitates preferential evaporation of surface arsenic atoms
[121]. The gallium-rich phase that commonly forms is the ζ(4 × 2), Fig. 5.1(d). This
surface was predicted first by DFT calculations [47] and subsequently observed by scanning
tunneling microscopy (STM) and x-ray diffraction studies [12, 161, 162] at temperatures
of 800 K and above. At lower temperatures, a combination of (2 × 6) and (3 × 6) surfaces
have been reported [12].
Several (2 × 4) arsenic-rich surface reconstructions, Fig. 5.1(e)-(i), have been identified by either theoretical calculation or experimentally using either STM or RHEED
[163, 193, 194, 195, 196]. The most reliable work to date identifies the β2(2 × 4) surface [163], Fig. 5.1(f), as the dominant surface reconstruction between 780 K and 820 K
[13]. Variations of the β2(2 ×4) reconstruction have also been reported at higher and lower
temperatures [13]. Between 820 K and 870 K, the surface structure deviates from the ideal
β2(2 × 4) structure with increased surface defect concentration (i.e., atoms are either missing or are displaced from the ideal β2(2 × 4) atomic configuration), while between 750
K and 850 K the surface reconstructions appear to be a combination of the c(4 × 4) and
the β2(2 × 4) surface structures [175, 197]. The existence of this α2(2 × 4) phase was
recently validated experimentally [166]. The remaining (2 × 4) surface reconstructions
shown in Fig. 5.1 have at one time or another been suggested as low-energy structures and
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
76
are included for later comparisons of DFT calculated surface free energies [13, 168, 193].
As the temperature is further lowered in the presence of an arsenic-rich atmosphere,
(2 × 4) surface reconstructions transform into c(4 × 4) surface reconstructions [167]. The
reconstruction shown in Fig. 5.1(j) has an additional 75% coverage of arsenic dimers; however, this has been observed to vary from 25–100% [13]. This reconstruction appears only
to occur under high arsenic vapor pressure conditions and at temperatures between 470 K
and 750 K [175]. The exact structure of the additional surface dimers has recently been explored and two c(4 × 4) surface reconstruction types have been found [174]. Here, only the
As-As surface is explored, so as to remain consistent with previous ab initio calculations
[47].
5.2.2 Surface free energy diagrams
The relative stability of various compound semiconductor surface structures can be compared over a range of conditions via the calculation of equilibrium surface free energy
diagrams. The thermodynamic derivation [169] and justification of the calculation method
[98, 170] have been well established for systems in equilibrium. The surface free energy
can be determined from the total energy, U, calculated via DFT [47] or classical potential
based methods for the surface reconstructions represented in Fig. 5.1.
The surface free energies for the potentials discussed in this paper were calculated using
conjugate gradient molecular statics [188], which minimizes the total energy of an ensemble of atoms. A computational slab of 1500–1700 atoms was created with two identical free
surfaces, each with a surface area A. Over 25 layers of atoms separated these reconstructed
surfaces and the central plane was fixed. Each layer in the computational cell measured
roughly 32 Å × 32 Å (64 atoms per layer) and periodic boundary conditions were used to
approximate an infinite slab in the lateral direction.
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
77
For the calculation of surface free energy, the atmosphere above the surface is assumed
to serve as a reservoir for atom exchange with the GaAs (001) surface. The number of
atoms is conserved during surface reactions that interchange gallium or arsenic atoms
[169]. The gallium and arsenic atoms in the reservoir have a chemical potential, μ Ga and
μAs . The surface free energy per unit area, γ, is then calculated as a function of atom configuration and composition for the computational cell [169]. The specific surface energy as
T → 0 K is given by:
γ=
1 tot
Uslab − NGa μGa − NAs μAs ,
2A
(5.2.1)
tot
is the total
where 2 A is the surface area of the double-surfaced computational cell, Uslab
energy of the computational slab, Ni is the number of atoms of type i, and μ i is the chemical
potential for species i (gallium or arsenic) in the slab. The gallium and arsenic chemical
potentials for the reservoir are related to the Gibbs free energy (or cohesive energy as
T → 0 K) per formula unit (fu) of the bulk GaAs crystal.
(bulk)
(bulk)
μGa + μAs = EGaAs = EGa
(bulk)
where Ex
(bulk)
+ EAs
+ ΔHf ,
(5.2.2)
is the cohesive energy per fu of either the gallium, arsenic, or GaAs systems
and ΔHf is the heat of formation for GaAs. The exothermic heat of formation of GaAs
(bulk)
(bulk)
(ΔHf ) is easily defined as ΔHf = EGaAs − EGa
(bulk)
− EAs
. Hence, the surface free
energy per unit area can be reexpressed as a function of the arsenic chemical potential.
γ=
1 tot
(bulk)
Uslab (NGa , NAs ) − NGa EGaAs − (NAs − NGa ) μAs .
2A
(5.2.3)
These reservoir chemical potentials can not be varied indiscriminately. If the arsenic
chemical potential becomes too small, then arsenic would leave the surface of the GaAs
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
78
film and pure gallium would form on the surface. Likewise, if the arsenic chemical potential
assumes a large negative value, then crystalline arsenic would begin to form on the surface.
The bounds within which the arsenic chemical potential is controllable are [98, 169]:
(bulk)
EAs
(bulk)
+ ΔHf < μAs < EAs
.
(5.2.4)
This range can be simplified by subtracting the bulk arsenic free energy from both sides of
the inequality in Eq. 5.2.4:
(bulk)
ΔHf < μAs − μAs
(bulk)
where EAs
(bulk)
= μAs
<0,
(5.2.5)
, as T → 0 K. The surface free energy diagram can then be plotted
between zero and the GaAs heat of formation. The arsenic chemical potential range can be
related to arsenic partial pressure (or arsenic concentration) assuming an ideal-gas reservoir
environment [198].
The free energy (cohesive energy as T → 0 K) for stable gallium, arsenic, and GaAs
phases are needed to calculate the surface free energy diagram with the range of compositions (arsenic chemical potential) defined by boundaries in Eq. 5.2.5. The cohesive energies
for lowest-energy GaAs, gallium, and arsenic phases are needed to define these boundaries
(bulk)
on μAs − μAs
. The lowest-energy binary GaAs phase has a zb structure [133, 134]. The
corresponding terminal phases are αGa and αAs phases for elemental gallium and arsenic
systems [135]. The experimental heat of formation at 298 K for GaAs was reported to
be −0.736 eV/fu [137]. The related experimental cohesive enthalpies at 298 K for GaAs,
gallium and arsenic (ΔHcoh ) are −6.690, −2.819, and −3.135 eV/fu, respectively [137].
These values can be used to approximate cohesive energies per fu as T → 0, see Chapter 3.
Ab initio methods have been used to calculate the slab and bulk energies used in Eq. 5.2.3
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
79
to construct a GaAs (001) surface free energy diagram, Fig. 5.2(a). In Fig. 5.2(a), the
solid lines correspond to surface free energy calculations by Lee et al. [47], and the dotted lines were obtained by Ohno [199] for (1 × 2) and (2 × 1) surface reconstructions.
Black lines show the lowest-energy phases; those that are represented by gray lines represent metastable phases. Under a high arsenic chemical potential (i.e., in an arsenic-rich
atmosphere) the c(4 × 4) surface is the most stable. Over a wide intermediate range of
(bulk)
μAs − μAs
, the β2(2 × 4) surface becomes the most stable. At the lowest relative ar-
senic chemical potential, the gallium-rich ζ(4 × 2) surface has the lowest surface energy. It
should be noted that there is a narrow arsenic chemical potential range between the ζ(4×2)
and β2(2 × 4) stable regions where the α2(2 × 4) reconstruction is predicted to have the
lowest surface energy.
Fig. 5.2(a) indicates that over a wide range of the arsenic chemical potential, the lowenergy arsenic-rich β2(2 × 4) surface reconstruction is dominant. As indicated above, the
β(2 × 4) had been previously incorrectly thought to be the most stable over this chemical
range [168]. More recent DFT calculations indicate that the β(2 × 4) and β2(2 × 4) surface
energies are in fact quite close. They are between 2.2 meV/Å2 and 3.1 meV/Å2 of each
other [47, 200]. The energy difference was attributed by Northrup and Froyen to electrostatic interactions on the polar semiconductor surface [165]. Even so, because the energy
difference between β(2 × 4) and β2(2 × 4) surface reconstructions is small, the β(2 × 4)
reconstruction might still be seen during vapor deposition experiments where diffusion is
slow when compared with film growth rates [200, 201].
Fig. 5.2(a) shows that the α2(2 × 4) surface reconstruction has the lowest energy over
a very small range of compositions and is bounded by the arsenic-rich β2(2 × 4) and the
gallium-rich ζ(4 × 2) reconstructions [47]. Gallium-rich β(4 × 2) or β2(4 × 2) surfaces
were once thought to be stable under gallium-rich conditions [168]. These gallium-rich
(4 × 2) reconstructions are similar to the arsenic-rich (2 × 4) surfaces in Fig. 5.1, except the
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
!
!
a
!
!
b
!
b
!
z
!
a
!
b
!
a
!
b
!
!
!
z
!
g
! b"b
! b"b
!
a2"a
.
-
!
#$% &%'$% %
g
!
!
!
-
m As m(bulk)
As (eV/fu)
#$% &%'$% %
g
!
!
H
b"b
!
!
! a"a2 !
!
-
!
!
.
b"b
!
!
m As m(bulk)
As (eV/fu)
!
b"b
!
( ) %** )+,,-
a2"a
!
z
m As m(bulk)
As (eV/fu)
meVÞ2L
meVÞ2L
.
H
#$% &%'$% %
g
!
.
H
a
g
meVÞ2L
H
g
#$% &%'$% %
meVÞ2L
g
/0)
80
-
!
z !
a !
a
"a
!
!
a
!
b"b
!
!
m As m(bulk)
As (eV/fu)
Figure 5.2: Surface free energy diagrams for GaAs (001) surface reconstructions, as predicted by (a) DFT [47, 199], (b) SW-WS, (c) SW-AMG+, and (d) Tersoff parametrizations.
The lowest-energy surface reconstructions (thick solid lines) are shown assuming surface
reconstructions (· · · · · ·) are destabilized by calculations in Section 5.6. Solid gray lines
are metastable surface reconstructions. Reconstruction labels with a “/” indicate that surface free energy lines are very close or overlap, e.g., in panel (b) the α2/α label represents
α(2 × 4), α2(2 × 4), α(4 × 2), and α2(4 × 2) surface reconstructions.
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
81
arsenic and gallium atom types are swapped and the surface is rotated by 90 ◦ . However,
Fig. 5.2(a) indicates that these surfaces are not stable structures. Instead, the ζ(4 × 2) phase
with a different lattice arrangement appears to be the most stable gallium-rich surface. The
understanding of these surface reconstructions has been greatly aided by DFT calculations.
Although the current picture may slightly change as surface reconstructions are refined
[174], a drastic change in the predicted GaAs (001) surface reconstructions is not expected.
5.3 Calculations using conventional potentials
Interatomic potentials provide a useful means for studying atomic structures and dynamic
interactions at nanoscopic length and time scales. By using them to calculate the total energy of a structure, potentials then can help identify the equilibrium and metastable phases
of solids and the various reconstructions of their surfaces. Such potentials are developed
by fitting the free parameters of physically inspired potential energy functions to material
properties. Several potentials (SW-WS, SW-AMG+, and TR-ANNK) have been proposed
for the GaAs system and were evaluated in Chapter 3 for their utility in MD simulations
with free (001) surfaces. The surface structure energy predictions obtained with these potentials for each of the reconstructions are shown in Fig. 5.2(b)-(d).
Before constructing surface free energy diagrams, the cohesive energies of the stable elemental and binary crystals were calculated for each potential. This was performed by minimizing the energy of the cubic and non-cubic crystals using the SW and Tersoff potentials,
see Appendix B. The conjugate gradient method [188] was used to find the lowest-energy
phase by both scaling the lattice dimensions and adjusting the internal atom positions of
supercells with 100–1000 atoms. The experimental and predicted potential equilibrium
structures are summarized along with cohesive energy and heat of formation data in Table 5.1.
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
82
Table 5.1: Predicted GaAs equilibrium properties for three empirical potential energy functions and experimental data. Heat of formation, ΔH f , for GaAs and the cohesive energy,
Ec , have units of eV/fu.
GaAs
Ga
As
Potential
ΔHf Crys.
Ec
Crys.
Ec
Crys.
Ec
a
Experimental -0.74
zb
-6.69 αGa -2.82 αAs -3.14
-0.47
zb
-4.12
dc
-1.78
dc
-1.87
SW-WS
SW-AMG+
-2.53
zb
-5.63
dc
-1.43 fcc -1.67
-0.92
zb
-6.71 bcc -2.84 αAs -2.95
TR-ANNK
a
Reference [137].
Experimental and potential calculations predict the GaAs zb phase to be the most stable. However, the equilibrium elemental phases and energies were not predicted with such
fidelity, see Chapter 3. The SW potentials underestimated experimental cohesive energies
for gallium and arsenic by as much as 45%. The TR-ANNK parametrization significantly
improves on this performance.
A relaxed GaAs crystal was used for the surface calculations. The supercell had two
identical (001) faces separated by 25–27 planes (each containing 64 atoms) to ensure that
the two faces did not interact. The energy of the supercell was minimized using the conjugate gradient method by scaling the volume and moving the internal atom positions. The
2
/3, where rbulk is the
surface area of the GaAs computational supercell was A = 512 rbulk
interatomic spacing for the equilibrium GaAs zb lattice (determined for each potential).
The calculated nearest-neighbor interatomic spacings of the equilibrium bulk structures of GaAs, gallium, and arsenic, as well as the dimer spacings on the gallium-rich
and arsenic-rich surfaces, are reported in Table 5.2. Experimental surface dimer spacings
were gathered from gallium-rich ζ(4 × 2) [161] and arsenic-rich β2(2 × 4) surfaces [175],
while surface dimer spacings for the potentials correspond to those on the lowest-energy
gallium-rich (1×2) and arsenic-rich (2×1) surfaces. Inspection of Table 5.2 shows that the
SW-WS potential predicted a uniform expansion of the bulk and surface equilibrium inter-
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
83
Table 5.2: Nearest-neighbor interatomic spacings (r) for equilibrium bulk phases and
lowest-energy surface dimers from experiments and three empirical potentials. All distances are in Å. Bonding coordination, Z, is also noted for bulk phases. Surface dimer
distances are taken from the uppermost surface dimer of the most stable surface reconstruction.
Ga-As
Ga-Ga
As-As
rbulk (Z) rbulk (Z) rsurf
rbulk (Z)
rsurf
Potential
a
b
c
b
Expt./DFT 2.443 (4) 2.457 (1) 2.445 2.517 (3)
2.38d
SW-WS
2.817 (4) 2.806 (4) 2.898 2.863 (4) 2.928
SW-AMG+ 2.447 (4) 2.440 (4) 2.575 3.433 (12) 3.193
TR-ANNK 2.448 (4) 2.745 (8) 2.699 2.353 (3) 3.213
a
Extrapolated to 0 K from reference [134].
Extrapolated to 0 K from reference [135].
c
Reference [161].
d
Reference [175]. Other calculations predict 2.50–2.52 Å [202].
b
atomic spacings for gallium, arsenic, and GaAs systems. Furthermore, all of the potentials
predicted an expanded As-As dimer on the arsenic-rich (2 × 1) surface.
Relaxed surface free energies for the reconstructions shown in Fig. 5.1 were calculated
using Eq. 5.2.3 and the data in Table 5.1. The surface free energy was then plotted versus
the relative arsenic chemical potential with boundaries defined by Eq. 5.2.5. These results
are summarized in Fig. 5.2. Examination of the surface free energy diagrams shows that
all of the potentials incorrectly predict the (1 × 2) gallium-rich and the (2 × 1) arsenic-rich
surfaces to be the most stable. The predicted lowest-energy (1 × 2) and (2 × 1) surfaces
do not have any of the missing dimers seen experimentally in the β2(2 × 4) structure or
the multilayer gallium dimerization and arsenic surface segregation seen in the ζ(4 × 2)
surfaces, Fig. 5.1.
The predicted surface energy of the β(2 × 4) and β2(2 × 4) surfaces were identical
(shown as β/β2(2 × 4) in Fig. 5.2) for all of the potentials. However, experimental studies [13] and ab initio calculations [47] always found the β2(2 × 4) surface reconstruction
to be more stable by 3–5 meV/Å2 . The β/β2 energy difference is thought to be a result
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
84
of electrostatic interactions [165]. These electrostatic interactions were not directly incorporated in any of the potentials studied here, which likely makes differentiation between
β and β2 surface reconstruction families impossible. A similar observation can be made
for the gallium-rich α(4 × 2) and α2(4 × 2) surfaces. For SW-WS, the α/α2(2 × 4) and
α/α2(4 × 2) were simply labeled as α/α2 in Fig. 5.2(b), because their free energies are
very close. Only TR-ANNK predicts a significant energy difference between the α(4 × 2)
and α2(4 × 2) surface structures.
During the process of finding the minimum energy for each surface supercell, the potential directs how atoms are moved on the surface. Hence, depending on the potential, the
resulting structure does not always match the initial surface structures shown in Fig. 5.1.
This is the case for the TR-ANNK potential’s relaxation of the γ(2 × 4) and c(4 × 4). For
these surfaces, the TR-ANNK parametrization predicts very weak arsenic surface dimer
bonding to the arsenic-rich surface. In fact, arsenic surface dimers resided about twice as
far above the surface (3.2–3.4 Å) compared to those predicted by other potentials. The TRANNK parameter set also fails to relax the ζ(4 × 2) to match the experimental structure.
Both SW parametrizations tend to relax the original surface reconstructions to form surface
bonds with tetrahedral bond angles (109.5 ◦ ).
5.4 Bond and dangling bond energy levels
It is well known that the surface geometry of low index polar semiconductors are significantly influenced by the electron occupancy of bonding and dangling bond energy levels. Harrison has shown that for sp3 hybrid orbitals, bonding and anti-bonding energy
levels relevant to the GaAs surface can be estimated using the bond orbital approximation
[203]. Following Harrison’s approach, the surface energy levels were estimated using tightbinding parameters (hopping integrals and orbital energies) calculated by the first principle,
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
85
Table 5.3: First principle, third generation LMTO tight-binding parameters for GaAs zb,
gallium dc, and arsenic dc crystals. Dashes (—) indicate the parameter is not applicable to
the material.
Parameter
Symbol
GaAs
Ga
As
Interatomic radius
r0 (Å)
2.448
2.459
2.506
ssσ (eV)
−1.454 −1.632 −1.020
σ bond hopping integral
σ bond hopping integral
spσ (eV)a
1.691
1.890
1.605
b
psσ (eV)
−2.147 −1.890 −1.605
σ bond hopping integral
σ bond hopping integral
ppσ (eV)
2.371
2.108
2.434
π bond hopping integral
ppπ (eV)
−1.012 −0.952 −0.884
Ga
−5.070 −5.159
—
s orbital energy for cation εs (eV)
p orbital energy for cation εGa
(eV)
1.377
1.429
—
p
As
−10.646
— −11.868
s orbital energy for anion εs (eV)
p orbital energy for anion εAs
(eV)
−1.366
— −2.434
p
a
b
For heteropolar bonding, the arsenic s orbital overlaps the gallium p x orbital.
For heteropolar bonding, the arsenic p x orbital overlaps the gallium s orbital.
third generation linear muffin-tin orbital (LMTO) method [204, 205]. These updated parameters are used to expand previous energy level calculations [206] to include Ga-Ga and
As-As bonding energies. These parameters are calculated at specific interatomic separations for the GaAs zb, gallium diamond cubic (dc), and arsenic dc crystal structures and
are summarized in Table 5.3.
The atomic s and p energy levels of both gallium and arsenic combine to form sp 3
hybrids in tetrahedrally coordinated solids. The four hybrid orbitals of isolated gallium and
As
arsenic atoms have an energy εGa
h and εh , respectively. Both hybrids contribute to the total
energy of the crystal when electrons occupy these orbitals. Since these energies correspond
to those of the non-bonded state, they also approximate the dangling bond energies of
gallium and arsenic on a free surface.
In a GaAs crystal, the hybrid orbitals overlap to form GaAs bonds with an energy ε GaAs
b
and GaAs anti-bonds with an energy εGaAs
. In a solid, the GaAs bond levels spread to form
a
a valence band and the GaAs anti-bond levels form a conduction band. Homopolar hybrid
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
$ %# +
+
A! A
!
A
+
+
A A" A
"
A# A# A#
A
86
Figure 5.3: The energy level diagram for a GaAs surface. Gallium and arsenic unbonded
As
GaGa
), As-As (εAsAs
), and
(dangling bond) hybrid energies (εGa
h , εh ), as well as Ga-Ga (εb
b
GaAs
Ga-As (εb ) bond energies are shown.
bonds also exist in arsenic and gallium dc crystals or on GaAs surfaces where As-As and
Ga-Ga dimers may form. The arsenic and gallium hybrids combined to form an As-As
, and a Ga-Ga bond with energy, εGaGa
. Five energy levels are
bond with energy, εAsAs
b
b
Ga
particularly relevant to the GaAs (001) surface. They are the unbonded hybrids (ε As
h , εh ),
), and surface dimers (εAsAs
, εGaGa
). Their energy levels are graphically
bulk bonds (εGaAs
b
b
b
represented in Fig. 5.3.
On the (001) surface, each atom has two dangling hybrid bonds on the unreconstructed
(1 × 1) surface. Fig. 5.3 shows that the surface energy increases when electrons occupy
gallium atom hybrid dangling bonds rather than arsenic hybrid dangling bonds. Harrison
showed that surfaces will reconstruct to maximize the occupancy of the arsenic dangling
bonds on the surface [171]. The surface energy of (001) surfaces is also lowered when AsAs and Ga-Ga dimerization occurs on arsenic-terminated and gallium-terminated planes,
respectively [168].
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
87
Both relaxation and reconstruction are driven by the surface energy reductions that
accompany valence electron redistribution from non-bonded high-energy levels into lowerenergy bonding or arsenic dangling bond energy levels, see Fig. 5.3. Dimer formation can
be addressed by the bonding terms in potentials. However, none of the current potentials
address the energy penalty associated with occupation of high-energy dangling bonds or
the resulting electron transfer that reduces this energy.
5.5 Electron counting model
The energy level issues identified by Harrison [171] have been summarized in an EC rule
[172, 173]. This rule states that a semiconductor surface is stable only if all anion dangling
bonds are fully occupied while all cation dangling bonds are empty. For a GaAs surface,
this means that all surface dimer bonds, bulk covalent bonds, and arsenic (anion) dangling
bonds contain two electrons while all of the gallium (cation) dangling bonds are empty.
If the number of available electrons and the number of electrons needed to populate these
covalent and dangling bonds are equal, then the EC rule can be satisfied. It was shown that
surfaces attempt to reconstruct to achieve this condition.
An EC energy penalty can be incorporated into a surface free energy calculation using
classical interatomic potentials. Suppose that each atom has V i valence electrons. If there
are N atoms, the total number of valence electrons
Vtot =
N
Vi .
(5.5.1)
i=1
The degree of electron occupancy in covalent and dangling bonds is parametrized in the
EC model. The bond between atoms i and j is required to be occupied by ξ ij electrons,
and atom i must contains α i electrons per dangling bond for the EC criteria to be met.
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
88
Therefore, the total number of electrons required by the model is:
Z
1 =
ξij +
αi ni ,
2 i=1 j=i
i=1
N
VEC
i
N
(5.5.2)
1
where i1 , i2 , ..., iZ is a list of the iZ neighbors of atom i and ni is the total number of
dangling bonds associated with atom i. The total number of dangling bonds of atom i is
calculated by ni = ρ − iZ , i.e., the difference between the total number of covalent bonds
formed in the bulk tetrahedral crystal, ρ = 4, minus the number of nearest-neighbor bonds
formed around atom i, iZ . The number of bonds, iZ , around atom i can be counted by:
iZ =
⎧
⎪
N
⎨ 1, rij < r νη
cut
⎪
νη
j=1, i=j ⎩ 0, rij ≥ rcut
,
(5.5.3)
νη
where rcut
is the interatomic cutoff distance between atoms i of type ν and j of type η. The
cutoff distance is important because only covalent bonds are relevant and bonds counted
outside the nearest-neighbor radius would disrupt the population of electrons.
The EC rule criterion asserts that the number of available electrons must equal the number of electrons used to populate the covalent and dangling bonds. When this difference,
ΔV = Vtot − VEC ,
(5.5.4)
is greater than zero, there are excess electrons in the system that must fill higher energy
states. When it is less than zero, low-energy states remain open. In both cases, the system
energy is increased. This effect is estimated with a simple quadratic energy penalty, ΔE,
given by:
ΔE = w ΔV 2 ,
(5.5.5)
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
89
where w is an energy penalty weight. The quadratic form of Eq. 5.5.5 is used because it is
the lowest-order non-zero term in a Taylor’s series expansion of EC energy. The constant
term of the Taylor expansion is irrelevant because only energy differences are considered
(not absolute EC energies), and the first-order term is zero for a system in equilibrium.
In the GaAs system, the number of valence electrons for gallium and arsenic are V Ga =
3 and VAs = 5. For a structure that satisfies the EC rule, the Ga dangling covalent bonds
must be empty, the arsenic dangling bonds and the remaining bonds must be full. This can
be simply implemented as ξ ij = 2, αAs = 2, and αGa = 0 in Eq. 5.5.2.
GaAs (001) surface reconstructions that equate Vtot and VEC are called EC rule compliant (ECRC) surfaces. The ECRC surface reconstructions identified in this paper are: the
β(2 × 4), β2(2 × 4), α(2 × 4), α2(2 × 4), β(4 × 2), β2(4 × 2), α(4 × 2), α2(4 × 2), γ(2 × 4),
c(4 × 4) 75%, and ζ(4 × 2). Surfaces that fail to comply with the EC rule (non-ECRC) include the arsenic and gallium bulk-terminated (1 × 1) (001) surfaces and the (2 × 1) and
(1 × 2) dimer row surfaces.
5.6 Potential energy functions with electron counting
The addition of the EC energy to a conventional potential enables energy predictions by a
potential to be modified to destabilize those that do not satisfy the EC criterion. It is important to recognize that the EC energy penalty alone does not guarantee that a potential+EC
combination will produce surface free energies that reproduce experimental observations.
Inaccuracies in the potential itself can still drive the surface to physically invalid predictions.
An implementation of the EC concept in conjunction with a potential requires determiνη
, to correctly enumerate homo- and heteropolar bonds and
nation of cutoff distances, rcut
identification of a realistic energy penalty parameter, w. These parameters are then inserted
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
90
Table 5.4: EC parameters for each empirical potential energy function. Cutoff distances
(Å) and the energy penalty (meV per electron) parameters are reported.
GaGa
AsAs
GaAs
Potential
w (meV/e− ) rcut
(Å) rcut
(Å) rcut
(Å)
SW-WS
7.45
3.83
3.95
4.50
13.52
2.90
3.30
3.50
SW-AMG+
TR-ANNK
7.20
2.85
3.40
3.50
in Eqs. 5.5.1 through 5.5.5 to calculate the EC energy for each surface reconstruction. The
parameters for all of the potentials are summarized in Table 5.4.
The procedure to determine the cutoff distances can be demonstrated for experimentally
valid crystal structures, such as the ζ(4 × 2) reconstruction. Recent experimental studies
indicate that the ζ(4 × 2) surface has second nearest-neighbors at 2.74–2.99 Å [161]. To
avoid counting these second nearest-neighbor Ga-Ga bonds, the Ga-Ga cutoff distance in
Eq. 5.5.3 must be less than 2.74 Å. Other surfaces have different maximum distances;
therefore, the cutoff distances for Ga-Ga, As-As, and Ga-As bonds were selected.
A universal choice of cutoff distances is not possible because each potential relaxes
a surface differently. Satisfying EC is especially difficult when As-As or Ga-Ga surface
dimers are expanded to values close to the As-As and Ga-Ga second nearest-neighbor bond
√
distances (r2NN = 4 r1NN / 6) of the equilibrium GaAs zb structure. This is the case for
the As-As bonds predicted by both the SW-AMG+ and TR-ANNK potentials. For both
potentials, the As-As surface dimer bond lengths are around 3.2 Å on the (2 × 1) surface
as compared to the Ga-As second nearest-neighbor distance of 3.99 Å. The cutoffs were
determined by varying the cutoff distances to find a value that satisfied ΔV in Eq. 5.5.4 for
the greatest number of surfaces.
Values of ΔV were calculated. All ECRC surfaces should obtain ΔV = 0. While the
SW-WS potentials predict ΔV = 0 for all of the ECRCs studied, the SW-AMG+ and TRANNK parametrizations give non-zero ΔV values for some of the ECRC surfaces. The
non-zero ΔV values predicted by the SW-AMG+ and TR-ANNK potentials are listed in
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
91
Table 5.5. They are caused by the surface relaxation induced expansion of surface dimer
length. The ζ(4 ×2) surface predicted by TR-ANNK has a significant ΔV (and is therefore
subject to a significant EC energy penalty) because both gallium dimers are expanded by
10% and the correct ζ(4 × 2) surface structure can not be maintained by the potential. In
addition, the γ(2×4), c(4×4), or the α2(2×4) surfaces predicted by the SW-AMG+ potential have non-zero ΔV because, as was previously mentioned, the predicted surface dimers
for arsenic are relatively large compared to the second nearest-neighbor As-As interatomic
spacing in the GaAs zb bulk phase, see Table 5.2.
The EC energy penalty parameter, w, was determined from ab initio data for the energy
difference between the β2(2 × 4) and the (2 × 1). DFT calculations predicted this energy
difference to lie between 3.1 and 4.7 meV/Å2 (on the arsenic-rich side of the diagram)
[199, 207]. Ohno’s [199] value of 4.7 eV/Å2 was used as the energy difference between
the β(2 × 4) and (2 × 1) surface reconstructions. The β(2 × 4) was chosen over the
β2(2 × 4) because it was predicted to be a slightly more stable reconstruction by a fraction
of a millielectron volt for the studied potentials.
The EC energy adjustment, Δγ, between the (2 × 1) and β(2 × 4) surfaces was then
determined so that it increased the original energy difference between the two surfaces for
each potential to that of 4.7 eV/Å2 , as predicted by the ab initio calculations. With this
data, the w parameters can be solved for each potential parametrization using the relation:
Δγ = w (ΔV )2 / (2 A) ,
(5.6.1)
where ΔV is the difference in the total number of electrons in Eq. 5.5.4 and 2 A is the total
surface area of the double surface crystals. The results for the remaining w parameters are
recorded in Table 5.4.
A summary of the changes in surface energy, Δγ, imposed by EC on all structures
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
92
Table 5.5: EC adjustments to surface energy for three empirical potentials. Two types of
surfaces are shown: EC rule violating surfaces (non-ECRC) surfaces always receive an EC
energy penalty, and EC rule compliant (ECRC) surfaces generally have no energy penalty
but fail for specific surfaces due to potential relaxation. Note that ΔV and Δγ are defined
in Eqs. 5.5.4 and 5.5.5.
Δγ (meV/Å2 )
Type Surface
ΔV (e− ) SW-WS SW-AMG+ TR-ANNK
(1 × 1)-As
-192
101.3
244.0
129.8
non- (1 × 1)-Ga
192
101.3
244.0
129.8
-64
11.3
27.1
14.4
ECRC (2 × 1)-As
(1 × 2)-Ga
64
11.3
27.1
14.4
α2(2 × 4)
(64)a
0.0
27.1
0.0
a
γ(2 × 4)
(64)
0.0
27.1
0.0
ECRC
c(4 × 4) 75%
(64)a
0.0
27.1
0.0
b
ζ(4 × 2)
(-256)
0.0
0.0
230.7
a
b
For SW-AMG+, where non-zero ΔV is caused by relaxation.
For TR-ANNK, where non-zero ΔV is caused by relaxation.
where Vtot = VEC is reported in Table 5.5. From this tabulated data, one can clearly
see which surfaces fail to satisfy the EC criterion for each potential. These surfaces were
marked in Fig. 5.2 with dashed lines, as noted in its caption. The new total surface energy
for these non-ECRC surfaces can then be obtained by adding Δγ to that predicted by the
potentials in Fig. 5.2.
The energy difference between the gallium-rich β(4×2) and (1×2) surface reconstructions can also be checked. The energy difference was calculated and compared to the ab
initio value, 13.8 meV/Å2 [199] (on the gallium-rich side of the diagram), for each potential. The values were determined as 3.92, 2.83, and 2.41 meV/Å2 for SW-WS, SW-AMG+,
and TR-ANNK, respectively.
The data in Table 5.5 and the surface free energy diagrams shown in Fig. 5.2 clearly
show that non-ECRC surfaces, such as (1 × 2), (2 × 1), (1 × 1)-As, and (1 × 1)-Ga,
are destabilized when electron occupancy is taken into account. By assigning an energy
penalty to surfaces that fail to fill covalent bonds and arsenic dangling bonds, the potential
CHAPTER 5. SURFACE FREE ENERGIES AND ELECTRON COUNTING
93
is now able to better predict trends in the surface free energy diagram.
The EC model presented in this paper looks at the energetics of a surface with many
atoms. It does not probe mechanisms by which assembly occurs. The local phenomena
such as electron transfer is not handled; thus, electrons are only counted globally without
any local information, i.e., it is a global model. It does not address local conditions and can
not be used to calculate force and stress. A more sophisticated EC potential will be needed
to provide an MD simulation tool for studying surface reconstructions. The next step is to
develop a dynamic potential that captures the physics of EC for use in MD simulations. A
direct MD simulation of growth of the GaAs (001) surface is summarized in Appendix H.
5.7 Conclusions
1. Conventional potential energy functions, such as Tersoff and Stillinger-Weber, as
parametrized, all incorrectly predict the (2 × 1) arsenic-rich and the (1 × 2) galliumrich structures as the lowest-energy surface reconstructions of a GaAs (001) surface.
Missing dimer rows and other complexities seen in the β2(2×4) and ζ(4×2) surface
reconstructions are not captured by these potentials.
2. The incorporation of the energy penalty associated with electron occupancy of dangling bonds (electron counting rule) improves predictions of various surface reconstruction energies by destabilizing (1 × 1) bulk-terminated (001) surfaces and the
dimer row ((2 × 1) and (1 × 2)) surface reconstructions for each of the potentials.
Chapter 6
An Analytic Bond-Order Potential1
6.1 Introduction
The vapor phase growth of GaAs thin films is an area of significant technological interest
and study [9]. Nonetheless, uncertainties remain about the atomic-scale assembly phenomena active during GaAs thin film growth [20, 21, 22, 23, 25, 50, 113, 114, 115, 172]. In
principle, these molecular assembly mechanisms can be studied with molecular dynamics
(MD) [129], provided a valid interatomic potential is available.
The usual approach to the development of an interatomic potential involves fitting a
physically motivated potential energy function to a database of physical properties for the
system of interest. A large experimental [9, 137, 141] and ab initio [46, 71, 143, 150]
database is available to guide the fitting and evaluation of potentials for the GaAs system.
However, the validity of the angular- and radially-dependent forces between the atoms
can be limited by both their functional representation by the potential and by inaccuracies
introduced during parametrization [130]. High fidelity is especially important during simulations of vapor deposition, where the local atomic environment radically changes over
1
This chapter is based on work in press for publication in Phys. Rev. B, see Ref. [208].
94
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
95
short periods of time. Currently, the best GaAs interatomic potentials either predict unrealistically weak As-As dimer bonds, see Chapter 4, or significantly underestimate the
As2 molecule sticking probability upon impact with the GaAs (001) surface, see Chapter 3. These shortcomings significantly restrict the problems that previously-parametrized
empirical potentials can satisfactorily analyze [129].
Bond-order potentials (BOPs) seek to overcome some of the limitations of empirical
potentials by formally coarse-graining and linking the electronic structure inherent in a
tight-binding approximation to atomic bonding [209]. The functional form of the resulting
analytic potential has been derived and fully justified for sp-valent systems [89]. The BOP
formalism includes separate contributions from the molecular orbitals describing both σ
and π type bonds [90] and can be applied to open phase (half-full valence shell) materials,
close-packed structures [91], and compound phases [210]. Recently, the BOP approach
has been generalized to more effectively model sp-valent elements in material systems
where the degree of valence shell filling is incorporated [93]. In principle, this band-filling
functionality enables the modeling of elements across the periodic table.
Here, we propose an analytic BOP for the GaAs system and deduce the parameters
that define it. The potential is used to predict bulk lattice parameters, cohesive energies,
and elastic properties of the elemental and compound phases, various point defect formation energies, and the (001) surface free energies of the zinc blende (zb) GaAs structure.
These are then compared with independent observations and used to assess the potential’s
suitability for simulations of the homoepitaxial growth of GaAs. Requiring a potential to
represent interactions for a wide range of environmental configurations has proven to be
challenging [130]. The potential proposed here is shown to be a significant step toward this
goal.
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
96
6.2 Bond-order potential
6.2.1 Potential format
We seek a potential energy function that reliably represents the radial and angular dependence of the dynamic interatomic forces as atoms and molecules break and reform bonds
during the assembly of a condensed GaAs structure. The homo- and heteroatomic bonding
within the condensed phases of gallium, arsenic, and GaAs involves sp-hybridization of the
overlapping molecular orbitals. The bond order (defined as one-half the difference between
the number of bonding and anti-bonding electrons in the molecular orbitals between adjacent atoms [211]) provides a foundation for quantifying bond strength. Bond orders, when
multiplied by bond (hopping) integrals, yield bonding energies [212]. The bond integrals
in turn are related to the probability that an electron will hop from one molecular orbital
to another and therefore depend on nearest-neighbor distance and orbital type [52]. The
derivation of a general analytic expression for the reduced (the separated σ and π bondorder terms) BOP from two-center, orthogonal tight-binding theory has been detailed by
Pettifor and his collaborators [88, 89, 90, 91].
A potential energy function (E) can be expressed as the sum of bonding (U bond ) and
repulsive (Urep ) energy terms:
E = Ubond + Urep ,
(6.2.1)
where the sp hybridization promotion energy term [210] has been grouped with U rep to
form a single repulsive energy term, simplifying the parametrization process discussed
later.
Consider a system of widely separated arsenic and gallium atoms in the vapor that are
allowed to condense. Atom i can form bonds (ij) with its j neighbors. These bonds can
have σ (primary covalent) and π (secondary covalent) bonding character. The bonding
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
97
energy term in Eq. 6.2.1 for such a system is found by summing the product of the bond
order and bond integral for each bond over all ij bonds for both the σ and π bond energy
terms. This can be written:
Ubond = −
1 [2 βσ,ij Θσ,ij + 2 βπ,ij Θπ,ij ] ,
2 i j,j=i
(6.2.2)
where βσ,ij and βπ,ij are the σ and π bond integrals between atoms i and j, Θσ,ij is the
σ bond-order term, and Θπ,ij is the π bond-order term [53]. The bond integrals are functions of the interatomic distance (r ij ) between atoms i and j. The bond orders are scalar
quantities that are dependent upon the local atomic environment in the vicinity of the ij
bond [89]. The maximum value of the σ bond order (Θ σ,ij ) is 1, while that of the π bond
order (Θπ,ij ) is 2. For sp systems, the total bond order (Θ σ + Θπ ) therefore has a maximum
value of 3. The σ and π bond orders reflect the ubiquitous single, double, and triple bond
behavior of chemistry.
The bond orders can be related to an intersite Green’s function [89, 90], which can be
expanded as a continued fraction by using the Lanczos recursion algorithm [213, 214] to
obtain Θσ and by using matrix recursion to obtain Θ π [215, 216]. Here we retain two levels
of the recursive representations for both the σ and π bond contributions. The resulting
two-level potential is a compromise that results in a computationally efficient potential
formulation suitable for MD simulations, while retaining sufficient terms to capture the
most significant aspects of bonding in the GaAs system.
During derivation of the bond-order terms, the expansion of the intersite Green’s function produces coefficients that can be directly related to molecular orbital hopping paths
via the Cyrot-Lackmann theorem [89]. The nth moment of the electronic eigenspectrum
is directly related to hopping paths of length n around the bond [217]. The hopping paths
sample the local atomic configuration and are dependent upon bond length and three- and
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
(a)
Q BOP
s,ij =
k
4!s (3-member ring term)
F s (2 hops)
i
k
+
j
i
(b)
Q
BOP
p,ij
=
k
F p (2 hops)
i
98
j
+
j
k
k'
i
j
F "p (4 hops)
+
k
i
j
k'
Figure 6.1: A schematic representation of the hopping paths that sample the local atomic
configuration (atoms k and k ) around the ij bond (atoms i and j). The hopping paths of
a primary σ covalent bond are shown in (a) and expressed in Eqs. 6.2.9 and 6.2.12. The
hopping paths of secondary π covalent bonds are shown in (b) and expressed by Eqs. 6.2.19
and 6.2.22.
four-body (dihedral) angles. Many possible hopping paths through molecular orbitals between atoms i and j and the surrounding atoms exist. The two-level σ bond order has
hopping paths of length 2 and is therefore a second moment approximation to the density
of states (DOS) [89]; the π bond order has hopping paths of length 4 and is a fourth moment approximation to the DOS [90]. The hopping paths utilized in this work are shown in
Fig. 6.1.
The σ and π bond hopping integrals have a common functional form and can be written
as:
βσ = βσ,0 f (r)n
(6.2.3)
βπ = βπ,0 f (r)n ,
(6.2.4)
where f (r) is a radially-dependent Goodwin-Skinner-Pettifor (GSP) [53] function (described later), βσ,0 and βπ,0 are prefactors that determine the magnitude of the bond energy
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
99
for the σ and π bonds, and n is an exponent that controls how quickly β σ and βπ approach
zero as the inter-atom distance, r, increases.
The repulsive component of the BOP uses a short-range two-body GSP function, φ ij ,
to approximate repulsion between a pair of ion-cores. It also incorporates the electron
Coulomb repulsion and the energy required to promote s and p electrons to sp 3 hybrid
atomic orbitals [36, 210]. The repulsive potential energy between atoms i and j can then be
written as the sum of two-body functions that depend upon only the interatomic separation
distance:
Urep =
1 φij ,
2 i
(6.2.5)
j,j=i
where
φ = φ0 f (r)m .
(6.2.6)
The prefactor, φ0 , represents the magnitude of the repulsive energy, and m is an exponent
that controls the repulsive energy gradient as the interatomic spacing is changed.
The GSP function identified in Eqs. 6.2.3, 6.2.4, and 6.2.6 has the form [53]:
r0
exp
f (r) =
r
r0
rc
nc
nc r
−
,
rc
(6.2.7)
where r is the interatomic spacing between a pair of atoms, r 0 is the interatomic spacing at
which f (r0 ) = 1, rc is a characteristic radius, and nc is a characteristic exponent. The pair
function parameters, including prefactors (φ0 , βσ,0 , and βπ,0 ), exponents (m, n, and nc ),
and radii (r0 and rc ), each depend on the elemental type of atoms i and j that participate
in the two-body interactions. We have assumed that the r 0 , rc , and nc parameters have
identical values for the three two-body functions in Eqs. 6.2.3, 6.2.4, and 6.2.6. It is a
simple generalization to lift this constraint. However, we found that this generalized form
did not improve the potential’s performance or its ease of parametrization.
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
100
Cutoff functions are widely used in potentials to limit their interaction distance. In
MD simulations, this restricts the resulting nearest-neighbor list size, which in turn leads
to much more computationally efficient calculations. The smoothness of the decay in the
region of the potential’s cutoff is very important for calculations involving surfaces and
liquid environments since intense sampling of this region of the potential occurs under
these circumstances. Additionally, smooth functions increase the stability of the numerical
solution of the Lagrangian integrals at discrete timesteps [94, 107]. Each pair function in
Eqs. 6.2.3, 6.2.4, and 6.2.6 utilizes a third-order polynomial spline to smoothly approach
zero for interatomic spacings within the range r1 < r < rcut , where rcut typically includes
only the first nearest-neighbor shell [54]. The spline function, S (r) = a + b r + c r 2 + d r 3,
has parameters a, b, c, and d that can be determined for βσ , βπ , and φ by equating the
value and derivative of each function to the spline at r = r 1 and by requiring that the spline
function and its derivative be equal to zero at r = rcut . Hence, the tails of the longer-range
βσ , βπ , and φ functions are smoothly replaced by the short-range spline function.
The σ bond order has been derived for systems with half-full valence shells and can
be generalized to include systems with any valence band occupancy. A two-level BOP
approximation for σ bonds with a half-full valence shell can be written:
( 12 )
Θσ,ij
= 1/ 1 + cσ (Φij,σ + Φji,σ ) ,
(6.2.8)
where cσ is an empirical parameter that compensates for some of the error introduced by a
two-level σ bond-order approximation and the Φσ,ij (Φσ,ji ) term is given by:
Φσ,ij =
k,k=i,j
2
gσ,jik
βσ,ik
βσ,ij
2
.
(6.2.9)
The gσ -function in Eq. 6.2.9 introduces angular-dependent contributions to bonding
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
101
resulting from the overlap of the hybridized atomic orbitals. The three-body angulardependent function between atoms i, j, and k can be written:
gσ,jik =
1 + pσ (cos θjik − 1) + bσ cos 2 θjik
,
1 + bσ
(6.2.10)
The three-body
and ik.
where θjik is the angle, centered at atom i, between vectors ij
angular-dependent function has two free parameters (pσ and bσ ) that depend on the type
of each of the i, j, and k atoms in the angle. This allows incorporation of asymmetry in
heteroatomic bonding environments [130, 210]. Note that s orbitals have no angular dependence (pσ = 0, bσ = 0), p orbitals have a cos θ form (pσ = 1 and bσ = 0), and dz 2
orbitals have a cos2 θ (or 1 + cos 2 θ) dependence (pσ = 0 and bσ = 0). The hybridized
atomic orbitals overlap and form molecular orbitals with a combination of these basic angular dependencies [211]. The bσ parameter was introduced in an early form of the BOP
[212] and was implemented here to help in the parametrization of the potential for arsenic.
A general σ bond-order term that includes valence shell occupancy can be extrapolated
from the half-full bond order by using a combination of symmetric and asymmetric bondorder functions [93]:
( 12 )
Θσ,ij = Θs,ij Θσ,ij , fσ ×
1
R3σ,ij
,
1 − fσ −
kσ
Φ
+Φ
2
1 + σ,ij 2 σ,ji
(6.2.11)
where Θs (Θ, f ) is the symmetric band filling function that modifies the half-full valence
shell bond-order expression and the second term approximates the asymmetric eigenspectra
with a skewing term that is proportional to the normalized three-member ring contribution.
We employ a band filling parameter, fσ , and a skewing parameter, kσ , in the symmetric and
asymmetric terms. The fσ parameter represents the number of electrons (e− ) in the valence
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
102
shell normalized by the full valence shell (8 electrons). Both f σ and kσ are dependent upon
the types of atoms i and j. The asymmetric three-member ring terms in Eq. 6.2.11 can be
expressed in the form [93]:
R3σ,ij =
gσ,jik gσ,kji gσ,ikj
k,k=i,j
βσ,ik βσ,jk
.
βσ,ij βσ,ij
(6.2.12)
The symmetric band-filling function can be expressed as a series of splines that fits the
functional to tight-binding calculations [93]:
⎧
⎪
⎪
2 f,
0 ≤ f < f0
⎪
⎪
⎨
Θs (Θ0 , f ) =
2 f0 + 2 F (1 − 2 f0 ) [1 + F (1 − cs F ] , f0 ≤ f < 1 − f0
⎪
⎪
⎪
⎪
⎩ 2 (1 − f ) ,
1 − f0 ≤ f ≤ 1
, (6.2.13)
where
f (1 − f ) − f0 (1 − f0 )
,
(1 − 2 f0 )2
⎧
⎪
⎨ 0,
Θ0 > 58
=
⎪
⎩ 32 5 − Θ0 , Θ0 ≤ 5
8
8
4
5
=
Θ0 −
.
3
8
F =
cs
f0
(6.2.14)
, and
(6.2.15)
(6.2.16)
An analytic expression for the π bond order was derived using the first two levels (sites)
from the matrix form of the Lanczos algorithm [89, 210]. The resulting two-site (π + and
π− ) expression for a half-full valence shell with hops of lengths 2 and 4 is:
Θπ,ij = Θπ+ + Θπ− ,
(6.2.17)
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
where
Θπ± = 1/ 1 + cπ
103
Φ2π,ij + Φ2π,ji ∓ Φ4π,ij
2
.
(6.2.18)
The Φ2π,ij (Φ2π,ji) terms are defined as:
Φ2π,ij =
β̂π,ik sin2 (θjik ) + 2
k,k=i,j
where
β̂π,ik = pπ
βσ,ik
βπ,ij
2
−
βπ,ik
βπ,ij
βπ,ik
βπ,ij
2 ,
(6.2.19)
2
(6.2.20)
and pπ is the species-dependent parameter of the central atom i. The Φ4π,ij term contains
four-body dihedral angles, Δφkk , that are important in π bonding,
Φ4π,ij =
2
2
2
2
β̂π,ik
β̂π,ik
sin θjik sin θjik (6.2.21)
k,k=j k =k+1,k =j
2
2
2
2
+β̂π,ik
β̂π,jk
sin θjik sin θijk 2
2
2
2
+β̂π,ik
β̂π,jk sin θijk sin θjik 2
2
2
2
+β̂π,jk
β̂π,jk
sin θijk sin θijk cos 2 (Δφ
kk )
4
.
The dihedral angle, Δφkk , defined in Fig. 6.2, is given by:
cos 2 (Δφkk ) =
2 [cos θkik − cos θjik cos θjik ]2
−1.
sin2 θjik sin2 θjik
(6.2.22)
Eq. 6.2.22 sums from k to k and therefore counts the neighbors of atoms i and j forming the
ij bond. The addition of the dihedral angle in a π-bonding format is extremely important
for modeling arsenic interactions with a dominant p 3 valence shell [185, 186].
To summarize, we propose an analytic potential energy function (Eq. 6.2.1) that is
expressed in terms of bonding (Eq. 6.2.2) and repulsive (Eq. 6.2.5) energy components. The
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
,Bkk'
k
i
104
k'
j
Figure 6.2: Dihedral angle, Δφkk , is shown for the four-body angle involving the k, i, j,
and k atoms around the ij bond.
bonding energy has been split into σ and π bonding terms, each of which are the products of
a bond integral and a bond order. The bond integrals (Eqs. 6.2.3 and 6.2.4) and the repulsive
energy (Eq. 6.2.6) were approximated with two-body GSP functions. The σ bond order
(Eq. 6.2.8) with a half-full valence shell was used to interpolate the bond-order expression
that incorporated explicit valence band filling (Eq. 6.2.11). This σ bond-order expression
also contained a three-member ring term (Eq. 6.2.12) that allowed implementation of an
asymmetric density of states, which helps to either stabilize or destabilize close-packed
structures. The π bond order (Eq. 6.2.17) included hopping paths of length 4 (Eq. 6.2.22)
that facilitated incorporation of a dihedral angle.
6.2.2 Parameters
There are 10 free material-specific parameters in the GSP functions for the repulsive and
bond integral terms. The bond-order terms have 3 bond-dependent parameters and 4 additional angular parameters for the elemental system. Binary systems have a total of 8 angular
parameters. Hence, the gallium and arsenic elemental systems have 17 parameters each,
while the binary GaAs system has an additional 22 parameters. There are thus a total of
17+17+22 (56) parameters to be determined. However, 17 parameters can be fixed prior to
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
105
the fitting process. They included inter-atom bond lengths, such as r 0 , which were equated
and fixed to an estimate of the dimer separation distances. The cutoff parameters (r c ) were
also specified and therefore not included in the fitting process. The r c parameters were
initially fixed for the gallium, arsenic, and GaAs systems to include only the atoms of the
first nearest-neighbor shell of the zb, NaCl, face-centered cubic (fcc), diamond cubic (dc),
and simple cubic (sc) structures (3.70 Å). However, at the completion of the fitting process,
the arsenic cutoff distance was shortened to 3.65 Å to include only the first six neighbors
of the αAs phase. The r1 parameters were arbitrarily fixed at 3.00 Å. Additionally, the
cπ parameters were set to unity as was originally derived for the π bond order [90, 93].
The GaAs zb crystal structure has a half-full valence shell (fσ = 0.50) and does not make
use of the symmetric and asymmetric σ bond-order terms (k σ = 0); therefore, these two
additional parameters for the Ga-As bonds were not included in the fit.
The remaining 12+12+15 (39) unknown BOP parameters were determined using a
method adapted from the work of Albe et al. [71], which utilized a two-step parametrization
approach for the GaAs material system described in detail in Appendix G. The material
properties used to determine the 12 free BOP parameters for gallium were interatomic
spacings, binding and cohesive energies, and bond stiffness data for the dimer and cubic
structures. Similar data were used for fitting arsenic parameters. However, the structural
and cohesive energy of the αAs phase and the cohesive energy of the arsenolamprite phase
were also included in the fitting process. The 15 binary GaAs parameters were determined
from dimer, trimer, and cubic crystal properties. Additionally, the sc16 (space group Pa 3̄)
cohesive energy, zb elastic constants, and unrelaxed vacancy and antisite defect formation
energy values were restricted within a defined range during the fitting process. A good fit
for the GSP parameters (m, n, nc , and φ0 ) was obtained and is summarized among the
other bond-dependent BOP parameters (βσ,0 , βπ,0 , cσ , cπ , fσ , and kσ ) in Table 6.1. In addition to these two-body parameters, the three-body angular parameters (p π , pσ , and bσ ) are
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
106
Table 6.1: Bond-dependent BOP parameters for GaAs; values depend on species types of
atoms i and j that form a bond.
Symbol Quantity
Ga-Ga As-As Ga-As
r0
GSP reference radius (Å)
2.4235 2.1200 2.3800
GSP characteristic radius (Å)
2.4235 2.1200 2.3800
rc
m
GSP attractive exponent
1.4509 1.3059 1.9652
n
GSP repulsive exponent
0.7255 0.6529 0.9826
nc
GSP decay exponent
2.6234 2.6304 2.6234
r1
Spline start radius (Å)
3.0000 3.0000 3.0000
Spline cutoff radius (Å)
3.7000 3.6500 3.7000
rcut
Repulsive energy prefactor (eV)
1.5520 3.9800 2.1000
φ0
βσ,0
σ bond integral prefactor (eV)
1.5233 3.0877 1.7959
π bond integral prefactor (eV)
0.0975 0.9263 0.3233
βπ,0
cσ
Empirical Θσ parameter
1.5193 3.6016 0.8534
Empirical Θπ parameter
1.0000 1.0000 1.0000
cπ
Band filling fraction (e− /8)
0.4456 0.6558 0.5000
fσ
kσ
Skewing prefactor
−25.6485 0.7600 0.0000
summarized in Table 6.2.
6.3 Evaluation of the potential
The GaAs parametrization of the BOP was assessed by examining predicted properties
relevant to the atomic assembly of epitaxial thin films grown from the vapor phase [130].
These include the bulk atomic volume, cohesive energy, and the elastic constants for var-
Table 6.2: BOP angular parameters for GaAs. These parameters are dependent upon the
three atoms that define the angle θjik , where atom i is the central atom. It is assumed that
the parameters for jik and kij are equal.
jik
pπ
pσ
bσ
Ga-Ga-Ga 0.7202 0.7947 0.1036
As-As-As 0.4271 0.8785 0.1458
As-Ga-As
—
0.6947 0.0391
Ga-As-Ga
—
0.7658 0.0000
Ga-Ga-As
—
0.8120 0.1275
As-As-Ga
—
0.8729 0.1642
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
107
ious gallium, arsenic, and GaAs structures; the zb GaAs melting temperature; the arsenic
and gallium dimer, trimer, and tetramer binding energies and structures; various GaAs
defect formation energies; and the surface free energies of GaAs (001) surface reconstructions. An analytic implementation of the interatomic energy and forces in a Lagrangian
MD code [218, 219] and in a symbolic computing environment [220] were used to analyze
the parametrized BOP, see Appendix B.
6.3.1 Small cluster properties
During vapor deposition, molecular arsenic (dimers and tetramers) and gallium atoms assemble to form GaAs. This assembly process is sensitive to the structure and bond strength
of these incident molecules [26]; therefore, reasonable predictions of bond energetics and
structures with regard to small clusters are needed to accurately model these processes.
Additionally, cluster properties are useful for evaluating the BOP by testing radial and angular bond-dependent structural parameters. To this end, the structure and binding energies
(free atom energy minus the energy of the bound cluster) of elemental and binary clusters
(dimers, trimers, and tetramers) were evaluated using the BOP. The dimer bond stiffness
was measured by the ground state wave numbers, ω = d2 E/dr2/μ/(2 π c), where μ is
the reduced mass, c is the speed of light in a vacuum, and d 2 E/dr2 is the curvature of the
dimer energy function, and was also compared to experimental values.
The structure and binding energy per atom (EB ) of small gallium clusters are summarized in Table 6.3. These have not been determined experimentally; therefore, ab initio
calculations were used for comparison with the BOP predictions. Inspection of Table 6.3
indicates that the dimer binding energy predicted by the BOP was roughly 15% smaller
than a generalized gradient approximation (GGA) density functional theory (DFT) prediction [46], but the separation distances were almost exactly the same. The dimer wave
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
108
Table 6.3: Gallium cluster interatomic spacing (r in Å), primary bond angles (θ in degrees),
and binding energy (EB in eV/atom) as predicted by DFT and BOP calculations. Dashes
(—) signify that data are either not defined or are unavailable.
DFTa
BOP
Structure
EB
r
θ
EB
r
θ
dimer
0.91 2.416 — 0.78 2.423 —
1.03 2.661 60.0 1.17 2.551 60.0
trimer
square
1.26 2.720 90.0 1.31 2.399 90.0
—
—
— 1.43 2.472 76.0
rhombus
—
—
— 1.34 2.666 60.0
tetrahedron
4 atom chain —
—
— 0.93 2.524 —
a
Reference [46].
number was predicted to be 168.8 cm−1 compared to an experimentally-measured value
of 165 cm−1 [159]. For the equilateral triangle trimer structure, the predicted BOP binding energy and interatomic spacing matched the GGA DFT calculations reasonably well
(within 14% and 4%, respectively). However, the GGA DFT calculations predict a square
structure as the lowest-energy tetramer structure, while the BOP calculations predict the
rhombus structure to be 0.12 eV/atom more stable than the square.
The arsenic dimer, trimer, and tetramer data are summarized in Table 6.4. The arsenic
dimer spacing and binding energy for GGA DFT, experimental, and BOP data were all
within a few percent of each other [46, 159]. The arsenic dimer wave number predicted
by the BOP was 268.7 cm−1 , which is 37.5% below the value (429.6 cm−1 ) experimentally
observed [222]. The GGA DFT and BOP predictions both indicate that an isosceles triangle
is the most stable trimer structure. The BOP arsenic trimer binding energy, bond lengths,
and bond angle were all reasonably close to both the experimental [159, 221] and GGA
DFT [46] data. Experimental studies indicate that the tetrahedron structure is the lowestenergy tetramer structure [160], and this is confirmed by GGA DFT calculations [46].
However, the BOP predicts a rhombus structure to be 0.59 eV/atom more stable than the
tetrahedron structure.
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
109
Table 6.4: Arsenic cluster interatomic spacing (r in Å), primary bond angles (θ in degrees),
and binding energy (EB in eV/atom) as reported by experimental measurements and predicted by GGA DFT and the BOP calculations. Dashes (—) signify that data are either not
defined or are unavailable.
Experimenta
GGA DFTb
BOP
Structure
EB
r
θ
EB
r
θ
EB
r
θ
dimer
1.98 2.103 — 2.03 2.122
— 1.99
2.120
—
2.14
—
— 2.13 2.332 c 65.0 1.82
2.339c
72.9
trimer
tetrahedron
2.55 2.435 60.0 2.68 2.460 60.0 1.63
2.637
60.0
—
—
—
—
—
— 2.22
2.381
78.9
rhombus
rectangle
—
—
—
—
—
— 2.21 2.111/3.000 90.0
—
—
—
—
— 1.72
2.354
—
4 atom chain —
a
References [159, 160, 221].
Reference [46].
c
Isosceles triangle side length.
b
BOP predictions for the GaAs dimers, trimers, and stoichiometric tetramer structures
are compared to GGA DFT data in Table 6.5. The GaAs dimer binding energy predicted by
the BOP was 40% greater and the separation distance 10–15% less than the experimental
and GGA DFT data [46, 223]. The GaAs dimer wave number predicted by the BOP (297.8
cm−1 ) was 38.5% higher than the experimentally measured value (215 cm−1 ) [223]. These
discrepancies for the GaAs dimer represent a limitation of the BOP, where the σ and π
bond-order values saturate at Θσ = 1 and Θπ = 2 for the GaAs dimer. However, this is
not the case for most bulk structures, which generally yield bond-order values below these
maximums. Therefore, the attractive bond energy (Ubond ) makes its strongest contribution
for dimers, which reduces the dimer interatomic spacing below that of the GaAs zb phase.
As a result, the experimental GaAs dimer spacing can not be predicted if the integrity of
the zb phase is to be preserved.
The arsenic-centered trimer (Ga-As-Ga) was well predicted by the BOP with binding
energies and structures all within 8.5% of GGA DFT data [46]. The gallium-centered
trimer (As-Ga-As) had a 40% larger bond angle than the GGA DFT data, but the bonding
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
110
Table 6.5: GaAs cluster interatomic spacing (r in Å), primary bond angles (θ in degrees),
and binding energy (EB in eV/atom) as predicted by GGA DFT and BOP calculations.
Dashes (—) signify that data are either not defined or are unavailable. Experimental data
for the dimer was EB = 1.03 eV/atom and r = 2.53 Å [223].
GGA DFTa
BOP
Structure
EB
r
θ
EB
r
θ
dimer
1.02 2.670
—
1.42
2.277
—
b
Ga-As-Ga
1.48 2.453 101.09 1.42
2.375
109.78
1.89 2.859 45.45 1.71
2.549
63.27
As-Ga-Asb
c
rhombus
2.04 2.776 49.10 1.80
2.448
88.5
2.225 (As-As)
2.512 (Ga-Ga) 86.7–93.3
—
—
1.92
quadrilaterald —
2.473 (Ga-As)
a
Reference [46].
Isosceles triangle: side length and apex angle are given.
c
Stoichiometric rhombus with Ga-As-Ga-As structure; the bond lengths for As-As are less than that for
Ga-Ga.
d
Stoichiometric rectangle-like tetramer with Ga-Ga-As-As structure.
b
energy and bond lengths were less than 11% different. The most stable stoichiometric
tetramer predicted by GGA DFT was the Ga-As-Ga-As rhombus, while the lowest-energy
BOP-predicted structure was a distorted Ga-Ga-As-As square-like quadrilateral structure.
The low-energy tetramer structures all deviated from the available GGA DFT and experimental data. We found that our parametrization was not sufficiently transferable to predict both bulk and tetramer structures within a single parameter set. It is possible that the
incorporation of additional physics is necessary to allow both environments to be modeled.
For example, the inclusion of additional hopping paths into the bond-order terms might
address this issue. Additionally, the two-center approximation, as implemented with the
two-body GSP functions, may also limit transferability between bulk and cluster properties
[55].
Despite these limitations, the BOP-predicted binding energies of the lowest-energy
structures were generally in good agreement with GGA DFT data. The strong molecu-
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
111
lar arsenic bonding in clusters, which is very important for modeling vapor deposition, was
also well predicted. Similarly, good predictions were made for the weak gallium binding
and moderate GaAs binding trends. The GaAs BOP is therefore anticipated to perform reasonably well for the modeling of the molecular species involved in GaAs vapor deposition.
6.3.2 Bulk lattice structures
The sensitivity of the potentials to the local bonding environment can also be investigated
by comparisons with the structure, volume (V ), cohesive energy (ΔE), and elastic constants (usually the bulk modulus, B) of gallium, arsenic, and GaAs crystalline phases with
atomic coordinations between 4 and 12. The cohesive energy is a negative quantity that
measures the difference in the total energy of atoms in their bulk bound state compared
to the energy of the atoms in their free unbonded state. The experimental enthalpies are
generally reported at 298 K, as compared to DFT and BOP energies, which are usually
calculated at 0 K. The direct comparison between these values (both reported with respect
to the free atom energy state) at constant pressure (P ) was previously justified based on the
small difference in enthalpy values between 298 K and 0 K for gallium (> 1%), arsenic
(∼ 6%), and GaAs (> 1%), see Chapter 3. Therefore, cohesive energy values deduced at
298 K for gallium and GaAs and at both 0 K and 298 K for arsenic were included in the
analysis [137, 138], because ΔH = ΔE + Δ(P V ) ≈ ΔE.
The properties of a large number of crystalline phases were also evaluated and are
identified using either the crystalline prototype or common name, see Section 6.3.3 for
additional crystallographic information. The abbreviations used are zb, sc16 (simple cubic
with 16 atoms in the unit cell), fcc, bcc (body-centered cubic), sc, and dc.
Experimental values for atomic volumes, enthalpies, and bulk moduli at 298 K and atmospheric pressure for the stable zb [134, 137, 140, 154], αGa [134, 135, 137, 152], and
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
112
αAs [134, 135, 137, 153] phases were compiled and are summarized in Fig. 6.3. The material properties for a wide range of structures have been calculated using the local density
approximation (LDA) DFT at 0 K and are shown in Fig. 6.3. For elemental systems, see
Ref. [71] and Chapter 3, and for the binary system, see Ref. [143]. LDA DFT data cohesive
energies are generally only given relative to the lowest-energy phases [71, 143]; therefore,
the data were shifted to experimental energies so that an estimate of absolute energies could
be used to evaluate the BOP predictions.
Examination of Fig. 6.3(a) indicates that the BOP-predicted atomic volumes per atom
were generally within 8% of the LDA DFT atomic volume predictions. The atomic volumes of the Ga-αGa and Ga-dc crystal structures were the only structures with deviations
outside this range. The relative order of the BOP and LDA DFT atomic volume values were
identical except for the Ga-bcc structure, which has a smaller atomic volume relative to the
fcc and Ga-II (of the I4̄3d space group) structures rather than a larger value as predicted by
LDA DFT [71].
In the BOP, the free atom state was defined to have zero energy; therefore, the potential energy in Eq. 6.2.1 can be used to directly calculate cohesive energies. The cohesive
energies per atom are summarized in Fig. 6.3(b). These energies were all within 8% of the
LDA DFT and experimental data. The low-energy gallium structure was approximated by
the choice of an fcc solid (see Appendix G for an explanation), which disrupted the relative energy ordering. The experimentally-observed low-energy αGa and metastable Ga-II
phases were predicted by the GaAs BOP to be around 0.2 eV/atom less stable than experimental data and LDA DFT predictions. In addition to these gallium phases, the As-dc
structure also had a lower relative energy than the As-fcc and As-bcc phases, when compared with the LDA DFT data. Despite these discrepancies with LDA DFT predictions, the
general trend of the energies were well reproduced by this parametrization of the BOP.
Bulk moduli data from LDA DFT calculations and experimental measurements are
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
/=)I
Material and Structure
/=
113
)I
dc
fcc
c
bc
sc
s
=A
dc
sc
c
bc
fcc
II
Ga
a
=G l
C
Cs
s
NiA l
C
Na
16
sc
Cohesive Energy HeVatomL
Atomic Volume HÞ3atomL
zb
27 "#! $#
26
25
24
23
22
21
20
19
18
17
16
-2.25 % &'!$ ()*
-2.50
-2.75
-3.00
-3.25
-3.50
175
!
150
125
100
75
50
25
dc
fcc
c
bc
sc
s
=A
dc
sc
c
bc
fcc
II
Ga
a
=G l
C
Cs
s
NiA l
C
Na
16
sc
zb
Figure 6.3: The BOP, LDA DFT, and experimental data of (a) atomic volume (Å3 /atom),
(b) cohesive energy (eV/atom), and (c) bulk modulus (GPa) for selected GaAs, gallium, and
arsenic phases. Experimental enthalpies at 298 K are used as the absolute energy point for
the relative LDA DFT energy data. For the αAs phase, a 6% change in enthalpy between
298 K and 0 K is noted by the shaded region.
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
114
Table 6.6: GaAs zb single crystal elastic constants as predicted by the BOP and DFT
calculations and observed in experiments. Calculations of c 44 that do not allow internal
(0)
relaxation are labeled c44 . All data have units of GPa.
cij Expt. (298 K)a LDA DFTb BOP
c11
118.1
123.0
117.4
c12
53.2
58.0
53.5
59.2
62.0
49.9
c44
(0)
c44
—
75.0
73.6
a
b
Reference [154].
Reference [45].
compared to the BOP predictions in Fig. 6.3(c). The bulk moduli were approximated by
the BOP analytic calculations without internal relaxation for the selected structures. For
cubic structures, this approximation is negligible; however, it can become more significant
for the non-cubic phases. The comparison between LDA DFT (also unrelaxed) and the
BOP predictions were within 42% of each other, except for gallium in bcc-like configurations. These CsCl, bcc, and Ga-II phases significantly overpredicted the bulk moduli data
calculated by LDA DFT. The deviations from LDA DFT predictions, though significant,
are similar or less than the discrepancies found using other interatomic potentials [130].
When calculating the bulk moduli with the BOP, the environmentally-dependent bond
orders are virtually constant as volume is varied. Therefore, the reduced accuracy of the
elastic response is largely dependent upon the two-body function of Eq. 6.2.7. The twobody function simply calculates a repulsive or bond integral value based on the distance
between the two atoms and does not consider the effect neighboring atoms may have on
screening the interaction. The inclusion of the screening may positively affect the energy
versus volume properties.
In addition to bulk moduli data, the three independent elastic constants for the GaAs
zb structure are shown in Table 6.6. The unrelaxed elastic constants are denoted by the
superscript (0) and reported for comparison with the values in DFT calculations. The
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
115
c44 elastic constant shows a significant change when atoms are allowed to relax during
calculations; however, this is not the case for the c 11 and c12 elastic constants, which exhibit
little relaxation. The elastic constants predicted by this parametrization of the BOP match
experimental observations at 298 K [154] and LDA DFT calculations [45] to within 5% for
all but the relaxed elastic constant data, c44 . The relaxed c44 elastic constant predicted by
the GaAs BOP was 9.3 GPa less stiff than the experimental measurement and 12.1 GPa less
stiff than the LDA DFT predictions. The Cauchy pressure (c12 − c44 ) for experimental (−6
GPa) [154] and DFT (−4 GPa) [45] data is negative. However, using the relaxed elastic
constants, a positive Cauchy pressure of 3.69 GPa was predicted by the BOP.
The origin of positive Cauchy pressure predicted by the BOP is the repulsive electrostatic part of the total energy [224]. For cubic systems, a positive Cauchy relation can
be traced to the stress component, σ11 , which is strongly positive for the bonding part
(Eq. 6.2.2) of a BOP. To balance this contribution from the bonding energy, a negative curvature from the repulsive energy is needed to produce a negative Cauchy relation, which
is not provided by the two-body repulsive term (Eq. 6.2.5). The implementation of the repulsive screening of valence orbitals [225] and an explicit repulsive promotion energy term
should recover an experimentally-valid Cauchy relation [210].
The BOP-predicted atomic volume, cohesive energy, and elastic constants for GaAs are
in generally good agreement with independent assessments and indicate that it can perform
well over a wide range of environments. This suggests it is acceptable for vapor deposition
applications.
6.3.3 Crystalline data summary
Not all the bulk crystalline structures evaluated in our analysis of the BOP parametrization
were reported in Fig. 6.3 due to the lack of consistent LDA DFT data. Therefore, additional
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
116
bulk property information for a larger collection of structures has been summarized for
gallium, arsenic, and GaAs structures in Table 6.7 [134, 142, 226].
The additional structural information for arsenic in Table 6.7 showed that the arsenolamprite structure was 21 meV/atom less stable than the lowest-energy αAs phase. The
arsenolamprite structure has been observed experimentally [227]. The structural parameters for the most stable arsenolamprite structure predicted by the BOP parametrization are
given in Table 6.7. The arsenolamprite and αAs phases are very similar. The first nearestneighbor shell of these structures had identical bond lengths; however, for more distant
neighboring shells, the αAs shells were generally split into multiple shells with different
bond lengths in the arsenolamprite structure.
6.3.4 Melting temperature
At the melting temperature, the potential energy close to the cutoff distance is dynamically
sampled. The prediction of a melting temperature therefore serves as an additional useful test of a potential. The GaAs melting temperature for the BOP was estimated using a
method developed by Morris et al. [157], in which a half-liquid, half-crystalline MD supercell was allowed to reach an equilibrium temperature under constant pressure. Here, a
supercell consisting of 6400 atoms (100 planes with 64 atoms in each plane) was used to
calculate the solid/liquid phase transition temperature. The supercell was initially divided
into two temperature-controlled regions—one well above the melting temperature and the
other well below. After 20 ps, one side had melted while the other remained crystalline.
The temperature control was then removed and the system thermally equilibrated. After
500 ps of MD simulation, the boundary between the liquid and solid phases had ceased
to move. The temperature of this (equilibrium) state was then taken as the melting temperature. The melting temperature predicted by GaAs BOP was 1950±50 K, which is
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
117
Table 6.7: The atomic volume, V , cohesive energy, E c , unrelaxed bulk modulus, B0 , and
bulk modulus pressure derivative, B , were calculated for the GaAs system using the BOP.
The Stukturbericht designation and space group notation are provided for the less common
structures.
Material Structure
V (Å3 /at) Ec (eV/at) B0 (GPa) B zb
22.714
−3.370
75.1 3.8
a
sc16 (—, Pa3̄)
20.862
−3.170
82.0 3.3
b
CrB (B33, Cmcm)
21.685
−3.103
105.5 3.1
GaAs
NaCl
18.078
−2.926
107.3 4.3
c
NiAs
18.511
−2.875
109.9 4.3
CsCl
16.396
−2.596
167.7 6.1
fcc
17.625
−2.838
84.2 3.7
d
hcp
17.649
−2.828
83.9 3.7
bcc
16.000
−2.769
160.6 3.4
Ga
βGa (A20, Cmcm)e
18.232f
−2.745
71.9 3.6
bcc12/Ga-II (—, I4̄3d)
16.740
−2.602
105.2 4.7
αGa (A11, Cmca)
21.003g
−2.593
49.3 3.3
sc
19.287
−2.585
49.1 3.2
dc
25.317
−2.382
27.9 2.9
h
αAs (A7, R3̄m)
19.874
−2.990
82.0 7.5
i
arsenolamprite (A11, Cmca) 19.821
−2.969
78.1 5.1
sc
19.303
−2.867
78.1 3.6
dc
26.644
−2.501
42.2 3.4
As
bcc
18.500
−2.340
103.9 3.9
graphite
24.706j
−2.258
42.3 3.5
fcc
18.844
−2.256
101.7 4.6
u = 0.151, v = 0.649
a = 4.341, b = 7.518, c = 5.316, u = 0.833, v = 0.167
c
c/a = 1.633
d
c/a = 1.649
e
βGa has the monoclinic symmetry (C2/c), but A20 an approximately similar structure [150].
f
a = 2.768, b = 9.157, c = 2.877, u = 0.132
g
a = 4.548, b = 7.484, c = 4.936, u = 0.162, v = 0.088
h
c/a = 2.965, u = 0.232
i
a = 5.407, b = 8.180, c = 3.585, u = 0.145, v = 0.250
j
c/a = 1.306
a
b
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
118
reasonably close to the experimentally-determined melting temperature of 1513 K at atmospheric pressure [158]. The BOP value overestimates this temperature by 28%. Previous
studies have linked discrepancies in the melting behavior to the cutoff distance approximation [228], which may be the case here.
6.3.5 Point defects
In the GaAs zb lattice, the point defects encountered include gallium and arsenic vacancies
(VGa and VAs ), gallium antisites (GaAs ) in which gallium sits on an arsenic site in the
GaAs lattice, arsenic antisites (AsGa ), and a variety of gallium and arsenic interstitials (Ga i
and Asi ) [156, 229]. Their concentrations depend on the defect formation energy growth,
temperature, flux composition, and deposition rate [6, 229]. The relative populations of the
point defects can be estimated from their defect formation energies, Ω [155]. Utilizing the
method proposed by Zhang and Northrup [48, 155], the energy of a neutral point defect can
be expressed as:
−
Ω (Δμ) = ED
1
(nGa − nAs ) Δμ ,
2
(6.3.1)
where nGa and nAs are the number of gallium and arsenic atoms in a computational cell.
The defect formation energies are linearly dependent on the environmental conditions,
which are addressed by the change in chemical potential, Δμ [48, 155, 169]:
(bulk)
(bulk)
,
Δμ = (μGa − μAs ) − μGa − μAs
(6.3.2)
where μGa and μAs are the environment-dependent gallium and arsenic chemical potentials
(bulk)
and μAs
(bulk)
and μAs
are the chemical potentials of the low-energy arsenic and gallium
bulk phases. At 0 K, the bulk chemical potential values are equivalent to the cohesive
energies per formula unit (fu) of the bulk systems. The Δμ values are constrained between
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
119
±ΔH [155], where ΔH is the formation enthalpy for GaAs per formula unit. The predicted
heat of formation at 0 K from the GaAs BOP is ΔHf = −0.91 eV/fu and was calculated
from the cohesive energy data in Table 6.7 in Section 6.3.3. The experimental value is
ΔHf = −0.74 eV/fu at 298 K [137] and is estimated at 0 K to be around −0.89 eV/fu
[138, 130].
The neutral defect formation energy term that is independent of environmental condi
) is defined as [48, 155]:
tions (ED
1
(bulk)
(nGa − nAs ) μGaAs
2
1
(bulk)
(bulk)
− (nGa − nAs ) μGa − μAs
,
2
ED
= ED −
(6.3.3)
values were
where ED is the total energy of a supercell that contains the defect. The E D
calculated for gallium and arsenic vacancies (VGa and VAs ), gallium and arsenic antisites
(GaAs and AsGa ), and three types of gallium and arsenic self-interstitial (Ga i and Asi) point
defects. The interstitial point defects considered include the tetrahedral, 110 dumbbell,
and 100 dumbbell types [100]. The dumbbell interstitials can be imagined to be formed
by splitting an on-site arsenic or gallium atom into two atoms and separating them with
their bond aligned along either the 100 or 110 directions [100, 230]. The periodic
computational cell used to calculate defect formation energies with ab initio LDA DFT
methods had 64 atoms [100, 156], while the BOP data were calculated using a 512 atom
cell. The low-energy defect structures were minimized at 0 K using a conjugate gradient
method [188].
The local structure around each defect was also evaluated. The interatomic bond lengths
(r) that connect a given defect to the surrounding atoms in the crystal were measured and
normalized by a Ga-As reference bond length for the perfect GaAs zb crystal (r0 ). The
resulting normalized bond length, r̂ N N = r/r0, characterizes bond length expansion and
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
120
Table 6.8: Point defect formation energies and structures predicted by the GaAs BOP and
), normalized interatomic
DFT calculations. Defect formation energies (Ω|Δμ=0 = ED
separation distances (r̂N N ), and number (#) and type of surrounding atoms are identified
for vacancy (VGa and VAs ), antisite (GaAs and AsGa ), and interstitial (Gai and Asi ) point
defects in zb GaAs. When more than one type of atom surrounds the defect, the positions
and types are listed on separate lines. Dashes (—) indicate that DFT data are unavailable.
DFT, Refs. [100] & [156]
BOP
ED
r̂N N
Type(#) ED
r̂N N
Type(#)
Defect
VGa
3.15 0.88
As(4)
3.28 0.99
As(4)
3.10 0.89
Ga(4)
2.93 1.03
Ga(4)
VAs
2.12 0.99±0.06 Ga(4)
2.03 1.06
Ga(4)
GaAs
AsGa
2.48 1.06
As(4)
2.50 1.05
As(4)
Gai (tetrahedral)
2.98 1.06
As(4)
4.14 1.08
As(4)
Gai (tetrahedral)
—
—
Ga(4)
2.66 1.03
Ga(4)
5.04 —
Ga(4)
4.47 1.07
Ga(4)
Asi (tetrahedral)
—
—
As(4)
3.32 1.03
As(4)
Asi (tetrahedral)
Gai (
110 dumbbell) 3.53 —
Ga(1)
4.97 1.01
Ga(1)
—
As(3)
1.01–1.02 As(3)
As(1)
3.82 0.94
Ga(3)
Asi (
110 dumbbell) 4.07 1.01
1.07
Ga(3)
1.02–1.08 Ga(3)
—
—
3.86 0.89
Ga(1)
Gai (
100 dumbbell) —
—
—
0.96
As(2)
—
—
4.68 0.88
As(1)
Asi (
100 dumbbell) —
—
—
0.99
Ga(2)
contraction compared to the perfect crystal.
and r̂N N values from LDA DFT [100, 156] and BOP calculations are summaThe ED
rized in Table 6.8. The vacancy and antisite formation energies calculated by the BOP were
< 5.5% of the LDA DFT reference data [156]. This can be contrasted with the evaluations
[156, 130] of previous GaAs parametrizations of the Tersoff [70] and SW [68] potentials,
which deviated from the reference formation energy data by an average of 17–133%. The
normalized nearest-neighbor bond lengths (r̂ N N ) were near unity and had little inward or
outward relaxation for the BOP vacancies. The LDA DFT calculations predicted significant
inward relaxation around the vacancies. The local relaxation predicted by LDA DFT was
also not well modeled by three of the four Tersoff potentials previously evaluated [156].
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
121
The local bonding environment predicted by LDA DFT around the antisites was reasonably captured by the BOP and all the previous parametrizations.
The lowest-energy interstitials for the BOP were those on tetrahedral sites. This was a
good approximation for the gallium interstitial; however, it was not consistent with DFT
predictions for the arsenic interstitial. In fact, the As i (tetrahedral) was 0.5 eV more stable
than the DFT-predicted 110 dumbbell arsenic interstitial [156]. The formation energies
for the lowest-energy interstitial defects showed that the BOP underpredicted the LDA DFT
data by 10.7% (Gai ) and 18.4% (Asi ). The underpredicted formation energies for both gallium and arsenic interstitials indicate that the defect concentrations are likely to be slightly
elevated during thin film growth. Nevertheless, this represents a significant improvement
over an average of 77–99% deviation from DFT data for interstitial formation energies predicted by previous parametrized potentials [156, 130]. The local environments around each
interstitial in the BOP (and previous potentials) were generally not well predicted for the
arsenic interstitials. Only the Sayed et al. [73] parametrization predicted reasonably close
formation energies and local environments; however, this potential was much less accurate
with regard to antisite and vacancy formation energies [156].
The formation energy predictions of the BOP calculations are acceptably well represented by this potential and are considerably better than those of previously parametrized
potentials. However, the issues with local bonding environments around vacancies and interstitials were approximated. These effects may ultimately be addressed by accounting
better for local changes in electronic structure [92] with either screening functions [55] or
explicit charge transfer terms [62]. Even so, the relative formation energy order is quite
similar to the DFT results. MD simulations of vapor deposition under arsenic-rich conditions and relatively high temperatures will therefore predict that arsenic antisite defects are
the most prevalent, which is consistent with experimental observations [229].
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
122
6.3.6 GaAs surfaces
The GaAs (001) surface can exhibit many reconstructed structures [12, 13, 161, 162]. These
include the experimentally validated arsenic-terminated β2(2 × 4) [163, 164, 165], arsenicterminated α2(2 × 4) [166], arsenic-rich c(4 × 4) [167, 174], and gallium-rich ζ(4×2) [47]
surface reconstructions. The surface temperature, composition of the vapor above the surface, and the deposition rate during film growth all combine to determine the reconstruction
structure that forms on a surface [168].
A surface free energy diagram can be used to represent the surface reconstructions that
form under equilibrium conditions as the vapor composition is varied. The surface free
energy per unit area, γ, can be calculated by assuming that the arsenic and gallium atoms
in the vapor freely exchange between the bulk material (the thermodynamic reservoir) and
an atmospheric vapor (atom reservoir) [169, 170] in a similar manner to that discussed in
the previous section. The gallium and arsenic atoms in these reservoirs have chemical potentials, μGa and μAs , respectively, which under equilibrium conditions are related [169].
This allows the influence of the vapor composition to be represented by a single chemical
(bulk)
potential difference (μAs −μAs
(bulk)
), where μAs
is the chemical potential of the low-energy
bulk arsenic crystal at 0 K (i.e., cohesive energy). The relative arsenic chemical potential
is limited between arsenic-rich (0 eV/fu) and gallium-rich (ΔH f ) conditions [169, 170],
where the BOP predicts ΔHf = −0.91 eV/fu (at 0 K) and experimental data indicates
ΔHf = −0.74 eV/fu (at 298 K) [137] and ΔHf = −0.89 eV/fu (at 0 K) [138, 130]. The
surface free energy per unit area can then be calculated as a function of this chemical potential difference for any atom configuration and composition by following standard methods
detailed elsewhere [169, 170, 189], see also Chapter 5. Results have been obtained from
DFT [47, 169, 170] and interatomic potentials [130, 189, 231].
The surface free energy diagram predicted by the BOP was obtained using a com-
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
123
a/a
a/a
b/b
g b/b
m As -
m(bulk)
(eV/fu)
As
Figure 6.4: GaAs (001) surface free energies for select surface reconstructions as predicted
by the BOP. The α(2 × 4) and α2(2 × 4) surface reconstructions have almost identical
surface free energies and are shown as a single line and are labeled as α/α2(2 × 4). The
same notation was applied for the α/α2(4 × 2), β/β2(2 × 4), and β/β2(4 × 2) surface
reconstructions. The 100% and 75% coverages of the c(4 × 4) surfaces are both shown.
putational supercell with 1500–1700 atoms (25–27 layers with 64 atoms/layer measuring
32 Å × 32 Å) for each reconstructed surface [98, 170, 189]. The cell had periodic boundary
conditions in the lateral directions and identical free surfaces on the top and bottom. The
central plane was fixed and the entire system was then relaxed using the conjugate gradient
method [188].
The BOP-predicted, low-energy (001) surface reconstructions have simple dimer row
structures corresponding to an arsenic-terminated (2 × 1) reconstruction for arsenic-rich
conditions and a gallium-terminated (1 × 2) reconstruction for gallium-rich conditions,
Fig. 6.4. This result is generally consistent with previous predictions with interatomic
potentials [130]. The simplified surface structures do not capture the additional trench
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
124
features of the β2(2 × 4) surface reconstruction that stabilizes under high temperatures
[13]. Nevertheless, the dimer-row surfaces represent a reasonable approximation when
formation of complex surface reconstructions is hindered by the reduced atom mobility, as
is the case during low-temperature molecular beam epitaxial growth [24].
Because of the coarse-graining of the electron degree of freedom, the occupancy of
dangling surface bonds and general conservation of electrons are not explicitly treated in the
BOP or other empirical potentials. The electron redistribution on surfaces has been shown
to play a significant role in stabilizing (001) GaAs surface reconstructions [171, 172, 173].
To address this redistribution of electrons on the surface, additional physics must be added
to the potentials to destabilize the (1 × 2) and (2 × 1) surface reconstructions. Using the
well-known electron counting (EC) rule [172, 173], a simple energy penalty was recently
proposed for static systems by calculating the square of the difference between the total
number of electrons in the system and the total number of available low-energy sites (i.e.,
covalent bonds and arsenic dangling bonds), see Chapter 5. This EC energy term (U EC )
can be added to Eq. 6.2.1 for the treatment of surfaces:
E = Ubond + Urep + UEC .
(6.3.4)
When applied to the GaAs surface, the UEC term is minimized when the surface covalent
and arsenic dangling bonds are fully occupied (2 electrons) and the gallium dangling bonds
are empty (0 electrons) [172, 173]. Surface structures that have more or less electrons than
the number required to exactly match these occupancies are then considered unstable and
incur a positive EC energy penalty (UEC ) [13].
This global EC approach has been generalized for MD by making a continuous and
differentiable set of equations that link the system’s EC energy to the local atom positions
[232]. This local EC potential utilized the empirically-determined EC rules for the distri-
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
125
gg a a
5
0
b
z
a
b
-5
-10
D
B
D B
D B
D m As - m(bulk)
(eV/fu)
As
B
0.00
Figure 6.5: GaAs (001) relative surface free energies predicted by DFT [47, 199] and the
BOP+EC calculations for selected surface reconstructions. The arrows connect the DFT
and BOP+EC results for the same surface. Surface free energies are plotted relative to the
α2(2 × 4) reconstruction and relative chemical potential values are scaled so that the heat
of formation values overlap.
bution of electrons between covalent and dangling bonds to dynamically solve the electron
occupation around each atom. By design, the EC term has no effect on the dimer or bulk
properties predicted by the BOP parametrization. Expressions for these and additional electron constraining terms are summarized along with the model parameters in Appendix H.
The surface free energy, γ, as calculated by the BOP with the newly defined EC term is
shown in Fig. 6.5 along with DFT surface free energy data from Lee et al. [47] and Ohno
[199], as combined in Chapter 5. In the combined surface free energy diagram, free energy
values were shifted so that the α2(2 × 4) surface reconstruction was at zero energy instead
BOP
DFT
= 76.18 meV/Å2 and γα2(2×4)
= 43.38 meV/Å2 for
of the absolute values of γα2(2×4)
the BOP and DFT, respectively. Additionally, since the DFT and BOP calculations have
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
126
different heats of formation (ΔHf = −0.91 eV/fu for BOP and −0.58 eV/fu for GGA
DFT [47]) that bound the surface free diagram, the chemical potential data were scaled by
|ΔHf | and plotted between 0 eV/fu and a general ΔHf value.
From Fig. 6.5, it is clear that electron conservation introduced by the EC rule correctly
destabilizes the appropriate reconstructions. These modified BOP+EC results are significantly better than the previous implementation of an EC energy penalty with empirical SW
and Tersoff formats in Chapter 5. Specifically, the BOP+EC potential predicted both the
β(2 × 4) and the c(4 × 4) surface reconstructions to be stable under arsenic-rich and very
arsenic-rich conditions.
The charge build-up effects that destabilize the β(2 × 4) surface reconstruction with
respect to the β2(2 × 4) reconstruction were not included in the model due to the absence
of Coulombic electrostatic interactions [165]. Therefore, the BOP surface free energy predictions can not significantly differentiate between the β(2 × 4) and β2(2 × 4) surface
reconstructions. This represents an overstabalization of the β(2 × 4) surface free energy
by a small 2.2–3.1 meV/Å2 margin as calculated by DFT [47, 200]. The free energies of
other structures that are not distinguishable include: γ β(2×4) ≈ γβ2(2×4) , γβ(4×2) ≈ γβ2(4×2) ,
γα(2×4) ≈ γα(2×4) , and γα(4×2) ≈ γα(4×2) .
In Fig. 6.5, the surface free energies for the c(4 × 4) and β2(2 × 4) reconstructions
predicted by the BOP+EC are generally consistent with DFT calculations. However, the
ζ(4 × 2) surface is much less stable for the BOP+EC (not shown, but an arrow is drawn
toward it from the DFT ζ(4 × 2) free energy line). Instead the β2(4 × 2) surface was
found to be the most stable gallium-rich reconstruction. The choice of a simplified lowenergy gallium structure in the BOP parametrization may explain why the much simpler
β2(4 × 2) surface is preferred over the more complex ζ(4 × 2) reconstruction. Despite
this simplification of the gallium-rich surface structure, the simulation of thin film growth
should not be adversely affected because arsenic-rich β(2 × 4) and β2(2 × 4) surfaces
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
127
are dominant during most epitaxial growth conditions (especially under high temperatures
above 800 K) [13].
In addition to surface structure, molecular/surface bonding of arsenic dimers to galliumrich surfaces also needs to be studied dynamically using MD to fully evaluate the potential.
This is because even a carefully parametrized, widely successful GaAs Tersoff potential
failed to predict arsenic dimer bonding to the (001) surface (As 2 sticking ratio near zero)
[71, 130]. These surface interactions using the BOP will be discussed in Chapter 7.
6.4 Conclusions
1. A computationally efficient analytic bond-order potential (BOP) has been derived
from tight-binding theory in a manner that coarse grains and links the electron structure to the local atomic structure.
2. A two-level version of the BOP was parametrized for gallium, arsenic, and the GaAs
material systems using a two-step process that separately fit radial and angular dependencies. Gallium bulk properties were simplified to take the lowest-energy fcc
structure, instead of the more complex αGa phase. Similar simplifying choices for
bulk moduli data, tetramer structure, and the zb c 44 elastic constant were made during the parametrization. These approximations were traced back to the choice of the
two-center approximation for bond integral and repulsive energy terms.
3. The BOP was evaluated by comparing the properties of small clusters, bulk atomic
properties (atomic volume, cohesive energies, and elastic constants), simple point
defects, and surface properties with other (experimental and DFT) estimates.
4. The potential most successfully modeled dimer, trimer, and bulk property trends.
The deviations were generally within 15% of the atomic volume and 8% of the cohesive energy values predicted by ab initio methods. The bulk moduli calculated by the
CHAPTER 6. AN ANALYTIC BOND-ORDER POTENTIAL
128
BOP were generally within 50% of values predicted by DFT, while the GaAs zb elastic constants were a good approximation of the DFT and experimental results. The
melting temperature was predicted within 28% of experimentally-measured temperatures.
5. Neutral point defect formation energies were calculated for the BOP and compared to
DFT data. The calculated formation energies and local configurations were generally
consistent with DFT data. The arsenic and gallium antisite defects from the BOP
most closely matched the DFT predictions. However, the local environments of the
interstitial defects did deviate some from the DFT data.
6. The complexities of the polar GaAs (001) arsenic-rich surface reconstruction were
captured by using a combination of the BOP and a newly developed electron counting
potential. The gallium-rich lowest energy surface reconstruction was simplified from
the ζ(4 × 2) to the β(4 × 2) reconstruction, which is consistent with the simplified
approximation made for the gallium bulk phase.
Chapter 7
Condensation Mechanisms of an
Arsenic-Rich Vapor on GaAs (001)
Surfaces1
7.1 Introduction
The atomic-scale assembly phenomena responsible for the experimental observations of
temperature-dependent desorption during homoepitaxial vapor deposition are not fully understood [7, 8, 14, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 32]. The experimental study
of these processes during growth of a thin film is difficult because of limited spatial (single atom dynamics) and temporal (short relaxation times) measurement resolution [234].
Computational methods provide a route for developing an understanding of assembly dynamics. The atomic assembly processes that control film composition, growth mode, and
thus film quality during the vapor phase growth of GaAs can be probed by molecular dynamics (MD) simulation using interatomic potentials, provided the potentials capture the
1
This chapter is based on work submitted for publication in Phys. Rev. B, see Ref. [233].
129
CHAPTER 7. CONDENSATION MECHANISMS . . .
130
essential physics involved in vapor/surface interactions. MD methods have been used to
simulate GaAs surface diffusion and thin film growth using empirical Tersoff [231] and
Stillinger-Weber (SW) interatomic potentials, see Chapter 4. However, the limited validity
of these potentials has significantly restricted the useful applications of this approach to
date, see Chapter 3.
Here we use the derived analytic bond-order potential (BOP) presented in Chapter 6
that models well the properties of GaAs clusters, bulk lattices, point defects, and surfaces
[208]. We use this GaAs BOP to conduct MD simulations of the homoepitaxial growth of
(001) GaAs surfaces and assess its validity by comparing results with experimental studies
of low-temperature (LT) GaAs growth. The atomic-scale assembly mechanisms active on
both gallium- and arsenic-terminated (001) surfaces are then studied in detail to investigate
the dynamic phenomena following arsenic dimer impacts over a wide range of surface temperatures. This MD study of surface kinetics opens a window into GaAs surface dynamics
over length and timescales that were not previously accessible.
7.2 Computational methods
MD simulations were performed using a BOP recently described and parametrized for the
GaAs system, see Chapter 6. An optional electron counting (EC) energy term that enables
the BOP to reproduce high-temperature (HT) (001) surface reconstructions [12, 13] has
also been developed and parametrized, see Appendix H. However, simulations presented
here concentrate upon the LT growth region where the formation of complex HT surface
reconstructions are hindered by the reduced atom mobility [24]. This, combined with the
increased computational demands of the modified form of the potential, led us to conduct
the studies reported here without the EC term. The potential energy and forces between
atoms were analytically implemented in a Lagrangian MD code [218, 219] in which the
CHAPTER 7. CONDENSATION MECHANISMS . . .
131
equations of particle motion were numerically solved at femtosecond time steps using a
Nordsieck predictor corrector algorithm [107].
The MD simulations were used to investigate the vapor deposition of homoepitaxial
thin films on a (001) GaAs surface as well as single species impact dynamics. The thin film
growth was performed on a 32 Å × 32 Å (64 atoms/layer) substrate, while single species
impact studies utilized a smaller 16 Å × 16 Å (16 atoms/layer) substrate. During vapor
deposition simulations, the initial surface had a β(2 × 4) arsenic-rich reconstruction with
a 75% coverage of arsenic arranged in sets of three dimers [13]. The initial surface for the
single impact calculations was either an arsenic-terminated (2 × 1) or a gallium-terminated
(1×2) surface, which consisted of dimerized rows of either arsenic or gallium, respectively.
Significant heat is released when either arsenic (2.36 eV/atom at 298 K) or gallium (3.20
eV/atom at 298 K) vapor condenses on a GaAs (001) surface [139]. In order to dissipate this
additional thermal energy during the growth of a thin film, the substrate was divided into
three computational regions. The position of the gallium and arsenic atoms in the bottom
two layers were fixed to avoid substrate translation. The atoms in the four layers above this
fixed region were thermally controlled using a Nosé-Hoover thermostat algorithm [96] set
to the desired simulation temperature, and the atoms in the remaining top three layers were
left thermally unconstrained. The thickness of the thermostatically regulated region was
then allowed to grow proportionally to the number of atoms incorporated into the thin film
so that the thickness of the unconstrained region remained approximately constant under
epitaxial growth conditions.
Gallium atoms and arsenic dimers were introduced normal to the surface at random positions and with random dimer orientations. The initial translational kinetic energy of both
species was set to 0.17 eV/atom. Arsenic dimers were given an internal vibrational energy
but no initial angular momentum. This vibrational energy was introduced by stretching the
dimer 4.9–5.4% from its equilibrium bond length (2.12 Å).
CHAPTER 7. CONDENSATION MECHANISMS . . .
132
During vapor deposition simulations, a gallium atom or an arsenic dimer was added
every 1.4 ps/nm2. Typically the equivalent of 14–22 Å (or 10–16 layers) of material was
deposited during 10 ns of simulation. In experiments, atoms or molecules arrive about
every millisecond per square nanometer [17]. Therefore, the time available for surface
diffusion of an atom or molecule after the initial impact with the surface was significantly
underestimated by these MD simulations.
The atom positions were tracked during the analysis of single impacts for 10 2 –104 ps.
Each collision was repeated 100–1000 times with different initial conditions (i.e., position on the surface and dimer orientation) for the vapor species. These calculations were
repeated at 25 K intervals between 100 K and 2400 K for different combinations of flux
species and surface types (arsenic- or gallium-rich).
7.3 Vapor deposition simulations
A series of homoepitaxial growth simulations were performed using substrate temperatures,
T , between 500 K and 1500 K and As:Ga flux ratios, R, between 0.9 and 3.4. Examples
of crystalline structures grown at (a) T = 850 K and R = 1.17 and (b) T = 1500 K
and R = 3.14 are shown in Fig. 7.1. The number of atoms of each type (N Ga and NAs )
deposited during the thin film growth are determined by the flux ratio, R, and the number
of deposition events, nd :
2 nd
2+R
2 nd R
=
.
2+R
NGa =
(7.3.1)
NAs
(7.3.2)
For the simulations reported here, nd ≈ 714. Of the arsenic and gallium atoms deposited
at 850 K, nearly 14% of the arsenic atoms but none of the gallium atoms were desorbed.
CHAPTER 7. CONDENSATION MECHANISMS . . .
(a)
6=850 K, 4=1.17
(b)
_
133
6=1500 K, 4=3.14
[001]
[110]
As
[110]
Ga
1 nm
Figure 7.1: As-grown GaAs thin film structures after 10 ns of deposition at (a) 850 K and
(b) 1500 K. The initial substrate is marked by the reflective plane. The atom positions, in
the absence of vibrational displacement from the local low-energy sites, are shown.
At 1500 K, more than 64% of the arsenic atoms and 1% of the gallium atoms desorbed.
Because of this temperature-dependent arsenic desorption (discussed in greater detail later),
the films grown at 850 K and 1500 K have different thicknesses. Nevertheless, both asgrown films were stoichiometric, with equal numbers of gallium and arsenic atoms, and
they were both terminated by arsenic-rich surfaces.
The arsenic composition for a set of similarly deposited thin film samples was measured
for 121 different combinations of the temperature, T , and As:Ga flux ratio, R (see Fig. 7.2).
The as-grown films were relativity thin, and the extra arsenic atoms on the surface increased
the measured arsenic atomic composition values of stoichiometric thin films from 0.50 to
between 0.50 and 0.53 (depending on the precise film thickness). Crystalline films were
always grown when the compositions were within this range and the temperature was above
800 K.
CHAPTER 7. CONDENSATION MECHANISMS . . .
134
≥
4
3
2.5
2
1.5
≤
1
600
800
1000
1200
6 1400
Figure 7.2: Arsenic composition of as-grown thin films as a function of As:Ga flux ratio,
R, and substrate temperature, T . Arsenic-rich compositions are the darkest. The stoichiometric composition region (0.50 ≤ R ≤ 0.53) is shown with diagonal-hash lines. The
composition along the white dashed lines are examined more fully in Fig. 7.3. Composition contours for T ≥ 1000 K indicate a temperature-dependent critical flux ratio (knee-like
bend) above which the film composition does not change.
CHAPTER 7. CONDENSATION MECHANISMS . . .
135
Fig. 7.2 exhibits several features that were consistent with experimental observations.
Deposition at high temperatures (e.g., 1400–1500 K) resulted in stoichiometric films for all
R values above 1.3, whereas LT deposition resulted in film compositions that were highly
dependent upon the As:Ga flux ratio [24]. The simulations also revealed the existence of a
critical value of R at each temperature above which the film composition depended weakly
upon the composition of the vapor. This indicates the existence of an arsenic solubility
limit above which the excess arsenic desorbs. We observed that more arsenic was soluble
in the GaAs lattice as the substrate temperature decreased. A qualitatively similar limit has
been observed experimentally [27, 235].
It is also evident in Fig. 7.2 that for a fixed flux ratio, the gallium concentration increased with growth temperature. Gallium-rich films were formed at all temperatures if
R
<
∼
1.2. Both observations are also consistent with experiments, which indicate that
gallium-rich surface structures are formed during HT deposition with low arsenic overpressures [12]. These results imply that the As 2 sticking ratio drops as the growth temperature
is increased, which is also observed experimentally [26].
The arsenic composition of thin films grown at 850 K and 1500 K is plotted against the
As:Ga flux ratio in Fig. 7.3. The arsenic atomic fraction of the film increased as the As:Ga
vapor flux ratio increased for deposition at 850 K. At high temperatures (e.g., 1500 K), the
arsenic atomic fraction again initially increased with R but then reached a saturation value
just above 0.50 at R = 1.3. The dashed line in Fig. 7.3 corresponds to the anticipated
arsenic atomic fraction if all atoms that arrived at the surface were incorporated into the
thin film.
By examining the species involved in deposition and desorption during the growth process, it was observed that almost all gallium atoms were incorporated in the grown films
for all temperatures and flux ratios explored in Fig. 7.3. The fraction of arsenic dimers
incorporated into the film during growth appears to be dependent upon the concentration of
CHAPTER 7. CONDENSATION MECHANISMS . . .
136
!
!
4
Figure 7.3: The arsenic atomic fraction of thin films deposited at 850 K and 1500 K. The
dashed line indicates the theoretical arsenic concentration limit when the sticking fraction
of both arsenic and gallium species is at unity.
arsenic in the As:Ga flux and the substrate temperature. Furthermore, as the growth temperature was decreased into the LT region, the fraction of As2 vapor that bonded to the surface
increased. However, even at the lowest simulation temperatures, approximately 15% of the
arsenic dimers that initially impacted the surface were subsequently desorbed. Samples
grown with low As:Ga flux ratios are therefore gallium-rich. Examination of gallium-rich
samples grown at T ≥ 800 K, whose arsenic fractions lay between 0.45 and 0.50, indicate
that the excess gallium was located on the free surface. The composition of the underlying
film was stoichiometric in these cases; however, at lower temperatures, the stoichiometry
changed and defects began to appear.
The composition trends of the simulated thin films were consistent with the experimental observations for both HT and LT growth regions. At low temperatures and arsenicrich flux conditions, excess arsenic was incorporated into the deposited structures up to a
CHAPTER 7. CONDENSATION MECHANISMS . . .
137
temperature-dependent solubility limit, as observed experimentally [24, 27, 235]. At high
temperatures and As:Ga flux ratios approaching unity, gallium-rich surfaces were observed
to form in both simulations and experiments [12]. As the flux ratio was increased under HT
growth conditions, the arsenic in excess of the stoichiometric value was desorbed resulting
in stoichiometric films. This is also generally consistent with HT molecular beam epitaxial
(MBE) results [17]. The simulated LT (800–1100 K) and HT (1400–1500+ K) conditions
are thus phenomenologically linked to experimental LT (500–600 K) and HT (800–900
K) conditions. The higher simulated temperatures were a consequence of the accelerated
deposition rate, which reduced the time available for surface diffusion during simulations.
The longer diffusion distances occurring in experiments were approximately recovered in
the simulations only by increasing the atomic mobility with an artificially higher substrate
temperature.
7.4 Arsenic dimer mechanisms
The vapor phase growth of GaAs involves the random impact of gallium atoms and arsenic dimers with a GaAs surface followed by adsorption, surface migration, evaporation,
and molecular reactions on the surface leading to incorporation of gallium and arsenic in
the lattice [236]. The mechanisms and rates of these kinetic processes are critical to a
fundamental understanding of the epitaxial growth of GaAs films [20]. A kinetic model
has been proposed for As2 binding on the surface [20, 21, 26, 237, 238, 239]. The model
was motivated by As2 sticking ratio observations on gallium-terminated (001), (110), and
(111)A GaAs surfaces [26, 238, 239]. Various kMC simulations were also used to identify
the states that best matched experimentally-measured desorption rates, island nucleation
kinetics, and terrace step growth rates [113, 114, 237].
The kinetic model proposed the existence of (1) a weakly-bound precursor state (As 2(p) )
CHAPTER 7. CONDENSATION MECHANISMS . . .
138
located relatively high above the surface, (2) a more strongly-bound intermediate chemisorbed
state (As∗2(c) ) located closer to the surface, and (3) an incorporated state (As(i) ) that has a
bulk-lattice-like bond strength and interatom separations. The overall reaction can then be
written as:
As2(v) As2(p) As∗2(c) → 2 As(i) .
(7.4.1)
In the model, the incident vapor molecule (As 2(v) ) is initially incorporated into the weaklybound precursor state (As2(p) ) from which it either desorbs to the vapor (As 2(v) ) or becomes
more strongly bound with the surface in an intermediate chemisorbed state (As ∗2(c) ). An arsenic dimer in the As∗2(c) state then either returns to the As2(p) state or can be fully incorporated into the lattice (As(i) ) [239]. These states represent classes of binding with a similar
bond strength and distance from the surface. However, the structural configurations of the
binding states are likely to depend upon the detailed atomic structure and composition of
the surface.
The interplay between the states is directly affected by the temperature, deposition rate,
flux composition, surface composition, and surface structure [21, 239, 240]. Little is known
about these effects on the specific binding states since the intermediate states can not be
observed directly in experiments due to the short state lifetimes [234]. Furthermore, kinetic
Monte Carlo (kMC) simulations are also unable to resolve these details due to the lack of
lattice vibration in the model. However, the MD simulation approach detailed here can be
used to directly study these intermediate states since its time resolution is ∼ 10 −14 sec and
the interatomic potential has been shown to capture the major bonding trends of the GaAs
system (Chapter 6).
CHAPTER 7. CONDENSATION MECHANISMS . . .
139
7.4.1 Gallium-terminated surfaces
The structure and reaction dynamics of the As2(p) and As∗2(c) states were explored for 104
ps following a dimer impact with the atoms of a perfect gallium-terminated (1 × 2) surface.
This was accomplished by computing the dimer binding energy and distance above the
surface as a function of time following impacts with surfaces at temperatures between 300
K and 1200 K. The dimer binding energy, ΔE, was determined as the difference between
the total energy of a system with a dimer in its bound position minus that of the same
system with the dimer removed beyond its interaction range with the surface (3.7 Å). A
dimer distance, z, above the surface was defined as the difference between the location
of the center of mass of the dimer and the position of the top layer of atoms forming the
surface (≈ 11.3 Å).
A typical result for an arsenic dimer impact with a gallium-terminated (1 ×2) surface at
900 K is shown in Fig. 7.4. The free vapor molecule (v) and three binding states (p, p*, and
c*) can be identified in Fig. 7.4 based upon the arsenic dimer bond length, position above
the substrate, and the dimer binding energy with the surface. The v-state corresponded
to the free arsenic vapor where no interaction with the surface occurred (the As2(v) state
in Eq. 7.4.1). In this case, ΔE = 0 eV/dimer and z > 3.7 Å. In the vapor, the arsenic
dimer had an interatomic spacing that vibrated around a mean length of 2.12 Å and a bond
strength of 3.98 eV/dimer, which are both consistent with experimental observations [159].
The three remaining states were involved in the dynamic binding of the arsenic dimer to
the surface. Frequent switching between the p, p*, and c* binding states during the first
104 ps of interaction can be seen in Fig. 7.4.
The p* state at 900 K corresponded to a dimer located at z = 2.28 ± 0.44 Å above the
surface with a binding energy ΔE = −1.93 ± 0.19 eV/dimer. The bound As 2 molecule
had an As-As separation distance of 2.28 ± 0.44 Å, similar to that of the free molecule.
CHAPTER 7. CONDENSATION MECHANISMS . . .
140
(
'
&'
&
## z $
, !"
,E !"
%
(
%
(
&'
%
%
%
%
%
% %
'
&'
Figure 7.4: Binding dynamics of As 2 on a gallium-terminated (1 × 2) surface at 900 K. (a)
Arsenic dimer binding energy (ΔE) to the surface. (b) Vertical distance between the dimer
center of mass and the (001) surface (z). The insert (c) shows the binding energy during
the first 10 ps of interaction. Four states were observed and are marked by v, p*, p, and c*.
The v-state corresponds to a dimer in the vapor. The other transition states are described in
the text.
CHAPTER 7. CONDENSATION MECHANISMS . . .
141
Analysis of time resolved atom positions during the simulation showed that the dimer in the
p* state was strongly influenced by lattice vibration. A dimer on the (001) surface plane in
the p* state frequently switched between alignment with the [110] direction (±18.6 ◦ ) (i.e.,
perpendicular to the surface dimer rows) and the [1̄10] direction (±8.5◦ ) (i.e., parallel to
the surface dimer rows). The arsenic dimer resided in the [110] orientation 79% of the time
and 21% of the time in the other [1̄10] orientation. The dimer axis in the p* binding state
remained within ±8.5◦ of the surface plane. Clearly, many different atomic configurations
were associated with a similar binding energy and location above the surface. Nevertheless,
the highly degenerate p* state formed only two strong bonds with the surface. The structure
was not stable and transferred to the p state (described below) when the system was relaxed
at 0 K (to find the minimum-energy atomic positions) [188].
The arsenic dimer in the p state resided closer to the surface (z = 1.84 ± 0.25 Å) than
in the p* state and had a stronger binding energy (ΔE = −2.81 ± 0.36 eV/dimer). Like
the p* state, its dimer bond length (2.33 ± 0.12 Å) was similar to that of dimers in the
vapor and it again formed only two strong bonds with the surface. Furthermore, the dimer
axis remained in the (001) plane (±7.3%) and resided in the [110] and [1̄10] orientations
with equal probability. The distribution of orientations was much sharper than for the p*
state and only varied within ±7◦ in each direction at 900 K. Total energy minimization at
0 K of the p state configurations identified an example structure shown in Fig. 7.5(a). The
long bond lengths and weak dimer binding energy of the p state corresponded well with
the As2(p) state in Eq. 7.4.1. The p* state (As ∗2(p) ) therefore appears to be a vibrationally
excited version of the As2(p) state that exists when significant thermal energy is transferred
into the dimer.
The c* binding energy in Fig. 7.4 has a binding energy ΔE = −4.28 ± 0.31 eV/dimer,
which was the lowest-energy binding state observed. The dimer separation distance was
2.54 ± 0.11 Å and it was located at a height z = 1.54 ± 0.15 Å above the surface. This is
CHAPTER 7. CONDENSATION MECHANISMS . . .
142
!
$
$
!!"
!"
#
!!"
!
$
$
Figure 7.5: Local atomic configurations for As2 on a gallium-terminated (1 × 2) surface.
(a) The weakly-bound precursor state (As2(p) ) and (b) the intermediate chemisorbed state
(As∗2(c) ). The configurations correspond to those obtained after total energy minimization
at 0 K.
CHAPTER 7. CONDENSATION MECHANISMS . . .
143
relatively close to the interplanar spacing in the [001] direction of the bulk crystal (1.4 Å).
This is consistent with c* being a chemisorbed state and corresponds to the As ∗2(c) state
in Eq. 7.4.1. During simulations at 900 K, this state was oriented in the [ 1̄10] direction
(±5◦ ) nearly 100% of the time and remained almost parallel (±5.3%) with the (001) surface. The typical structure of this state is shown in its relaxed form in Fig. 7.5(b). In this
configuration, the arsenic dimer formed four strong covalent bonds with the surface. Before the arsenic dimer was added, the surface gallium atoms were arranged in dimerized
rows. However, in the As∗2(c) state, Fig. 7.5(b) shows that the surface Ga-Ga bonds directly
below the arsenic molecule were broken and these two atoms moved into bulk lattice-like
positions.
At 1100 ps and 3300 ps in Fig. 7.4(b), the dimer position dropped to ∼ 1 Å above the
surface. Upon inspection of these states, it was found that the structure was very close to
that of the As∗2(c) state. However, one of the surface dimers had been slightly displaced
by thermal vibration, which allowed the dimer to move in the [00 1̄] direction about 0.5 Å.
Since this anomaly was strictly a function of temporary changes in surface structure, it does
not define a new binding state.
The initial interactions between an arsenic dimer and a gallium-terminated surface at
900 K, Fig. 7.4(c), proceed according to the following sequence. At t = 0, an incident
dimer (As2(v) ) located beyond the interaction range (z > 5 Å) of the potential has a binding
energy ΔE = 0. As the dimer approaches the surface, it becomes weakly bound to the
surface in the As2(p) state. The As2(p) state was occupied for a short, random time (5 ps
in Fig. 7.4) before transition to a more strongly-bound state occurred. This more strongly
chemisorbed state is the As∗2(c) state in Eq. 7.4.1. Analysis of multiple impacts indicated
that the residence time in the As2(p) state depended upon the initial orientation of the dimer,
the local surface structure at the impact site, and the surface temperature.
After the initial impact at 900 K, the dimer was observed to be highly mobile during
CHAPTER 7. CONDENSATION MECHANISMS . . .
!
$%(
$%
144
$%(
$% !!& %'
"
#
"
"
Δ- Figure 7.6: The dimer binding state occupation probability distribution at 300 K, 900 K,
and 1200 K during 104 ps of dimer/surface binding.
the transition between binding states and it readily diffused across a gallium-terminated
surface. During the migration of the dimer on the surface, the fraction of time occupied
by each state was determined by calculating the area under the state occupation probability curve. The division line between the As ∗2(c) and As2(p) states was selected at −3.65
eV/dimer, while −2.26 eV/dimer was used to divide the As 2(p) and As∗2(p) states. These
state occupation probabilities are shown at 300 K, 900 K, and 1200 K in Fig. 7.6.
At 300 K, the incorporated dimer resided in the As ∗2(c) state for the majority of the
time (98.4%) and only briefly occupied either the As2(p) (1.4%) or As∗2(p) (0.2%) states.
Hence, the intermediate chemisorbed state (As∗2(c) ) was the dominant state at low temperatures. As the temperature was increased to 900 K, the switching between the As ∗2(p) , As2(p) ,
and As∗2(c) states increased in frequency (3 transitions/ns in Fig. 7.4). The strongly-bound
As∗2(c) state was occupied for 32.1% of the time, while the weakly-bound states were oc-
CHAPTER 7. CONDENSATION MECHANISMS . . .
145
cupied 40.5% (As2(p) ) and 27.4% (As∗2(p) ) of the time. Clearly, the occupation probability
favored the two weakly-bound states (As∗2(p) and As2(p) ) as temperatures neared the upper limit of experimental MBE growth [17]. At 1200 K, the weakly-bound As ∗2(p) state
had the highest occupation probability (58.3%), followed by the As 2(p) (30.2%) and the
As∗2(c) (11.5%) states. The dimer had a very high switching frequency (> 30 switchings/ns) between each of these states. At such high temperatures, the four strong bonds
of the As∗2(c) state could not be sustained and lattice vibrations led to desorption from the
As∗2(p) state.
The MD analysis of atomic assembly processes is generally consistent with the kinetic
model of Eq. 7.4.1. A variant of the As 2(p) state (As∗2(p) ) was observed to have a high
occupancy probability at high temperatures. At lower temperatures, the As ∗2(c) state had
high occupancy. It was clear from the MD simulations that the transition between the
As∗2(c) , As2(p) , and As∗2(p) states was completely reversible and occurred repeatedly as the
dimer diffused across the surface.
7.4.2 Arsenic-terminated surfaces
Experimental observations of the interaction of arsenic dimers with arsenic-terminated surfaces indicate that the bonding is temporary unless temperatures are low and the arsenic
concentration in the vapor is very high [13, 167]. Unless these conditions exist, As 2 incorporation into the crystalline GaAs lattice requires surface accessible gallium adsorption
sites [20, 21]. However, under LT and high arsenic flux conditions, freely accessible gallium sites are rarely encountered, and colder surfaces allow the binding of arsenic dimers
to the arsenic-terminated surfaces. Under these conditions, the kinetic model developed for
arsenic dimer binding to gallium-terminated surfaces (Eq. 7.4.1) no longer applies.
Interactions between arsenic dimers and a perfect arsenic-terminated (2 × 1) surface
CHAPTER 7. CONDENSATION MECHANISMS . . .
146
were explored to investigate the binding states present during LT GaAs growth under high
As:Ga flux ratio conditions. In contrast to the gallium-terminated surface, where impacting dimers were almost always bound to transition states, dimer adsorption/desorption was
highly dependent upon the detailed structure at the impact site for arsenic-terminated surfaces, and the dimer orientation in the vapor state strongly influenced the adsorption probability.
Rapid desorption or occasional adsorption of arsenic dimers was observed when arsenic
dimers impacted an arsenic-terminated surface. The binding energy and atom configurations for a typical rapid desorption event are shown in Fig. 7.7. The dimer in this simulation
impacted the surface between the dimer rows and was initially nearly vertically oriented
(≈ 30◦ ) to the surface, see part (1) of Fig. 7.7(b). Initially, atom 2 of the dimer impacted
the surface between the dimer rows, where it briefly (and weakly) bonded with gallium
atoms in the second layer below the surface and surface arsenic atoms (see part (2) of
Fig. 7.7(b)). The bonding was weak, Fig. 7.7(a), and the dimer quickly desorbed (see part
(3) of Fig. 7.7(b)). Throughout this event, atom 1 of the dimer remained well above the surface and bonded only with one surface arsenic atom (see parts (1)-(3) of Fig. 7.7(b)). While
this particular impact resulted in rapid desorption, similar impacts between the dimer rows
sometimes resulted in kinetically trapped dimers whose desorption rate was then strongly
dependent upon temperature. However, none of these interactions were observed to transition to or from the precursor state. At 500 K, rapid desorption occurred in 18% of the more
than 1000 surface impacts monitored. This rapid desorption from the arsenic-terminated
surface is consistent with the observation that ∼ 15% of the arsenic dimers did not stick to
the surface during thin film growth simulations.
Surface adsorption of the arsenic dimers was observed to occasionally occur. An example at 500 K is shown in Fig. 7.8. Following impact, the dimer assumed a weakly-bound
configuration with a binding energy ΔE ≈ −1.25 eV/dimer, Fig. 7.8(a). The local atomic
CHAPTER 7. CONDENSATION MECHANISMS . . .
147
(
,- !
! "# ) *
+*" *"
,-
'
!
$%
&
$%
$%
Figure 7.7: A rapid As2 desorption event from an arsenic-terminated (2 × 1) surface at 500
K. (a) The binding energy of the arsenic dimer to the surface for interaction after initial
impact; and (b) the local atomic configurations at (1) 0.25 ps, (2) 0.75 ps, and (3) 1.25 ps
are also shown. The initial dimer angle is measured with respect to the axis perpendicular
to the (001) surface.
CHAPTER 7. CONDENSATION MECHANISMS . . .
148
Δ- *
!!( ")!
?
!" F
! ,"!"
+ F
# !
%&'
%&
%&
?
$
Figure 7.8: Adsorption of As2 onto the arsenic-terminated (2 × 1) surface at 500 K. (a) The
binding energy of the arsenic dimer for 6 ps of interaction after impact. Atomic structures
of (b) the weakly-bound precursor and (c) the adsorbed states are also shown.
CHAPTER 7. CONDENSATION MECHANISMS . . .
149
configuration of this state is shown in Fig. 7.8(b). The interatom separation within the
dimer was 2.35 Å, compared to a separation of 2.12 Å in the vapor. The dimer in this precursor configuration was located ∼ 2.1 Å above the surface. It did not perturb the original
atomic surface structure and formed two strong bonds with the arsenic-rich surface. These
characteristics are analogous to the weakly-bound precursor state (As2(p) ) in Eq. 7.4.1.
The second state indicated in Fig. 7.8(a) had a much stronger dimer binding energy
(ΔE = −3.09 eV/dimer at 500 K) and resided closer to the surface (z = 1.84 Å) compared
to the As2(p) -like state. The atomic configuration for this state is shown in Fig. 7.8(b).
Four relatively strong bonds were formed with the surface. The As-As-As bond angles
between the dimer and the surface were approximately 90◦ . The As-As dimer interatomic
spacing was 2.45 Å when bonded to the arsenic-terminated surface. This state is similar
to the intermediate chemisorbed state (As ∗2(c) ) seen in the gallium-terminated surface since
it has a high binding energy and short bond lengths. However, the dimer did not open
up the substrate dimers, as observed during adsorption on gallium-terminated surfaces.
Nevertheless, this state can be classified as a specific example of the general class of As∗2(c) like states.
The arsenic dimer binding energy (ΔE), lateral in-plane position on the surface, and
the distance above the surface (z) were studied for the As∗2(c) -like state between 300 K and
1200 K for times up to 104 ps. Unlike the gallium-terminated case, no switching between
states was observed beyond the initial As 2(p) to As∗2(c) transition. Once in the As∗2(c) -like
state, the dimer atoms vibrated with a temperature-dependent amplitude, and little surface
migration of the dimers was observed within the 10 4 ps calculation window. Instead of
diffusing, the dimers tended to desorb when thermally perturbed from the As ∗2(c) -like state.
CHAPTER 7. CONDENSATION MECHANISMS . . .
150
7.5 Sticking ratio estimates
7.5.1 Gallium- and arsenic-terminated surfaces
Desorption rates from (001) GaAs surfaces depend on the surface structure, adsorbate coverage and species type, and the surface temperature. These rates are influenced by the
binding states that the incoming species occupy, see Eq. 7.4.1 [26]. During growth, the
impacting species that bind to the surface migrate on the surface until they encounter a
surface site that traps the atom or dimer. On a flat gallium-terminated surface, the migration of an arsenic-dimer was observed to be quite significant. In this case, the effective
migration time between impact and incorporation into the film (usually at a terrace ledge)
has a significant impact on growth kinetics [237]. On the other hand, our observations
of arsenic dimer binding on a flat arsenic-terminated surface showed rapid desorption and
little surface migration once the arsenic dimer occupied the As∗2(c) state. Nevertheless, the
surface residence time (even for a relatively small number of surface binding sites) can still
have a significant impact on the growth dynamics of GaAs thin films. We can explore the
connection between surface migration (residence) time and desorption using perfectly flat
gallium-terminated (1×2) and arsenic-terminated (2×1) surfaces. These surfaces represent
simple approximations to the gallium- and arsenic-rich surfaces observed experimentally
for (001) surface reconstructions [12, 13, 234].
The arsenic dimer and gallium atom adsorption and desorption behaviors have been
measured by monitoring the behavior of several thousand impacts on gallium- and arsenicterminated surfaces as a function of temperature and counting the fraction of arsenic dimers
and gallium atoms that desorb. This data was converted into a sticking ratio, S R , which can
be computed by dividing the number of atoms that remained on the surface by the number
that impacted the surface in a prescribed time. The gallium atom sticking ratio on both
gallium- and arsenic-terminated surfaces was found to be close to unity between 100 K and
CHAPTER 7. CONDENSATION MECHANISMS . . .
151
2000 K. No significant gallium desorption was observed within 100 ps of the impact event
on either surface; however, significant arsenic desorption was observed from the upper
substrate layers as the temperature was increased above 1650 K. Hence, the sticking ratio
estimates here focus on the arsenic dimer, where variation as a function of temperature
is clearly observed. These calculations can be compared to experimentally-determined
sticking ratio data for arsenic dimer impacts on gallium-terminated (4 × 2) surfaces [26].
The arsenic sticking fraction on (1 × 2) and (2 × 1) surfaces is shown in Fig. 7.9. The
sticking ratio data points (black dots) were obtained from an analysis of 100–200 dimer
impacts at temperatures between 100 K and 2400 K. Each impact event was monitored for
desorption for 100 ps. The estimated sticking ratio had a standard deviation around ±10%
[241].
The evaluation of the sticking ratio as a function of time, t, and temperature, T , requires
the utilization of a time-dependent kinetic model. To this end, consider a flat (001) GaAs
surface that has NJ dimer impacts per unit area from an incoming flux. From these incoming dimers, N0 dimers per unit area bind to the surface and are assumed not to interact with
each other. A kinetic model can be used to determine the number of dimers per unit area
that remain on the surface as a function of time.
Experimental studies suggest As 2 desorption exhibits first order reaction kinetics [26,
234]. The desorption rate of an adsorbate dimer, Rd , can therefore be written:
Rd = −dN/dt = k N ,
(7.5.1)
where k is the rate constant for the desorption process and N is the number of dimers per
unit area on the surface at time, t. The rate constant, k, can be expressed in an Arrhenius
form:
k = Ax exp (−Qx /kB T ) ,
(7.5.2)
CHAPTER 7. CONDENSATION MECHANISMS . . .
152
! 5 4
1.0
0.8
0.6
0.4
0.2
$
0.0
0
500
1000
1500
%
6 &
2000
" #
! 5 4
1.0
0.8
0.6
0.4
0.2
$
0.0
0
500
1000
1500
%
6 &
2000
Figure 7.9: The temperature dependence of the sticking ratio of an As 2 vapor flux on
(a) a gallium-terminated (1 × 2) surface and (b) an arsenic-terminated (2 × 1) surface.
Experimental sticking ratio data for As 2 on a gallium-rich (4 × 2) surface (Ref. [26]) is
shown as a thick gray line in part (a). The time-dependent desorption trends are plotted for
a wide range of surface migration times with solid black lines.
CHAPTER 7. CONDENSATION MECHANISMS . . .
153
where Qx is the activation barrier for arsenic dimer desorption from a surface of type x, Ax
is the pre-exponential factor for a surface of type x, kB is the Boltzmann constant, and T is
the absolute temperature of the system.
The number of dimers that remain on the surface per unit area at time t can be found
by integrating the desorption rate equation in Eq. 7.5.1:
N (t) = N0 exp (−k t) .
(7.5.3)
The arsenic dimer sticking ratio, SR , can then be calculated by:
SR =
N (t)
N0
=
exp (−k t) ,
NJ
NJ
(7.5.4)
where N0 /NJ = 1 when all the dimers initially bind to the surface (as is the case for the
(1 × 2) surface) and N0 /NJ < 1 when a rapid desorption mechanism is in play (as is the
case on the (2 × 1) surface, where N0 /NJ ≈ 0.847).
The desorption activation energies and pre-exponential factors can be fitted to the simulated As2 sticking ratio data as a function of temperature on both the gallium-terminated
(1 × 2) and arsenic-terminated (2 × 1) surfaces for t = 100 ps. This gives: A1×2 = 0.269
ps−1 , Q1×2 = 0.886 eV (on a gallium-terminated surface), A2×1 = 0.0329 ps−1 , and
Q2×1 = 0.206 eV (on an arsenic-terminated surface). The t = 100 ps curve begins to deviate from the simulated data at temperatures above 1700 K due to the evaporation of arsenic
from the initial gallium- and arsenic-terminated substrates.
Experimental data for the arsenic sticking fraction on a (4×2) gallium-rich surface have
been obtained between 673 K and 853 K for deposition rates between 5 ×10 14 atoms/cm2-s
and 9 × 1014 atoms/cm2-s [26]. These data are well fitted by Arrhenius relations (solid gray
line in Fig. 7.9(a)) for a kinetic model similar to that in Eq. 7.4.1. The arsenic sticking ratio
CHAPTER 7. CONDENSATION MECHANISMS . . .
154
predicted by our kinetic desorption model can be plotted for a range of surface residence
(or free migration) times, see Fig. 7.9. The experimental sticking ratio data for As 2 on a
gallium-rich surface is consistent with the predictions from our kinetic model if the time
over which desorption can occur is increased from 102 ps to 105 ps. However, it should
be noted that due to the simplicity of the (1 × 2) gallium-terminated surface used in this
model, the 105 ps free migration time predicted is likely underestimated for surfaces with
defect sites, as is the case for real (4 × 2) surfaces [12].
The experimental model used to fit the experimental sticking ratio data to Arrhenius
relations assumes binding states similar to those of Eq. 7.4.1 [26]. The desorption activation
barrier (Qd ) from these states was evaluated and fitted to the Arrhenius relation, Q d ≈
0.91 ± 0.08 eV [26]. The magnitude indicated that desorption most likely occurred from
the strongly-bound As ∗2(c) state [26]. In our time-dependent model, the desorption activation
barrier energy for arsenic was 0.886 eV and was consistent (by virtue of magnitude) with
desorption from the As∗2(c) state, which matches well with the experimental estimate. This
insight can be coupled with the direct observation of arsenic dimer interactions on the (1 ×
2) gallium-terminated surface. In these dynamic simulations, the dimer frequently switched
between the As∗2(p) , As2(p) , and As∗2(c) states. Furthermore, the final desorption event was
observed to occur from the As∗2(p) state. Nevertheless, desorption was not observed to
occur from the weakly-bound state without first going through the more strongly-bound
As∗2(c) state. Therefore, a higher activation barrier for desorption is expected despite the
common occurrence of the As∗2(p) and As2(p) states.
The experimental study of As2 interactions with an arsenic-rich surface shows that essentially no arsenic stays bound to a surface in the absence of exposed gallium atoms at
high temperatures [20, 21]. However, arsenic has been observed to stick at temperatures
below 750 K in an arsenic-rich environment [175]. The low desorption energy barrier predicted in this model indicates that As 2 readily desorbs in accordance with experimental
CHAPTER 7. CONDENSATION MECHANISMS . . .
155
observations. This is consistent with easy desorption from a weakly-bound precursor state
[50]. Here, we have accounted for two paths to desorption that contribute to this barrier.
These paths of rapid desorption and thermally-activated desorption are consistent with our
mechanistic observations in the previous section. Hence, the time resolved kinetic model
identifies a correspondence between the simulations and experiments. This, in combination
with the mechanistic insights about the binding of As 2 dimers to the (001) GaAs surface,
provides insight into the states that are otherwise not observable experimentally.
7.5.2 Arsenic dimer orientation effects
Since diffusion of the dimer on arsenic-terminated (2 × 1) surfaces was significantly less
than on a gallium-terminated surface, the local surface structure of the impact site and
orientation more strongly influence the probability of binding in the As ∗2(c) state. For the
simple dimer-row surface structure, the issue reduces to whether a dimer impacts the top of
the dimer row (As2(p) → As∗2(c) ) or within the narrow trench between the rows (rapid desorption or trapping). The orientation effect was quantified by analyzing the sticking ratio of
As2 on an arsenic-terminated surface at 300 K and 1000 K, see Fig. 7.10. The sticking ratio
data were calculated by repeating 1000–1500 single impact runs with randomized orientation and location over a (2 × 1) surface with surface temperatures between 300 K and 1500
K. After the introduction of the dimer, the system was allowed to progress for 100 ps, as
before. The sticking ratio was then calculated as a function of the initial dimer orientation
angle and averaged in each of the nine orientation angle bins between 0 ◦ and 90◦ . Fig. 7.10
shows that dimers initially perpendicular to the surface (θ < 40 ◦ ) were 40% more likely
to desorb than impacts where both dimer atoms reached the surface nearly simultaneously
(θ > 40◦ ). The desorption rate was therefore a strong function of angle in a scenario without angular momentum. A similar study was performed for As 2 on the gallium-terminated
CHAPTER 7. CONDENSATION MECHANISMS . . .
156
1.0
Sticking fraction, 54
0.9
300 K
0.8
0.7
1000 K
0.6
[001]
0.5
θ
0.4
[110]
0
20
40
60
As 2 orientation angle, G (degrees)
80
Figure 7.10: Sticking ratio of As2 on the arsenic-terminated (2 × 1) surface as a function
of the initial orientation angle of the dimer to the axis perpendicular to the (001) surface.
Measurements are reported at 300 K and 1000 K.
(1 × 2) surface and no appreciable sticking preference based on initial angle was seen.
7.6 Conclusions
1. A GaAs bond-order potential (BOP) based molecular dynamics (MD) method has
been demonstrated to reproduce phenomenological observations of the high- and
low-temperature growth of GaAs on the (001) surface.
2. The calculated arsenic composition of the as-grown thin films was strongly dependent upon temperature and As:Ga flux ratio. The experimental temperature-dependent
arsenic solubility trend was reproduced with the GaAs BOP-based MD method.
3. The interaction of As2 on a gallium-terminated (1 × 2) surface was observed to
match a proposed kinetic model quite well. An additional excited precursor state
CHAPTER 7. CONDENSATION MECHANISMS . . .
157
was observed during the significant switching between the precursor and intermediate chemisorbed states. This switching was temperature dependent and was significant at growth temperatures commonly used in experiments.
4. Arsenic dimers can adsorb to the arsenic-terminated surface and generally diffuse
much less than those on a gallium-terminated surface. Rather than diffusing, dimers
are found to simply desorb once perturbed from their binding state.
5. A correspondence between simulated and experimental sticking ratio values was established by utilization of a time-dependent kinetic model for desorption. The arsenic
dimer surface migration time was found to have a significant influence on the desorption rate.
6. The sticking of As2 on an arsenic-terminated surface is strongly dependent upon the
orientation of the dimer at the time of impact. No such dependence was observed on
the gallium-terminated surface.
Chapter 8
Discussion
The research contained in this dissertation was performed with the expressed purpose
of further understanding the atomic assembly mechanisms of gallium and arsenic vapor
species on the (001) GaAs surface. Molecular dynamics (MD) simulation methods were
used to study the atomic assembly mechanisms during vapor deposition growth over 10 −5 –
102 ns of time and for length scales on the order of nanometers. However, for these MD
simulations to be reliable, the potential energy function that governs interatomic interactions must sufficiently represent the real Ga-Ga, As-As, and Ga-As interactions as observed
in experiments. In addition to this experimental data, density functional theory (DFT) based
ab initio calculations were utilized to fill in the critical gaps in data for verification of the
fitness of the potentials.
The identification and analysis of significant properties that contribute to the fidelity of
the published potentials were recorded in Chapter 3. Of the large number of parametrizations available in literature (Appendix C), two empirical potentials were found to produce the most reliable results for use in MD simulation of GaAs: the Tersoff potential, as parametrized by Albe et al. [71] and identified as TR-ANNK; and the jointly
parametrized GaAs Stillinger-Weber (SW) potential [75, 76], identified as SW-AMG+ in
158
CHAPTER 8. DISCUSSION
/=
)I
Reference
40
SW-AMG+
TR-ANNK
BOP
30
20
10
0.0
-0.5
zb
sc16
NaCl
NiAs
CsCl
dim
aGa
GaII
fcc
bcc
sc
dc
dim
aAs
sc
bcc
fcc
dc
dim
/=)I
(b)
Cohesive Energy (eV/atom)
Atomic Volume HÞ3atomL
50
zb
sc16
NaCl
NiAs
CsCl
dim
aGa
GaII
fcc
bcc
sc
dc
dim
aAs
sc
bcc
fcc
dc
dim
(a)
159
/=)I
)I
/=
-1.0
-1.5
-2.0
-2.5
-3.0
-3.5
100
B
c’
c 44
sc16
NaCl
NiAs
CsCl
aGa
GaII
fcc
bcc
sc
dc
aAs
sc
bcc
fcc
dc
50
zb
bulk moduli (B)
6
4
2
0
Asi,<110>
150
Asi,tet
200
8
Asi,<110>
250
10
N/=< N)I
N/=> N)I
VGa
551
409
12
AsGa
1128
1139
(d)
)I
VAs
Elastic Constants (GPa)
300
/=
Ga i,tet
/=)I
Ga As
350
Defect Formation Energy (eV)
(c)
Figure 8.1: (a) Atomic volume, (b) cohesive energy, and (c) elastic constants for a variety
of gallium, arsenic, and GaAs phases. In panel (d) gallium-rich and arsenic-rich defect
formation energies in the zb GaAs lattice are shown.
this work. In addition to these potentials, a newly derived bond-order potential (BOP)
[93] was parametrized for improved material property simulation, see Chapter 6. The bulk
atomic volume, cohesive energy, elastic constants, and defect properties for these potentials
are summarized in Fig. 8.1 and are compared to local density approximation (LDA) DFT
reference data [71, 143, 208].
The TR-ANNK empirical potential clearly outperformed the SW-AMG+ empirical potential with its ability to predict reasonable bulk atomic volume, cohesive energy, and dimer
properties for a wide range of Ga-Ga, As-As, and Ga-As bonding environments, Fig. 8.1(a)-
CHAPTER 8. DISCUSSION
160
(c). The weaknesses in the ability of the SW-AMG+ potential to model a wide range of
bulk properties were significant. The weak elemental interactions significantly limited the
application of the potential to environments that had the fewest number of like-atom interactions. These issues can be traced to the inherent limitation in the SW potential format,
which does not allow for the complexities of bonding environments that significantly deviate from tetrahedral or, in the case of a weak angular term, close-packed structures. Both
empirical potentials had some difficulty with the bulk modulus elastic constants for a few
structures, Fig. 8.1(c).
Despite the exemplary performance with atomic volume and cohesive energy, the TRANNK defect properties were poorly reproduced, Fig. 8.1(d). The very low defect formation energy for the gallium tetrahedral interstitial (Ga i,tet ) will result in an overprediction of
this type of point defect during simulation. Furthermore, the relative order of both galliumand arsenic-rich point defects is not well reproduced by the TR-ANNK potential. Unfortunately, the SW-AMG+ potential does not reproduce the relative ordering well either.
However, the higher formation energies hinder the formation of an inordinate number of
point defects and allow limited use of the SW-AMG+ parameterization.
In the process of evaluating the current potentials, it became clear that the polar (001)
surface could not be accurately predicted by the classical interatomic potentials without
somehow accounting for electron occupancy in bonds and dangling bonds, see Chapter 5.
This is because of the coarse-graining of the electron degree of freedom, the occupancy
of surface dangling bonds and general conservation of electrons are not explicitly treated
in the empirical or derived potentials. The electron redistribution on surfaces has been
shown to play a significant role in stabilizing (001) GaAs surface reconstructions [171,
172, 173]. The incorporation of the energy penalty associated with the electron occupancy
of dangling bonds (electron counting rule) was found to improve predictions of various
surface reconstruction energies by destabilizing (1 × 1) bulk-terminated (001) surfaces and
CHAPTER 8. DISCUSSION
161
the dimer row ((1 × 2) and (2 × 1)) surface reconstructions. This simple application of the
electron counting rule served as a proof-of-concept and was then generalized to account
for the effects of dynamic electron transfer among dangling, surface, and bulk bonds. The
resulting electron counting (EC) potential grew out of this study and served as a term that
could be seamlessly superimposed on any potential format without affecting the energy,
forces, or elastic constants of bulk crystal structures, isolated atoms, or dimers.
The EC approach was superimposed upon the SW-AMG+, TR-ANNK, and BOP potentials to calculate the surface free energy, γ, of various surfaces, see Chapter 5 and Appendix H. The relative energy (with respect to the γα2(2×4) surface) of the minimum energy
surfaces is plotted in Fig. 8.2 for the three potentials as a function of the arsenic chemical
potential (bounded by the normalized GaAs heat of formation, ΔH f ). Similar data obtained
from DFT calculations [47, 199] are included in the figure for comparison. The addition of
the EC method improved the modeling of surface free energies for all the potentials.
The β/β2(2×4) surface reconstruction label indicates that the two β(2×4) and β2(2×
4) reconstructions can not be differentiated by interatomic potentials. This is because the
charge build-up effects that destabilize the β(2 × 4) reconstruction are not included due
to the absence of Coulombic electrostatic interactions [165]. Furthermore, none of the
interatomic potentials reproduced the complex ζ(4 × 2) gallium-rich surface reconstruction
and instead predicted the simpler β/β2(4 × 2) structure. Clearly, both the SW-AMG+ and
the TR-ANNK potentials overpredict the range of stability of their gallium-rich surface
structures and do not capture the additional c(4 × 4) arsenic-rich surface reconstruction.
The sticking ratio of an arsenic dimer to the most stable gallium-terminated surface (i.e.,
the (1 × 2) surface without use of the EC term) can be compared for all three potentials and
experimental data [26]. Using the time-dependent kinetic method described in Chapter 7,
the activation for desorption was calculated, see Table 8.1. The TR-ANNK potential has a
very low activation barrier for dimer desorption and the arsenic dimer desorbed almost in-
CHAPTER 8. DISCUSSION
162
Ga-rich
As-rich
2
TR-ANNK
2
(meV/Å )
0
DFT
-2
g-g a
2(2x4)
-4
BOP
-6
SW-AMG+
-8
-10
DH
B
D
DH
3 HB /4
B
m -m
As
/2
(bulk)
As
DH
B
/4
0.00
(eV/fu)
Potential
Ga-rich
As-rich
DFT
z(4x2)
BOP
b/b2(4x2) a/a2(2x4) b/b2(2x4)
SW-AMG+
b/b2(4x2) a/a2(4x2) b/b2(2x4)
TR-ANNK
b/b2(4x2) a/a2(2x4) b/b2(2x4)
a2(2x4)
b2(2x4)
c(4x4)
c(4x4)
Figure 8.2: Relative surface energy of the lowest-energy (001) GaAs surfaces as a function
of the relative, normalized arsenic chemical potential. The GaAs zb heat of formation
(ΔHf ) for the SW-AMG+, TR-ANNK, BOP and GGA DFT data is −2.53 eV/fu, −0.92
eV/fu, −0.91 eV/fu, and −0.58 eV/fu, respectively. The experimental value is ΔH f =
−0.74 eV/fu at 298 K [137] and is estimated at 0 K to be around −0.89 eV/fu [138, 130].
Table 8.1: The desorption activation barrier and pre-exponential factor as fitted to an
Arrhenius-based time-dependent kinetic model from desorption data monitored for 10 2 ps.
The experimentally-derived activation data is also included for comparison.
Potential/Experiment Pre-exponential factor (ps−1 ) Activation energy (eV)
SW-AMG+
5.44
1.296
TR-ANNK
0.0408
0.000
BOP
0.269
0.886
Experiment
—
0.91 ± 0.08
CHAPTER 8. DISCUSSION
163
stantaneously from the GaAs (001) surface over an extremely wide range of temperatures.
Surface interactions were thus inadequate for studies of molecular arsenic vapor deposition on the (001) surface. Therefore, despite the careful attention to bulk properties and a
promising TR-ANNK potential format, the surface properties were insufficiently accurate
to warrant use for the study of atomic assembly mechanisms or vapor deposition from an
arsenic dimer flux source.
The SW-AMG+ potential, on the other hand, has a higher activation barrier that is
indicative of reduced As2 desorption, when compared with the experimental data (Fig. 8.1).
The SW-AMG+ potential proved to be the best previously published potential for vapor
deposition. This was largely based on its ability to predict both reasonable GaAs zinc
blende (zb) bulk properties and crystalline vapor deposition growth from atomic gallium
and molecular arsenic fluxes. However, the SW potential format was limited in its ability to
predict the desorption mechanism common to arsenic-rich deposition techniques. Despite
these issues, growth and assembly mechanisms of GaAs with the SW-AMG+ potential
under low-temperature (LT) conditions and an equiatomic flux yielded interesting results.
In Chapter 4, the SW-AMG+ potential predicted a reasonable temperature-dependent
crystalline/amorphous transition in growth modes. A large variation in crystallinity was
observed around the transition temperature, which illustrated the significant randomness of
amorphous growth nucleation near the transition temperature, that is, the degree of crystalline growth is sensitive to the random creation of atomic-scale defects. In addition to this,
a clear transition, or precursor, state was observed for arsenic dimers before they were fully
incorporated onto the surface. The time that this reorientation process took was dependent
upon the initial orientation of the dimer. The orientation process took less than 3 ps. The
existence of this precursor was consistent with suggestions found in literature [21, 26, 50].
Furthermore, the formation of gallium vacancies was identified in time-dependent snapshots. The defect formation was accomplished during film growth by capping vacancies
CHAPTER 8. DISCUSSION
164
before surface diffusion filled them. Regardless of the weaknesses in the SW potential,
these results helped identify useful quantitative methods for studying vapor deposition during MD simulations.
The shortcomings of the GaAs potentials available in the literature served as a motivation to develop a new potential energy function. An analytic two-level BOP derived from
a tight-binding description of covalent bonding was utilized for this purpose. It was really
only with a new potential that the study of atomic assembly mechanisms could be effectively conducted. The development of this format was spearheaded by David Pettifor and
coworkers at the University of Oxford, see Ref. [93] and the references therein. Our role in
applying the BOP theory was to implement the analytic format, parameterize the potential,
report problems in reproducing material properties, and suggest revisions for formats that
could not be adequately applied to real material systems. This process was iterative and
continues to this day. The potential format implemented in this work addresses σ and π
bonding across the valency of the sp-valent elements.
The potential was parametrized for the GaAs material system. BOP parametrization
was approached using a method adapted from work by Albe et al. that utilized a two-step
parametrization approach for the GaAs material system [71]. Using this method, a smooth
equilibrium bond energy versus bond length curve was fit to adjusted target property values
with the pair functions. Once the pair functions were fully determined using this method,
the angular function parameters were optimized to best match gallium, arsenic, and GaAs
properties. In addition to the BOP terms, an electron counting (EC) potential term was
added to help capture (001) polar surface properties. The GaAs BOP captured the major
bonding trends in the GaAs system, with values that were generally within 5–15% of ab initio predictions. The potential represented a marked improvement over previous potentials
by predicting reasonable bulk atomic volumes, cohesive energies, elastic constants, defect
formation energies, and surface bonding properties (see Figs. 8.1 and 8.2 and Table 8.1).
CHAPTER 8. DISCUSSION
165
Finally, the study of atomic-scale mechanisms could proceed with a reasonable interatomic potential. The homoepitaxial growth of GaAs on the (001) surface from gallium
and molecular As2 vapor fluxes was simulated with MD using the GaAs BOP. Growth
conditions were varied over a wide range of temperatures (500–1500 K) and As:Ga flux
ratios (∼ 1–3). At a low temperature and high As:Ga flux ratio, the samples were strongly
arsenic-rich, while at a high temperature and low As:Ga flux ratio, the as-grown films were
gallium-rich. However, at high temperatures and high As:Ga flux ratios, nearly perfectly
crystalline films were grown. At intermediate temperatures and flux ratios, an arsenic solubility limit was clearly observed. These trends agreed well with experimental observations.
With the potential generally validated, the likelihood that predicted atomic-scale assembly
mechanisms were plausible was greatly increased.
Arsenic dimer incorporation dynamics on clean (001) surfaces were studied and three
significant predictions were made. Firstly, the incorporation of As 2 on the gallium-rich
surface involves significant switching between the precursor and chemisorbed state. This
switching was temperature dependent and was significant for growth temperatures around
900 K. Secondly, incorporation on an arsenic-rich surface is strongly dependent upon the
orientation of the incoming dimer at the time of impact. Thirdly, arsenic dimers on an
arsenic-rich surface generally desorb (instead of diffusing) once they are significantly perturbed from their bonding state.
During this study, a number of new methods have been utilized. They include a simple
method for calculating relaxed elastic constants, the computational calculation of dynamic
sticking ratios, the time-dependent evaporation model, modified crystalline order parameters, dimer/surface binding energy curves, the global EC energy penalty, the EC potential
formalism, and, of fundamental importance, the BOP formalism with σ and π bond orders
and band filling.
The significant work in developing a new potential with a never-before-used potential
CHAPTER 8. DISCUSSION
166
format has been thus finally rewarded. These predicted insights highlight the usefulness
of the MD approach to study device processing on the atomic scale. In addition to the
atomic assembly insights, a detailed record of how to improve the future interatomic potentials has been left in published literature. These insights range from the mundane observation that cutoff functions should be smooth and gradual to a significant contribution to
the understanding of what properties can be fitted when two-body repulsive and attractive
terms are used for energy and bond integrals. It is likely that the next major step forward
in interatomic potential development will involve the improvement of these terms with
screened environmentally-dependent expressions that can capture a much more diverse array of structures across the periodic table. Nevertheless, the current GaAs BOP format is
suitable for a large number of studies into the atomic-scale mechanisms that have yet to be
explored or understood by other methods.
Chapter 9
Summary
1. The Stillinger-Weber (SW) potentials parametrized respectively by Wang and Stroud
(SW-WS) [80] and by Angelo et al. and Grein et al. (SW-AMG+) [75, 76], and a Tersoff function parametrized by Albe et al. (TR-ANNK) [71] have been evaluated for
their suitability for simulating thin films in the GaAs system. The elemental and binary bulk properties predicted by these three potentials have been compared with experimental and ab initio results. The TR-ANNK potential yielded the closest agreement and the SW-WS potential was unable to reproduce energies, volumes, and elastic constants consistent with experimental and ab initio values. Simulations involving
homopolar bonding were poorly predicted by both the SW-WS and SW-AMG+ potentials. Defect properties were best predicted by the SW-AMG+ potential (under
limited environmental conditions); however, none of the potential parametrizations
performed well in this regard.
2. The complexities of the GaAs (001) surface reconstruction were not captured by
any of the interatomic potentials. Further work is needed to develop potentials that
introduce the physics responsible for the appearance of dimer trenches on the β2(2 ×
4) and ζ(4 × 2) reconstructions on the (001) surfaces of GaAs.
167
CHAPTER 9. SUMMARY
168
3. The temperature dependence of arsenic dimer sticking probability was evaluated.
Homologous temperatures were defined to relate experimental and predicted temperatures. Simulations of arsenic dimer deposition onto gallium-rich GaAs (001)
surfaces indicated that the SW potential parametrizations predict near 100% sticking
probability. This is experimentally valid at temperatures below ∼ 600 K [17]. The
TR-ANNK potential predicts a high rate of desorption, so much so that it can not be
used to simulate vapor deposition with molecular arsenic.
4. Due to its difficulty with bulk properties, the SW-WS potential should be avoided
and the SW-AMG+ potential used in its place. The use of the SW-AMG+ potential
should be limited to Ga-As interactions, because elemental interactions were poorly
modeled. Thus, the SW-AMG+ parametrization might be useful for stoichiometric
GaAs thin film growth under equiatomic flux conditions. The TR-ANNK potential had great success in many areas; however, (001) surface/molecular bonding was
poorly captured. Therefore, the TR-ANNK parametrization may best perform in
atomic flux growth conditions. Nevertheless, there is much room for improvement
in the modeling of GaAs properties and care should be taken in applying these and
other interatomic potentials to vapor deposition studies.
5. The Angelo, Mills, Grein et al. [75, 76] parametrization of the SW [68] potential
energy function was utilized to simulate stoichiometric growth from a vapor phase.
6. The potential predicted crystalline thin films for temperatures above T /T m ≈ 0.35
and below the evaporation temperature. Increasingly, amorphous growth was observed for T /Tm < 0.34.
7. Incorporation of arsenic dimers was the dominant mechanism observed. A secondary
mechanism (and much less frequent) of a single arsenic atom incorporation was also
identified, but was likely overpredicted by the SW potential. Initial dimer orientation
was observed to play a significant role in this assembly mechanism.
CHAPTER 9. SUMMARY
169
8. Gallium vacancy defects have the lowest formation energies and dominate during
low-temperature (LT) stoichiometric vapor deposition. The formation of gallium
vacancies during film growth was accomplished by capping vacancies before surface
diffusion filled them.
9. The SW potential has limitations with regard to the modeling of elemental binding
energies [130]. These properties, among others, should be improved to increase the
confidence in the veracity of the observed arsenic molecular bonding and desorption
mechanisms.
10. Conventional potential energy functions, such as Tersoff and SW, as parametrized,
all incorrectly predict the (2 × 1) arsenic-rich and the (1 × 2) gallium-rich structures
as the lowest-energy surface reconstructions of a GaAs (001) surface. Missing dimer
rows and other complexities seen in the β2(2×4) and ζ(4×2) surface reconstructions
are not captured by these potentials.
11. The incorporation of the energy penalty associated with electron occupancy of dangling bonds (electron counting (EC) rule) improves predictions of various surface
reconstruction energies by destabilizing (1 × 1) bulk-terminated (001) surfaces and
the dimer row ((2 × 1) and (1 × 2)) surface reconstructions for each of the potentials.
12. A computationally efficient analytic BOP has been derived from tight-binding theory
in a manner that coarse grains and links the electron structure to the local atomic
structure.
13. A two-level version of the BOP was parametrized for gallium, arsenic, and the GaAs
material systems using a two-step process that separately fit radial and angular dependencies. Gallium bulk properties were simplified to take the lowest-energy facecentered cubic (fcc) structure instead of the more complex αGa phase. Similar simplifying choices for bulk moduli data, tetramer structure, and the zb c 44 elastic constant were made during the parametrization. These approximations were traced back
CHAPTER 9. SUMMARY
170
to the choice of the two-center approximation for bond integral and repulsive energy
terms.
14. The BOP was evaluated by comparing the properties of small clusters, bulk atomic
properties (atomic volume, cohesive energies, and elastic constants), simple point
defects, and surface properties with other (experimental and DFT) estimates.
15. The BOP most successfully modeled dimer, trimer, and bulk property trends. The
deviations were generally within 15% of the atomic volume and 8% of the cohesive
energy values predicted by ab initio methods. The bulk moduli calculated by the
BOP were generally within 50% of values predicted by DFT, while the GaAs zinc
blende (zb) elastic constants were a good approximation of the DFT and experimental results. The melting temperature was predicted within 28% of experimentallymeasured temperature.
16. Neutral point defect formation energies were calculated for the BOP and compared to
DFT data. The calculated formation energies and local configurations were generally
consistent with DFT data. The arsenic and gallium antisite defects from the BOP
most closely matched the DFT predictions. However, the local environments of the
interstitial defects did deviate some from the DFT data.
17. The complexities of the polar GaAs (001) arsenic-rich surface reconstruction were
captured by using a combination of the BOP and a newly developed EC potential. The gallium-rich lowest energy surface reconstruction was simplified from the
ζ(4 × 2) to the β(4 × 2) reconstruction, which is consistent with the simplified approximation made for the gallium bulk phase.
18. A GaAs BOP-based molecular dynamics (MD) method has been demonstrated to
reproduce phenomenological observations of the high- and low-temperature growth
of GaAs on the (001) surface.
19. The calculated arsenic composition of the as-grown thin films was strongly depen-
CHAPTER 9. SUMMARY
171
dent upon temperature and As:Ga flux ratio. The experimental temperature-dependent
arsenic solubility trend was reproduced with the GaAs BOP-based MD method.
20. The interaction of As2 on a gallium-terminated (1×2) surface was observed to match
a proposed kinetic model quite well using the BOP. An additional excited precursor
state was observed during the significant switching between the precursor and intermediate chemisorbed states. This switching was temperature dependent and was
significant at growth temperatures commonly used in experiments.
21. Arsenic dimers can adsorb to the arsenic-terminated surface and generally diffuse
much less than those on a gallium-terminated surface for simulations with the BOP.
Rather than diffusing, dimers are found to simply desorb once perturbed from their
binding states.
22. A correspondence between simulated and experimental sticking ratio values was established by utilization of a time-dependent kinetic model for desorption. The arsenic
dimer surface migration time was found to have a significant influence on the desorption rate.
23. The sticking of As2 on an arsenic-terminated surface is strongly dependent upon the
orientation of the dimer at the time of impact. No such dependence was observed on
the gallium-terminated surface.
Appendix A
Crystal Lattice and Properties
A.1 Crystal basics
Crystalline solids can be treated in a compact way due to the long-range order inherent
in the structure. A crystal can be defined in a regular periodic arrangement of points in
space using something called a Bravais lattice. The fact that these bulk crystals can be
defined with a periodically repeated unit cell is called translational symmetry. The points
of the Bravais lattice are connected by non-coplanar translation vectors called primitive or
fundamental translational vectors.
tn = n1t1 + n2t2 + n3t3 .
(A.1.1)
The integers n1 , n2 , and n3 represent the indices that uniquely identifies each copy of the
unit cell in space. The parallel piped formed by the primitive vectors is called the primitive
unit cell and contains one lattice point.
The choice of primitive vectors for a given primitive cell is not unique, which implies
that the points of a Bravais lattice can be defined by an infinite number of choices of primi172
APPENDIX A. CRYSTAL LATTICE AND PROPERTIES
173
tive vectors. To simplify this great number of choices, it is best to choose the primitive cell
with a shape that has the highest symmetry, i.e., a cube if possible. Furthermore, to aid in
the visualization of a crystal, one can also select a conventional cell that has more than the
minimum number of lattice points that would be present in the primitive cell. 1
In three-dimensions symmetry, considerations lead to 14 different Bravais lattices that
are grouped into seven different systems based on three lengths (a, b, c) and three angles
(α, β, γ), see Table A.1. The seven systems ordered from the least to most symmetric are
triclinic, monoclinic, orthorhombic, trigonal, tetragonal, hexagonal, and cubic.
In addition to the primitive (conventional) unit cell, a crystal definition must also have
the atom positions and types fixed within the unit cell within something called basis vectors.
A crystal with more than one atom type is called a composite crystal or a composite lattice.
All the atoms in a unit cell as defined by the basis vectors can be considered to lie on
congruent lattices or sublattices defined by the primitive vectors. The sublattices differ
from one another by the value defined in the basis vectors. This combination of lattice and
basis vectors is repeated in three-dimensional space with the periodic array of atoms, ions,
or molecules to define the crystal.
Crystals are classified into different groups and are labeled according to the Strukturbericht designation, Pearson symbol, or space group. Each naming convention is based
on a different perspective and level of complexity.
The Strukturbericht designation is a historical approach based on the number of elements, stoichiometry, and roughly the order in which they were discovered, for example,
see the on-line database of the Center for Computational Materials Science of the United
States Naval Research Laboratory [243]. The convention has faults in consistency; never1
It is relevant to note that in situations that need full translational symmetry, one must consider only
the primitive vectors and unit cell and must not use the conventional cells [242]. Fortunately, this will not
be the case in our work with empirical potentials. Nevertheless, this full translational symmetry comes to
play in wave-vector quantum numbers and Brillouin zones, which are important in some of the tight-binding
calculations.
APPENDIX A. CRYSTAL LATTICE AND PROPERTIES
174
Table A.1: The fourteen Bravais lattices are broken down into seven crystal systems and
are classified under primitive, base-centered, body-centered and face-centered forms. The
conventional parallelepipeds are shown in terms of three angles and three lengths.
Crystal
Bravais lattices
system
primitive
base-centered body-centered face-centered
Triclinic
a = b = c
c
α = β = γ
β
α
γ
b
a
Monoclinic
a = b = c
α=β=
π
2
= γ
c
c
β
a
b
β
a
b
Orthorhombic
a = b = c
α=β=γ=
π
2
c
c
a
b
c
b
c
a
a
b
a
b
Trigonal
a=b=c
α = β = γ =
π
2
a α
α
α
a
a
Tetragonal
a = b = c
α=β=γ=
π
2
c
c
a
a
a
a
Hexagonal
a = b = c
α = β = π2
γ=
c
2π
3
γ
a
a
Cubic
a=b=c
α=β=γ=
π
2
a
a
a
a
a
a
a
a
a
APPENDIX A. CRYSTAL LATTICE AND PROPERTIES
175
Table A.2: The following provides a straightforward nomenclature for identifying the basic
structure of a given crystal. The naming convention is used in Pearson symbols and in the
space notation. The basic Bravais letter types are primitive (P), base-centered (C), bodycentered (I), all face-centered (F), and primitive hexagonal/rhombohedral (P/R).
Pearson
Space Bravais
label
Crystal System
Groups lattices
a
Asymmetric (Triclinic)
2
P
m
Monoclinic
13
P, C
o
Orthorhombic
59
P, I, F, C
t
Tetragonal
68
P, I
h
Hexagonal (and Trigonal)
52
P/R
c
Cubic
36
P, I, F
theless, the simplicity keeps the system in use. Single element materials are labeled ‘A,’ AB
compounds are labeled ‘B,’ AB2 compounds are labeled ‘C,’ while more complex systems
are labeled with higher alphabetic letters.
The Pearson system is a more systematic representation of the crystals and contains
information on the crystal system (x), the space lattice of the unit cells (B), and the number
of atoms per unit cell (n) [141]. The notation takes the form xBn, where x and B are defined
in Table A.2. The Pearson symbol does not uniquely define a crystal structure and can be
the same for crystals with different symmetries [244].
The space group notation is the most comprehensive notation system used in this work.
The space group has 230 different representations based on the crystal symmetries. For a
full description of the types of symmetry and the naming convention, see any crystallography textbook such as the one by Borchardt-Ott [245]. In this work, the space group is
included so as to avoid confusion when the other naming conventions are not unique.
APPENDIX A. CRYSTAL LATTICE AND PROPERTIES
176
A.2 Orthogonal conventional unit cells
The crystal structures relevant to gallium, arsenic, and GaAs are the cubic, hexagonal,
tetragonal, and the orthorhombic.2 Fortunately, each of the above crystal systems allow
the crystals to be easily generalized by the orthorhombic crystal family. The cubic (a =
b = c), tetragonal (a = b = c), and orthorhombic (a = b = c) crystal structures all have
orthogonal conventional cells. The hexagonal structures have primitive and basis vectors
that can be cast into larger conventional cells with the orthorhombohedral symmetry. These
larger cells have twice the number of atoms in the periodic cell. The fact that all the
structures can be written in the orthorhombic form with its orthogonal translation vectors is
important because the current version of the MD code used in this work requires orthogonal
periodic cells, which allows for a quicker and more simple handling of periodic boundary
conditions.
As an example of the conversion, the transformation between hexagonal (solid cell line)
and orthorhombic (dashed cell line) is shown in Fig. A.2 for the hexagonal close-packed
(hcp) crystal structure. The hcp structure is an instructive example for this orthogonalization due to the simplicity of the transformation in a single element system. The same procedure can be followed for more complex hexagonal structures with multiple atom types.
The primitive or translational vectors for the hexagonal unit cell are:
t1 = a ( 1 , −
2
√
3
, 0),
2
t2 = a ( 1 ,
2
√
3
, 0),
2
and t3 = c (0, 0, 1) .
This form can rewritten into orthorhombic form as:
t1 = a (1, 0, 0), t2 = b (0, 1, 0), and t3 = c (0, 0, 1) ,
(A.2.1)
2
Gallium does have a monoclinic phase, but it can be approximated quite effectively by an orthorhombic
structure, see Section 6.3.3.
APPENDIX A. CRYSTAL LATTICE AND PROPERTIES
177
O
"
>
!
=
=
N
Figure A.1: The hcp crystal structure is drawn in two-dimensions with the height (c-axis)
denoted by the different atom sizes. The larger lighter atoms are located at z = c/2 while
the smaller darker atoms are located at z = 0. The hcp lattice normally has two atoms in
the unit cell (solid lines) (light dashed lines are used to show the larger set of hexagonal
cells), but this increases to four (see numbered
atoms) when the orthorhombic lattice is
√
used (heavy dashed lines). Note that b = 3 a.
where b =
√
3 a. Following the graphical representation in Fig. A.2 the new basis vectors
can be reexpressed as:
⎛
⎞
0 0 0
ortho
Bhcp
⎜
⎜
⎜ 1
⎜ 2
=⎜
⎜ 0
⎜
⎝
1
2
1
2
1
3
5
6
⎟
⎟
0 ⎟
⎟
⎟ ,
1 ⎟
2 ⎟
⎠
(A.2.2)
1
2
where each row is associated with the numbered atom in the figure. The atom positions of
the new conventional cells can be determined by dotting the basis vectors with the translation vectors. Notice that atoms 3 and 4 are translated from atoms 1 and 2 by simply adding
(0 13 21 ) to each atom basis vector.
A collection of elemental and binary crystals relevant to gallium, arsenic, and GaAs
crystal systems are collected into two tables, see Tables A.3 and A.4.
The data used
APPENDIX A. CRYSTAL LATTICE AND PROPERTIES
178
Table A.3: Single elemental crystal structures relevant to gallium and arsenic are identified
by three crystal identification schemes. All conventional cell and basis vectors are listed
in a form consistent with the orthogonal (a=b=c and α=β=γ=π/2) crystal structure. The
number of atoms, N, in the orthogonal conventional cell are also recorded. Primitive unit
cells and bases can be found by following Refs. [142] and [243].
Pearson StrukturSpace
Common
Lattice
symbol bericht
group
Name
a
b
c N Basis Vectors
cP1
Ah
Pm3̄m
sc
a
a
a 1 000
cF4
A1
Fm3̄m
fcc
a
a
a 4 000; 0 12 21 ; 12 0 12 ; 12 21 0
cI2
A2
Im3̄m
bcc
a
a
a 2 000; 12 21 21
cI12
I4̄3d
bcc12 (Ga-II) a
a
a 12 34 81 0; 14 83 0; 0 34 81 ; 38 0 14 ;
511
; 0 14 83 ; 14 85 21 ; 34 87 21 ;
824
115 713 1 3 137
;
; 1 ;
248 824 8 4 248
111
cF8
A4
Fd3̄m
diamond
a
a
a 8 000; 4 4 4 ; 0 12 21 ; 14 43 43 ;
1 1 313 11
0 ;
; 0; 34 43 41
2 2 444 22
√
hP1
Af
P6/mmm sh
a √3 a c 2 000; 12 21 0
hP2
A3
P63 mmc hcp
a √3 a c 4 000; 12 21 0; 0 13 21 ; 12 65 21
hP4
A9
P63 /mmc graphite
a
3 a c 8 00 14 ; 00 34 ; 12 21 41 ; 12 21 43 ;
113
; 0 23 43 ; 0 13 41 ; 12 65 41
264
√
hR2
A7
R3̄m
αAs
a
3 a c 12 00u; 12 21 u;
00 1 − u; 12 21 1 − u;
0 23 32 ± u; 12 61 32 ± u;
0 13 31 ± u; 12 65 31 ± u
a
a
c 4 000; 12 21 21 ; 12 0 14 ; 0 12 43
tI4
A5
I41 /amd βSn
tI2
A6
I4/mmm fct
a
a
c 4 000; 12 21 0; 12 0 12 ; 0 12 21
oC4
A20
Cmcm
βGa
a
b
c 4 0u 14 ; 12 21 − u 34 ;
1 1
+ u 14 ; 1 1 − u 34
2 2
oC8
A11
Cmca
αGa
a
b
c 8 0uv; 0 1 − u 1 − v;
0 12 ± u 12 ∓ v;
1 1
+u v; 12 21 −u 1−v;
2 2
1
u 12 − v; 12 1 − u 12 + v
2
APPENDIX A. CRYSTAL LATTICE AND PROPERTIES
179
Table A.4: Binary elemental crystal structures relevant to GaAs are identified by three identification schemes. All conventional cell and basis vectors are listed in a form consistent
with the orthogonal (a=b=c and α=β=γ=π/2) orthorhombohedral crystal structure with
sufficient information for creating the crystals. The number of atoms in each sublattice
precede the X or Y vectors for the orthogonal conventional cell. Primitive unit cells and
bases can be found by following Refs. [142], [243], and [246].
Pearson StrukturSpace
Common
Lattice
Atom Type:
symbol bericht
group
Name
a
b
c Basis Vectors
cP2
B2
Pm3̄m
CsCl
a
a
a X: 000 Y: 12 21 21
cP16
—
Pa3̄
sc16
a
a
a 8X: u, ±u, ±u;
1
∓ u, 12 ± u, ±u;
2
u, 12 ± u, 12 ∓ u;
1
± u, ±u, 12 ∓ u
2
8Y: u → v
cF8
B1
Fm3̄m
NaCl
a
a
a 4X: 000; 0 12 21 ; 12 0 12 ; 12 21 0
4Y: 12 00; 12 21 21 ; 10 12 ; 1 12 0
cF8
B3
F4̄3m
Zinc blende a
a
a 4X: 000; 0 12 21 ; 12 0 12 ; 12 21 0
4Y: 14 14 41 ; 14 43 43 ; 34 41 43 ; 34 43 41
√
hP4
B4
P63 mc
Wurtzite
a
3 a c 4X: 0 23 u; 12 61 u;
0 13 21 + u; 12 56 12 + u
4Y: u → v
√
P63 /mmc NiAs
a
3 a c 4X: 000; 12 21 0; 00 12 ; 12 21 21
hP4
B81
4Y: 12 16 43 ; 0 13 41 ; 12 65 41 ; 0 23 43
tP2
L10
P4/mmm CuAu
a
a
c 2X: 000; 12 21 0
2Y: 0 12 21 ; 12 0 12
oC8
B33
Cmcm
CrB
a
b
c 4X: 0u 14 ; 0, −u, 34 ;
1 1
, + u, 14 ; 12 , 12 − u, 34
2 2
4Y: u → v
APPENDIX A. CRYSTAL LATTICE AND PROPERTIES
180
for these tables were collected from the Atlas of Crystal Structure Types for Intermetallic
Phases [142] and the Naval Research Laboratory (NRL) on-line crystal database [243].
The crystals not already in orthogonal form (i.e., hexagonal) were transformed by hand
from the structural data listed. Thus, the basis vectors given are designed to be used in
an orthogonal setting as has been already discussed in this section. The common name
along with the Pearson, Strukturbericht, and space group nomenclature for the original
primitive cell are listed. Along with this information, the orthogonal lattice parameters and
atom positions, with internal parameters, are listed for the unit or conventional cell. It is
intended that sufficient information is provided so that these crystals can be easily created
and used from the available information in this work.
A.3 Distances and angles within the crystal cell
The distances and the angles between atoms in the computational cell are used to calculate
the potential energy. The distance vector, vij , between two atoms (i and j) in an infinite
crystal can be simply determined by:
vij = (xj − xi , yj − yi , zj − zi ) = (Δxij , Δyij , Δzij ) ,
(A.3.1)
where x, y, and z are the Cartesian positions of atoms i and j. The magnitude of the
distance vector atoms can then be calculated by taking the dot product as:
rij =
vij · vij .
(A.3.2)
Under periodic boundary conditions, a finite system of atoms approximates the infinite
crystal. The length of the sides of the cell are determined by the magnitude of each of the
APPENDIX A. CRYSTAL LATTICE AND PROPERTIES
181
three translation vectors. For orthogonal crystals, this becomes a length vector as:
= (nx a, ny b, nz c) ,
L
(A.3.3)
where nx , ny , and nz represent the number of periodic unit cells in the conventional super
cell. The choice of the number unit cells in each direction is a function of the cutoff distance
used in the potential. The length of each side should be more than twice the magnitude of
the cutoff distance. The periodic neighbor distance can be calculated efficiently by:
Lx
2
Lx
if Δxij > +
2
if Δxij < −
then
Δxij = Δxij + Lx else
then
Δxij = Δxij − Lx else
(A.3.4)
Δxij = Δxij ,
where Δxij generally refers to one of the three components of v and Lx refers to one of the
Less computationally efficient
three components of the computational cell length vector, L.
methods are more straightforward in notation; however, this method for accounting for
periodic boundary conditions in the orthogonal computation cell is used exclusively in this
work.
The cosine of the angle between two atoms, j and k, from a central atom, i, can be
calculated very easily from the two vectors vij and vik as seen in Equation A.3.5.
cos θjik =
vij · vik
.
vij vik (A.3.5)
Calculation of the angle itself only requires the application of arccos to the previous equation.
Appendix B
Molecular Statics
Molecular statics methods are used to calculate material properties without the influence
of kinetic energy. Material properties estimated in this environment are cohesive energy,
atomic volume, and elastic constants of bulk phases; dimer and tetramer cluster energies
and structures; and the surface energy of (001) surface reconstructions. The calculation of
each of these properties requires that atoms in the computational cell be moved until the
system energy is minimized. This motion can involve the group movement of atoms (as is
done for highly symmetric crystalline phases) or may optimize individual atom positions
(as is the case for surface relaxation).
The calculations for energy, lattice structure, and elastic constants were performed in
the symbolic computing environment of Mathematica [220]. Each potential energy function was implemented as an analytic function of the spacing and angles between atoms.
The potential energy was then determined as a function of lattice parameters for bulk crystals and atom positions for small clusters. These cohesive and binding energies can then be
minimized with respect to lattice parameters and atom positions to find the lowest-energy
crystal and cluster structures.
The method of energy minimization used by Mathematica [247] was a combination of
182
APPENDIX B. MOLECULAR STATICS
183
the conjugate gradient method and Levenberg-Marquardt algorithms [188]. The minimization scheme for crystals varies the lattice parameters and not the atomic positions, which
allows properties for metastable phases to be easily determined. The optimized crystal parameters can then be used to calculate the atomic volume from the lattice vectors defining
the unit cell. The crystal unit cells not already in orthogonal form (e.g., αAs and αGa)
were transformed into larger cells so that an orthogonal crystal definition can be used, see
Appendix A.
The minimization of potential energy for clusters allowed interatomic spacing and angles to be optimized. The minimum dimer energy and interatomic spacing can be determined analytically. The lowest-energy tetramer structure was determined by the relaxation
[247] of six different starting structures of either the chain, zig-zag chain, square, rhombus,
Y, or tetrahedron configurations.
The bulk modulus was calculated for each crystal, while the c 11 , c12 , and c44 shear
elastic constants were determined for the GaAs zinc blende (zb) crystal. The second-order
elastic response to deformation was calculated without regard to internal atom relaxation
and thus is an estimate of the observed elastic response. These were calculated analytically
and numerically in Mathematica using the minimized energy lattice parameters. The bulk
modulus was calculated analytically with B = Ω δ 2 U/δΩ2 , where Ω is the atomic volume.
The elastic constants for GaAs zb were numerically calculated. The vectors between atoms
were strained with a matrix in Voigt notation [52]. The unrelaxed elastic constants were
then calculated from:
(0)
cij =
1 δ2U
Ω δi δj
,
(B.1.1)
i =j =0
where U is the potential energy for the given format and the superscript “(0)” indicates that
the internal positions were not relaxed.
The relaxed elastic constant (c44 ) was calculated at a series of strains using molecular
APPENDIX B. MOLECULAR STATICS
184
statics methods as implemented in the FORTRAN code (see Appendix I, Section I.3.7) with
the conjugate gradient energy minimization method [188]. Internal atom positions were
allowed to relax within the strain field. The code was inserted into gneigh (see Appendix I,
Section I.3.6). The curvature of the energy versus strain curve was then analyzed and c44
was calculated from Eq. B.1.1.
Free surfaces were also calculated within the conjugate gradient method implemented
in a FORTRAN code, which has a significantly faster computational cycle than Mathematica. An entire system of 1500-1700 atoms was relaxed with respect to both individual
atomic lattice coordinates and lattice parameters.
Appendix C
Potential Energy Function Summary
Several competing interatomic potential energy formats have been proposed for the covalent system. Lennard-Jones-Axilrod-Teller (LJ-AT) [248], Stillinger-Weber (SW) [68],
Ito-Khor-Das Sarma (IKD) [83, 249], Conrad-Scheerschmidt (CS) [87], and Tersoff (TR)
[70, 131, 132] potential formats have been proposed for multicomponent covalent systems.
A brief analysis of three characteristics that strongly influence the ability to perform molecular dynamics (MD) simulations are summarized for the GaAs parametrizations of these
potentials. Potentials and parametrizations that meet these criteria are noted and discussed
in greater detail in the body of this paper.
The first requirement is a consequence of the large atomic displacements from the ideal
crystal or surface lattice positions encountered in vapor deposition simulations. This therefore requires the potential energy function, the first derivative (interatomic forces) step, and
the second derivative (elastic constants) to be continuous (C 2 ). A second criterion can be
identified from thermodynamic considerations. The formation of a GaAs zinc blende (zb)
phase structure from elemental gallium and arsenic must be an exothermic process [137].
Additionally, the zb phase is required to be the most stable GaAs phase. A third criterion
requires that solids must possess mechanical stability, which can be calculated from the
185
APPENDIX C. POTENTIAL ENERGY FUNCTION SUMMARY
186
Table C.1: The potential energy functions and parametrizations developed for GaAs are
evaluated based on three simple criteria: (1) continuity of energy and force functions, (2)
the GaAs zb phase must have a negative heat of formation and is required to be the lowest√
energy binary phase, and (3) GaAs zb mechanical stability (“×” indicates a failure, “ ”
indicates a success, and “—” indicates that the measurement has not been made). Information for the IKD, IKD-mod, and CS potentials and the surface properties of the TR-Smith,
TR-SJWC, and TR-SJWC0 potentials were gathered from literature.
Assessment Criterion
Potential
1
2
3
Refs.
√ √
LJ-AT
×
[81, 82]
√ √
√
SW-WS
[80]
√
√
SW-AM
×
[75]
√ √
√
[75, 76]
SW-AMG+
a
IKD
× —
—
[83]
a
—
[251, 84]
IKD-mod
× —
√
√
CS
×
[87, 252]
√
√
TR-Smith
× √
[253, 252, 74]
√
[253, 252, 73]
TR-SJWC
×
√
√
TR-SJWC0 ×
[254, 253, 252]
√ √
√
TR-ANNK
[71]
a
The IKD potentials would pass this criteria if a single equilibrium angle was to be chosen.
predicted elastic constants. The cubic GaAs zb phase has three independent elastic constants, c11 , c12 , and c44 . Two of the elastic constants can be combined to give the bulk
modulus, B = (c11 + 2 c12 ) /3, and the shear modulus, c = (c11 − c12 ) /2. Mechanical
stability for cubic crystals then requires that B, c , and c44 must all be positive [250].
Table C.1 summarizes the performance of eleven potentials with regard to the criteria described above. The LJ-AT parametrization by Choi et al. [81] has a continuous
functional form; however, from our calculations, it appears that c 44 < 0. Thus, the
second criteria failed. The multielement extension of the widely-used SW potential was
parametrized by Wang and Stroud (SW-WS) [80], Angelo and Mills (SW-AM) [75], and
a revised parametrization by Grein et al. (SW-AMG+) [76]. The SW-WS and SW-AMG+
potential parametrizations were analyzed in the paper; however, SW-AM was omitted be-
APPENDIX C. POTENTIAL ENERGY FUNCTION SUMMARY
187
cause the parameters defining the Ga-Ga and As-As interactions were set equal to those of
the Ga-As interactions (i.e., ΔHf = 0.0 eV/fu, second criteria). Unfortunately, the IKD
parametrization [83] and the format extension (IKD-mod) [84, 251] could not be used for
MD applications, because the equilibrium angle in the many-body term had no continuous
analytical expression (first criteria) [74, 87]. (If instead a fixed equilibrium angle was used,
the potential would then be C 2 ; however, it would not be transferable across the structures
in the same way it was originally published.) The CS parametrization [87] was not used
because an inaccurate low-energy GaAs phase was found (second criteria) during melting
and recrystallization [252]. The Tersoff potential format was parametrized in succession
by Smith (TR-Smith) [74], GaAs interactions were revised by Sayed et al. (TR-SJWC)
to improve elastic constants [73], and then a small change to the TR-SJWC parametrization was suggested (TR-SJWC0) [252, 254]. All of the Tersoff parametrizations discussed
so far are based on Smith’s elemental parametrizations of gallium and arsenic (TR-Smith,
TR-SJWC, TR-SJWC0). The arsenic parameter set (n < 1 in the multi-body term) causes
the force to become infinite for the arsenic dimer. Thus, the functional form is discontinuous (first criteria) and can not be used in MD simulations. Another parametrization by
Albe et al. (TR-ANNK) [71] was more recently suggested with a slightly revised format
[132]. Of these parametrizations, the SW-WS [80], SW-AMG+ [75, 76], and TR-ANNK
[71] parametrizations were studied.
Appendix D
Stillinger-Weber Potential Energy
Function
The functional form of the interatomic potential function proposed by Stillinger and Weber
(SW) [68] has a cohesive energy expressed by:
ESW
1 =
2 i j,j=i
!
φij +
"
fij fjk gjik
.
(D.1.1)
k,k=i,j
The two-body attractive and repulsive pair potential function is defined as:
φij = ij Aij Bij
σij
rij
pij
−
σij
rij
qij fc,ij ,
(D.1.2)
where the exponential cutoff term smoothly approaches zero as:
fc,ij
⎧
σij
⎪
⎨ e r−αij σij , r < αij σij
=
⎪
⎩ 0,
r ≥ αij σij
188
.
(D.1.3)
APPENDIX D. STILLINGER-WEBER POTENTIAL ENERGY FUNCTION
189
Table D.1: The SW-WS and SW-AMG+ parameter values used in the SW potential form
for the GaAs system.
SW-WS [80]
SW-AMG+ [75, 76]
Ga
As
GaAs
Ga
As
GaAs
A
5.9768 6.8553 7.0496 4.2558 16.9840 8.5130
B
0.5860 0.6711 0.6022 0.7672 2.3538 0.7820
(eV)
1.0300 1.0300 1.0300 1.4090 1.4090 1.4090
σ (Å)
2.5100 2.5100 2.5100 2.1000 2.3000 2.1000
α
1.8000 1.8000 1.8000 1.7940 1.7940 1.7940
γ
1.2000 1.2000 1.2000 1.0000 1.0000 1.0000
λ
21.0000 21.0000 21.0000 27.0000 27.0000 27.0000
p
4.0000 4.0000 4.0000 4.0000 4.0000 4.0000
q
0.0000 0.0000 0.0000 0.0000 0.0000 0.0000
The three-body angular function is simply expressed with no adjustable parameters as:
gjik =
1
cos θjik +
3
2
,
(D.1.4)
vectors centered around atom i. This
and ik
where θjik is the angle formed between the ij
three-body term vanishes when arccos 13 = 109.47◦ , which is the tetrahedral bond angle.
The angular function is multiplied by two-body functions of the form:
fij =
γ
ij
ij λij fc,ij
.
(D.1.5)
The SW potential format has nine bond-dependent parameters for each of the elemental and binary bonds. However, the pij and qij are always fixed to 4 and 0, respectively.
Because qij = 0, the exponential cutoff function, fc,ij , acts as the attractive term. The remaining 7+7+7 (21) parameters for the GaAs system were originally parametrized by Wang
and Stroud (SW-WS) [80], see Table D.1. In an attempt to improve on this parametrization, Angelo and Mills [75] and Grein et al. [76] generated an additional parameter set
(SW-AMG+), also shown in Table D.1.
Appendix E
Tersoff Potential Energy Function
The functional format of the Tersoff interatomic potential energy function [70] has a cohesive energy expressed by:
ETr =
1 fc,ij (VR,ij − Bij VA,ij ) .
2 i j,j=i
(E.1.1)
The two-body repulsive and attractive terms can be written in the following form:
D0,ij
exp −βij 2Sij (rij − r0,ij ) and
Sij − 1
2
Sij D0,ij
=
(rij − r0,ij ) .
exp −βij
Sij − 1
Sij
VR,ij =
(E.1.2)
VA,ij
(E.1.3)
The cutoff function (fc,ij ) used by Tersoff is based on the trigonometric sine function and
can be written as:
⎧
⎪
⎪
1,
⎪
⎪
⎨
fc,ij =
−
2
⎪
⎪
⎪
⎪
⎩ 0,
1
r ≤ Rij − Dij
1
2
sin
π (rij Rij )
,
2 Dij
|Rij − rij | ≤ Dij
rij ≥ Rij + Dij
190
.
(E.1.4)
APPENDIX E. TERSOFF POTENTIAL ENERGY FUNCTION
Table E.1: The TR-ANNK parameter values
GaAs system.
Ga
γ
0.00787
S
1.11000
−1
β (Å ) 1.08000
D0 (eV) 1.40000
2.32350
r0 (Å)
c
1.91800
d
0.75000
h
0.30130
2μ
1.84600
R (Å)
2.95000
D (Å)
0.15000
191
used in the Tersoff potential format for the
As
0.45500
1.86000
1.43500
3.96000
2.10000
0.11860
0.16120
0.07748
3.16100
3.40000
0.20000
GaAs
0.01660
1.14170
1.52280
2.10000
2.35000
1.29000
0.56000
0.23700
0.00000
3.10000
0.20000
The many-body functional form follows a variant Tersoff form proposed by Brenner [132]
and is expressed as:
1
Bij =
2
where
χij =
!
1
1
+
1 − χij
1 − χji
"
,
(E.1.5)
fc,ij gjik exp [(2 μik ) (rij − rik )] .
(E.1.6)
k,k=i,j
The gjik function accounts for the angular dependence and is written as:
!
gjik = γik
c2ik
c2
−
1 + ik
d2ik d2ik + (cos θjik + hik )2
"
,
(E.1.7)
vectors centered around atom i.
and ik
where θjik is the angle formed between the ij
This form of the Tersoff potential has 11 parameters for each elemental and binary
bonding environment. These 11+11+11 (33) parameters were parametrized by Albe et
al. (TR-ANNK) for the GaAs system [71], see Table E.1.
Appendix F
Crystalline Order Parameter
The assessment of the crystalline order of grown samples can be quantified by the definition
of a crystalline order parameter, S. The calculation of S used in our analysis was motivated
by the long-range order parameter for binary solids [255]. It has been generalized to quantify the order of a system that allows for atom displacements as well as substitutions. The
general form of the crystalline order parameter is then S = N /N, where N is the total
number of deposited atoms and N is the number of deposited atoms that have a crystalline
environment.
The atoms in the as-grown region, i = 1 . . . N, are determined to be on a lattice site
by comparing the vectors of j neighboring atoms to the vectors of a perfect crystal. For a
tetrahedral zinc blende lattice, a minimum of four vectors must be considered (j = 4). For
each one of the neighboring atoms, j, the vector from the central atom, i, is subtracted from
the perfect lattice vector and the magnitude of the resultant, Δr ij , is computed. A normal
distribution function is then computed for each resultant magnitude as c ij = exp −α Δrj2 ,
where the parameter α is set equal to 45 to strongly penalize deviation from the crystalline
192
APPENDIX F. CRYSTALLINE ORDER PARAMETER
193
vectors. Therefore, the on-site count can be determined by:
N =
N 4
cij /4 .
i=1 j=1
The region used to compute S must be determined to best approximate the crystallinity
of the as-grown thin film by avoiding the counting of relaxed or reconstructed surface
atoms. This is done by counting only the N deposited atoms four monolayers (∼ 5.65 Å)
below the top plane. The top plane is defined as the highest plane that has a planer atomic
density of at least 25%. Hence, neither the substrate nor surface atoms are counted in the
determination of S. In general, crystalline order values are best approximated with the
largest possible sample size.
Appendix G
Bond-Order Potential Parametrization
Methods
The analytic bond-order potential (BOP) can be used to predict the lattice constants, cohesive energy, and elastic constants of a large variety of phases. These can then be compared
to experimental or ab initio calculated values and the free parameters of the BOP fitted to
match expected property estimates. At first glance, it would appear that a fitting method
that sets the target values for desired properties, puts physical limits on parameters, and
minimizes the sum of the square deviation of the predicted properties from the target values would lead to a good set of parameters for the potential. However, this is not the case
because the target properties are reported as discrete values and do not usually form a continuous function as required by the choice of smooth two-body repulsive and bond integral
terms. The values of these Goodwin-Skinner-Pettifor (GSP) [53] two-body terms depend
on the distance between the two atoms of the bond and are not influenced by the bonding
environment. The choice to use this two-body format is a significant approximation [55];
however, a highly transferable potential can be developed providing characteristic material
system trends are used in the free parameter fitting rather than raw target properties.
194
APPENDIX G. BOND-ORDER POTENTIAL PARAMETRIZATION METHODS
195
Albe et al. [71] discovered that for the Tersoff potential, the bond energy of cubic structures and dimers can be expressed only as a function of bond length. Because cohesive
energies and lattice constants of a variety of cubic phases essentially define the trend of
the bond energy versus bond length relation, this finding enabled Albe et al. to determine
all the pair functions by requiring the predicted bond energy versus bond length relation to
match the bonding trends defined by the target properties of cubic structures and dimers.
Once the pair functions were fully determined using this method, the angular function parameters were optimized in a second step to best match additional gallium, arsenic, and
GaAs properties. This approach significantly improved the transferability of the potential.
The BOP has a similar characteristic that allows determination of all the pair functions by
matching the predicted bond energy versus bond length curve to the bonding trend defined
by the target properties of a variety of simple structures, such as dimer, trimer, and cubic
crystals. The crystallographic information for many of the crystal structures used during
the BOP parametrization and evaluation is included in Section 6.3.3.
Using the BOP equations in Section 6.2.1, the bond energy, E b , as a function of interatomic spacing, r, can be written as:
Eb = φ0 f m (r) − 2βσ,0 f n (r) Θσ − 2βπ,0 f n (r) Θπ .
(G.1.1)
The m and n parameters help define the normalized potential hardness, (φ /φ) / (β /β)|r=r0 =
m/n (βσ or βπ are equivalent for this calculation) [256]. This quantity determines the shape
of the energy curve by measuring the relative stiffness of the repulsive energy curve (φ)
compared with the attractive energy curves (βσ and βπ ). For a hard sphere potential, the
normalized potential hardness is ∞, while for carbon m/n = 2.2 and for silicon m/n = 1.8
[256]. In this parametrization, m/n was targeted at 2.0 during the fitting process.
For structures that have only the first nearest-neighbor (1NN) shell within the cutoff dis-
APPENDIX G. BOND-ORDER POTENTIAL PARAMETRIZATION METHODS
196
tance, the bond orders Θσ and Θπ have a single value and remain constant during application of a hydrostatic strain. Such 1NN structures include dimer, trimer, and some tetramer
structures for both elements and binary systems; diamond cubic (dc), simple cubic (sc),
and face-centered cubic (fcc) elemental crystals; and zinc blende (zb) and the NaCl binary
crystal structures. Additionally, the 1NN shell of the body-centered cubic (bcc) and CsCl
phases can be included. The equilibrium bond energy as a function of equilibrium bond
lengths for these structures was derived from Eq. G.1.1, using the equilibrium condition,
Eb = 0:
Eb =
m
1−
φ0 f m (r) .
n
(G.1.2)
Eq. G.1.2 depends only upon the GSP pair function and related parameters.
Using a similar approach, the bond energy curvature at the equilibrium bond length was
derived as:
Eb = m2 (1 − n/m) φ0 f m−2 (r) [f (r)] .
2
(G.1.3)
The curvature is simply related to the bulk modulus, B:
B=
Z Eb
,
18F r
(G.1.4)
where Z is the atomic coordination in the solid (the cohesive energy per atom is Z E b /2)
and F is defined as the prefactor in the atomic volume, V = F r 3 . The values of F are
arbitrarily chosen as unity for dimer, trimer, and tetramer clusters and take the values of 1
√
√
√
for the sc lattice, 8 3/9 for the dc lattice, 2/2 for fcc, and 4 3/9 for bcc structures. The
coordinations, Z, are 1, 2, 3, 4, 6, 8 (1NN shell), and 12 for dimer, trimer, tetrahedron, dc,
sc, bcc, and fcc structures, respectively.
APPENDIX G. BOND-ORDER POTENTIAL PARAMETRIZATION METHODS
197
To ensure the potential energy functions do not have a large slope change at the junction
between the GSP function and the spline cutoff distance (r1 ), the GSP term, f n , of the
bond integral terms is required to decay to a small number, that is, f n (α r0 ) < T , where
T ≈ 0.1-0.2 and α ≈ 1.5. The bond integral GSP term was used because it has a longer
interaction range than the repulsive term, f m .
Eqs. G.1.2 and G.1.3 can be used to fit the target bond energy and bulk modulus for a
variety of structures with different bond lengths under the f n constraint to determine the
φ0 , m, n, and nc parameters. The target values (gathered from density functional theory,
or DFT [46, 71, 143] and experimental sources [137, 138, 159, 160, 221, 223]) and the
fitted bond energy and bulk modulus GSP curves are shown in Fig. G.1 as a function of
equilibrium bond length for many gallium, arsenic, and GaAs phases. In Fig. G.1, the
experimental or ab initio data are marked by . Notice that many of the data points do
not fall within a trend that allows the GSP curve to intersect all the points. This makes the
fitting process difficult, since all the points cannot be intersected. Therefore, these initially
predicted values were iteratively adjusted to fit GSP curves (see the arrows) that define
smooth trends. The adjusted values are marked as and were used as the target values
in subsequent fittings. Numerous minimization routines, such as the downhill simplex
method of Nelder and Mead [257], a genetic algorithm, or biased random walk (simulated
annealing) [247], were used to determine the parameters that minimize the mean-square
difference between the target and predicted values.
From the equilibrium, Eb = 0, the target bond-order values for the nearest-neighbor
structures satisfy:
βσ,0 Θσ + βπ,0 Θπ =
m φ0 f m (r)
.
2 n f n (r)
(G.1.5)
Eq. G.1.5 enables the βσ,0 , βπ,0 , cσ , fσ , kσ , pπ , pσ , and bσ parameters to be determined by
fitting the bond orders for nearest-neighbor structures.
APPENDIX G. BOND-ORDER POTENTIAL PARAMETRIZATION METHODS
-1.0
2.4 2.6 2.8 3.0 3.2 3.4 3.6
bond length, r
(c)
-2.0
-3.0
0.0
-0.5
-1.0
-1.5
-2.0
dim-tri-tet-dc-sc-fcc-bcc
2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6
bond length, r
(e)
dim-zb-NaCl-CsCl
2.4 2.6 2.8 3.0 3.2 3.4 3.6
bond length, r
(b)
curvature, E''b
dim-dc-sc-fcc-bcc
5.5
4.4
3.3
2.2
1.1
0.0
curvature, E''b
0.0
(a)
Curvature vs. 24
20
16
12
8
4
0
9.0
7.5
6.0
4.5
3.0
1.5
0.0
curvature, E''b
bond energy, Eb
bond energy, Eb
0.00
-0.25
-0.50
-0.75
-1.00
-1.25
-1.50
-1.75
-4.0
bond energy, Eb
GaAs
Arsenic
Gallium
Bond energy vs. 198
dim-dc-sc-fcc
2.4 2.6 2.8 3.0 3.2 3.4 3.6
bond length, r
(d)
dim-dc-sc-fcc-bcc
2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6
bond length, r
(f)
dim-zb-NaCl-CsCl
2.4 2.6 2.8 3.0 3.2 3.4 3.6
bond length, r
Objective value
Adjusted objective value
Best fit from GSP two-body function
Figure G.1: Bond energy and curvature versus equilibrium bond length curves representing
the best fit of the GSP-based two-body functions (dashed lines). The objective values ()
from experimental measurements and ab initio calculations are adjusted () so that the
GSP functional form can fit the data for the dimer (dim), trimer (tri), tetrahedral tetramer
(tet), dc, zb, sc, NaCl, fcc, bcc (1NN shell), and CsCl (1NN shell) structures. The order of
the structure for each system is shown in each panel.
APPENDIX G. BOND-ORDER POTENTIAL PARAMETRIZATION METHODS
199
The fitting of remaining parameters for gallium utilized mainly the 1NN bond-order
values generated using Eq. G.1.5. In addition, the bcc structure (including the second
nearest-neighbor shell) was tested. The αGa (A11, Cmca) [135] is the lowest-energy phase
for gallium. The local atomic configuration around each atom in αGa is quite complex and
has one neighbor within a covalent bonding radius and six atoms at metallic-like bonding
distances [135]. After unfruitful efforts to try to force a fit of the αGa phase, we found
that the BOP could not stabilize all seven bonds with their correct bond lengths. The
fcc phase is predicted by DFT to be only 0.04-0.07 eV less stable than the αGa structure
[71, 149, 150]. Therefore, we chose to approximate the low-energy gallium structure with
the fcc structure. Other attempts to stabilize the αGa bonding environment with interatomic
potentials that employ two-body repulsive and attractive bonding terms also failed [71],
see Chapter 3. However, one interatomic potential format did report some success with
modeling the αGa structure by including a screening function [150]. It is therefore likely
that screening bonding and repulsive interactions, by incorporation of the environmental
dependence around each pair of bonds as well as the usual interatomic spacing, would aid
in the modeling of the αGa crystalline structure.
Like gallium, arsenic bond-order parameters were fit using mainly the nearest-neighbor
structures. However, the structure and cohesive energy of the αAs (A7, R3̄m) [135] and
arsenolamprite (A11, Cmca) [227] phases were also evaluated within the iterative bondorder fitting process. Monitoring the arsenolamprite structure and binding energy during
the selection process were critical to the successful prediction of the low-energy αAs phase.
At this point, the cutoff parameters (r1 and rcut ) for the spline were arbitrarily set to
give the longest interaction length within the first nearest-neighbor shell. (For arsenic, this
included both the first and second sets of three neighbors.) The value of r cut was adjusted
by hand at the end of the fitting process if a small change (< 0.1 Å) was helpful in moving
particular shells of atoms outside the interaction range.
APPENDIX G. BOND-ORDER POTENTIAL PARAMETRIZATION METHODS
200
For GaAs, the parameters for the bond order were fit using the nearest-neighbor structures, such as dimer, symmetric trimers (As-Ga-As or Ga-As-Ga), zb, and NaCl structures.
Additionally, the cohesive energy for the CsCl (having both nearest- and next-nearestneighbor shells) and a simple cubic structure with 16 atoms in the unit cell (sc16, Pa 3̄)
[258] were evaluated in the bond-order fitting process. It was necessary to monitor the
energy of the sc16 structure during the fitting process because it can easily stabilize (with
respect to the zb phase) with relatively small changes in the angular parameters (p σ and
bσ ). The unrelaxed zb elastic constants (c and c44 ) [52, 259, 260] were fit; however, due
to the fact that elastic constants were reasonably close (±20%) without fitting, we found
this constraint only helped refine the values. The equilibrium bond angles and bond lengths
of asymmetric trimers (e.g., As-Ga-Ga and As-As-Ga) from ab initio data [46] were used
to assist the fitting of these angular parameters. These symmetric and asymmetric angular parameters also affected the unrelaxed vacancy and antisite defect formation energies,
which were also used to help determine their values. Utilization of angular parameters that
depended on the species type of all three atoms in the bond angle proved very useful for
predicting accurate defect formation energies.
After each fitting iteration, the best parameter set was tested for a large collection of
bulk structures, see Chapter 6.3.3. Providing no spurious structures were detected (for
example, a structure is found to have a lower cohesive energy than the ground state phase),
the properties outlined in Chapter 6 were evaluated. If a significant problem was identified
during this evaluation, the entire process was repeated with the necessary adjustments.
Appendix H
Electron Counting Potential
The electron counting (EC) potential enables atoms to redistribute their valence electrons
among inter-atom bonds and dangling bonds at a surface to reduce the potential energy in
EEC within physical constraints as outlined by the EC rule [172, 173]. The EC term can
be directly added to the potential energy predicted by the bond-order potential (BOP) in
Eq. 6.2.1. Its form,
UEC = Eb + Ed +
6
Ec,n ,
(H.1.1)
n=1
is expressed as a sum of terms that control the electron occupation of covalent bonds (E b )
and dangling bonds (Ed ), along with a series of six physically motivated limits on the
electron population (Ec,1 -Ec,6 ). The derivation and detailed explanation for these terms
are discussed elsewhere [232]. Here a brief summary of the format and parameters are
discussed. The explicit expressions for these terms are all dependent upon the expressions
and quantities that are summarized in Table H.1.
The EC bond energy penalty, Eb , constrains the electron occupation of inter-atom bonds
with:
Eb =
i
j,j=i
bij Pij2
qij
qji
−
aij + aji −
q0,ij
q0,ji
201
2
,
(H.1.2)
APPENDIX H. ELECTRON COUNTING POTENTIAL
202
Table H.1: Expressions and quantities necessary for the calculation of the EC potential.
The EC free parameters (Vi , αi , q0,ij , ra,ij , rc,ij , rS,ij , wd,i , bij , and wc ) are summarized
in Table H.2. The e− is an abbreviation used below for “electron” or the “number of
electrons.” Equations with two indices influence the electron distribution within the ij
bond, while a single indices relates to the environment around a single atom.
Function description
Equation
−
Dynamic e distribution
aij = dynamically solved
⎧
rij ≤ ra,ij
⎨ q0,ij ,
(3ra,ij −rc,ij −2 rij )
−
q0,ij (ra,ij −rc,ij )3 /(rij −rc,ij )2 , ra,ij < rij < rc,ij
Static e distribution
qij =
⎩
0,
rc,ij ≤ r
(fixed for tetrahedral structures)
Bulk coordination
νi = 4 #
Bonding fraction
F0,i = $ j,j=i qij (rij )/Vi
0,
F0,i ≤ 1
Over-bonding correction
ΔFi =
F0,i − 1, F0,i > 1
Corrected F0,i
Fi = F0,i − ΔFi⎧
0,
x ≤ xs
⎨
1
1
x−xs
− cos(π xf −xs ), xs < x < xf
General order function
G (x, xs , xf ) =
⎩ 2 2
1,
xf ≤ x
Surface coordination order Pij = G (nm,ij , 0.50, 0.75)
Low-coordination order
Si = G (n0,i , 0.25, 0.50)
High-coordination order
Zi = G (Fi , 0.26, 0.40)
Dangling bonds
ni = νi (1 − F
#i )
d i ni = Vi − i gij
e− in dangling bonds
qij
e− in bond
gij = Pij aij + (1 − Pij ) 1+ΔF
i
Lower limit of e− in bond λij = max (Vi − 2 νi , 2 − Vj ) qij /q0,ij
Upper limit of e− in bond μij = min (Vi , 2 + 2 νj − Vj ) qij /q0,ij
Rescaled ni
n0,i = ni , nearest-neighbor distance rescaled by rS,ij a
Atom environment
nm,i = max [n0,k qik /q0,ik , with k = 1, 2, . . . , N]
Bond environment
nm,ij = max
$ [min (nm,i , nm,j ) , n0,i , n0,j ]
0,
x<0
Constraint function
C (x) =
wc x2 , x ≥ 0
a
Rescaling can be omitted to improve calculation speed, assuming the crystal is not significantly stretched.
APPENDIX H. ELECTRON COUNTING POTENTIAL
203
where the coefficient bij determines the strength of the energy penalty, qij /q0,ij is the normalized static electron distribution that depends on the ij bond length, and a ij + aji is the
dynamic electron distribution between atoms i and j. In addition, P ij characterizes the
nature of the bond between atoms i and j, so that P ij = 0 indicates that the ij bond is in
the bulk and Pij = 1 signifies that ij is on the surface. The parameters bij and q0,ij (along
with ra,ij and rc,ij as used in qij in Table H.1) are dependent upon the types of atoms in the
ij bond.
The EC dangling bond energy penalty, Ed , controls the electron occupation in dangling
bonds using:
Ed =
wd,i (Si Zi )2 (di ni − αi ni )2 ,
(H.1.3)
i
where wd,i reflects the strength of the energy penalty for each atom i, αi is the electron
affinity of atom i, ni is the number of dangling bonds around atom i, and d i ni is the number
of electrons donated from atom i to its dangling bonds, see Table H.1. The low-coordination
order function, Si , has a high value (Si = 1) for low-coordination environments and a low
value (Si = 0) for highly-coordinated bulk environments. An additional high-coordination
order function, Zi , takes a value of Zi = 1 for highly-coordinated atoms and Z i = 0 for
low-coordinated atoms.
The boundaries on the electron distribution are physically limited by six constraining
energy terms. The continuous redistribution of electrons in covalent bonds and dangling
bonds is bounded between 0 (number must be positive) and 2 (Pauli exclusion principle).
The energy constraints can be expressed for dangling bonds as 0 ≤ d i ni ≤ 2 ni ,
Ec,1 =
C (−di ni )
(H.1.4)
C (di ni − 2 ni ) ,
(H.1.5)
i
Ec,2 =
i
APPENDIX H. ELECTRON COUNTING POTENTIAL
204
and for inter-atom bonds as 0 ≤ aij + aji ≤ 2,
Ec,3 =
i
Ec,4 =
i
C (−aij − aji )
(H.1.6)
C (aij + aji − 2) .
(H.1.7)
j,j=i
j,j=i
Furthermore, the ability of atoms i and j to transfer electrons decays to zero as the interatomic distance, rij , is increased to the interaction cutoff distance, rc,ij . To ensure that
energy and electron distributions are continuous during dynamic simulation, the λ ij ≤
gij ≤ μij constrains the total number of electrons in the ij bond, as expressed by:
Ec,5 =
Ec,6 =
i
j,j=i
i
j,j=i
C (λij − gij )
(H.1.8)
C (gij − μij ) .
(H.1.9)
These terms have no effect on gij at small bond lengths but force the value to zero as the
bond length approaches the cutoff, rc,ij .
The EC term required the material-specific atomic valence (Vi ) and electron affinity
(αi ) parameters, the bond-dependent static electron distribution parameters (q 0,ij , ra,ij , and
rc,ij ), rescaling radius for the ij bond (rS,ij ) used in the calculation of n0,i , the dangling
bond and bonding energy penalty coefficients (wd,i and bij ), and the electron population
constraint coefficient (wc ) to be determined. The static electron distribution parameters
were previously reported [232], the rS values were chosen from the values of r0 used in
the BOP, the wd and b parameters were parametrized following the Appendix in Ref. [232],
and wc was arbitrarily chosen and fixed for all atomic and bonding environments. The ECP
parameters are summarized in Table H.2.
The EC potential energy (UEC ) has been expressed as a function of atom positions and
APPENDIX H. ELECTRON COUNTING POTENTIAL
Table H.2: EC potential parameters. The parameters
within appropriate bounds are set at wc = 100.0 eV.
Symbol Quantity
Vi
Atomic valence (e− )
Electron affinity (e− )
αi
q0,ij
Static electron distrib. (e− /bond)
ra,ij
. . . begin cutoff (Å)
. . . final cutoff (Å)
rc,ij
wd,i
Dangling bond coeff. (eV/e− )
Bonding coeff. (eV/e− )
bij
rS,ij
Rescaling radius (Å)
a
205
for keeping the electron occupation
Ga-Ga
3.000
0.000
0.750
2.600
2.918
1.836
4.450
2.424
As-As Ga-As
5.000
—
2.000
—
1.250
—a
2.800 2.700
3.500 3.220
1.836
—
4.450 4.450
2.120 2.380
Central atom (i) specific parameter, q 0,ij = Vi /4, that is, q0,GaAs = 0.750 and q0,AsGa = 1.250.
the dynamic electron population, aij and aji . For any set of atomic positions, the dynamic
electron population can be solved from the equilibrium (minimum energy) conditions using
the conjugate gradient method coupled with a Newton-Raphson algorithm [62]. Additionally, the EC potential can be calculated at each timestep (or set of timesteps) during full
MD simulation. The dynamic electron population and EC energy penalty are continuous
functions with respect to atom motion. Therefore, the efficiency of the calculations is significantly improved when the solutions for a ij and aji are retained for the initial values in
the next time step. Furthermore, it should be noted that because ∂E/∂a ij = 0, all derivatives of aij with respect to atom positions have no impact on the forces and stresses of the
BOP.
Appendix I
Molecular Dynamics Code
I.1 FORTRAN subroutine and function map
The calls between the functions and subroutines that make up the MDvap96 molecular
dynamics (MD) code have been mapped in Fig. I.1. These routines have been divided into
14 groups according to their respective tasks. The groupings are outlined in Table I.1. The
setup and input group initializes the variables and reads in much of the input data from
a.i and setups of the simulation, see Appendix K. This includes the potential parameters
and tables from GaAs-POT and GaAs-ECR (file names are defined in setfl and setECR
in the a.i file), see Appendix J. The initial atom positions are read in from r0 or are
created based on input from a.i by the group of lattice generation functions, again see
Appendix K for information on these input files. During either static energy calculation
or dynamics simulation, the timing, periodicity, scaling, constraints, and temperature control must all be monitored and maintained. These subroutines and functions are therefore
grouped into convenient collections of routines. The routines that govern molecular statics
and dynamics calculations are grouped together and can be called upon to minimize the
energy of a given system of atoms in the absence of kinetic energy or to integrate the equa206
APPENDIX I. MOLECULAR DYNAMICS CODE
MDvap96
207
initsec
mytime
dynamo
calce
inter
newton
initlat
restart
setn1st
latgen
storelat
readef
disgen
cross
delvac
sorter
scopy
chktyp
chkper
snrm2
setfix
chktyp
compscale
patoms
velgen
colect
settmp
veldum
uscale
rgauss
latdum
setalat
vafunc
colect
m01aaf
va08a
uscale
chkper
saxpy
sdot
nords
chkvap
seconds
seconds
seconds
accel
colect
output
uscale
chkper
fixtmp
rgauss
fixfor
BOP+EC
chkdis
SW/Tersoff
gneigh
ECR
calbe
addv1
theta
initialize
calbndorder
sigmaBO
calgtheta
piBO
PromEner
begrad
calalpha
Figure I.1: Map of functions for all the subroutines and functions with the MDvap96 MD
code. The function names listed in italics reference a new branch of the map.
APPENDIX I. MOLECULAR DYNAMICS CODE
208
Table I.1: A hierarchy of groups that contain the subroutines and functions of the MDVAP96 FORTRAN code.
Group
Page Function
Setup and Input
214 MDvap96, dynamo, inter, setn1st,
patoms, chktyp, newton
Lattice Generation
235 initlat, restart, latgen, latdum, setalat, cross, snrm2, scopy, storelat,
readef, delvac, sorter, velgen, veldum, disgen
Timing Routines
251 initsec, mytime, seconds
Miscellaneous
252 m01aaf, rgauss, colect, compscale, uscale, chkper
Constraints on Atoms
256 setfix, fixfor, settmp, fixtmp
Neighbor List
265 gneigh, chkdis
Statics
278 minimize, va08a, vafunc, sdot,
saxpy
Dynamics
283 nordint, nords, accel, addv1
Output
296 output
Electron Counting
298 ECR, initialize, calbe, calalpha, begrad
Potential Energy
324 calce, force
Stillinger-Weber Potential 329 calbndorder, calgtheta
Tersoff Potential
333 calbndorder, calgtheta
Bond-Order Potential
338 theta, sigmaBO, piBO, PromEner
APPENDIX I. MOLECULAR DYNAMICS CODE
209
tions of motion, respectively. These functions call the potential energy routines frequently
to obtain the energies and forces of the atoms in the computational cell. For the StillingerWeber (SW) and Tersoff potentials, the formats do not explicitly cite the electron counting
(EC) potential. The dynamic EC routines were fully implemented only for the bond-order
potential (BOP). The formations for each of these potentials are also collected into their
respective groups. Lastly, the output files are produced by the single output subroutine and
are discussed in greater detail in Appendix L.
I.2 Include files
I.2.1 Stillinger-Weber potential
The vap.inc file is included in the MDvap96 code for the SW potential format. The
include file does not have the variables for the EC functions defined through the code.
However, this should be easily remedied by adding a few parameters like nECRon and
setting them to zero.
parameter (natmax=5000,neimax=50,nelmax=3,
npair=nelmax*(1+nelmax)/2,nrg=2000,nthetag=2000)
parameter (nboxx=25,nboxy=120,nboxz=25,nboxn=50)
logical sortp,follow
DOUBLE PRECISION timefx, t0
common /lattice/ perub(3),perlb(3),perlen(3),perlenH(3),alat,
.
xbound(2),ybound(2),zbound(2),natoms
common /cbound/ dpress,bndmas(3),bnddrg(3),bndvel(3),dstress(3),
.
ibdtyp,idynper(3)
common /types/ amass(nelmax),ielement(nelmax),netype(nelmax),
.
ntypes
common /particle/ rv(6,natmax),itype(natmax)
common /scaled/ y(6,natmax)
common /forces/ f(3,natmax),stresst(3),totE,e0
common /accels/ acc(3,natmax)
common /fixit/ timefx,vectfx(3,0:100),dvctfx(3,0:100),
.
posfx(3,natmax),modefx(0:100),ipntfx(natmax),nfixes,
.
ifxal1,ifxal2
common /tmpfix/ qreg(6),tmpreg(0:6),xcenter(6),xwidth(6),
.
ycenter(6),ywidth(6),zcenter(6),zwidth(6),acttmp(0:6),
.
drag(0:6),timetmp,ifxtmp,nregs,ipntrg(natmax),natrg(0:6),
.
follow
common /integ/ t0,tend,dt,tol,dxmax,nsteps,noutp,inte,iaccur,
.
c
APPENDIX I. MOLECULAR DYNAMICS CODE
210
.
ndegfr,mnterm
common /errs/ detops
common /calls/ ngtlst,nforce
common /neigh/ rcut(npair),rcutsq(npair),rctsqn(npair),dradn,
*
dr(npair),rdr(npair),nnindx(0:natmax),nnlst(natmax*neimax),
*
neigh(natmax),neighT(natmax,neimax),disij(3,natmax,neimax),
*
rij(natmax,neimax),newlst,nneips,nyt,dnyt,nboxn1,nboxnei,
*
rctroot,rcutall,nr,ntheta,dtheta,rdtheta,strn(6)
common /triple/ gtheta(natmax,neimax*(neimax-1)/2),
*
dgtheta(natmax,neimax*(neimax-1)/2,4,3)
common /double/ pair1(natmax,neimax),dpair1(natmax,neimax),
*
pair2(natmax,neimax),dpair2(natmax,neimax)
common /bondorder/ bndord(natmax*neimax/2),
*
dbndordi(natmax*neimax/2,3),
*
dbndordj(natmax*neimax/2,3),nthird(natmax*neimax/2),
*
numthird(natmax*neimax/2,2*neimax-2),
*
dbndordk(natmax*neimax/2,2*neimax-2,3),
*
dbndordl(natmax*neimax/2,3)
common /grids1/ VA(npair,nrg),VA1(npair,nrg),VA2(npair,nrg),
*
VA3(npair,nrg),VA4(npair,nrg),VA5(npair,nrg),VA6(npair,nrg)
common /grids2/ VR(npair,nrg),VR1(npair,nrg),VR2(npair,nrg),
*
VR3(npair,nrg),VR4(npair,nrg),VR5(npair,nrg),VR6(npair,nrg)
common /print/ typep,xminp,xmaxp,yminp,ymaxp,zminp,zmaxp,sortp,
.
ipinter,ipatoms,ipitera,irstrt,iconf,iconst
common /average/ avtemp,avpres,avvol,avpe,avke,avstrs(3),
.
eqtim,avtmprg(0:6),nequil,nskipd,nave
common /vapor/ ivapor,type1(5),fraction1(5),type2(5),
.
fraction2(5),evapor,depdir(3),vdep,ycenter1,ywidth1,TbndV,
.
ratio,inert,dtadd,density,ntopbox,mark1,mark2,
.
nmo,emo,emo0,einert,devapor,inertvary,depdirtime,spinphi,
.
layernumber,eomit,nomit,evaporline,yline,yline0,
.
timelayer(2),timehlayer(2),nlbl,dimer(nelmax),dimdis,dimdd
I.2.2 Tersoff potential
The vap.inc file is included in the MDvap96 code for the Tersoff potential format. The
include file does not have the variables for the EC functions defined through the code.
However, this should be easily remedied by adding a few parameters like nECRon and
setting them to zero.
parameter (natmax=10000,neimax=24,nelmax=3,
npair=nelmax*(1+nelmax)/2,nrg=2000,nthetag=2000)
parameter (nboxx=45,nboxy=300,nboxz=45,nboxn=50)
logical sortp,follow
DOUBLE PRECISION timefx, t0
common /lattice/ perub(3),perlb(3),perlen(3),perlenH(3),alat,
.
xbound(2),ybound(2),zbound(2),natoms
common /cbound/ dpress,bndmas(3),bnddrg(3),bndvel(3),dstress(3),
.
ibdtyp,idynper(3)
common /types/ amass(nelmax),ielement(nelmax),netype(nelmax),
.
ntypes
common /particle/ rv(6,natmax),itype(natmax)
.
c
APPENDIX I. MOLECULAR DYNAMICS CODE
211
common /scaled/ y(6,natmax)
common /forces/ f(3,natmax),stresst(3),totE,e0
common /accels/ acc(3,natmax)
common /fixit/ timefx,vectfx(3,0:100),dvctfx(3,0:100),
.
posfx(3,natmax),modefx(0:100),ipntfx(natmax),nfixes,
.
ifxal1,ifxal2
common /tmpfix/ qreg(6),tmpreg(0:6),xcenter(6),xwidth(6),
.
ycenter(6),ywidth(6),zcenter(6),zwidth(6),acttmp(0:6),
.
drag(0:6),timetmp,ifxtmp,nregs,ipntrg(natmax),natrg(0:6),
.
follow
common /integ/ t0,tend,dt,tol,dxmax,nsteps,noutp,inte,iaccur,
.
ndegfr,mnterm
common /errs/ detops
common /calls/ ngtlst,nforce
common /parameters/ an(npair),delta(npair),twom(npair)
common /neigh/ rcut(npair),rcutsq(npair),rctsqn(npair),dradn,
*
dr(npair),rdr(npair),nnindx(0:natmax),nnlst(natmax*neimax),
*
neigh(natmax),neighT(natmax,neimax),disij(3,natmax,neimax),
*
rij(natmax,neimax),newlst,nneips,nyt,dnyt,nboxn1,nboxnei,
*
rctroot,rcutall,nr,ntheta,dtheta,rdtheta,strn(1:6)
common /triple/ gtheta(natmax,neimax*(neimax-1)/2),
*
dgtheta(natmax,neimax*(neimax-1)/2,4,3)
common /double/ pair1(natmax,neimax),dpair1(natmax,neimax),
*
pair2(natmax,neimax),dpair2(natmax,neimax),
*
pair3(natmax,neimax),dpair3(natmax,neimax)
common /bondorder/ bndord(natmax*neimax/2),
*
dbndordi(natmax*neimax/2,3),
*
dbndordj(natmax*neimax/2,3),nthird(natmax*neimax/2),
*
numthird(natmax*neimax/2,2*neimax-2),
*
dbndordk(natmax*neimax/2,2*neimax-2,3),
*
dbndordl(natmax*neimax/2,3)
common /grids1/ VA(npair,nrg),VA1(npair,nrg),VA2(npair,nrg),
*
VA3(npair,nrg),VA4(npair,nrg),VA5(npair,nrg),VA6(npair,nrg)
common /grids2/ VR(npair,nrg),VR1(npair,nrg),VR2(npair,nrg),
*
VR3(npair,nrg),VR4(npair,nrg),VR5(npair,nrg),VR6(npair,nrg)
common /grids3/ fc(npair,nrg),fc1(npair,nrg),fc2(npair,nrg),
*
fc3(npair,nrg),fc4(npair,nrg),fc5(npair,nrg),fc6(npair,nrg)
common /grids4/ gang(npair,nthetag),gang1(npair,nthetag),
*
gang2(npair,nthetag),gang3(npair,nthetag),
*
gang4(npair,nthetag),gang5(npair,nthetag),
*
gang6(npair,nthetag)
common /print/ typep,xminp,xmaxp,yminp,ymaxp,zminp,zmaxp,sortp,
.
ipinter,ipatoms,ipitera,irstrt,iconf,iconst
common /average/ avtemp,avpres,avvol,avpe,avke,avstrs(3),
.
eqtim,avtmprg(0:6),nequil,nskipd,nave
common /vapor/ ivapor,type1(5),fraction1(5),type2(5),
.
fraction2(5),evapor,depdir(3),vdep,ycenter1,ywidth1,TbndV,
.
ratio,inert,dtadd,density,ntopbox,mark1,mark2,
.
nmo,emo,emo0,einert,devapor,inertvary,depdirtime,spinphi,
.
layernumber,eomit,nomit,evaporline,yline,yline0,
.
timelayer(2),timehlayer(2),nlbl,dimer(nelmax),dimdis,dimdd
I.2.3 Bond-order potential
The vap.inc file is included in the MDvap96 code for the BOP format. The include file
contains the variables defined for the EC functions.
APPENDIX I. MOLECULAR DYNAMICS CODE
parameter (natmax=2500,neimax=27,nelmax=3,
npair=nelmax*(1+nelmax)/2,nrg=2000,ntotNei=natmax*neimax,
ntotSigk=(neimax-1)*(neimax-1),ntotPik=2*neimax-2,
nBOtg=400,ngrid=2000)
parameter (nboxx=25,nboxy=200,nboxz=25,nboxn=80)
logical sortp,follow
common /lattice/ perub(3),perlb(3),perlen(3),perlenH(3),alat,
.
xbound(2),ybound(2),zbound(2),natoms,n1stps,n1stpf,
*
be(ntotNei/2,2),de(natmax),de0(natmax),be0(ntotNei/2,2)
common /cbound/ dpress,bndmas(3),bnddrg(3),bndvel(3),dstress(3),
.
ibdtyp,idynper(3)
common /types/ amass(nelmax),ielement(nelmax),netype(nelmax),
.
ntypes,Vai(nelmax),Va(natmax),alp(nelmax),y1st(2),
*
wd(nelmax),wb(npair),wc1(npair),wc2(npair),
*
wc3(nelmax),wc4(nelmax)
common /particle/ rv(6,natmax),itype(natmax)
common /scaled/ y(6,natmax)
common /forces/ f(3,natmax),stresst(3),totE,e0
common /accels/ acc(3,natmax)
common /fixit/ timefx,vectfx(3,0:100),dvctfx(3,0:100),
.
posfx(3,natmax),modefx(0:100),ipntfx(natmax),nfixes,
.
ifxal1,ifxal2
common /tmpfix/ qreg(6),tmpreg(0:6),xcenter(6),xwidth(6),
.
ycenter(6),ywidth(6),zcenter(6),zwidth(6),acttmp(0:6),
.
drag(0:6),timetmp,ifxtmp,nregs,ipntrg(natmax),natrg(0:6),
.
follow
common /integ/ t0,tend,dt,tol,dxmax,nsteps,noutp,inte,iaccur,
.
ndegfr,mnterm
common /errs/ detops
common /calls/ ngtlst,nforce,nforce1
common /neigh/ rcut(npair),rcutsq(npair),rctsqn(npair),dradn,
*
dr(npair),rdr(npair),nnindx(0:natmax),nnlst(ntotNei),
*
neigh(natmax),neighT(natmax,neimax),disij(3,natmax,neimax),
*
rij(natmax,neimax),newlst,nneips,nyt,dnyt,nboxn1,nboxnei,
*
rctroot,rcutall,nr,ngrid7,neighb(natmax),strn(6),
*
neighTb(natmax,neimax),disijT(3,natmax,neimax),
*
rijT(natmax,neimax)
common /parameters/ an(npair),delta(npair),
*
pNg(npair),anp(npair),deltap(npair),deltaNg,pfactor(npair),
*
an1(npair),an2(npair),deltas(npair),
*
pg(nelmax,nelmax,nelmax),cg(nelmax,nelmax,nelmax)
common /ECRBS/ nECRon,ncalbulk,r0(npair),rnearest(natmax),
*
nnindx1(0:natmax),nnlst1(ntotNei),rij1(ntotNei),
*
disij1(3,ntotNei),rcutqb(npair),rcutqbsq(npair),
*
rcutqbsqn(npair),totb0(natmax),dtotb0(natmax,neimax),
*
gtotb0(natmax),dgtotb0(natmax,neimax),ngm(natmax),
*
ngm1(natmax),gtotb0m(natmax),dgtotb0m(natmax),
*
nBm(natmax*neimax/2),qij(ntotNei/2,2),dqij(ntotNei/2,2),
*
nECRrun,nnindx2(0:natmax),nnlst2(ntotNei/2),natoms2
common /ECRsingle/ totb(natmax),dtotb(natmax,neimax),
*
deltotb(natmax),ddeltotb(natmax,neimax),gtotb(natmax),
*
dgtotb(natmax,neimax),Stotb(natmax),dStotb(natmax),
*
dbfac(natmax),ddbfac(natmax)
common /ECRdouble/ Btotb(ntotNei/2),dBtotb(ntotNei/2),
*
IBtotb(ntotNei/2)
common /ECRfor/ Esbond,Ebbond,Edbond,Ebcons,Edcons
common /grids1/ pBetaSsq(npair,nrg),pBetaSsq1(npair,nrg),
*
pBetaSsq2(npair,nrg),pBetaSsq3(npair,nrg),
*
pBetaSsq4(npair,nrg),pBetaSsq5(npair,nrg),
*
pBetaSsq6(npair,nrg)
common /grids2/ pBetaPsq(npair,nrg),pBetaPsq1(npair,nrg),
*
pBetaPsq2(npair,nrg),pBetaPsq3(npair,nrg),
*
pBetaPsq4(npair,nrg),pBetaPsq5(npair,nrg),
*
pBetaPsq6(npair,nrg)
.
.
.
212
APPENDIX I. MOLECULAR DYNAMICS CODE
213
common /grids3/ pRepul(npair,nrg),pRepul1(npair,nrg),
pRepul2(npair,nrg),pRepul3(npair,nrg),
pRepul4(npair,nrg),pRepul5(npair,nrg),
pRepul6(npair,nrg)
common /grids4/ FsigBO(npair,nBOtg),FsigBO1(npair,nBOtg),
*
FsigBO2(npair,nBOtg),FsigBO3(npair,nBOtg),
*
FsigBO4(npair,nBOtg),FsigBO5(npair,nBOtg),
*
FsigBO6(npair,nBOtg),fij(npair),cij(npair),dBO,rdBO,nBOt
common /grids6/ qijT(nelmax*nelmax,nrg),
*
qijT1(nelmax*nelmax,nrg),qijT2(nelmax*nelmax,nrg),
*
qijT3(nelmax*nelmax,nrg),qijT4(nelmax*nelmax,nrg),
*
qijT5(nelmax*nelmax,nrg),qijT6(nelmax*nelmax,nrg),
*
rcq(npair),qij0(nelmax*nelmax)
common /grids7/ BG(ngrid),BG1(ngrid),BG2(ngrid),BG3(ngrid),
*
BG4(ngrid),BG5(ngrid),BG6(ngrid),dGG,rdGG
common /grids8/ SG(ngrid),SG1(ngrid),SG2(ngrid),SG3(ngrid),
*
SG4(ngrid),SG5(ngrid),SG6(ngrid),dSGG,rdSGG
common /grids9/ dzero(ngrid),dzero1(ngrid),dzero2(ngrid),
*
dzero3(ngrid),dzero4(ngrid),dzero5(ngrid),dzero6(ngrid),
*
ddzero,rddzero
common /triple/ cosAng(natmax,neimax*(neimax-1)/2),
*
dcosAng(natmax,neimax*(neimax-1)/2,4,3)
common /double/ betaSsq(natmax,neimax),
*
dBetaSsq(natmax,neimax),betaPsq(natmax,neimax),
*
dBetaPsq(natmax,neimax),repul(natmax,neimax),
*
dRepul(natmax,neimax)
common /sigma/ sigB(ntotNei/2),dSigBi(ntotNei/2,3),
*
dSigBj(ntotNei/2,3),nSigBk(ntotNei/2),
*
itypeSigBk(ntotNei/2,ntotSigk),dSigBk(ntotNei/2,ntotSigk,3),
*
dSigBl(ntotNei/2,3)
common /sigmaOld/ sigB1(ntotNei/2),dSigBi1(ntotNei/2,3),
*
dSigBj1(ntotNei/2,3),dSigBk1(ntotNei/2,ntotSigk,3),
*
dSigBl1(ntotNei/2,3)
common /pi/ piB(ntotNei/2),dPiBi(ntotNei/2,3),
*
dPiBj(ntotNei/2,3),nPiBk(ntotNei/2),
*
itypePiBk(ntotNei/2,ntotPik),dPiBk(ntotNei/2,ntotPik,3),
*
dPiBl(ntotNei/2,3)
common /prome/ prom(natmax),dPromi(natmax,3),
*
nProm(natmax),itypeProm(natmax,neimax*(neimax-1)),
*
dPromk(natmax,neimax*(neimax-1),3),dProml(natmax,3),
*
proA(npair)
common /print/ typep,xminp,xmaxp,yminp,ymaxp,zminp,zmaxp,sortp,
.
ipinter,ipatoms,ipitera,irstrt,iconf,iconst
common /average/ avtemp,avpres,avvol,avpe,avke,avstrs(3),
.
eqtim,avtmprg(0:6),nequil,nskipd,nave
common /vapor/ ivapor,type1(5),fraction1(5),type2(5),
.
fraction2(5),evapor,depdir(3),vdep,ycenter1,ywidth1,TbndV,
.
ratio,inert,dtadd,density,ntopbox,mark1,mark2,
.
nmo,emo,emo0,einert,devapor,inertvary,depdirtime,spinphi,
.
layernumber,eomit,nomit,evaporline,yline,yline0,
.
timelayer(2),timehlayer(2),dimer(nelmax),dimdis,dimdd
*
*
*
I.3 FORTRAN functions
The original base to the MDvap96 code was the Dynamo code written by S. M. Folies
and M. S. Daw. This original code was significantly revised by X. W. Zhou for use in
APPENDIX I. MOLECULAR DYNAMICS CODE
214
vapor deposition simulation. He later extended the systems from metallic systems modeled
by the embedded atom method (EAM) to include semiconductor potentials, such as the
SW, Tersoff, and BOP formats. This is the twelfth revision of the semiconductor version
of this code, MULTI12.f. The code was additionally modified by D. A. Murdick and
B. A. Gillespie. Through the combined efforts of X. W. Zhou, D. A. Murdick, and B. A.
Gillespie, this code achieved its current form.
I.3.1 Setup and input subroutines and functions
MDvap96
c*******************************************************************
c
c
MDvap96 code version Sparc/RS6000 Modified by X. W. Zhou
c
c*******************************************************************
c
program MDvap96
include ’vap.inc’
c
c
character*80 printf,rstrtf,conff,fnamestr
character*24 timestr
data rstrtf,conff/2*’none’/,printf/’dynprint’/
namelist /prntcard/ ipinter,ipatoms,ipitera,printf,rstrtf,conff,
1
iconst,xminp,yminp,zminp,xmaxp,ymaxp,zmaxp,typep,sortp,iconf
ipinter=0
ipatoms=3
ipitera=-1
irstrt=0
iconf=0
iconst=0
xminp=-1.e6
yminp=-1.e6
zminp=-1.e6
xmaxp=1.e6
ymaxp=1.e6
zmaxp=1.e6
typep=.0
nboxnei=0
sortp=.false.
nneips=0
nnindx(0)=0
c
c read the parameters controlling output
c
c
c
change made by dewey to accept file name in command line
Wed Oct 1 22:15:00 EDT 2003
If (iargc() .eq. 1) then
CALL GetArg(1, fnamestr)
APPENDIX I. MOLECULAR DYNAMICS CODE
open(unit=5,file=fnamestr)
else
open(unit=5,file=’a.i’)
endif
c
c
c
determine the initial timing values
call initsec()
c
c
c
read the parameters controlling output
read(5,prntcard)
c
c
determine which output files are desired and open them
open(unit=6,file=printf,form=’FORMATTED’,status=’UNKNOWN’)
c
9100
c
write(6,9100)
format(’ *******
MDvap96 (unix)
2/26/96 *******’)
write(6,9005)printf
9005 format(/,/,1x,’opened print file named ’,a80)
c
c print out the real time for the beginning of the job
c
call mytime(timestr)
write(6,9101) timestr
9101 format(/,/,1x,’begin run:’,a24)
c
c open restart and configuration files
c
if (.not.(rstrtf(1:4).eq.’NONE’.or.rstrtf(1:4).eq.’none’)) then
irstrt = 1
open(unit=21,file=rstrtf,form=’FORMATTED’,status=’UNKNOWN’)
write(6,9006)rstrtf
9006
format(1x,’opened restart file named ’,a80)
end if
if (.not.(conff(1:4).eq.’NONE’.or.conff(1:4).eq.’none’)) then
if (iconf.eq.0) iconf = 1
open(unit=20,file=conff,form=’UNFORMATTED’,status=’UNKNOWN’)
write(6,9007)conff,iconf
9007
format(1x,’opened configuration file named ’,a80,/
$
’ configuration file type:’,i2)
else
iconf = 0
end if
c
c call dynamo to perform the computation
c
1000 continue
print *,’entering dynamo’
call dynamo
c
c compute final timing information
c
t2tot = seconds()
c
write(6,9010) t2tot
9010 format(/,/,1x,’timing:’,1f12.3)
call mytime(timestr)
write(6,9102) timestr
9102 format(1x,’end of run:’,a24)
close(6)
215
APPENDIX I. MOLECULAR DYNAMICS CODE
close(20)
c
if (inte.ne.-1.or.mnterm.eq.0) then
stop ’ˆGˆG’
else
stop ’*nfmax*’
endif
end
dynamo
c************************************************************************
c
c
c
this is the main routine
c
subroutine dynamo
include ’vap.inc’
character*80 header
data header /’
’/
namelist /headcard/ header
namelist /bndcard/ ibdtyp,dpress,bndmas,bnddrg,dstress,idynper
namelist /neicard/ dradn
namelist /avecard/ eqtim
emo=.0
nmo=0
ibdtyp=1
dpress=.0
bndmas(1)=100.0
bndmas(2)=100.0
bndmas(3)=100.0
bnddrg(1)=-1.0
bnddrg(2)=-1.0
bnddrg(3)=-1.0
idynper(1)=1
idynper(2)=1
idynper(3)=1
dstress(1)=.0
dstress(2)=.0
dstress(3)=.0
eqtim=.0
dradn=-1.0
c
c
c clear the force statistics variables
c
nforce = 0
nforce1 = 0
ngtlst = 0
c
c read and print the descriptive header for this run
c
read(5,headcard)
write(6,9110) header
9110 format(’ ****************************************** ’,//,
11x,a80,//,
1’ ****************************************** ’)
c
c describe the output control in effect
c
write(6,9120)ipinter,ipatoms,ipitera,iconst
9120 format(/,/,’ print control: ’,/,
1’
print interaction functions: ’,i4,/,
216
APPENDIX I. MOLECULAR DYNAMICS CODE
2’
3’
4’
c
c
c
print atom positions: ’,i4,/,
print iteration info: ’,i4,/,
print full constraint list: ’,i4)
print the units convention
write(6,9130)
9130 format(/,/,’ explanation of units’,/,’ positions in angstroms’,/,
1’ time in picoseconds’,/,’ velocities in angstroms/picosecond’,/,
2’ energies in ev’,/,’ temperature in degrees kelvin’,/,
3’ pressure in bars ’,/,
4’ mass in ev-psecˆ2/angstromsˆ2’,/,/)
c
c
c
set up interactions
call inter
c
c
c
determine the initial positions and velocities
call initlat
if (nECRon .ne. 0) call setn1st()
c
c
c
read in the type of boundaries to be used
read(5,bndcard)
c
c
c
c
c
determine the boundary drag if it is not specified by the user
this determination is for critical damping assuming a
bulk modulus of 1mbar
if (ibdtyp.eq.2.and.bnddrg(1).lt.0.0) then
bnddrg(1) = sqrt(7.5*perlen(1)/bndmas(1))
bnddrg(2) = sqrt(7.5*perlen(2)/bndmas(2))
bnddrg(3) = sqrt(7.5*perlen(3)/bndmas(3))
end if
if (ibdtyp.eq.2) then
trace = (dstress(1)+dstress(2)+dstress(3))/3.
dpress = dpress + trace
dstress(1) = dstress(1) - trace
dstress(2) = dstress(2) - trace
dstress(3) = dstress(3) - trace
endif
write(6,9210)
9210 format(/,/’ ****** boundary conditions’)
if(ibdtyp.eq.1)write(6,9215)
9215 format(/,’ constant volume (fixed periodic vectors) ’)
if(ibdtyp.eq.2)then
write(6,9220)
9220
format(/,’ dynamic periodic lengths (fixed directions) ’)
write(6,9225)dpress,dstress,bndmas,bnddrg
9225
format(’ desired pressure:’,g12.5,/,
1
’ desired stresses:’,3g14.5,/,
2’ bondary mass:’,3g14.5,/,’ boundary drag:’,3g14.5,/)
write(6,9227) idynper
9227
format(’ boundaries allowed to move:’,3i2)
endif
c convert pressure and stresses from bar to internal units
dpress = dpress/1.602e+6
dstress(1) = dstress(1)/1.602e+06
dstress(2) = dstress(2)/1.602e+06
dstress(3) = dstress(3)/1.602e+06
c
c multiply dstress by the appropriate combinations of perlens
c for use elsewhere
217
APPENDIX I. MOLECULAR DYNAMICS CODE
c
dstress(1) = dstress(1)*perlen(2)*perlen(3)/perlen(1)
dstress(2) = dstress(2)*perlen(1)*perlen(3)/perlen(2)
dstress(3) = dstress(3)*perlen(1)*perlen(2)/perlen(3)
c
c
c
determine the type of neighbor finding method to be used
read(5,neicard)
c
c
c
c
c
c
set up the storage required by the neighbor list,
initialize the values of the neighbor list index and compute the
cut off radii for the neighbor list using the default
expression for dradn if it is not specified
300
c
c
c
newlst = 1
if (dradn.lt.0.0) dradn = 0.1*rcutall
do 300 i=1,ntypes*(ntypes+1)/2
rctsqn(i)=(rcut(i)+dradn)**2
rcutqbsqn(i)=(rcutqb(i)+dradn)**2
if (ncalbulk .ne. 0) then
rctsqn(i)=amax1(rctsqn(i),rcutqbsqn(i))
endif
continue
rctroot=rctroot+dradn
if (ivapor .eq. 1) then
dnyt=rctroot
nyt=1000000
mark1=1
mark2=1
if (depdir(1) .lt. .0) mark1=-1
if (depdir(3) .lt. .0) mark2=-1
endif
calculate energy of initial lattice without defects
call calce(ekin1,eperf,etot1,temper,press,1,t0)
c
c
c
read in defects
write(6,9140)
9140 format(/,/’ ******
call readef(ndef)
c
c
c
c
reading in defects ’)
if defects have been created, force the determination of a
new neighbor list
if (ndef.ne.0) newlst = 1
write(6,9150)ndef
9150 format(’ finished reading in ’,i5,’ defects ’)
c
c
c
delete vacancies
call delvac
if (nECRon .ne. 0) call setn1st()
c
c
c
check that all types used have been defined
call chktyp
c
c
c
make sure natoms.le.natmax
if(natoms.gt.natmax)then
write(6,9160)natoms,natmax
9160
format(’ natoms=’,i10,’ is greater than natmax=’,i10)
218
APPENDIX I. MOLECULAR DYNAMICS CODE
stop
endif
c
c
c
read in the fixcard constraints
call setfix
c
c
c
calculate initial state
if(ndef.ne.0)then
call calce(ekin1,pot1,etot1,temper,press,1,t0)
else
pot1 = eperf
endif
volint = perlen(1)*perlen(2)*perlen(3)
write(6,9205)ekin1,pot1,etot1,temper,press,volint
9205 format(’ ******
initial state: ’,/,
1’ kinetic, potential and total energies ’,3e17.7,/,
2’ temperature:’,g13.6,’ pressure:’,g13.6,’ volume:’,g13.6)
c
c
c
c
print out types, positions, velocities, electron densities,
forces and energies on particles
write(6,9170)natoms
9170 format(/,/1x,i5,’ particles ’)
if(ipatoms.eq.1.or.ipatoms.eq.3) call patoms
c
c
c
read in and set up the temperature control
call settmp
c
c
c
10
initiaze the averaging variables
read(5,avecard)
avvol = 0.0
nave = 0
nskipd = 0
avpe = 0.0
avke = 0.0
avpres = 0.0
avtemp = 0.0
do 10 i = 1,3
avstrs(i) = 0.0
do 11 ireg = 0,6
avtmprg(ireg) = 0.0
11
c
c write the job parameters to the output file 20 for use by the
c analysis programs
c
if (iconf.ne.0) then
if (ivapor .eq. 1 .and. inte .ne. -1) then
write(20) header
else
write(20) header
write(20) natoms
write(20) (perub(i),i=1,3),(perlb(i),i=1,3)
write(20) ntypes
write(20) (amass(i),ielement(i),i=1,ntypes)
endif
end if
write(0,*) "DEBUG:", header
write(0,*) "DEBUG:", natoms
write(0,*) "DEBUG:", (perub(i),i=1,3),(perlb(i),i=1,3)
write(0,*) "DEBUG:", ntypes
219
APPENDIX I. MOLECULAR DYNAMICS CODE
write(0,*) "DEBUG:", (amass(i),ielement(i),i=1,ntypes)
c
c
c
c
call newton to integrate the equations of motion
or to minimize the potential
call newton
if (ivapor .eq. 1) then
write(6,8041)
write(6,8042)ycenter(1),ywidth(1)
endif
format(1x,’substrate temperature region ycenter and ywidth’)
format(2f10.4)
8041
8042
c
c if a minimization, put the final positions in a configuration file
c if there is one
c
if (iconf.ne.0.and.inte.eq.-1) then
c
t = 0.0
temp = 0.0
if (iconf.eq.1) then
write(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
write(20) ((rv(i,j),i=1,3),itype(j),j=1,natoms)
end if
if (iconf.eq.2) then
write(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
write(20) ((rv(i,j),i=1,6),itype(j),j=1,natoms)
end if
if (iconf.eq.3) then
write(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
write(20) ((rv(i,j),i=1,3),itype(j),j=1,natoms)
end if
if (iconf.eq.4) then
write(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
write(20) ((rv(i,j),i=1,6),itype(j),j=1,natoms)
end if
c
endif
c
c if this run is just to calculate energy (inte=2), skip down to
c timing information
c
if(inte.eq.2)goto 5000
c
c print out the final position, velocities, and forces as well as
c the final energies, temerature, and pressure
c
if(ipatoms.ge.2) call patoms
call calce(ekin2,pot2,etot2,temper,press,1,tend)
volume = perlen(1)*perlen(2)*perlen(3)
write(6,9240)ekin2,pot2,etot2,temper,press,volume
9240 format(/,/,’ ****** final state: ’,/,
1’ kinetic, potential and total energies ’,3e17.7,/,
2’ temperature:’,g13.6,’ pressure:’,g13.6,’ volume:’,g13.6)
write(6,9242) volume/natoms
9242 format(’ ******
volume per atom ’,e17.8)
write(6,9241) etot2/natoms
9241 format(’ ******
energy per atom ’,e17.8)
c
c
c
c
for a minimization, print out a warning if the minimization
terminated for any reason other than convergence to tol
if (inte.eq.-1.and.mnterm.eq.1) then
220
APPENDIX I. MOLECULAR DYNAMICS CODE
9232
c
c
c
write(6,9232)
format(1x,’warning************************************’,/,
1
1x,’minimization terminated due to nfmax’,/,
2
1x,’warning************************************’)
endif
determine the changes in the energies
dekin=ekin2-ekin1
dpot=pot2-pot1
detot=etot2-etot1
erel=pot2-eperf
write(6,9245)dekin,dpot,detot
9245 format(’ changes in energies: kinetic, potential, and total ’,
1/1x,3e17.7)
write(6,9250)detops
9250 format(’ largest change in total e reported by output: ’,e17.7)
write(6,9260)erel
9260 format(’ energy of final lattice with defects’,
1’ relative to initial lattice without defects =’,e17.7)
write(6,9270)(stresst(i),i=1,3)
9270 format(/’ normal stress ’/1x,3g15.5)
dvperc = 100.0*(volume-volint)/volint
write(6,9290)volume,dvperc
9290 format(1x,’final volume:’,g14.7,
1
’
percent volume change:’,g12.5)
write(6,9291) perlen
9291 format(’ final length ’,8x,3g15.5)
c
c
c
compute and output the average values.
if (nave.gt.0) then
avtemp = avtemp/nave
avpres = avpres/nave
avke = avke/nave
avpe = avpe/nave
avvol = avvol/nave
avden = natoms/avvol
write(6,9300)avtemp,avpres,avvol,avden,avke,avpe
9300
format(1x,’average values’,/,
1
5x,’temperature:’,g14.7,’
pressure:’,g14.7,/,
2
5x,’volume:’,g14.7,’
density:’,g14.7,/,
3
5x,’kinetic energy:’,g14.7,’ potential energy:’,g14.7)
do 100 i = 1,3
100
avstrs(i) = avstrs(i)/nave
write(6,9301)(avstrs(i),i=1,3)
9301
format(5x,’average normal stress’,/,
1
(7x,3g15.5,/))
if(ifxtmp.ne.0)then
do 101 ireg = 0,nregs
101
avtmprg(ireg) = avtmprg(ireg)/nave
write(6,9302)(ireg,avtmprg(ireg),ireg=0,nregs)
9302
format(’ region:’,i5,’ average temperature:’,g14.7)
endif
end if
c
c create the restart file (21)
c
c
use format compatible with vax/creator capability
if (irstrt.eq.1) then
write(21,9501) header
9501 format(a80)
write(21,9502) natoms,ntypes,tend
221
APPENDIX I. MOLECULAR DYNAMICS CODE
9502
9503
9504
9505
222
format(2i10,e15.8)
write(21,9503) (perub(i),i=1,3),(perlb(i),i=1,3)
format(3e25.16)
write(21,9504) (amass(i),ielement(i),i=1,ntypes)
format(e25.16,i10)
write(21,9505) ((rv(i,j),i=1,6),itype(j),j=1,natoms)
format(3e25.16/3e25.16/i10)
write(21,9503) (bndvel(i),i=1,3)
end if
c
c output the statistics on call to force
c
5000 continue
write(6,9401)
9401 format(/,/,1x,’****** statistics on FORCE and GNEIGH’)
write(6,9402)nforce
9402 format(1x,’total number of calls to FORCE:’,i5)
write(6,9403) ngtlst
9403 format(1x,’total number of neighbor list updates:’,i5)
write(6,9404) nneips
9404 format(1x,’maximum number of actual neighbors found:’,i5)
if (nmo .gt. 0) then
emo=emo/real(nmo)
write(6,*)’average inert gas energy before impact =’,einert
write(6,*)’average inert gas energy after impact =’,emo
write(6,*)’number of inert gas atoms sampled =’,nmo
endif
return
end
inter for the Stillinger-Weber potential
The inter subroutine is specific to the interatomic potential being used. The function included here is for the SW format.
c***************************************************************
c
c this routine sets the parameters defining the interactions
c
subroutine inter
include ’vap.inc’
character*80 setfl
data conmas/1.0365e-4/
data setfl/’none’/
namelist /funccard/ setfl
c
read(5,funccard)
c
open(unit=10,file=setfl,form=’FORMATTED’,status=’OLD’)
read(10,150) ntypes
150
format(i5)
if (ntypes.gt.nelmax) then
write(6,*)’error: number of types greater than nelmax’
stop
endif
read(10,150) nr
do 152 i=1,ntypes
APPENDIX I. MOLECULAR DYNAMICS CODE
152
30
154
9901
9903
160
142
c
c
c
c
c
c
read(10,30) ielement(i),amass(i)
continue
format(i5,e16.8)
do 154 i=1,ntypes*(ntypes+1)/2
read(10,9901) rcut(i),dr(i)
continue
format(2e16.8)
format(5e16.8)
do 160 i=1,ntypes*(ntypes+1)/2
read(10,9903) (VR(i,j),j=1,nr)
read(10,9903) (VA(i,j),j=1,nr)
continue
close(10)
rcutall=0.0
do 142 i=1,ntypes*(ntypes+1)/2
rcutall=amax1(rcutall,rcut(i))
rcutsq(i)=rcut(i)*rcut(i)
rdr(i)=1.0/dr(i)
continue
rctroot=rcutall
rdtheta=1.0/dtheta
this is
here we
this is
restart
the only place where the mass is in amu
convert to eV-psec**2/angstrom**2
the unit used throughout the program
assumes this mass unit
do 75 i=1,ntypes
75
amass(i) = conmas*amass(i)
c
c now set up the dense grids
c compute the value and slope at the computational grid points
c
do 500 i=1,ntypes*(ntypes+1)/2
VA1(i,1)=VA(i,2)-VA(i,1)
VA1(i,2)=0.5*(VA(i,3)-VA(i,1))
VA1(i,nr-1)=0.5*(VA(i,nr)-VA(i,nr-2))
VA1(i,nr)=VA(i,nr)-VA(i,nr-1)
VR1(i,1)=VR(i,2)-VR(i,1)
VR1(i,2)=0.5*(VR(i,3)-VR(i,1))
VR1(i,nr-1)=0.5*(VR(i,nr)-VR(i,nr-2))
VR1(i,nr)=VR(i,nr)-VR(i,nr-1)
do 520 k=3,nr-2
VA1(i,k)=((VA(i,k-2)-VA(i,k+2))+
*
8.0*(VA(i,k+1)-VA(i,k-1)))/12.0
VR1(i,k)=((VR(i,k-2)-VR(i,k+2))+
*
8.0*(VR(i,k+1)-VR(i,k-1)))/12.0
520
continue
do 525 k=1,nr-1
VA2(i,k)=3.0*(VA(i,k+1)-VA(i,k))*
2.0*VA1(i,k)-VA1(i,k+1)
VA3(i,k)=VA1(i,k)+VA1(i,k+1)*
2.0*(VA(i,k+1)-VA(i,k))
VR2(i,k)=3.0*(VR(i,k+1)-VR(i,k))*
2.0*VR1(i,k)-VR1(i,k+1)
VR3(i,k)=VR1(i,k)+VR1(i,k+1)*
2.0*(VR(i,k+1)-VR(i,k))
525
continue
VA2(i,nr)=0.0
VA3(i,nr)=0.0
VR2(i,nr)=0.0
VR3(i,nr)=0.0
do 528 k=1,nr
223
APPENDIX I. MOLECULAR DYNAMICS CODE
528
500
224
VA4(i,k)=VA1(i,k)/dr(i)
VA5(i,k)=2.0*VA2(i,k)/dr(i)
VA6(i,k)=3.0*VA3(i,k)/dr(i)
VR4(i,k)=VR1(i,k)/dr(i)
VR5(i,k)=2.0*VR2(i,k)/dr(i)
VR6(i,k)=3.0*VR3(i,k)/dr(i)
continue
continue
return
end
inter for the Tersoff potential
The inter subroutine is specific to the interatomic potential being used. The function included here is for the Tersoff format.
c***************************************************************
c
c this routine sets the parameters defining the interactions
c
subroutine inter
include ’vap.inc’
character*80 setfl
data conmas/1.0365e-4/
data setfl/’none’/
namelist /funccard/ setfl
c
read(5,funccard)
c
open(unit=10,file=setfl,form=’FORMATTED’,status=’OLD’)
read(10,150) ntypes
150
format(i5)
if (ntypes.gt.nelmax) then
write(6,*)’error: number of types greater than nelmax’
stop
endif
read(10,151) nr,ntheta,dtheta
151
format(2i5,e16.8)
do 152 i=1,ntypes
read(10,30) ielement(i),amass(i)
152
continue
30
format(i5,e16.8)
do 154 i=1,ntypes*(ntypes+1)/2
read(10,9903) delta(i),an(i),rcut(i),dr(i),twom(i)
154
continue
9903 format(5e16.8)
do 160 i=1,ntypes*(ntypes+1)/2
read(10,9903) (VR(i,j),j=1,nr)
read(10,9903) (VA(i,j),j=1,nr)
160
continue
do 140 i=1,ntypes*(ntypes+1)/2
read(10,9903) (gang(i,j),j=1,ntheta)
read(10,9903) (fc(i,j),j=1,nr)
140 continue
close(10)
rcutall=0.0
APPENDIX I. MOLECULAR DYNAMICS CODE
142
c
c
c
c
c
c
do 142 i=1,ntypes*(ntypes+1)/2
rcutall=amax1(rcutall,rcut(i))
rcutsq(i)=rcut(i)*rcut(i)
rdr(i)=1.0/dr(i)
continue
rctroot=rcutall
rdtheta=1.0/dtheta
this is
here we
this is
restart
the only place where the mass is in amu
convert to eV-psec**2/angstrom**2
the unit used throughout the program
assumes this mass unit
do 75 i=1,ntypes
75
amass(i) = conmas*amass(i)
c
c now set up the dense grids
c compute the value and slope at the computational grid points
c
do 500 i=1,ntypes*(ntypes+1)/2
VA1(i,1)=VA(i,2)-VA(i,1)
VA1(i,2)=0.5*(VA(i,3)-VA(i,1))
VA1(i,nr-1)=0.5*(VA(i,nr)-VA(i,nr-2))
VA1(i,nr)=VA(i,nr)-VA(i,nr-1)
VR1(i,1)=VR(i,2)-VR(i,1)
VR1(i,2)=0.5*(VR(i,3)-VR(i,1))
VR1(i,nr-1)=0.5*(VR(i,nr)-VR(i,nr-2))
VR1(i,nr)=VR(i,nr)-VR(i,nr-1)
fc1(i,1)=fc(i,2)-fc(i,1)
fc1(i,2)=0.5*(fc(i,3)-fc(i,1))
fc1(i,nr-1)=0.5*(fc(i,nr)-fc(i,nr-2))
fc1(i,nr)=fc(i,nr)-fc(i,nr-1)
gang1(i,1)=gang(i,2)-gang(i,1)
gang1(i,2)=0.5*(gang(i,3)-gang(i,1))
gang1(i,ntheta-1)=0.5*(gang(i,ntheta)-gang(i,ntheta-2))
gang1(i,ntheta)=gang(i,ntheta)-gang(i,ntheta-1)
do 520 k=3,nr-2
VA1(i,k)=((VA(i,k-2)-VA(i,k+2))+
*
8.0*(VA(i,k+1)-VA(i,k-1)))/12.0
VR1(i,k)=((VR(i,k-2)-VR(i,k+2))+
*
8.0*(VR(i,k+1)-VR(i,k-1)))/12.0
fc1(i,k)=((fc(i,k-2)-fc(i,k+2))+
*
8.0*(fc(i,k+1)-fc(i,k-1)))/12.0
520
continue
do 81 k=3,ntheta-2
gang1(i,k)=((gang(i,k-2)-gang(i,k+2))+
*
8.0*(gang(i,k+1)-gang(i,k-1)))/12.0
81
continue
do 525 k=1,nr-1
VA2(i,k)=3.0*(VA(i,k+1)-VA(i,k))*
2.0*VA1(i,k)-VA1(i,k+1)
VA3(i,k)=VA1(i,k)+VA1(i,k+1)*
2.0*(VA(i,k+1)-VA(i,k))
VR2(i,k)=3.0*(VR(i,k+1)-VR(i,k))*
2.0*VR1(i,k)-VR1(i,k+1)
VR3(i,k)=VR1(i,k)+VR1(i,k+1)*
2.0*(VR(i,k+1)-VR(i,k))
fc2(i,k)=3.0*(fc(i,k+1)-fc(i,k))*
2.0*fc1(i,k)-fc1(i,k+1)
fc3(i,k)=fc1(i,k)+fc1(i,k+1)*
2.0*(fc(i,k+1)-fc(i,k))
525
continue
do 82 k=1,ntheta-1
gang2(i,k)=3.0*(gang(i,k+1)-gang(i,k))-
225
APPENDIX I. MOLECULAR DYNAMICS CODE
226
*
82
528
83
500
2.0*gang1(i,k)-gang1(i,k+1)
gang3(i,k)=gang1(i,k)+gang1(i,k+1)*
2.0*(gang(i,k+1)-gang(i,k))
continue
VA2(i,nr)=0.0
VA3(i,nr)=0.0
VR2(i,nr)=0.0
VR3(i,nr)=0.0
fc2(i,nr)=0.0
fc3(i,nr)=0.0
gang2(i,ntheta)=gang2(i,ntheta-1)
gang3(i,ntheta)=gang3(i,ntheta-1)
do 528 k=1,nr
VA4(i,k)=VA1(i,k)/dr(i)
VA5(i,k)=2.0*VA2(i,k)/dr(i)
VA6(i,k)=3.0*VA3(i,k)/dr(i)
VR4(i,k)=VR1(i,k)/dr(i)
VR5(i,k)=2.0*VR2(i,k)/dr(i)
VR6(i,k)=3.0*VR3(i,k)/dr(i)
fc4(i,k)=fc1(i,k)/dr(i)
fc5(i,k)=2.0*fc2(i,k)/dr(i)
fc6(i,k)=3.0*fc3(i,k)/dr(i)
continue
do 83 k=1,ntheta
gang4(i,k)=gang1(i,k)*rdtheta
gang5(i,k)=2.0*gang2(i,k)*rdtheta
gang6(i,k)=3.0*gang3(i,k)*rdtheta
continue
continue
return
end
inter for the bond-order potential
The inter subroutine is specific to the interatomic potential being used. The function included here is for the BOP format.
c***************************************************************
c
c this routine sets the parameters defining the interactions
c
subroutine inter
include ’vap.inc’
character*80 setfl,setECR
data conmas/1.0365e-4/
data setfl/’none’/,setECR/’none’/
namelist /funccard/ setfl,nECRon,setECR,ncalbulk,y1st
c
nECRon=0
ncalbulk=0
y1st(1)=-9999.0
y1st(2)=y1st(1)
read(5,funccard)
if (nECRon .eq. 0) ncalbulk=0
nECRrun=1
if (nECRon .ne. 0) nECRrun=nECRon
APPENDIX I. MOLECULAR DYNAMICS CODE
c
open(unit=10,file=setfl,form=’FORMATTED’,status=’OLD’)
read(10,150) ntypes,nr
150
format(2i5)
if (ntypes.gt.nelmax) then
write(6,*)’error: number of types greater than nelmax’
stop
endif
do 152 i=1,ntypes
read(10,30) ielement(i),amass(i),delta(i)
152
continue
30
format(i5,2e16.8)
do 154 i=1,ntypes*(ntypes+1)/2
read(10,8) rcut(i),dr(i)
read(10,8) an1(i),an2(i)
read(10,8) anp(i),proA(i)
read(10,8) deltas(i),deltap(i)
154
continue
do 21 i=1,ntypes
do 21 j=1,ntypes
do 21 k=1,ntypes
read(10,8)pg(i,j,k),cg(i,j,k)
21
continue
9913 format(4e16.8)
9903 format(5e16.8)
do 160 i=1,ntypes*(ntypes+1)/2
read(10,9903) (pRepul(i,j),j=1,nr)
160
continue
do 140 i=1,ntypes*(ntypes+1)/2
read(10,9903) (pBetaSsq(i,j),j=1,nr)
140 continue
do 7 i=1,ntypes*(ntypes+1)/2
read(10,9903)(pBetaPsq(i,j),j=1,nr)
7
continue
do 77 i=1,ntypes*(ntypes+1)/2
read(10,8)pNg(i),deltaNg
c
pfactor(i)=pNg(i)/(pNg(i)+1.0)
c code changed by Dewey (dam2j) on 4/20/2005
pfactor(i)=pNg(i)
77
continue
8
format(2e16.8)
read(10,33)nBOt,dBO
do 11 i=1,ntypes*(ntypes+1)/2
read(10,8)fij(i),cij(i)
read(10,9903)(FsigBO(i,j),j=1,nBOt)
11
continue
33
format(i5,e16.8)
close(10)
rcutall=0.0
do 142 i=1,ntypes*(ntypes+1)/2
rcutall=amax1(rcutall,rcut(i))
rcutsq(i)=rcut(i)*rcut(i)
rdr(i)=1.0/dr(i)
142
continue
rctroot=rcutall
dBO=1.0/(nBOt-1.0)
rdBO=1.0/dBO
if (nECRon .ne. 0) then
open(unit=10,file=setECR,form=’FORMATTED’,status=’OLD’)
read(10,9904)ngrid7
read(10,9915)dGG,dSGG,ddzero
do 7100 i=1,ntypes*(ntypes+1)/2
read(10,8)r0(i),rcq(i)
227
APPENDIX I. MOLECULAR DYNAMICS CODE
7100
7001
7002
9904
9908
9915
c
c
c
c
c
c
rctroot=amax1(rctroot,rcq(i))
read(10,9915)wb(i),wc1(i),wc2(i)
rcutqb(i)=rcq(i)*rcq(i)/r0(i)
rcutqbsq(i)=rcutqb(i)*rcutqb(i)
if (ncalbulk .ne. 0) rctroot=amax1(rctroot,rcutqb(i))
continue
do 7001 i=1,ntypes
read(10,9903)wd(i),wc3(i),wc4(i),alp(i),Vai(i)
continue
do 7002 i=1,ntypes*ntypes
read(10,9908) qij0(i)
read(10,9903)(qijT(i,j),j=1,nr)
continue
read(10,9903)(BG(j),j=1,ngrid7)
read(10,9903)(SG(j),j=1,ngrid7)
read(10,9903)(dzero(j),j=1,ngrid7)
close(10)
rdGG=1.0/dGG
rdSGG=1.0/dSGG
rddzero=1.0/ddzero
endif
format(i5)
format(e16.8)
format(3e16.8)
this is
here we
this is
restart
the only place where the mass is in amu
convert to eV-psec**2/angstrom**2
the unit used throughout the program
assumes this mass unit
do 75 i=1,ntypes
75
amass(i) = conmas*amass(i)
c
c now set up the dense grids
c compute the value and slope at the computational grid points
c
do 500 i=1,ntypes*(ntypes+1)/2
pBetaSsq1(i,1)=pBetaSsq(i,2)-pBetaSsq(i,1)
pBetaSsq1(i,2)=0.5*(pBetaSsq(i,3)-pBetaSsq(i,1))
pBetaSsq1(i,nr-1)=0.5*(pBetaSsq(i,nr)-pBetaSsq(i,nr-2))
pBetaSsq1(i,nr)=pBetaSsq(i,nr)-pBetaSsq(i,nr-1)
pBetaPsq1(i,1)=pBetaPsq(i,2)-pBetaPsq(i,1)
pBetaPsq1(i,2)=0.5*(pBetaPsq(i,3)-pBetaPsq(i,1))
pBetaPsq1(i,nr-1)=0.5*(pBetaPsq(i,nr)-pBetaPsq(i,nr-2))
pBetaPsq1(i,nr)=pBetaPsq(i,nr)-pBetaPsq(i,nr-1)
pRepul1(i,1)=pRepul(i,2)-pRepul(i,1)
pRepul1(i,2)=0.5*(pRepul(i,3)-pRepul(i,1))
pRepul1(i,nr-1)=0.5*(pRepul(i,nr)-pRepul(i,nr-2))
pRepul1(i,nr)=pRepul(i,nr)-pRepul(i,nr-1)
FsigBO1(i,1)=FsigBO(i,2)-FsigBO(i,1)
FsigBO1(i,2)=0.5*(FsigBO(i,3)-FsigBO(i,1))
FsigBO1(i,nBOt-1)=0.5*(FsigBO(i,nBOt)-FsigBO(i,nBOt-2))
FsigBO1(i,nBOt)=FsigBO(i,nBOt)-FsigBO(i,nBOt-1)
do 520 k=3,nr-2
pBetaSsq1(i,k)=((pBetaSsq(i,k-2)-pBetaSsq(i,k+2))+
*
8.0*(pBetaSsq(i,k+1)-pBetaSsq(i,k-1)))/12.0
pBetaPsq1(i,k)=((pBetaPsq(i,k-2)-pBetaPsq(i,k+2))+
*
8.0*(pBetaPsq(i,k+1)-pBetaPsq(i,k-1)))/12.0
pRepul1(i,k)=((pRepul(i,k-2)-pRepul(i,k+2))+
*
8.0*(pRepul(i,k+1)-pRepul(i,k-1)))/12.0
520
continue
do 620 k=3,nBOt-2
FsigBO1(i,k)=((FsigBO(i,k-2)-FsigBO(i,k+2))+
*
8.0*(FsigBO(i,k+1)-FsigBO(i,k-1)))/12.0
228
APPENDIX I. MOLECULAR DYNAMICS CODE
620
525
621
528
622
500
continue
do 525 k=1,nr-1
pBetaSsq2(i,k)=3.0*(pBetaSsq(i,k+1)-pBetaSsq(i,k))*
2.0*pBetaSsq1(i,k)-pBetaSsq1(i,k+1)
pBetaSsq3(i,k)=pBetaSsq1(i,k)+pBetaSsq1(i,k+1)*
2.0*(pBetaSsq(i,k+1)-pBetaSsq(i,k))
pBetaPsq2(i,k)=3.0*(pBetaPsq(i,k+1)-pBetaPsq(i,k))*
2.0*pBetaPsq1(i,k)-pBetaPsq1(i,k+1)
pBetaPsq3(i,k)=pBetaPsq1(i,k)+pBetaPsq1(i,k+1)*
2.0*(pBetaPsq(i,k+1)-pBetaPsq(i,k))
pRepul2(i,k)=3.0*(pRepul(i,k+1)-pRepul(i,k))*
2.0*pRepul1(i,k)-pRepul1(i,k+1)
pRepul3(i,k)=pRepul1(i,k)+pRepul1(i,k+1)*
2.0*(pRepul(i,k+1)-pRepul(i,k))
continue
do 621 k=1,nBOt-1
FsigBO2(i,k)=3.0*(FsigBO(i,k+1)-FsigBO(i,k))*
2.0*FsigBO1(i,k)-FsigBO1(i,k+1)
FsigBO3(i,k)=FsigBO1(i,k)+FsigBO1(i,k+1)*
2.0*(FsigBO(i,k+1)-FsigBO(i,k))
continue
pBetaSsq2(i,nr)=0.0
pBetaSsq3(i,nr)=0.0
pBetaPsq2(i,nr)=0.0
pBetaPsq3(i,nr)=0.0
pRepul2(i,nr)=0.0
pRepul3(i,nr)=0.0
FsigBO2(i,nBOt)=0.0
FsigBO3(i,nBOt)=0.0
do 528 k=1,nr
pBetaSsq4(i,k)=pBetaSsq1(i,k)/dr(i)
pBetaSsq5(i,k)=2.0*pBetaSsq2(i,k)/dr(i)
pBetaSsq6(i,k)=3.0*pBetaSsq3(i,k)/dr(i)
pBetaPsq4(i,k)=pBetaPsq1(i,k)/dr(i)
pBetaPsq5(i,k)=2.0*pBetaPsq2(i,k)/dr(i)
pBetaPsq6(i,k)=3.0*pBetaPsq3(i,k)/dr(i)
pRepul4(i,k)=pRepul1(i,k)/dr(i)
pRepul5(i,k)=2.0*pRepul2(i,k)/dr(i)
pRepul6(i,k)=3.0*pRepul3(i,k)/dr(i)
continue
do 622 k=1,nBOt
FsigBO4(i,k)=FsigBO1(i,k)/dBO
FsigBO5(i,k)=2.0*FsigBO2(i,k)/dBO
FsigBO6(i,k)=3.0*FsigBO3(i,k)/dBO
continue
continue
if (nECRon .eq. 0) return
do 5001 i=1,ntypes
do 5001 j=1,ntypes
if (i .eq. j) then
i12=i
else if (i .lt. j) then
i12=i*ntypes-.5*i*(i+1)+j
else
i12=j*ntypes-.5*j*(j+1)+i
endif
iij=(i-1)*ntypes+j
qijT1(iij,1)=qijT(iij,2)-qijT(iij,1)
qijT1(iij,2)=0.5*(qijT(iij,3)-qijT(iij,1))
qijT1(iij,nr-1)=0.5*(qijT(iij,nr)-qijT(iij,nr-2))
qijT1(iij,nr)=qijT(iij,nr)-qijT(iij,nr-1)
do 5002 k=3,nr-2
qijT1(iij,k)=((qijT(iij,k-2)-qijT(iij,k+2))+
*
8.0*(qijT(iij,k+1)-qijT(iij,k-1)))/12.0
229
APPENDIX I. MOLECULAR DYNAMICS CODE
5002
5003
5004
5001
5009
5010
5011
5012
5013
5014
5015
continue
do 5003 k=1,nr-1
qijT2(iij,k)=3.0*(qijT(iij,k+1)-qijT(iij,k))*
2.0*qijT1(iij,k)-qijT1(iij,k+1)
qijT3(iij,k)=qijT1(iij,k)+qijT1(iij,k+1)*
2.0*(qijT(iij,k+1)-qijT(iij,k))
continue
qijT2(iij,nr)=0.0
qijT3(iij,nr)=0.0
do 5004 k=1,nr
qijT4(iij,k)=qijT1(iij,k)/dr(i12)
qijT5(iij,k)=2.0*qijT2(iij,k)/dr(i12)
qijT6(iij,k)=3.0*qijT3(iij,k)/dr(i12)
continue
continue
BG1(1)=BG(2)-BG(1)
BG1(2)=0.5*(BG(3)-BG(1))
BG1(ngrid7-1)=0.5*(BG(ngrid7)-BG(ngrid7-2))
BG1(ngrid7)=BG(ngrid7)-BG(ngrid7-1)
do 5009 k=3,ngrid7-2
BG1(k)=((BG(k-2)-BG(k+2))+8.0*(BG(k+1)-BG(k-1)))/12.0
continue
do 5010 k=1,ngrid7-1
BG2(k)=3.0*(BG(k+1)-BG(k))-2.0*BG1(k)-BG1(k+1)
BG3(k)=BG1(k)+BG1(k+1)-2.0*(BG(k+1)-BG(k))
continue
BG2(ngrid7)=0.0
BG3(ngrid7)=0.0
do 5011 k=1,ngrid7
BG4(k)=BG1(k)/dGG
BG5(k)=2.0*BG2(k)/dGG
BG6(k)=3.0*BG3(k)/dGG
continue
SG1(1)=SG(2)-SG(1)
SG1(2)=0.5*(SG(3)-SG(1))
SG1(ngrid7-1)=0.5*(SG(ngrid7)-SG(ngrid7-2))
SG1(ngrid7)=SG(ngrid7)-SG(ngrid7-1)
do 5012 k=3,ngrid7-2
SG1(k)=((SG(k-2)-SG(k+2))+8.0*(SG(k+1)-SG(k-1)))/12.0
continue
do 5013 k=1,ngrid7-1
SG2(k)=3.0*(SG(k+1)-SG(k))-2.0*SG1(k)-SG1(k+1)
SG3(k)=SG1(k)+SG1(k+1)-2.0*(SG(k+1)-SG(k))
continue
SG2(ngrid7)=0.0
SG3(ngrid7)=0.0
do 5014 k=1,ngrid7
SG4(k)=SG1(k)/dSGG
SG5(k)=2.0*SG2(k)/dSGG
SG6(k)=3.0*SG3(k)/dSGG
continue
dzero1(1)=dzero(2)-dzero(1)
dzero1(2)=0.5*(dzero(3)-dzero(1))
dzero1(ngrid7-1)=0.5*(dzero(ngrid7)-dzero(ngrid7-2))
dzero1(ngrid7)=dzero(ngrid7)-dzero(ngrid7-1)
do 5015 k=3,ngrid7-2
dzero1(k)=((dzero(k-2)-dzero(k+2))+
*
8.0*(dzero(k+1)-dzero(k-1)))/12.0
continue
do 5016 k=1,ngrid7-1
dzero2(k)=3.0*(dzero(k+1)-dzero(k))*
2.0*dzero1(k)-dzero1(k+1)
dzero3(k)=dzero1(k)+dzero1(k+1)*
2.0*(dzero(k+1)-dzero(k))
230
APPENDIX I. MOLECULAR DYNAMICS CODE
5016
5017
continue
dzero2(ngrid7)=0.0
dzero3(ngrid7)=0.0
do 5017 k=1,ngrid7
dzero4(k)=dzero1(k)/ddzero
dzero5(k)=2.0*dzero2(k)/ddzero
dzero6(k)=3.0*dzero3(k)/ddzero
continue
return
end
setn1st
12
11
14
13
16
15
18
17
19
subroutine setn1st()
include ’vap.inc’
dimension rv0(6,natmax),itype0(natmax)
natoms0=0
do 11 i=1,natoms
if (rv(2,i) .lt. y1st(1)) then
natoms0=natoms0+1
itype0(natoms0)=itype(i)
do 12 j=1,6
rv0(j,natoms0)=rv(j,i)
continue
endif
continue
n1stps=natoms0+1
if (n1stps .gt. natoms) then
write(6,*)’n1stps .gt. natoms’
stop
endif
do 13 i=1,natoms
if (rv(2,i) .ge. y1st(1) .and. rv(2,i) .lt. y1st(2)) then
natoms0=natoms0+1
itype0(natoms0)=itype(i)
do 14 j=1,6
rv0(j,natoms0)=rv(j,i)
continue
endif
continue
n1stpf=natoms0
do 15 i=1,natoms
if (rv(2,i) .ge. y1st(2)) then
natoms0=natoms0+1
itype0(natoms0)=itype(i)
do 16 j=1,6
rv0(j,natoms0)=rv(j,i)
continue
endif
continue
do 17 i=1,natoms
itype(i)=itype0(i)
do 18 j=1,6
rv(j,i)=rv0(j,i)
continue
continue
do 19 i=n1stps,natoms
Va(i)=Vai(itype(i))
if (i .le. n1stpf) Va(i)=Va(i)/2.0
continue
nnindx1(n1stps-1)=0
nnindx2(n1stps-1)=0
return
231
APPENDIX I. MOLECULAR DYNAMICS CODE
end
patoms
c***************************************************************
c
c patoms prints out the atom positions etc.
c
subroutine patoms
include ’vap.inc’
dimension rmult(3),dum1(natmax),idum1(natmax),idum2(natmax)
c
c sort the output list if requested
c
do 1000 i = 1,natoms
1000 idum2(i) = i
if (.not.sortp) goto 2000
permax = amax1(perlen(1),perlen(2),perlen(3))
if(permax.ge.1000.)then
xbot = 1.e6
ybot = 1.e6
zbot = 1.e6
do 1005 i = 1,natoms
xbot = min(xbot,rv(1,i))
ybot = min(ybot,rv(2,i))
zbot = min(zbot,rv(3,i))
1005
continue
call m01aaf(perlen,1,3,idum1,idum2,ifail)
rmult(1) = 10**(4*idum1(1)-3)
rmult(2) = 10**(4*idum1(2)-3)
rmult(3) = 10**(4*idum1(3)-3)
do 1010 i=1,natoms
dum1(i) = rmult(1)*(rv(1,i)-xbot)
1
+ rmult(2)*(rv(2,i)-ybot)
2
+ rmult(3)*(rv(3,i)-zbot)
1010
continue
else
do 1020 i=1,natoms
dum1(i) = rv(1,i)**2 + rv(2,i)**2 + rv(3,i)**2
1020
continue
endif
call m01aaf(dum1,1,natoms,idum1,idum2,ifail)
if(ifail.ne.0)write(6,9020)ifail
9020 format(’
trouble in sorting routine
’,i5)
2000 continue
c
c
c now print out the atoms in the specified region and/or type
c
write(6,9180)
9180 format(1x,’atomic data:’,
1
’number, type, positions, energy’)
write(6,9181)
9181 format(13x,’velocities, kinetic energy (if not minimization)’,/,
2
13x,’forces’,/)
do 2100 i = 1,natoms
j = idum2(i)
if (rv(1,j).lt.xminp.or.rv(1,j).gt.xmaxp) goto 2100
if (rv(2,j).lt.yminp.or.rv(2,j).gt.ymaxp) goto 2100
if (rv(3,j).lt.zminp.or.rv(3,j).gt.zmaxp) goto 2100
if (typep.ne.0.and.itype(j).ne.typep) goto 2100
if (inte.ne.-1) then
akin = 0.5*amass(itype(j))*(rv(4,j)**2+rv(5,j)**2+rv(6,j)**2)
232
APPENDIX I. MOLECULAR DYNAMICS CODE
9191
write(6,9191) rv(4,j),rv(5,j),rv(6,j),akin
format(9x,4g15.5)
endif
write(6,9192) (f(k,j),k=1,3)
format(9x,3g15.5)
continue
9192
2100
c
c print out the periodic lengths
c
write(6,9200) (perlen(i),i=1,3)
9200 format(1x,’perlen:’,3g15.7)
return
end
chktyp
c************************************************************************
c
c chktyp checks that all types used have been defined
c
subroutine chktyp
include ’vap.inc’
do 90 i = 1,nelmax
90
netype(i) = 0
do 100 i = 1,natoms
ityp = itype(i)
if (ityp.le.0.or.ityp.gt.ntypes) then
write(6,9001) ityp
9001
format(1x,’** undefined type found. itype = ’,i5,’ **’)
stop
end if
netype(ityp) = netype(ityp) + 1
100
continue
write(6,9101) (netype(i),i=1,ntypes)
9101 format(1x,’number of atoms of each type:’,10i6)
return
end
newton
c***************************************************************
c
c this routine checks the namelist intcard to determine the
c integration scheme to be used and the corresponding parameters.
c it then calls the appropriate integrator.
c
subroutine newton
include ’vap.inc’
c
c define namelist defaults
c
data tottim,outtim/0.1,0.05/
data nfmax/0/,stmax/0.0/
namelist /intcard/ tottim,outtim,iaccur,dt,tol,inte,nfmax,stmax
namelist /strncard/ strn
dt=0.001
tol=0.001
iaccur=0
inte=1
c
c read the data from the namelist
c
233
APPENDIX I. MOLECULAR DYNAMICS CODE
6621
c
c
c
c
c
read(5,intcard)
read(UNIT=5,NML=strncard,IOSTAT=ioerr)
if(ioerr.ne.0) then
do 6621 i=1,natoms
strn(i)=0.0
continue
end if
inte=-1
inte=1
inte=2
minimization
dynamics with nordsieck routine
just calculate the energy once
if(inte.eq.2)return
if (inte .eq. 1 .and. tottim .eq. .0) return
if (inte .eq. -1 .and. nfmax .eq. 0) return
write(6,9010)
9010 format(/,/,’ ****** solving problem’)
nsteps = tottim/dt
if(inte.gt.0)ipitera = iabs(ipitera)
if(inte.eq.-1)then
nsteps = nfmax
dxmax = stmax
endif
if(outtim.gt.tottim .and. inte .eq. 1)then
write(6,9020)outtim,tottim
9020
format(’ output time =’,g15.5,
1
’ is greater than tottim=’,g15.5,’ will set outtim=tottim’)
outtim = tottim
endif
noutp = nint(outtim/dt)
c
c determine the number of outputs before averaging
c
nequil = eqtim/outtim
c
c determine the number of degrees of freedom
c
if (ibdtyp.eq.1) then
ndegfr = natoms
else if (ibdtyp.eq.2) then
ndegfr = natoms + 1
else
write(6,9030)ibdtyp
9030
format(1x,’undefined boundary type: ibdtyp =’,i3)
stop
end if
c
c check that the number of degrees of freedom does not exceed natmax
c
if (ndegfr.gt.natmax) then
write(6,9901) ndegfr,natmax
9901
format(1x,’ndegfr=’,i6,’ is greater than natmax=’,i6)
stop
end if
c
c compute the scaled coordinates to pass to solvers
c
call compscale
c
c call the requested solver
c
if (inte.lt.0)then
write(6,9100)
234
APPENDIX I. MOLECULAR DYNAMICS CODE
9100
9110
format(//’ minimizing energy’)
else
write(6,9110)
format(//’ solving newton’’s equation’)
endif
if (inte.eq.-1)call minimize
if (inte.eq. 1)call nordint
c
write(6,9120)
9120 format(’ ****** solution finished’)
c
c unscale the coordinates
c
call colect
call uscale
return
end
I.3.2 Lattice generation subroutines and functions
initlat
c*******************************************************************
c
c initlat initializes the positions and velocities of the atoms
c
subroutine initlat
include ’vap.inc’
logical genlat,genvel,gendis,sort
character*80 initf
dimension scale(3),origin(3)
data genlat,genvel,gendis,sort/4*.false./
data scale/3*-9999./
data dismag/0.1/
data disxmin,disymin,diszmin/3*-1.e6/,disxmax,disymax,
*diszmax/3*1.e6/
namelist /vaporcard/ ivapor,type1,fraction1,type2,
*fraction2,evapor,depdir,vdep,TbndV,nTbnd,ratio,inert,dtadd,
*devapor,einert,inertvary,subspin,vdepreal,timelayer,
*dimer,dimdis,dimdd
namelist /initcard/ initf,genlat,genvel,gendis,dismag,sort
1,scale,disxmin,disxmax,disymin,disymax,diszmin,diszmax
ivapor=0
type1(1)=1
type2(1)=2
fraction1(1)=1.0
fraction2(1)=1.0
evapor=1.0
depdir(1)=.0
depdir(2)=.0
depdir(3)=.0
vdep=200000.0
TbndV=.0
nTbnd=0
ratio=.0
initf=’none’
inert=5
dtadd=.0
nboxn1=nboxn-1
devapor=.0
einert=.0
inertvary=0
235
APPENDIX I. MOLECULAR DYNAMICS CODE
41
c
c
c
vdepreal=8.0e-8
subspin=.0
depdirtime=.0
timelayer(1)=200.0
timelayer(2)=-1.0
do 41 i=1,nelmax
dimer(i)=1.0
continue
dimdis=2.1
dimdd=0.3
determine how the program is to be initialized
read(5,vaporcard)
timehlayer(1)=.5*timelayer(1)
if (timelayer(2) .eq. -1.0) timelayer(2)=timelayer(1)
timehlayer(2)=.5*timelayer(2)
if (ivapor .eq. 1) then
fsum1=0.0
fsum2=0.0
do 401 i=1,5
inttyp=type1(i)
if (inttyp .ne. 0 .and. dimer(inttyp) .ne. 0)
*
fsum1=fsum1+fraction1(i)/dimer(inttyp)
inttyp=type2(i)
if (inttyp .ne. 0 .and. dimer(inttyp) .ne. 0)
*
fsum2=fsum2+fraction2(i)/dimer(inttyp)
401
continue
do 402 i=1,5
inttyp=type1(i)
if (inttyp .ne. 0 .and. dimer(inttyp) .ne. 0)
*
fraction1(i)=fraction1(i)/(dimer(inttyp)*fsum1)
inttyp=type2(i)
if (inttyp .ne. 0 .and. dimer(inttyp) .ne. 0)
*
fraction2(i)=fraction2(i)/(dimer(inttyp)*fsum2)
402
continue
do 88 i=2,5
fraction1(i)=min(1.0,fraction1(i-1)+fraction1(i))
fraction2(i)=min(1.0,fraction2(i-1)+fraction2(i))
88
continue
if (subspin .gt. .0) depdirtime=6.0*vdep/vdepreal*subspin*
*1.0e-12
c code changed by Dewey on 4/25/2005 (match idea by XZ)
c
if (TbndV .gt. .0) TbndV=TbndV/100000.0
c
if (TbndV .eq. -1.0) TbndV=vdep/100000.0
if (TbndV .gt. .0) then
TbndV=TbndV/100000.0
endif
evaporline=vdep/100000.0*2.0
endif
read(5,initcard)
c
c
initf of ’none’ indicates that no restart file is available
c
if (initf(1:4).eq.’NONE’.or.initf(1:4).eq.’none’) then
c
c if no restart file, generate position and velocity and also sort
c
sort = .true.
genvel = .true.
genlat = .true.
else
open(unit=22,file=initf,form=’FORMATTED’,
1
status=’OLD’)
236
APPENDIX I. MOLECULAR DYNAMICS CODE
9135
1
c
c
c
c
c
write(6,9135)initf
format(/,/,1x,’******
using restart’,/,
’ reading in initial file named ’,a80)
call restart
close(22)
endif
generate a lattice if requested
if lattice generation not requested, read in latcard and ignore
its contents
if (genlat) then
call latgen
else
call latdum(density,ivapor)
end if
c
c
c
check that the number of atoms is not too large
if (natoms.gt.natmax) then
write(6,9160) natoms,natmax
9160
format(’ natoms=’,i10,’ is greater than natmax=’,i10)
stop
end if
c
c
c
sort lattice if requested
if (sort) call sorter
c
c
c
scale the lattice if requested
if
if
if
if
9010
1
100
110
c
c
c
(scale(1).eq.-9999.) scale(1) = 1.
(scale(2).eq.-9999.) scale(2) = scale(1)
(scale(3).eq.-9999.) scale(3) = scale(1)
(scale(1).ne.1..or.scale(2).ne.1..or.scale(3).ne.1.) then
write(6,9010) (scale(j),j=1,3)
format(1x,’***************’,/,’ scaling lattice by ’,3g13.5,
/,’***************’)
do 110 i = 1,3
perlen(i) = scale(i)*(perub(i)-perlb(i))
perlenH(i)=0.5*perlen(i)
origin(i) = 0.5*(perlb(i)+perub(i))
perub(i) = origin(i) + 0.5*perlen(i)
perlb(i) = perub(i) - perlen(i)
do 100 j = 1,natoms
rv(i,j) = origin(i) + scale(i)*(rv(i,j)-origin(i))
continue
continue
endif
check periodicity
call chkper
c
c
c
generate random displacements if requested
if (gendis) call disgen(dismag,disxmin,disxmax,disymin,
*disymax,diszmin,diszmax)
c
c
c
c
generate the velocities if requested
if velocities not requested, read velcard and ignore its contents
if (genvel) then
call velgen
237
APPENDIX I. MOLECULAR DYNAMICS CODE
else
call veldum
end if
c
c
c
check that all types have been defined
call chktyp
c
if (ivapor .eq. 1) then
if (density .le. .0) then
write(6,*) ’density not defined’
stop
endif
if (dtadd .eq. .0) then
dtadd=(perub(1)-perlb(1))*(perub(3)-perlb(3))*vdep*
*density*1.0e-5
dtadd=1.0/dtadd
endif
write(6,*)’dtadd=’,dtadd
endif
return
end
restart
c****************************************************************************
c
c this subroutine reads in the parameters required to restart
c a run from fortran file 22
c
subroutine restart
include ’vap.inc’
character*80 header
c
c note that the old header is not passed to the rest of the
c program
c
read(22,9501,end=8000) header
9501 format(a80)
write(6,9001)header
9001 format(/,’ previous header:’,/,3x,a80,/)
read(22,9502) natoms,ntyp,t0
9502 format(2i10,e15.8)
c
c check that the number of atoms is not too large
c
if (natoms.gt.natmax) then
write(6,9901) natoms,natmax
9901
format(1x,’natoms=’,i6,’ is greater than natmax=’,i6)
stop
end if
c
write(6,9002)natoms,ntyp
9002 format(1x,i10,’ atoms’,i10,’ particle types’)
write(6,9003) t0
9003 format(1x,’final time of previous run: ’,f10.3)
read(22,9503) (perub(i),i=1,3),(perlb(i),i=1,3)
9503 format(3e25.16)
read(22,9504) (amass(i),ielement(i),i=1,ntyp)
9504 format(e25.16,i10)
read(22,9505) ((rv(i,j),i=1,6),itype(j),j=1,natoms)
9505 format(3e25.16/3e25.16/i10)
read(22,9503,end=200) (bndvel(i),i=1,3)
238
APPENDIX I. MOLECULAR DYNAMICS CODE
goto 1000
continue
do 210 i = 1,3
bndvel(i) = 0.0
write(6,9201)
format(1x,’no bndvel available, zero assumed’)
200
210
9201
c
c
c
1000
print out types
continue
write(6,9100)
9100 format(’ restart uses these types: ’)
write(6,9102)
9102 format(’
type element
amass ’,/,
1
’
---- ---------------’)
write(6,9103)(i,ielement(i),amass(i),i=1,ntypes)
9103 format(1x,i4,i9,2x,g11.4)
c
c
c
compute perlen
100
9031
9032
9033
9034
8000
do 100 i = 1,3
perlen(i) = perub(i) - perlb(i)
perlenH(i)=0.5*perlen(i)
continue
write(6,9031)
format(’ periodicity
’,15x,’x’,14x,’y’,14x,’z’)
write(6,9032)perlb
format(’ lower periodic bound ’,3g15.5)
write(6,9033)perub
format(’ upper periodic bound ’,3g15.5)
write(6,9034)perlen
format(’ length
’,8x,3g15.5)
return
end
latgen
subroutine latgen
include ’vap.inc’
character*8 lattype
dimension avec(3),bvec(3),cvec(3),xrot(3),yrot(3),zrot(3)
dimension xold(3),yold(3),zold(3),avecp(3),bvecp(3),cvecp(3)
dimension roter(3,3),aperub(3),aperlb(3)
dimension axbnd(2),aybnd(2),azbnd(2)
dimension rcell(3,10),ccell(nelmax,10),rcellp(3,10)
common /iran/ iseed
data iseed0/87654321/
c
c
c
default values for namelist
data lattype/’none’/,xrot/3*0./,yrot/3*0./,zrot/3*0./
data xold/1.,0.,0./,yold/0.,1.,0./,zold/0.,0.,1./
data avec/3*0.0/,bvec/3*0.0/,cvec/3*0.0/
data aperlb/3*-9999./,aperub/3*9999./
data axbnd/-9999.,9999./,aybnd/-9999.,9999./,azbnd/-9999.,9999./
data ncell/1/
data rcell/30*0./
namelist /latcard/ lattype,avec,bvec,cvec,alat,xrot,yrot,zrot,
1perub,perlb,xbound,ybound,zbound,aperub,aperlb,axbnd,aybnd,
2azbnd,ncell,rcell,ccell,iseed
alat=3.52
perub(1)=9999.0
perub(2)=9999.0
239
APPENDIX I. MOLECULAR DYNAMICS CODE
perub(3)=9999.0
perlb(1)=-9999.0
perlb(2)=-9999.0
perlb(3)=-9999.0
xbound(1)=-9999.0
xbound(2)=9999.0
ybound(1)=-9999.0
ybound(2)=9999.0
zbound(1)=-9999.0
zbound(2)=9999.0
c
1
c
c
c
do 1 i = 1,nelmax
do 1 j = 1,10
ccell(i,j) = 0.
continue
ccell(1,1) = 1.
start the time clock at 0 for a generated configuration
t0 = 0.0
c
c
c
read the lattice parameters
read(5,latcard)
if (iseed .le. 0) iseed=iseed0
c Dewey added this code on 12/13/2004
print *, "randseed (genlat): ", iseed
c Dewey added this code on 8/2/2005
aaa=rand(iseed)
c
c if no periodic bounds set, assume a 4 period cube and scale the
c periodic lengths from units of lattice constants to real units
c
do 3 i = 1,3
if (perlb(i).le.-9998..and.aperlb(i).le.-9998.) aperlb(i) = -2.0
if (perub(i).ge.9998..and.aperub(i).ge.9998.) aperub(i) = 2.0
if (perlb(i).le.-9998.) perlb(i) = alat*aperlb(i)
if (perub(i).ge.9998.) perub(i) = alat*aperub(i)
3
continue
c
c set the x,y,and z bounds to fill the periodic bounds if they have not
c been set by the user
c
if (axbnd(1).gt.-9998.) xbound(1) = alat*axbnd(1)
if (aybnd(1).gt.-9998.) ybound(1) = alat*aybnd(1)
if (azbnd(1).gt.-9998.) zbound(1) = alat*azbnd(1)
if (axbnd(2).lt.9998.) xbound(2) = alat*axbnd(2)
if (aybnd(2).lt.9998.) ybound(2) = alat*aybnd(2)
if (azbnd(2).lt.9998.) zbound(2) = alat*azbnd(2)
if (xbound(1).le.-9998.) xbound(1) = perlb(1) + 0.01
if (xbound(2).ge.9998.) xbound(2) = perub(1) + 0.01
if (ybound(1).le.-9998.) ybound(1) = perlb(2) + 0.01
if (ybound(2).ge.9998.) ybound(2) = perub(2) + 0.01
if (zbound(1).le.-9998.) zbound(1) = perlb(3) + 0.01
if (zbound(2).ge.9998.) zbound(2) = perub(3) + 0.01
c
c see if primitive lattice vectors have been defined
c if not, find them using lattype
c
if lattype is not defined from namelist, then use latty of
c
first atom type
primdef = (avec(1)**2 + avec(2)**2 + avec(3)**2)*
1(bvec(1)**2 + bvec(2)**2 + bvec(3)**2)*
2(cvec(1)**2 + cvec(2)**2 + cvec(3)**2)
if(primdef.ne.0.0)then
240
APPENDIX I. MOLECULAR DYNAMICS CODE
if (ivapor .eq. 1 .and. lattype .eq. ’none’) then
write(6,*) ’unknown lattype’
stop
else
if (ivapor .ne. 1) lattype = ’none’
endif
else
if(lattype.eq.’none’)lattype = ’fcc’
call storelat(lattype,avec,bvec,cvec)
endif
if (ivapor .eq. 1) then
density=-100.0
if (lattype .eq. ’fcc’) density=4.0/alat**3*real(ncell)
if (lattype .eq. ’bcc’) density=2.0/alat**3
if (lattype .eq. ’sc’) then
write(6,*)’Vapor Deposition not available in sc Materials’
stop
endif
endif
if(lattype.ne.’none’) then
write(6,9115)lattype
end if
format(//’ ****** generating ’,a8,’ lattice ’)
write(6,9116)avec,bvec,cvec
format(’ primitive lattice vectors ’,3f5.2,3x,3f5.2,3x,3f5.2)
xnorm = snrm2(3,xrot,1)
ynorm = snrm2(3,yrot,1)
znorm = snrm2(3,zrot,1)
9115
9116
c
c
c
if two defined, find missing one from them
if((xnorm.ne.0.0).and.(ynorm.ne.0.0).and.(znorm.eq.0.0))
call cross(zrot,xrot,yrot)
if((ynorm.ne.0.0).and.(znorm.ne.0.0).and.(xnorm.eq.0.0))
1
call cross(xrot,yrot,zrot)
if((znorm.ne.0.0).and.(xnorm.ne.0.0).and.(ynorm.eq.0.0))
1
call cross(yrot,zrot,xrot)
1
c
c
c
if none or only one defined, set equal to no rotation
if((xnorm*ynorm.eq.0.0).and.(xnorm*znorm.eq.0.0).
1and.(ynorm*znorm.eq.0.0))then
call scopy(3,xold,1,xrot,1)
call scopy(3,yold,1,yrot,1)
call scopy(3,zold,1,zrot,1)
endif
c
c
c
5
10
c
c
c
normalize the unit vectors and define rotation matrix
xnorm = snrm2(3,xrot,1)
ynorm = snrm2(3,yrot,1)
znorm = snrm2(3,zrot,1)
do 5 i=1,3
xrot(i) = xrot(i)/xnorm
yrot(i) = yrot(i)/ynorm
zrot(i) = zrot(i)/znorm
continue
do 10 i=1,3
do 10 j=1,3
roter(i,j)= xold(i)*xrot(j) + yold(i)*yrot(j) + zold(i)*zrot(j)
continue
rotate avec,bvec,cvec
241
APPENDIX I. MOLECULAR DYNAMICS CODE
20
800
801
30
do 20 i=1,3
avecp(i)=0.0
bvecp(i)=0.0
cvecp(i)=0.0
do 20 j=1,3
avecp(i) = avecp(i) + roter(i,j)*avec(j)
bvecp(i) = bvecp(i) + roter(i,j)*bvec(j)
cvecp(i) = cvecp(i) + roter(i,j)*cvec(j)
do 800 j1=1,ncell
do 800 i1=1,3
rcellp(i1,j1)=0.0
do 800 j2=1,3
rcellp(i1,j1)=rcellp(i1,j1)+roter(i1,j2)*rcell(j2,j1)
continue
do 801 i=1,3
do 801 j=1,ncell
rcell(i,j)=rcellp(i,j)*0.5*alat
continue
do 30 i=1,3
avec(i) = avecp(i)
bvec(i) = bvecp(i)
cvec(i) = cvecp(i)
write(6,9216)avec,bvec,cvec
format(’ rotated lattice vectors
’,3f5.2,3x,3f5.2,3x,3f5.2)
9216
c
c compute perlen
c
do 50 i = 1,3
perlen(i) = perub(i) - perlb(i)
perlenH(i)=0.5*perlen(i)
50
continue
c
c
half-lattice constant (angstroms)
c
ahlc = 0.5*alat
write(6,9030)ahlc
9030 format(’ half-lattice constant = ’,g15.5)
write(6,9031)
9031 format(’
’,15x,’x’,14x,’y’,14x,’z’)
write(6,9032)xbound(1),ybound(1),zbound(1)
9032 format(’ lower cell bound
’,3g15.5)
write(6,9033)xbound(2),ybound(2),zbound(2)
9033 format(’ upper cell bound
’,3g15.5)
write(6,9034)perlb
9034 format(’ lower periodic bound ’,3g15.5)
write(6,9035)perub
9035 format(’ upper periodic bound ’,3g15.5)
write(6,9036)perlen
9036 format(’ length
’,8x,3g15.5)
xlen = max(abs(avec(1)),abs(bvec(1)),abs(cvec(1)))*ahlc
ylen = max(abs(avec(2)),abs(bvec(2)),abs(cvec(2)))*ahlc
zlen = max(abs(avec(3)),abs(bvec(3)),abs(cvec(3)))*ahlc
nsidex = int((xbound(2)-xbound(1))/xlen) + 2
nsidey = int((ybound(2)-ybound(1))/ylen) + 2
nsidex = max(nsidex,nsidey)
nsidez = int((zbound(2)-zbound(1))/zlen) + 2
nsidex = max(nsidex,nsidez)
nsidex = 2*nsidex
ncentx = int(0.6 + 0.5*real(nsidex))
do 190 l = 1,ncell
do 190 m = 2,ntypes
ccell(m,l) = min(1.,ccell(m-1,l) + ccell(m,l))
190
continue
natoms = 0
242
APPENDIX I. MOLECULAR DYNAMICS CODE
201
200
do 200 i=1,nsidex
ii = i - ncentx
do 200 k=1,nsidex
kk = k - ncentx
do 200 j=1,nsidex
jj = j - ncentx
xc = ahlc*(ii*avec(1) + jj*bvec(1) + kk*cvec(1))
yc = ahlc*(ii*avec(2) + jj*bvec(2) + kk*cvec(2))
zc = ahlc*(ii*avec(3) + jj*bvec(3) + kk*cvec(3))
do 200 l = 1,ncell
xt = xc + rcell(1,l)
yt = yc + rcell(2,l)
zt = zc + rcell(3,l)
if(xt.ge.xbound(2))go to 200
if(xt.lt.xbound(1))go to 200
if(yt.ge.ybound(2))go to 200
if(yt.lt.ybound(1))go to 200
if(zt.ge.zbound(2))go to 200
if(zt.lt.zbound(1))go to 200
tst = rand(0)
it = 0
do 201 m=ntypes,1,-1
if (tst.lt.ccell(m,l)) it = m
if (it.le.0.or.it.gt.ntypes) goto 200
natoms = natoms + 1
if(natoms.gt.natmax)go to 300
itype(natoms) = it
rv(1,natoms) = xt
rv(2,natoms) = yt
rv(3,natoms) = zt
continue
return
c
300 write(6,9601)natmax
9601 format(’
number of atoms generated exceeds maximum dimension:’
1 ,i10)
return
end
latdum
c*******************************************************************
c
c dummy program to read the latcard namelist entry
c
subroutine latdum(density,ivapor)
character*80 lattype
dimension avec(3),bvec(3),cvec(3),xrot(3),yrot(3),zrot(3)
dimension perub(3),perlb(3),xbound(2),ybound(2),zbound(2)
dimension aperub(3),aperlb(3),axbnd(2),aybnd(2),azbnd(2)
dimension rcell(3,10),ccell(3,10)
common /iran/ iseed
namelist /latcard/ lattype,avec,bvec,cvec,alat,xrot,yrot,zrot,
1perub,perlb,xbound,ybound,zbound,aperub,aperlb,axbnd,aybnd,
2azbnd,ncell,rcell,ccell,iseed
data iseed0/87654321/
alat=3.52
zrot(1)=1.0
zrot(2)=1.0
zrot(3)=1.0
c
c read the namelist latcard. note that the values are discarded.
c
243
APPENDIX I. MOLECULAR DYNAMICS CODE
read(5,latcard)
call setalat(alat)
if (iseed .le. 0) iseed=iseed0
c Dewey added this code on 12/13/2004
print *, "randseed (latdum): ", iseed
c Dewey added this code on 8/2/2005
aaa=rand(iseed)
if (ivapor .eq. 1) then
if (lattype .eq. ’none’) then
write(6,*) ’unknown lattype’
stop
else
density=-100.0
if (lattype .eq. ’fcc’) density=4.0/alat**3*real(ncell)
if (lattype .eq. ’bcc’) density=2.0/alat**3
if (lattype .eq. ’sc’) then
write(6,*)’Vapor Deposition not available in sc Materials’
stop
endif
endif
endif
return
end
setalat
subroutine setalat(a)
include ’vap.inc’
alat=a
return
end
cross
subroutine cross(z,x,y)
dimension z(3),x(3),y(3)
z(1) = x(2)*y(3) - x(3)*y(2)
z(2) = x(3)*y(1) - x(1)*y(3)
z(3) = x(1)*y(2) - x(2)*y(1)
return
end
snrm2
100
function snrm2(n,x,inc)
dimension x(1)
ilast = n*inc
sum = 0.
do 100 i = 1,ilast,inc
sum = sum + x(i)**2
continue
snrm2 = sqrt(sum)
return
end
scopy
subroutine scopy(n,x,incx,y,incy)
dimension x(1),y(1)
244
APPENDIX I. MOLECULAR DYNAMICS CODE
100
do 100 i = 0,n-1
jx = 1 + i*incx
jy = 1 + i*incy
y(jy) = x(jx)
continue
return
end
storelat
subroutine storelat(latty,avec,bvec,cvec)
character*8 lstored(10),latty
dimension avecs(3,10),bvecs(3,10),cvecs(3,10)
dimension avec(3),bvec(3),cvec(3)
data lstored/’fcc
’,’bcc
’,’sc
’,7*’
’/
data avecs/1.,1.,0., 1.,1.,-1., 2.,0.,0., 21*0.0/
data bvecs/0.,1.,1., -1.,1.,1., 0.,2.,0., 21*0.0/
data cvecs/1.,0.,1., 1.,-1.,1., 0.,0.,2., 21*0.0/
c
primitive lattice vectors given in terms of half-lattice constants
imatch = 0
do 10 i=1,10
if(latty.ne.lstored(i))go to 10
imatch = 1
do 5 j=1,3
avec(j) = avecs(j,i)
bvec(j) = bvecs(j,i)
cvec(j) = cvecs(j,i)
5
continue
10
continue
if(imatch.eq.1)return
write(6,15)latty
15
format(’
could not find lattice type ’,a8,
1’. assume default type.’)
c assume default
i = 1
latty = lstored(i)
do 20 j=1,3
avec(j) = avecs(j,i)
bvec(j) = bvecs(j,i)
cvec(j) = cvecs(j,i)
20
continue
return
end
readef
c*****************************************************************************
c
c the subroutine readef reads in the defcards
c
subroutine readef(ndef)
include ’vap.inc’
integer type,oldtype,newtype
dimension num(2),pos(3),delpos(3),vel(3)
namelist /defcard/ num,oldtype,pos,delpos,vel,newtype,
1
xmin,xmax,ymin,ymax,zmin,zmax
c
c initialize the count of the number of real defcards
c
ndef = 0
100
continue
c
245
APPENDIX I. MOLECULAR DYNAMICS CODE
c
c
10
c
c
c
set all the values of the namelist variables to their default values
newtype = 99
oldtype = 99
type = 99
num(1) = -1
num(2) = -1
do 10 i = 1,3
pos(i) = 9999.
delpos(i) = 0.
vel(i) = 9999.
continue
xmin = -9999.
xmax = 9999.
ymin = -9999.
ymax = 9999
zmin = -9999.
zmax = 9999.
read in the next defcard and check to see if anyting is changed
read(5,defcard)
if (newtype.ne.99) type=newtype
if (num(1).ne.-1) goto 1000
if (type.ne.99) goto 1000
if (oldtype.ne.99) goto 1000
if (xmin.ne.-9999..or.xmax.ne.9999.) goto 1000
if (ymin.ne.-9999..or.ymax.ne.9999.) goto 1000
if (zmin.ne.-9999..or.zmax.ne.9999.) goto 1000
if (delpos(1).ne.0.) goto 1000
if (delpos(2).ne.0.) goto 1000
if (delpos(3).ne.0.) goto 1000
c
c
c
nothing changed so return
return
c
1000 continue
c
c there is a nontrivial defcard
c
ndef = ndef + 1
write(6,defcard)
c
c branch depending on whether the defects are specified by number or position
c
if (num(1).ne.-1) goto 1500
c
c specified by position
c
do 1100 i = 1,natoms
if (rv(1,i).lt.xmin.or.rv(1,i).gt.xmax) goto 1100
if (rv(2,i).lt.ymin.or.rv(2,i).gt.ymax) goto 1100
if (rv(3,i).lt.zmin.or.rv(3,i).gt.zmax) goto 1100
if (oldtype.ne.99.and.itype(i).ne.oldtype) goto 1100
if (type.ne.99) itype(i) = type
do 1110 j = 1,3
if (pos(j).ne.9999.) then
rv(j,i) = pos(j)
else
rv(j,i) = rv(j,i) + delpos(j)
endif
if (vel(j).ne.9999.) rv(3+j,i) = vel(j)
1110 continue
246
APPENDIX I. MOLECULAR DYNAMICS CODE
1100
continue
goto 100
c
c specified by number
c
1500 continue
if (num(2).eq.-1) num(2) = num(1)
c
c creating a new atom
c
if (num(1).eq.0) then
natoms = natoms + 1
n = natoms
if (type.ne.99) then
itype(n) = type
else
itype(n) = 1
endif
do 1605 j = 1,3
rv(j,n) = pos(j)
if (vel(j).eq.9999.) then
rv(3+j,n) = 0.
else
rv(3+j,n) = vel(j)
endif
1605
continue
else
c
c modify existing atoms
c
do 1600 i = num(1),num(2)
if (oldtype.ne.99.and.itype(i).ne.oldtype) goto 1600
if (type.ne.99) itype(i) = type
do 1610 j = 1,3
if (pos(j).ne.9999.) then
rv(j,i) = pos(j)
else
rv(j,i) = rv(j,i) + delpos(j)
endif
if (vel(j).ne.9999.) then
rv(3+j,i) = vel(j)
else
rv(3+j,i) = 0.
endif
1610
continue
1600
continue
endif
goto 100
end
delvac
c***************************************************************
c
deletes vacancies
c
subroutine delvac
include ’vap.inc’
c
c
c
delete vacancies
j = 0
do 30 i=1,natoms
if(itype(i).eq.0)go to 30
247
APPENDIX I. MOLECULAR DYNAMICS CODE
j = j + 1
itype(j) = itype(i)
do 20 k=1,6
20
rv(k,j) = rv(k,i)
30
continue
ndel = natoms - j
natoms = j
write(6,9000)ndel,natoms
9000 format(//’ deleted ’,i10,’ vacancies’/
1,i10,’ atoms left’)
nforce1=0
return
end
sorter
c***************************************************************
c
sorts atoms
c
subroutine sorter
include ’vap.inc’
dimension idum1(natmax),idum2(natmax),dum1(natmax),
1
idum3(natmax)
dimension rmult(3)
c
c
c set newlst = 1 to insure that a new neighbor list will be
c determined
c
newlst = 1
c
c
order according to non-periodic directions first
c
permax = amax1(perlen(1),perlen(2),perlen(3))
if(permax.ge.1000.)then
call m01aaf(perlen,1,3,idum1,idum2,ifail)
rmult(1) = 10**(4*idum1(1)-3)
rmult(2) = 10**(4*idum1(2)-3)
rmult(3) = 10**(4*idum1(3)-3)
do 40 i=1,natoms
dum1(i) = rmult(1)*(rv(1,i)-xbound(1)) +
1
rmult(2)*(rv(2,i)-ybound(1)) + rmult(3)*(rv(3,i)-zbound(1))
40
continue
write(6,9010)idum1(1),idum1(2),idum1(3)
9010 format(//’ ****** sorting according to following hierarchy:’,
1/’
x
y
z’,
2/1x,3i6)
else
do 45 i=1,natoms
dum1(i) = rv(1,i)**2 + rv(2,i)**2 + rv(3,i)**2
45
continue
write(6,9015)
9015 format(//’ ****** sorting according to distance from origin’)
endif
call m01aaf(dum1,1,natoms,idum1,idum2,ifail)
if(ifail.ne.0)write(6,9020)ifail
9020 format(’
trouble in sorting routine
’,i5)
do 50 i = 1,natoms
50
idum3(idum1(i)) = itype(i)
do 52 i = 1,natoms
52
itype(i) = idum3(i)
do 60 k = 1,6
do 62 i = 1,natoms
248
APPENDIX I. MOLECULAR DYNAMICS CODE
62
64
60
dum1(idum1(i)) = rv(k,i)
do 64 i = 1,natoms
rv(k,i) = dum1(i)
continue
return
end
velgen
c***************************************************************
c
c this routine produces random velocities with a boltzman
c distribution appropriate to temp
c
(the center of mass velocity is set to zero)
c
subroutine velgen
include ’vap.inc’
dimension vcm(3)
data boltz/8.617e-5/
namelist /velcard/ temp
c
c
c
temperature in degrees kelvin
c
generate velocities in angstroms/picosecond
c
temp = 0.0
read(5,velcard)
c
c
convert temp to eV
c
tempin = temp * boltz
c
c
mass is in eV-psec**2/Angstroms**2
c
tmass = 0.0
do 110 i=1,natoms
it = itype(i)
vnorm = sqrt(tempin/amass(it))
do 105 jc=4,5
rv(jc,i) = vnorm*rgauss()
vcm(jc-3) = vcm(jc-3) + amass(it)*rv(jc,i)
105
continue
rv(6,i)=vnorm*rgauss()
vcm(3) = vcm(3) + amass(it)*rv(6,i)
tmass = tmass + amass(it)
110
continue
c
c
also ensure that the center of mass is not drifting
c
do 200 jc=1,3
200 vcm(jc)=vcm(jc)/tmass
do 300 jc=4,6
do 300 i=1,natoms
300 rv(jc,i)=rv(jc,i)-vcm(jc-3)
c
c compute the kinetic energy
c
ekin=0.0
do 320 i=1,natoms
v2 = rv(4,i)**2 + rv(5,i)**2 + rv(6,i)**2
320 ekin = ekin + amass(itype(i))*v2
ekin = ekin*0.5
c
249
APPENDIX I. MOLECULAR DYNAMICS CODE
c
c
compute the actual temperature
tempact = 7736.6*ekin/real(natoms)
c
c
c
scale the velocities to get the exact temperature
if (tempact.gt.0.) then
scalev = sqrt(temp/tempact)
else
if (temp.le.0.0) then
scalev = 0.
else
write(6,*)’error in velgen’
stop
endif
endif
do 350 jc=4,6
do 350 i=1,natoms
rv(jc,i) = rv(jc,i)*scalev
350
c
c finally set the initial boundary velocities to zero
c
do 400 i = 1,3
400
bndvel(i) = 0.0
return
end
veldum
c***************************************************************
c
c dummy program to read the namelist card velcard
c
subroutine veldum
namelist /velcard/ temp
read(5,velcard)
return
end
disgen
c***************************************************************
c
c this routine produces random displacements to move the
c atom positions off of symmetric saddple points
c
subroutine disgen(dismag,disxmin,disxmax,disymin,disymax,
*diszmin,diszmax)
include ’vap.inc’
c
c
c generate small random displacements to
c push system off of symmetric extremum
c
write(6,9020)
9020 format(//’ ****** generating small random displacements’ )
do 50 i=1,natoms
if (rv(1,i) .le. disxmin) goto 50
if (rv(1,i) .ge. disxmax) goto 50
if (rv(2,i) .le. disymin) goto 50
if (rv(2,i) .ge. disymax) goto 50
if (rv(3,i) .le. diszmin) goto 50
250
APPENDIX I. MOLECULAR DYNAMICS CODE
51
50
251
if (rv(3,i) .ge. diszmax) goto 50
do 51 ic=1,3
rv(ic,i) = rv(ic,i) + 2.*dismag*(rand(0)-0.5)
continue
continue
return
end
I.3.3 Timing routines
The timing routines utilized, initsec, seconds, and mytime, are dependent upon the system on which the code is compiled. The timing functions that work on Linux-based Intel
and AMD machines and Sparc workstations are uncommented.
c************************************************************************
c
c
the following three functions provide timing information
c
c***********************************************************************
c
c timing routines
c
c
subroutine initsec()
c
common /seccom/ start
c
start=mclock()/100.0
c
return
c
end
c
function seconds()
c
common /seccom/ start
c
seconds=mclock()/100.0-start
c
return
c
end
c
subroutine mytime(timestr)
c
integer*4 time
c
character*24 timestr
c
call ctime_(timestr,time())
c
return
c
end
c************************************************************************
c
c The following timing functions run on sparc stations
c
c************************************************************************
subroutine initsec()
implicit real(a-h,o-z)
real*4 tarray(2),start,etime
common /seccom/ start
start = etime(tarray)
return
end
function seconds()
implicit real(a-h,o-z)
real*4 tarray(2),start,etime
common /seccom/ start
APPENDIX I. MOLECULAR DYNAMICS CODE
252
t = etime(tarray) - start
seconds = t
return
end
subroutine mytime(timestr)
character*24 timestr,ctime
integer*4 time
timestr = ctime(time())
return
end
I.3.4 Miscellaneous subroutines and functions (sorting, Gaussian, scaling, and periodicity)
m01aaf
c*******************************************************************
subroutine m01aaf(a,ii,jj,ip,ia,ifail)
c*****************************************************************
c
c subroutine qsort is a quick sort algorithm designed to look
c like the nag routine m01aaf
c
c a is the input array to be sorted
c
(a is unchanged after the sort)
c ii,jj are the bounds of the part of the array to be sorted
c ip(i) = position of a(i) in the sorted list
c ia(i) = index of the ith element in the sorted list
c
(i.e. the elements in order are a(ia(i))
c ifail is a error message
c
c the algorithm is taken from Richard C. Singleton
c
Communications of the ACM, vol. 12 Number 3, March 1969, p. 185
c
(Algorithm 347)
c
dimension a(jj),ia(jj),ip(jj),iu(16),il(16)
ifail = 0
if (ii.gt.jj) ifail = 1
if (ii.lt.1) ifail = 2
if (jj.lt.1) ifail = 3
if (ifail.ne.0) return
do 2 i = ii,jj
2
ia(i) = i
m = 1
i = ii
j = jj
5
if (i.ge.j) goto 70
10
k = i
ij = (i+j)/2
t = a(ij)
it = ia(ij)
if (a(i).le.t) goto 20
a(ij) = a(i)
a(i) = t
t = a(ij)
ia(ij) = ia(i)
ia(i) = it
it = ia(ij)
20
l = j
if (a(j) .ge. t) goto 40
a(ij) = a(j)
APPENDIX I. MOLECULAR DYNAMICS CODE
30
40
50
60
70
80
90
100
1000
a(j) = t
t = a(ij)
ia(ij) = ia(j)
ia(j) = it
it = ia(ij)
if (a(i) .le. t) goto 40
a(ij) = a(i)
a(i) = t
t = a(ij)
ia(ij) = ia(i)
ia(i) = it
it = ia(ij)
goto 40
a(l) = a(k)
a(k) = tt
ia(l) = ia(k)
ia(k) = itt
l = l - 1
if (a(l) .gt. t) goto 40
tt = a(l)
itt = ia(l)
k = k + 1
if (a(k) .lt. t) goto 50
if (k .le. l) goto 30
if (l-i .le. j-k) goto 60
il(m) = i
iu(m) = l
i = k
m = m + 1
goto 80
il(m) = k
iu(m) = j
j = l
m = m + 1
goto 80
m = m - 1
if (m .eq. 0) goto 1000
i = il(m)
j = iu(m)
if (j-i .ge. ii) goto 10
if (i .eq. ii) goto 5
i = i - 1
i = i + 1
if (i .eq. j) goto 70
t = a(i+1)
it = ia(i+1)
if (a(i) .le. t) goto 90
k = i
a(k+1) = a(k)
ia(k+1) = ia(k)
k = k - 1
if (t .lt. a(k)) goto 100
a(k+1) = t
ia(k+1) = it
goto 90
continue
do 1100 i = ii,jj
ip(ia(i)) = i
1100
c
c now return the data to the original order
c
do 2000 k = ii,jj
if (ia(k).lt.0) goto 2000
k1 = k
253
APPENDIX I. MOLECULAR DYNAMICS CODE
2100
2000
2200
ik1 = ia(k1)
temp = a(k1)
continue
ia(k1) = -ia(k1)
store = a(ik1)
a(ik1) = temp
temp = store
k1 = ik1
ik1 = ia(k1)
if (ik1.gt.0) goto 2100
continue
do 2200 k = ii,jj
ia(k) = -ia(k)
return
end
rgauss
function rgauss()
implicit real(a-h,o-z)
data twopi/6.283185308/
10 continue
a1 = rand(0)
if (a1.eq.0.) goto 10
a2 = rand(0)
rgauss = sqrt(-2.*log(a1))*cos(twopi*a2)
return
end
colect
c********************************************************************
c
c this subroutine puts all the particles back into the basic
c periodic cell.
c
subroutine colect
include ’vap.inc’
c
c determine the type of variable scaling used
c
goto (1000,2000) ibdtyp
write(6,9001) ibdtyp
9001 format(1x,’undefined scaling method ibdtyp=’,i3)
stop
c
1000 continue
c
c ibdtyp = 1
c
no scaling
c
do 1100 j = 1,3
do 1100 i = 1,natoms
if (y(j,i).lt.perlb(j)) y(j,i) = y(j,i) + perlen(j)
if (y(j,i).ge.perub(j)) y(j,i) = y(j,i) - perlen(j)
1100 continue
return
c
c ibdtyp = 2
c
dynamic periodic lengths rectangular orientation
c
2000 continue
254
APPENDIX I. MOLECULAR DYNAMICS CODE
2100
do 2100 j = 1,3
do 2100 i = 1,natoms
if (y(j,i).lt.0.0) y(j,i) = y(j,i) + 1.0
if (y(j,i).ge.1.0) y(j,i) = y(j,i) - 1.0
continue
return
end
compscale
subroutine compscale
include ’vap.inc’
c
c
c
determine the type of variable scaling used
9001
goto (1000,2000) ibdtyp
write(6,9001) ibdtyp
format(1x,’undefined boundary type:
stop
ibdtyp=’,i3)
c
1000 continue
c
c ibdtyp = 1
c
fixed boundaries no scaling
c
do 1100 j = 1,6
do 1100 i = 1,natoms
1100 y(j,i) = rv(j,i)
return
c
c ibdtyp = 2
c
dynamic periodic lengths rectangular orientation
c
2000 continue
do 2100 j = 1,3
scfact = 1.0/perlen(j)
origin = perlb(j)
do 2100 i = 1,natoms
y(j,i) = (rv(j,i) - origin)*scfact
y(3+j,i) = rv(3+j,i)*scfact
2100 continue
do 2200 j = 1,3
y(j,natoms+1) = perlen(j)
y(j+3,natoms+1) = bndvel(j)
2200 continue
return
end
uscale
subroutine uscale
include ’vap.inc’
c
c
c
determine the type of variable scaling used
9001
c
1000
c
goto (1000,2000) ibdtyp
write(6,9001) ibdtyp
format(1x,’undefined boundary type:
stop
continue
ibdtyp=’,i3)
255
APPENDIX I. MOLECULAR DYNAMICS CODE
c
c
c
ibdtyp = 1
no scaling
1100
do 1100 j = 1,6
do 1100 i = 1,natoms
rv(j,i) = y(j,i)
return
c
c ibdtyp = 2
c
dynamic periodic lengths rectangular orientation
c
2000 continue
do 2100 j = 1,3
perlen(j) = y(j,natoms+1)
perlenH(j)=0.5*perlen(j)
perub(j) = perlb(j) + y(j,natoms+1)
bndvel(j) = y(j+3,natoms+1)
2100 continue
do 2200 j = 1,3
scfact = perlen(j)
origin = perlb(j)
do 2200 i = 1,natoms
rv(j,i) = y(j,i)*scfact + origin
rv(3+j,i) = y(3+j,i)*scfact
2200 continue
return
end
chkper
c***************************************************************
subroutine chkper
include ’vap.inc’
c
c
check periodicity:
c
if perlen is lt 2*sqrt(rcutsq), then have troubles with periodicity
c
permin = 2.*rcutall
istop = 0
do 100 i=1,3
if(perlen(i).ge.permin)go to 100
write(6,9230)i
9230 format(’
periodicity is too short in the ’,i2,’ direction’)
write(6,9240)permin,perlen(i)
9240 format(’
permin = ’,e15.5,’ periodicity = ’,e15.5)
istop = 1
100
continue
if(istop.eq.1)stop
c
return
end
I.3.5 Constraints and temperature control subroutines
setfix
c
c
c
subroutine setfix determines the constraints on each atom
subroutine setfix
integer type
256
APPENDIX I. MOLECULAR DYNAMICS CODE
include ’vap.inc’
dimension num(2),vector(3),dvecdt(3)
namelist /fixcard/ num,type,mode,vector,dvecdt,
1
xmin,xmax,ymin,ymax,zmin,zmax
c
c
c
set the last time fixfor was called (timefx) to t0
timefx = t0
nread=1
c
c
c
clear the flag for the existence of constraints
nfixes = 0
ifxal1 = 0
ifxal2 = 0
c
c
c
clear the fixcard data arrays
do 100 i = 0,100
modefx(i) = 0
vectfx(1,i) = 0.
vectfx(2,i) = 0.
vectfx(3,i) = 0.
dvctfx(1,i) = 0.
dvctfx(2,i) = 0.
dvctfx(3,i) = 0.
continue
continue
100
1000
c
c clear the namelist variables to read the next card
c
num(1) = 0
num(2) = 0
type = 0
mode = -9999
xmin = -9999.
xmax = 9999.
ymin = -9999.
ymax = 9999.
zmin = -9999.
zmax = 9999.
vector(1) = 9999.
vector(2) = 9999.
vector(3) = 9999.
dvecdt(1) = 9999.
dvecdt(2) = 9999.
dvecdt(3) = 9999.
c
c read the fix card
c
read(5,fixcard)
if (nread .eq. 1) then
nread=2
endif
c
c see if anything is to be fixed
c
if (mode.eq.-9999) goto 2000
nfixes = nfixes + 1
c
c if not done already
c
if (ifxal1.eq.0) then
ifxal1 = 1
257
APPENDIX I. MOLECULAR DYNAMICS CODE
do 300 i = 1,natmax
ipntfx(i) = 0
endif
if (ifxal2.eq.0.and.mode.eq.4) then
ifxal2 = 1
do 400 i = 1,natmax
posfx(1,i) = 0.
posfx(2,i) = 0.
posfx(3,i) = 0.
continue
endif
300
400
c
c
c
write out the fixcard
write(6,fixcard)
c
c
c
if vector refers to a direction, normalize it.
if (mode.eq.1.or.mode.eq.2) then
vnorm = sqrt(vector(1)**2 + vector(2)**2 + vector(3)**2)
vector(1) = vector(1)/vnorm
vector(2) = vector(2)/vnorm
vector(3) = vector(3)/vnorm
endif
c
c
c
store the fixcard data
modefx(nfixes) = mode
if(vector(1).ne.9999.)
if(vector(2).ne.9999.)
if(vector(3).ne.9999.)
if(dvecdt(1).ne.9999.)
if(dvecdt(2).ne.9999.)
if(dvecdt(3).ne.9999.)
c
c
c
c
c
c
vectfx(1,nfixes)
vectfx(2,nfixes)
vectfx(3,nfixes)
dvctfx(1,nfixes)
dvctfx(2,nfixes)
dvctfx(3,nfixes)
=
=
=
=
=
=
vector(1)
vector(2)
vector(3)
dvecdt(1)
dvecdt(2)
dvecdt(3)
determine to which atoms these constraints apply and set the ipntfx
values for those atoms to this set of constraints
branch depending on whether the atoms are specified by number or position
if (num(1).ne.0) goto 1500
c
c
c
specified by position
1100
do 1100 i = 1,natoms
if (rv(1,i).lt.xmin.or.rv(1,i).gt.xmax) goto 1100
if (rv(2,i).lt.ymin.or.rv(2,i).gt.ymax) goto 1100
if (rv(3,i).lt.zmin.or.rv(3,i).gt.zmax) goto 1100
if (type.ne.0.and.itype(i).ne.type) goto 1100
ipntfx(i) = nfixes
if (mode.eq.4) then
posfx(1,i) = rv(1,i)
posfx(2,i) = rv(2,i)
posfx(3,i) = rv(3,i)
endif
continue
goto 1000
c
c specified by number
c
1500 continue
if (num(2).eq.0) num(2) = num(1)
do 1600 i = num(1),num(2)
ipntfx(i) = nfixes
258
APPENDIX I. MOLECULAR DYNAMICS CODE
1600
2000
c
c
c
c
if (mode.eq.4) then
posfx(1,i) = rv(1,i)
posfx(2,i) = rv(2,i)
posfx(3,i) = rv(3,i)
endif
continue
goto 1000
continue
if (nfixes.eq.0) return
set the velocities of any fixed atoms to 0 in the appropriate
direction
do 2100 i = 1,natoms
iii=ipntfx(i)
if (modefx(iii).eq.0.or.modefx(iii).eq.4) goto 2100
if (modefx(iii).eq.1) then
vdvec = rv(4,i)*vectfx(1,iii) + rv(5,i)*vectfx(2,iii)
1
+ rv(6,i)*vectfx(3,iii)
rv(4,i) = rv(4,i) - vdvec*vectfx(1,iii)
rv(5,i) = rv(5,i) - vdvec*vectfx(2,iii)
rv(6,i) = rv(6,i) - vdvec*vectfx(3,iii)
endif
if (modefx(iii).eq.2) then
vdvec = rv(4,i)*vectfx(1,iii) + rv(5,i)*vectfx(2,iii)
1
+ rv(6,i)*vectfx(3,iii)
rv(4,i) = vdvec*vectfx(1,iii)
rv(5,i) = vdvec*vectfx(2,iii)
rv(6,i) = vdvec*vectfx(3,iii)
endif
if (modefx(iii).eq.3) then
rv(4,i) = 0.0
rv(5,i) = 0.0
rv(6,i) = 0.0
endif
2100 continue
c
c last card read - print out current constraints
c
if(iconst.eq.1)then
write(6,9010)
9010
format(1x,/,1x,’****** the following constraints apply’)
write(6,9020)
9020
format(1x,’
num type mode’,15x,’vector’,35x,’dvecdt’)
do 2200 i = 1,natoms
if (modefx(ipntfx(i)).eq.0) goto 2200
write(6,9030) i,itype(i),modefx(ipntfx(i)),
1
(vectfx(j,ipntfx(i)),j=1,3),
2
(dvctfx(j,ipntfx(i)),j=1,3)
9030
format(1x,3i6,3g12.4,5x,3g12.4)
2200
continue
write(6,9040)
9040
format(1x,’end of constraints’,/,1x)
endif
return
end
fixfor
c***************************************************************************
c
c fixfor implements the force fixing defined by setfix
c
259
APPENDIX I. MOLECULAR DYNAMICS CODE
subroutine fixfor(time)
include ’vap.inc’
dimension deltaof(3)
c
c
c
if no constraints, return
if (nfixes.eq.0) return
c
c
c
increment the vectors with time
do 100 i = 1,nfixes
vectfx(1,i) = vectfx(1,i) + (time-timefx)*dvctfx(1,i)
vectfx(2,i) = vectfx(2,i) + (time-timefx)*dvctfx(2,i)
vectfx(3,i) = vectfx(3,i) + (time-timefx)*dvctfx(3,i)
continue
100
c
c loop through all the atoms and implement the constraints
c
do 1000 i = 1,natoms
c
c skip if no constraints on this atom
c
if (ipntfx(i).eq.0) goto 1000
c
c branch to the appropriate contraint mode
c
goto (1100,1200,1300,1400) modefx(ipntfx(i))
if (modefx(ipntfx(i)).eq.0) goto 1000
write(6,9101) modefx(i)
9101 format(1x,’undefined modefx’,i6)
stop
1100 continue
c
c constrain to a plane
c
dotprd = f(1,i)*vectfx(1,ipntfx(i)) + f(2,i)*vectfx(2,ipntfx(i))
1
+ f(3,i)*vectfx(3,ipntfx(i))
f(1,i) = f(1,i) - dotprd*vectfx(1,ipntfx(i))
f(2,i) = f(2,i) - dotprd*vectfx(2,ipntfx(i))
f(3,i) = f(3,i) - dotprd*vectfx(3,ipntfx(i))
goto 1000
1200 continue
c
c constrain to a line
c
dotprd = f(1,i)*vectfx(1,ipntfx(i)) + f(2,i)*vectfx(2,ipntfx(i))
1
+ f(3,i)*vectfx(3,ipntfx(i))
f(1,i) = dotprd*vectfx(1,ipntfx(i))
f(2,i) = dotprd*vectfx(2,ipntfx(i))
f(3,i) = dotprd*vectfx(3,ipntfx(i))
goto 1000
1300 continue
c
c constrain to a point
c
f(1,i) = 0.0
f(2,i) = 0.0
f(3,i) = 0.0
goto 1000
1400 continue
c
c add a force
c
f(1,i) = f(1,i) + vectfx(1,ipntfx(i))
260
APPENDIX I. MOLECULAR DYNAMICS CODE
f(2,i) = f(2,i) + vectfx(2,ipntfx(i))
f(3,i) = f(3,i) + vectfx(3,ipntfx(i))
deltaof(1) = rv(1,i)-posfx(1,i)
deltaof(2) = rv(2,i)-posfx(2,i)
deltaof(3) = rv(3,i)-posfx(3,i)
deltaof(1)=deltaof(1)-perlen(1)*nint(deltaof(1)/perlen(1))
deltaof(2)=deltaof(2)-perlen(2)*nint(deltaof(2)/perlen(2))
deltaof(3)=deltaof(3)-perlen(3)*nint(deltaof(3)/perlen(3))
posfx(1,i) = rv(1,i)
posfx(2,i) = rv(2,i)
posfx(3,i) = rv(3,i)
continue
1000
c
c reset the last time called variable
c
timefx = time
return
end
settmp
c**************************************************
c
c
settmp determines the temperature control parameters
c
subroutine settmp
include ’vap.inc’
dimension qdefault(3)
data qdefault/1730.,40.,0.1/,destmp/300./,tmptim/1.0/
namelist /tmpcard/ ifxtmp,follow
namelist /regcard/ q,tmptim,destmp,xmin,xmax,ymin,ymax,zmin,zmax
ifxtmp=0
follow=.false.
c
c
c read the temperature control card
c
drag(0)=.0
read(5,tmpcard)
c
write(6,9229)
9229
format(//,’ ****** energy/temperature conditions ’)
c
if (ifxtmp.eq.0)then
write(6,9230)
9230
format(/,’ constant energy’,/)
c
c read in regcards (to be ignored)
c
100
destmp = -9999.
read(5,regcard)
if(destmp.eq.-9999.)return
goto 100
endif
c
c set time variable for fixtmp
c
timetmp = t0
tmpreg(0) = 0.
do 300 i =1,natmax
300
ipntrg(i) = 0
c
c set representative mass for determination of q values from tmptim
261
APPENDIX I. MOLECULAR DYNAMICS CODE
c
repmass = amass(1)
do 305 ityp=1,ntypes
repmass = amin1(repmass,amass(ityp))
305
c
c read in cards to define regions
c
nregs = 0
c
c read in parameters
c
1000 q = qdefault(ifxtmp)
tmptim = 9999.
destmp = -9999.
xmin = -9999.
xmax = 9999.
ymin = -9999.
ymax = 9999.
zmin = -9999.
zmax = 9999.
c
read(5,regcard)
if(destmp.eq.-9999.)goto 2000
nregs = nregs + 1
c
write(6,9233)nregs
9233 format(/’ temperature control region ’,i5)
write(6,regcard)
c
c store region information
c
if(tmptim.ne.9999.)then
if(ifxtmp.eq.1)qreg(nregs) = destmp*tmptim/(2.2*repmass)
if(ifxtmp.eq.2)qreg(nregs) = destmp*tmptim**2/(188.*repmass)
if(ifxtmp.eq.3)qreg(nregs) = 3.*repmass/tmptim
else
qreg(nregs) = q
endif
if (qreg(nregs) .eq. .0) qreg(nregs)=1500.0
tmpreg(nregs) = destmp
xcenter(nregs) = (xmin + xmax)/2.
xwidth(nregs) = (xmax - xmin)/2.
ycenter(nregs) = (ymin + ymax)/2.
ywidth(nregs) = (ymax - ymin)/2.
zcenter(nregs) = (zmin + zmax)/2.
zwidth(nregs) = (zmax - zmin)/2.
c
c set initial value (used only for ifxtmp=2)
c
drag(nregs) = 0.0
c
goto 1000
c
2000 continue
c
if(nregs.eq.0)then
write(6,9555)
9555
format(’ no regions defined:’,/,
.
’ must at least specify a temperature ’)
stop
endif
c
c if following by atom number, set up indirection pointer
c
262
APPENDIX I. MOLECULAR DYNAMICS CODE
2501
2500
if(follow)then
do 2500 i=1,natoms
ipntrg(i) = 0
do 2501 ireg=1,nregs
if(abs(rv(1,i)-xcenter(ireg)).gt.xwidth(ireg))goto 2501
if(abs(rv(2,i)-ycenter(ireg)).gt.ywidth(ireg))goto 2501
if(abs(rv(3,i)-zcenter(ireg)).gt.zwidth(ireg))goto 2501
ipntrg(i) = ireg
continue
continue
endif
c
if (ivapor .eq. 1) then
ycenter1=ycenter(1)
ywidth1=ywidth(1)
endif
return
end
c************************************************************************
c
c this routine applies temperature control to the equations of motion
c by adding a drag term
c two methods implemented: both have f = f - drag*v
c
ifxtmp = 1:
drag = (actual temp - desired tmp)/q
c
ifxtmp = 2:
d(drag)/dt = (actual temp - desired tmp)/q (Hoover)
c
ifxtmp = 3:
langevin (Biswas & Hamann)
c
fixtmp
subroutine fixtmp(time)
include ’vap.inc’
data boltz/8.617e-5/
c
c
c
modify the forces to enforce temperature control if appropriate
if (ifxtmp.eq.0) return
c
c
if following particle numbers then update indirection pointer
if(.not.follow)then
if (ivapor .eq. 1) then
c code chanbed by Dewey 4/25/2005 to match idea by XZ
c
ycenter(1)=ycenter1+.5*TbndV*time
c
ywidth(1)=ywidth1+.5*TbndV*time
if (TbndV .gt. 0.0) then
ycenter(1)=ycenter1+.5*TbndV*time
ywidth(1)=ywidth1+.5*TbndV*time
else if (TbndV .lt. 0.0) then
ndN=natoms-nTbnd
if (ndN.lt.0) ndN=0
ycenter(1)=ycenter1-0.5*TbndV*ndN
ywidth(1)=ywidth1-0.5*TbndV*ndN
endif
endif
do 200 i=1,natoms
ipntrg(i) = 0
do 201 ireg=1,nregs
if(abs(rv(1,i)-xcenter(ireg)).gt.xwidth(ireg))goto 201
if(abs(rv(2,i)-ycenter(ireg)).gt.ywidth(ireg))goto 201
if(abs(rv(3,i)-zcenter(ireg)).gt.zwidth(ireg))goto 201
ipntrg(i) = ireg
201
continue
263
APPENDIX I. MOLECULAR DYNAMICS CODE
200
c
c
c
continue
endif
calculate drag for each region and apply to atoms
deltat = time-timetmp
c
c
c
standard drag
if(ifxtmp.eq.1)then
c
c
c
calculate the temperature of each region
do 299 ireg=0,nregs
natrg(ireg) = 0
299
acttmp(ireg) = 0.
ccdir$ novector
do 300 i=1,natoms
ireg = ipntrg(i)
natrg(ireg) = natrg(ireg) + 1
acttmp(ireg) = acttmp(ireg) +
.
amass(itype(i))*(rv(4,i)**2 + rv(5,i)**2 + rv(6,i)**2)
300
continue
do 305 ireg=0,nregs
if(natrg(ireg).ne.0)acttmp(ireg) = acttmp(ireg)/
.
(3.*boltz*real(natrg(ireg)))
305
continue
c
c add drag term to force
c
do 306 ireg=1,nregs
drag(ireg) = (acttmp(ireg)-tmpreg(ireg))/qreg(ireg)
306
continue
do 307 i=1,natoms
do 307 j = 1,3
307
f(j,i) = f(j,i) - drag(ipntrg(i))*rv(j+3,i)
ccdir$ vector
endif
c
c hoover drag
c
if(ifxtmp.eq.2)then
c
c calculate the temperature of each region
c
do 399 ireg=0,nregs
natrg(ireg) = 0
399
acttmp(ireg) = 0.
ccdir$ novector
do 400 i=1,natoms
ireg = ipntrg(i)
natrg(ireg) = natrg(ireg) + 1
acttmp(ireg) = acttmp(ireg) +
.
amass(itype(i))*(rv(4,i)**2 + rv(5,i)**2 + rv(6,i)**2)
400
continue
do 405 ireg=0,nregs
if(natrg(ireg).ne.0)acttmp(ireg) = acttmp(ireg)/
.
(3.*boltz*real(natrg(ireg)))
405
continue
c
c add drag term to force
c
do 420 ireg=1,nregs
dragdot = (acttmp(ireg)-tmpreg(ireg))/qreg(ireg)
264
APPENDIX I. MOLECULAR DYNAMICS CODE
drag(ireg) = drag(ireg) + dragdot*deltat
continue
do 421 i=1,natoms
do 421 j = 1,3
421
f(j,i) = f(j,i) - drag(ipntrg(i))*rv(j+3,i)
ccdir$ vector
endif
c
c langevin
c
if( (ifxtmp.eq.3).and.(deltat.ne.0.0) ) then
c
c note: do not calculate the temperature
c
ccdir$ novector
do 530 ireg=1,nregs
530
drag(ireg) = qreg(ireg)
do 540 i=1,natoms
do 540 j=1,3
stoch = sqrt( 2.*drag(ipntrg(i))*boltz*tmpreg(ipntrg(i))/
.
deltat ) * rgauss()
f(j,i) = f(j,i) - drag(ipntrg(i))*rv(j+3,i) + stoch
540
continue
ccdir$ vector
endif
c
c update last time
timetmp = time
c
return
end
420
I.3.6 Neighbor list subroutines
gneigh
c************************************************************************
c
c this routine determines the neighbors of atoms
c
subroutine gneigh()
include ’vap.inc’
common /neibob/ nbox(nboxx,nboxy,nboxz,nboxn),nxt,nzt,dnxt,dnzt
dimension dis(3),rnearest0(natmax)
c
if (nforce1 .eq. 1) then
do 91 i=1,nnindx2(natoms2)
be0(i,1)=be(i,1)
be0(i,2)=be(i,2)
91
continue
endif
do 1 i=1,natoms
neigh(i)=0
if (nECRon .eq. nECRrun .and. i .ge. n1stps) then
totb(i)=0.0
gtotb0m(i)=0.0
ngm(i)=0
rnearest(i)=0.0
if (ncalbulk .ne. 0) totb0(i)=0.0
endif
1
continue
c
265
APPENDIX I. MOLECULAR DYNAMICS CODE
if (newlst.ne.0) goto 2500
c
c
c
if here then use the neighbors found earlier
indx=0
do 2 i=1,natoms
if (nECRrun .eq. nECRon .and. i .ge. n1stps) then
if (ncalbulk .ne. 0) nnindx1(i)=nnindx1(i-1)
endif
do 3 jtmp=nnindx(i-1)+1,nnindx(i)
j=nnlst(jtmp)
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
do 4 k=1,3
dis(k)=rv(k,i)-rv(k,j)
if (dis(k) .gt. perlenH(k)) dis(k)=dis(k)-perlen(k)
if (dis(k) .lt. -perlenH(k)) dis(k)=dis(k)+perlen(k)
continue
dissq=dis(1)*dis(1)+dis(2)*dis(2)+dis(3)*dis(3)
if (dissq .lt. rcutsq(i12)) then
neigh(i)=neigh(i)+1
nneips=max0(nneips,neigh(i))
neigh(j)=neigh(j)+1
nneips=max0(nneips,neigh(j))
neighT(i,neigh(i))=j
neighT(j,neigh(j))=i
4
c
coding changed to simulate strain
$
$
$
$
$
$
*
$
$
$
disij(1,i,neigh(i))=((1+strn(1))*dis(1))+
(strn(6)*(dis(2)/2))+(strn(5)*(dis(3)/2))
disij(1,j,neigh(j))=-disij(1,i,neigh(i))
disij(2,i,neigh(i))=((1+strn(2))*dis(2))+
(strn(6)*(dis(1)/2))+(strn(4)*(dis(3)/2))
disij(2,j,neigh(j))=-disij(2,i,neigh(i))
disij(3,i,neigh(i))=((1+strn(3))*dis(3))+
(strn(5)*(dis(1)/2))+(strn(4)*(dis(2)/2))
disij(3,j,neigh(j))=-disij(3,i,neigh(i))
dissq=disij(1,i,neigh(i))**2+
disij(2,i,neigh(i))**2+disij(3,i,neigh(i))**2
rij(i,neigh(i))=sqrt(dissq)
rij(j,neigh(j))=rij(i,neigh(i))
ps=rij(i,neigh(i))*rdr(i12)+1.0
ks=ps
ks=min0(ks,nr-1)
ps=ps-ks
ps=amin1(ps,1.0)
betaSsq(i,neigh(i))=((pBetaSsq3(i12,ks)*ps+
pBetaSsq2(i12,ks))*ps+pBetaSsq1(i12,ks))*ps+
pBetaSsq(i12,ks)
if (betaSsq(i,neigh(i)) .le. 0.0)
betaSsq(i,neigh(i))=pBetaSsq(i12,ks)
dBetaSsq(i,neigh(i))=(pBetaSsq6(i12,ks)*ps+
pBetaSsq5(i12,ks))*ps+pBetaSsq4(i12,ks)
betaSsq(j,neigh(j))=betaSsq(i,neigh(i))
dBetaSsq(j,neigh(j))=dBetaSsq(i,neigh(i))
betaPsq(i,neigh(i))=((pBetaPsq3(i12,ks)*ps+
pBetaPsq2(i12,ks))*ps+pBetaPsq1(i12,ks))*ps+
pBetaPsq(i12,ks)
266
APPENDIX I. MOLECULAR DYNAMICS CODE
if (betaPsq(i,neigh(i)) .le. 0.0)
betaPsq(i,neigh(i))=pBetaPsq(i12,ks)
dBetaPsq(i,neigh(i))=(pBetaPsq6(i12,ks)*ps+
$
pBetaPsq5(i12,ks))*ps+pBetaPsq4(i12,ks)
betaPsq(j,neigh(j))=betaPsq(i,neigh(i))
dBetaPsq(j,neigh(j))=dBetaPsq(i,neigh(i))
repul(i,neigh(i))=((pRepul3(i12,ks)*ps+
$
pRepul2(i12,ks))*ps+pRepul1(i12,ks))*ps+
$
pRepul(i12,ks)
dRepul(i,neigh(i))=(pRepul6(i12,ks)*ps+
$
pRepul5(i12,ks))*ps+pRepul4(i12,ks)
repul(j,neigh(j))=repul(i,neigh(i))
dRepul(j,neigh(j))=dRepul(i,neigh(i))
if (nECRon .eq. nECRrun .and. i .ge. n1stps .and.
*
j .gt. n1stpf .and. itype(i) .ne. inert .and.
*
itype(j) .ne. inert) then
i1=(itype(i)-1)*ntypes+itype(j)
j1=(itype(j)-1)*ntypes+itype(i)
indx=indx+1
qij(indx,1)=((qijT3(i1,ks)*ps+
$
qijT2(i1,ks))*ps+qijT1(i1,ks))*ps+
$
qijT(i1,ks)
qij(indx,2)=((qijT3(j1,ks)*ps+
$
qijT2(j1,ks))*ps+qijT1(j1,ks))*ps+
$
qijT(j1,ks)
dqij(indx,1)=(qijT6(i1,ks)*ps+
$
qijT5(i1,ks))*ps+qijT4(i1,ks)
dqij(indx,2)=(qijT6(j1,ks)*ps+
$
qijT5(j1,ks))*ps+qijT4(j1,ks)
totb(i)=totb(i)+qij(indx,1)
totb(j)=totb(j)+qij(indx,2)
dtotb(i,neigh(i))=dqij(indx,1)
dtotb(j,neigh(j))=dqij(indx,2)
if (ncalbulk .ne. 0) then
if (rnearest(i) .lt. r0(i12)/rij(i,neigh(i)))
*
rnearest(i)=r0(i12)/rij(i,neigh(i))
if (rnearest(j) .lt. r0(i12)/rij(j,neigh(j)))
*
rnearest(j)=r0(i12)/rij(j,neigh(j))
endif
endif
else if (nECRon .eq. nECRrun .and. ncalbulk .ne. 0
*
.and. i .ge. n1stps .and. j .ge. n1stps .and.
*
dissq .lt. rcutqbsq(i12) .and. itype(i) .ne. inert
*
.and. itype(j) .ne. inert) then
nnindx1(i)=nnindx1(i)+1
nnlst1(nnindx1(i))=j
rij1(nnindx1(i))=sqrt(dissq)
disij1(1,nnindx1(i))=dis(1)
disij1(2,nnindx1(i))=dis(2)
disij1(3,nnindx1(i))=dis(3)
if (rnearest(i) .lt. r0(i12)/rij1(nnindx1(i)))
*
rnearest(i)=r0(i12)/rij1(nnindx1(i))
if (rnearest(j) .lt. r0(i12)/rij1(nnindx1(i)))
*
rnearest(j)=r0(i12)/rij1(nnindx1(i))
endif
3
continue
2
continue
if(nneips.gt.neimax)then
write(6,9212)nneips,neimax
9212
format(’ number of neighbors’,i5,’ exceeds array bound ’,i5)
stop
endif
if (nECRon .eq. nECRrun .and. ncalbulk .ne. 0) then
do 661 i=n1stps,natoms
*
267
APPENDIX I. MOLECULAR DYNAMICS CODE
c
661
662
$
$
$
10
$
$
if (itype(i) .eq. inert) cycle
if (rnearest(i) .gt. 1.0) rnearest(i)=1.0
rnearest0(i)=rnearest(i)
neighb(i)=0
continue
do 662 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 662 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 662
if (itype(j) .eq. inert) cycle
if (rnearest(i) .lt. rnearest0(j)) rnearest(i)=rnearest0(j)
if (rnearest(j) .lt. rnearest0(i)) rnearest(j)=rnearest0(i)
continue
do 6 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 6 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 6
if (itype(j) .eq. inert) cycle
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
i1=(itype(i)-1)*ntypes+itype(j)
j1=(itype(j)-1)*ntypes+itype(i)
rscaled=rnearest(i)*rij(i,jtmp)
if (rscaled .gt. rcq(i12)) goto 10
neighb(i)=neighb(i)+1
neighTb(i,neighb(i))=j
disijT(1,i,neighb(i))=disij(1,i,jtmp)
disijT(2,i,neighb(i))=disij(2,i,jtmp)
disijT(3,i,neighb(i))=disij(3,i,jtmp)
rijT(i,neighb(i))=rij(i,jtmp)
ps=rscaled*rdr(i12)+1.0
ks=ps
ks=min0(ks,nr-1)
ps=ps-ks
ps=amin1(ps,1.0)
totb0(i)=totb0(i)+((qijT3(i1,ks)*ps+
qijT2(i1,ks))*ps+qijT1(i1,ks))*ps+
qijT(i1,ks)
dtotb0(i,neighb(i))=((qijT6(i1,ks)*ps+
qijT5(i1,ks))*ps+qijT4(i1,ks))*rnearest(i)
continue
rscaled=rnearest(j)*rij(i,jtmp)
if (rscaled .gt. rcq(i12)) goto 6
neighb(j)=neighb(j)+1
neighTb(j,neighb(j))=i
disijT(1,j,neighb(j))=-disij(1,i,jtmp)
disijT(2,j,neighb(j))=-disij(2,i,jtmp)
disijT(3,j,neighb(j))=-disij(3,i,jtmp)
rijT(j,neighb(j))=rij(i,jtmp)
ps=rscaled*rdr(i12)+1.0
ks=ps
ks=min0(ks,nr-1)
ps=ps-ks
ps=amin1(ps,1.0)
totb0(j)=totb0(j)+((qijT3(j1,ks)*ps+
qijT2(j1,ks))*ps+qijT1(j1,ks))*ps+
qijT(j1,ks)
268
APPENDIX I. MOLECULAR DYNAMICS CODE
dtotb0(j,neighb(j))=((qijT6(j1,ks)*ps+
qijT5(j1,ks))*ps+qijT4(j1,ks))*rnearest(j)
continue
do 7 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 7 jtmp=nnindx1(i-1)+1,nnindx1(i)
j=nnlst1(jtmp)
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
i1=(itype(i)-1)*ntypes+itype(j)
j1=(itype(j)-1)*ntypes+itype(i)
if (rnearest(i) .lt. 1.0) then
rscaled=rnearest(i)*rij1(jtmp)
if (rscaled .lt. rcq(i12)) then
neighb(i)=neighb(i)+1
neighTb(i,neighb(i))=j
disijT(1,i,neighb(i))=disij1(1,jtmp)
disijT(2,i,neighb(i))=disij1(2,jtmp)
disijT(3,i,neighb(i))=disij1(3,jtmp)
rijT(i,neighb(i))=rij1(jtmp)
ps=rscaled*rdr(i12)+1.0
ks=ps
ks=min0(ks,nr-1)
ps=ps-ks
ps=amin1(ps,1.0)
totb0(i)=totb0(i)+((qijT3(i1,ks)*ps+
$
qijT2(i1,ks))*ps+qijT1(i1,ks))*ps+
$
qijT(i1,ks)
dtotb0(i,neighb(i))=((qijT6(i1,ks)*ps+
$
qijT5(i1,ks))*ps+qijT4(i1,ks))*rnearest(i)
endif
endif
if (rnearest(j) .lt. 1.0) then
rscaled=rnearest(j)*rij1(jtmp)
if (rscaled .lt. rcq(i12)) then
neighb(j)=neighb(j)+1
neighTb(j,neighb(j))=i
disijT(1,j,neighb(j))=-disij1(1,jtmp)
disijT(2,j,neighb(j))=-disij1(2,jtmp)
disijT(3,j,neighb(j))=-disij1(3,jtmp)
rijT(j,neighb(j))=rij1(jtmp)
ps=rscaled*rdr(i12)+1.0
ks=ps
ks=min0(ks,nr-1)
ps=ps-ks
ps=amin1(ps,1.0)
totb0(j)=totb0(j)+((qijT3(j1,ks)*ps+
$
qijT2(j1,ks))*ps+qijT1(j1,ks))*ps+
$
qijT(j1,ks)
dtotb0(j,neighb(j))=((qijT6(j1,ks)*ps+
$
qijT5(j1,ks))*ps+qijT4(j1,ks))*rnearest(j)
endif
endif
continue
endif
if (nECRon .eq. nECRrun) then
do 8 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
totb(i)=totb(i)/Va(i)
$
6
7
269
APPENDIX I. MOLECULAR DYNAMICS CODE
2015
2016
*
2017
8
if (totb(i) .gt. 1.0) then
deltotb(i)=totb(i)-1.0
totb(i)=1.0
gtotb(i)=0.0
do 2015 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (itype(j) .eq. inert) cycle
if (j .lt. n1stps) goto 2015
ddeltotb(i,jtmp)=dtotb(i,jtmp)/Va(i)
dtotb(i,jtmp)=0.0
dgtotb(i,jtmp)=0.0
continue
else
deltotb(i)=0.0
gtotb(i)=4.0*Va(i)/Vai(itype(i))*(1.0-totb(i))
do 2016 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (itype(j) .eq. inert) cycle
if (j .lt. n1stps) goto 2016
ddeltotb(i,jtmp)=0.0
dtotb(i,jtmp)=dtotb(i,jtmp)/Va(i)
dgtotb(i,jtmp)=-4.0*Va(i)/Vai(itype(i))*dtotb(i,jtmp)
continue
endif
if (ncalbulk .ne. 0) then
totb0(i)=totb0(i)/Va(i)
if (totb0(i) .gt. 1.0) then
totb0(i)=1.0
gtotb0(i)=0.0
neighb(i)=0
else
gtotb0(i)=4.0*Va(i)/Vai(itype(i))*(1.0-totb0(i))
do 2017 jtmp=1,neighb(i)
dtotb0(i,jtmp)=dtotb0(i,jtmp)/Va(i)
dgtotb0(i,jtmp)=-4.0*Va(i)/Vai(itype(i))*
dtotb0(i,jtmp)
continue
endif
else
totb0(i)=totb(i)
gtotb0(i)=gtotb(i)
neighb(i)=neigh(i)
endif
continue
indx=0
do 12 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 12 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (itype(j) .eq. inert) cycle
if (j .lt. i) goto 12
i1=(itype(i)-1)*ntypes+itype(j)
j1=(itype(j)-1)*ntypes+itype(i)
indx=indx+1
if (gtotb0m(i) .lt. gtotb0(j)*qij(indx,1)/qij0(i1)) then
gtotb0m(i)=gtotb0(j)*qij(indx,1)/qij0(i1)
ngm(i)=j
ngm1(i)=indx
endif
if (gtotb0m(j) .lt. gtotb0(i)*qij(indx,2)/qij0(j1)) then
gtotb0m(j)=gtotb0(i)*qij(indx,2)/qij0(j1)
ngm(j)=i
ngm1(j)=indx
endif
270
APPENDIX I. MOLECULAR DYNAMICS CODE
12
continue
endif
return
c
c end of neighbor finding when using old neighbor list
c
c------------------------------------------------------------2500 continue
c
c determine new neighbor list while getting the neighbors
c
indx=0
do 1002 i=1,natoms
if (nECRon .eq. nECRrun .and. i .ge. n1stps) then
if (ncalbulk .ne. 0) nnindx1(i)=nnindx1(i-1)
endif
nnindx(i)=nnindx(i-1)
nix=int((rv(1,i)-perlb(1))/dnxt)+1
niy=int((rv(2,i)-perlb(2))/dnyt)+1
if (nzt .le. 3) then
nzaa=1
nzbb=nzt
else
niz=int((rv(3,i)-perlb(3))/dnzt)+1
nzaa=niz-1
nzbb=niz+1
endif
if (nxt .le. 3) then
nxaa=1
nxbb=nxt
else
nxaa=nix-1
nxbb=nix+1
endif
if (nyt .le. 3) then
nyaa=1
nybb=nyt
else
nyaa=niy-1
nybb=niy+1
endif
do 2600 j1=nxaa,nxbb
k1=j1
if (k1 .lt. 1) k1=nxt
if (k1 .gt. nxt) k1=1
do 2601 j2=nyaa,nybb
k2=j2
if (nyt .gt. nboxy) then
if (k2 .lt. 1) goto 2601
if (k2 .gt. nboxy) then
write(6,*) ’nboxy is too small 2’
stop
endif
else
if (k2 .lt. 1) k2=nyt
if (k2 .gt. nyt) k2=1
endif
do 2602 j3=nzaa,nzbb
k3=j3
if (k3 .lt. 1) k3=nzt
if (k3 .gt. nzt .and. k3 .ne. 1) k3=1
if (nbox(k1,k2,k3,nboxn) .ne. nboxnei) goto 2602
do 2603 j4=1,nbox(k1,k2,k3,nboxn1)
j=nbox(k1,k2,k3,j4)
271
APPENDIX I. MOLECULAR DYNAMICS CODE
if (j .le. i) goto 2603
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
do 1004 k=1,3
dis(k)=rv(k,i)-rv(k,j)
if (dis(k) .gt. perlenH(k)) dis(k)=dis(k)-perlen(k)
if (dis(k) .lt. -perlenH(k)) dis(k)=dis(k)+perlen(k)
continue
dissq=dis(1)*dis(1)+dis(2)*dis(2)+dis(3)*dis(3)
if (dissq .lt. rctsqn(i12)) then
nnindx(i)=nnindx(i)+1
if (nnindx(i) .gt. ntotNei) then
write(6,*)’nnindx(i) .gt. ntotNei’
stop
endif
nnlst(nnindx(i))=j
endif
if (dissq .lt. rcutsq(i12)) then
neigh(i)=neigh(i)+1
nneips=max0(nneips,neigh(i))
neigh(j)=neigh(j)+1
nneips=max0(nneips,neigh(j))
neighT(i,neigh(i))=j
neighT(j,neigh(j))=i
1004
c
coding changed to include strain
$
$
$
$
$
$
*
$
$
$
*
disij(1,i,neigh(i))=((1+strn(1))*dis(1))+
(strn(6)*(dis(2)/2))+(strn(5)*(dis(3)/2))
disij(1,j,neigh(j))=-disij(1,i,neigh(i))
disij(2,i,neigh(i))=((1+strn(2))*dis(2))+
(strn(6)*(dis(1)/2))+(strn(4)*(dis(3)/2))
disij(2,j,neigh(j))=-disij(2,i,neigh(i))
disij(3,i,neigh(i))=((1+strn(3))*dis(3))+
(strn(5)*(dis(1)/2))+(strn(4)*(dis(2)/2))
disij(3,j,neigh(j))=-disij(3,i,neigh(i))
dissq=disij(1,i,neigh(i))**2+
disij(2,i,neigh(i))**2+disij(3,i,neigh(i))**2
rij(i,neigh(i))=sqrt(dissq)
rij(j,neigh(j))=rij(i,neigh(i))
ps=rij(i,neigh(i))*rdr(i12)+1.0
ks=ps
ks=min0(ks,nr-1)
ps=ps-ks
ps=amin1(ps,1.0)
betaSsq(i,neigh(i))=((pBetaSsq3(i12,ks)*ps+
pBetaSsq2(i12,ks))*ps+pBetaSsq1(i12,ks))*ps+
pBetaSsq(i12,ks)
if (betaSsq(i,neigh(i)) .le. 0.0)
betaSsq(i,neigh(i))=pBetaSsq(i12,ks)
dBetaSsq(i,neigh(i))=(pBetaSsq6(i12,ks)*ps+
pBetaSsq5(i12,ks))*ps+pBetaSsq4(i12,ks)
betaSsq(j,neigh(j))=betaSsq(i,neigh(i))
dBetaSsq(j,neigh(j))=dBetaSsq(i,neigh(i))
betaPsq(i,neigh(i))=((pBetaPsq3(i12,ks)*ps+
pBetaPsq2(i12,ks))*ps+pBetaPsq1(i12,ks))*ps+
pBetaPsq(i12,ks)
if (betaPsq(i,neigh(i)) .le. 0.0)
betaPsq(i,neigh(i))=pBetaPsq(i12,ks)
272
APPENDIX I. MOLECULAR DYNAMICS CODE
dBetaPsq(i,neigh(i))=(pBetaPsq6(i12,ks)*ps+
pBetaPsq5(i12,ks))*ps+pBetaPsq4(i12,ks)
betaPsq(j,neigh(j))=betaPsq(i,neigh(i))
dBetaPsq(j,neigh(j))=dBetaPsq(i,neigh(i))
repul(i,neigh(i))=((pRepul3(i12,ks)*ps+
$
pRepul2(i12,ks))*ps+pRepul1(i12,ks))*ps+
$
pRepul(i12,ks)
dRepul(i,neigh(i))=(pRepul6(i12,ks)*ps+
$
pRepul5(i12,ks))*ps+pRepul4(i12,ks)
repul(j,neigh(j))=repul(i,neigh(i))
dRepul(j,neigh(j))=dRepul(i,neigh(i))
if (nECRon .eq. nECRrun .and. i .ge. n1stps .and.
*
j .gt. n1stpf .and. itype(i) .ne. inert .and.
*
itype(j) .ne. inert) then
inum=(itype(i)-1)*ntypes+itype(j)
jnum=(itype(j)-1)*ntypes+itype(i)
indx=indx+1
qij(indx,1)=((qijT3(inum,ks)*ps+
$
qijT2(inum,ks))*ps+qijT1(inum,ks))*ps+
$
qijT(inum,ks)
qij(indx,2)=((qijT3(jnum,ks)*ps+
$
qijT2(jnum,ks))*ps+qijT1(jnum,ks))*ps+
$
qijT(jnum,ks)
dqij(indx,1)=(qijT6(inum,ks)*ps+
$
qijT5(inum,ks))*ps+qijT4(inum,ks)
dqij(indx,2)=(qijT6(jnum,ks)*ps+
$
qijT5(jnum,ks))*ps+qijT4(jnum,ks)
totb(i)=totb(i)+qij(indx,1)
totb(j)=totb(j)+qij(indx,2)
dtotb(i,neigh(i))=dqij(indx,1)
dtotb(j,neigh(j))=dqij(indx,2)
if (ncalbulk .ne. 0) then
if (rnearest(i) .lt. r0(i12)/rij(i,neigh(i)))
*
rnearest(i)=r0(i12)/rij(i,neigh(i))
if (rnearest(j) .lt. r0(i12)/rij(j,neigh(j)))
*
rnearest(j)=r0(i12)/rij(j,neigh(j))
endif
endif
else if (nECRon .eq. nECRrun .and. ncalbulk .ne. 0
*
.and. i .ge. n1stps .and. j .ge. n1stps .and.
*
dissq .lt. rcutqbsq(i12) .and. itype(i) .ne. inert
*
.and. itype(j) .ne. inert) then
nnindx1(i)=nnindx1(i)+1
nnlst1(nnindx1(i))=j
rij1(nnindx1(i))=sqrt(dissq)
disij1(1,nnindx1(i))=dis(1)
disij1(2,nnindx1(i))=dis(2)
disij1(3,nnindx1(i))=dis(3)
if (rnearest(i) .lt. r0(i12)/rij1(nnindx1(i)))
*
rnearest(i)=r0(i12)/rij1(nnindx1(i))
if (rnearest(j) .lt. r0(i12)/rij1(nnindx1(i)))
*
rnearest(j)=r0(i12)/rij1(nnindx1(i))
endif
continue
continue
continue
continue
continue
if(nneips.gt.neimax)then
write(6,9212)nneips,neimax
stop
endif
if (nECRon .eq. nECRrun .and. ncalbulk .ne. 0) then
do 663 i=n1stps,natoms
$
2603
2602
2601
2600
1002
273
APPENDIX I. MOLECULAR DYNAMICS CODE
c
663
664
$
$
$
1009
$
$
if (itype(i) .eq. inert) cycle
if (rnearest(i) .gt. 1.0) rnearest(i)=1.0
rnearest0(i)=rnearest(i)
neighb(i)=0
continue
do 664 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 664 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 664
if (itype(j) .eq. inert) cycle
if (rnearest(i) .lt. rnearest0(j)) rnearest(i)=rnearest0(j)
if (rnearest(j) .lt. rnearest0(i)) rnearest(j)=rnearest0(i)
continue
do 1006 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 1006 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 1006
if (itype(j) .eq. inert) cycle
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
i1=(itype(i)-1)*ntypes+itype(j)
j1=(itype(j)-1)*ntypes+itype(i)
rscaled=rnearest(i)*rij(i,jtmp)
if (rscaled .gt. rcq(i12)) goto 1009
neighb(i)=neighb(i)+1
neighTb(i,neighb(i))=j
disijT(1,i,neighb(i))=disij(1,i,jtmp)
disijT(2,i,neighb(i))=disij(2,i,jtmp)
disijT(3,i,neighb(i))=disij(3,i,jtmp)
rijT(i,neighb(i))=rij(i,jtmp)
ps=rscaled*rdr(i12)+1.0
ks=ps
ks=min0(ks,nr-1)
ps=ps-ks
ps=amin1(ps,1.0)
totb0(i)=totb0(i)+((qijT3(i1,ks)*ps+
qijT2(i1,ks))*ps+qijT1(i1,ks))*ps+
qijT(i1,ks)
dtotb0(i,neighb(i))=((qijT6(i1,ks)*ps+
qijT5(i1,ks))*ps+qijT4(i1,ks))*rnearest(i)
continue
rscaled=rnearest(j)*rij(i,jtmp)
if (rscaled .gt. rcq(i12)) goto 1006
neighb(j)=neighb(j)+1
neighTb(j,neighb(j))=i
disijT(1,j,neighb(j))=-disij(1,i,jtmp)
disijT(2,j,neighb(j))=-disij(2,i,jtmp)
disijT(3,j,neighb(j))=-disij(3,i,jtmp)
rijT(j,neighb(j))=rij(i,jtmp)
ps=rscaled*rdr(i12)+1.0
ks=ps
ks=min0(ks,nr-1)
ps=ps-ks
ps=amin1(ps,1.0)
totb0(j)=totb0(j)+((qijT3(j1,ks)*ps+
qijT2(j1,ks))*ps+qijT1(j1,ks))*ps+
qijT(j1,ks)
274
APPENDIX I. MOLECULAR DYNAMICS CODE
dtotb0(j,neighb(j))=((qijT6(j1,ks)*ps+
qijT5(j1,ks))*ps+qijT4(j1,ks))*rnearest(j)
1006
continue
do 1007 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 1007 jtmp=nnindx1(i-1)+1,nnindx1(i)
j=nnlst1(jtmp)
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
i1=(itype(i)-1)*ntypes+itype(j)
j1=(itype(j)-1)*ntypes+itype(i)
if (rnearest(i) .lt. 1.0) then
rscaled=rnearest(i)*rij1(jtmp)
if (rscaled .lt. rcq(i12)) then
neighb(i)=neighb(i)+1
neighTb(i,neighb(i))=j
disijT(1,i,neighb(i))=disij1(1,jtmp)
disijT(2,i,neighb(i))=disij1(2,jtmp)
disijT(3,i,neighb(i))=disij1(3,jtmp)
rijT(i,neighb(i))=rij1(jtmp)
ps=rscaled*rdr(i12)+1.0
ks=ps
ks=min0(ks,nr-1)
ps=ps-ks
ps=amin1(ps,1.0)
totb0(i)=totb0(i)+((qijT3(i1,ks)*ps+
$
qijT2(i1,ks))*ps+qijT1(i1,ks))*ps+
$
qijT(i1,ks)
dtotb0(i,neighb(i))=((qijT6(i1,ks)*ps+
$
qijT5(i1,ks))*ps+qijT4(i1,ks))*rnearest(i)
endif
endif
if (rnearest(j) .lt. 1.0) then
rscaled=rnearest(j)*rij1(jtmp)
if (rscaled .lt. rcq(i12)) then
neighb(j)=neighb(j)+1
neighTb(j,neighb(j))=i
disijT(1,j,neighb(j))=-disij1(1,jtmp)
disijT(2,j,neighb(j))=-disij1(2,jtmp)
disijT(3,j,neighb(j))=-disij1(3,jtmp)
rijT(j,neighb(j))=rij1(jtmp)
ps=rscaled*rdr(i12)+1.0
ks=ps
ks=min0(ks,nr-1)
ps=ps-ks
ps=amin1(ps,1.0)
totb0(j)=totb0(j)+((qijT3(j1,ks)*ps+
$
qijT2(j1,ks))*ps+qijT1(j1,ks))*ps+
$
qijT(j1,ks)
dtotb0(j,neighb(j))=((qijT6(j1,ks)*ps+
$
qijT5(j1,ks))*ps+qijT4(j1,ks))*rnearest(j)
endif
endif
1007
continue
endif
if (nECRon .eq. nECRrun) then
do 1008 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
totb(i)=totb(i)/Va(i)
$
275
APPENDIX I. MOLECULAR DYNAMICS CODE
2008
2009
*
2010
1008
if (totb(i) .gt. 1.0) then
deltotb(i)=totb(i)-1.0
totb(i)=1.0
gtotb(i)=0.0
do 2008 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (itype(j) .eq. inert) cycle
if (j .lt. n1stps) goto 2008
ddeltotb(i,jtmp)=dtotb(i,jtmp)/Va(i)
dtotb(i,jtmp)=0.0
dgtotb(i,jtmp)=0.0
continue
else
deltotb(i)=0.0
gtotb(i)=4.0*Va(i)/Vai(itype(i))*(1.0-totb(i))
do 2009 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (itype(j) .eq. inert) cycle
if (j .lt. n1stps) goto 2009
ddeltotb(i,jtmp)=0.0
dtotb(i,jtmp)=dtotb(i,jtmp)/Va(i)
dgtotb(i,jtmp)=-4.0*Va(i)/Vai(itype(i))*dtotb(i,jtmp)
continue
endif
if (ncalbulk .ne. 0) then
totb0(i)=totb0(i)/Va(i)
if (totb0(i) .gt. 1.0) then
totb0(i)=1.0
gtotb0(i)=0.0
neighb(i)=0
else
gtotb0(i)=4.0*Va(i)/Vai(itype(i))*(1.0-totb0(i))
do 2010 jtmp=1,neighb(i)
dtotb0(i,jtmp)=dtotb0(i,jtmp)/Va(i)
dgtotb0(i,jtmp)=-4.0*Va(i)/Vai(itype(i))*
dtotb0(i,jtmp)
continue
endif
else
totb0(i)=totb(i)
gtotb0(i)=gtotb(i)
neighb(i)=neigh(i)
endif
continue
indx=0
do 1010 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 1010 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (itype(j) .eq. inert) cycle
if (j .lt. i) goto 1010
i1=(itype(i)-1)*ntypes+itype(j)
j1=(itype(j)-1)*ntypes+itype(i)
indx=indx+1
if (gtotb0m(i) .lt. gtotb0(j)*qij(indx,1)/qij0(i1)) then
gtotb0m(i)=gtotb0(j)*qij(indx,1)/qij0(i1)
ngm(i)=j
ngm1(i)=indx
endif
if (gtotb0m(j) .lt. gtotb0(i)*qij(indx,2)/qij0(j1)) then
gtotb0m(j)=gtotb0(i)*qij(indx,2)/qij0(j1)
ngm(j)=i
ngm1(j)=indx
endif
276
APPENDIX I. MOLECULAR DYNAMICS CODE
1010
continue
endif
c
newlst = 0
ngtlst = ngtlst + 1
return
end
chkdis
c*********************************************************************
c
c this subroutine computes the displacement of each particle since
c the last update of the neighbor list.
c if the maximum displacement is more than 1/2 of dradn, then newlst
c is set to flag the creation of a new neighbor list by gneigh
c
subroutine chkdis
include ’vap.inc’
dimension dis(3,natmax),r(natmax)
common /nm3rold/ rold(3,natmax)
c
c treat the second call the same as the first in case defects have been
c added
c
c also if newlst has been set to 1, do not override even if the particles
c have not moved
c
if (newlst.eq.1) goto 2500
c
c compare the new positions with the old ones
c
do 2100 i=1,natoms
dis(1,i) = rold(1,i) - rv(1,i)
dis(1,i) = dis(1,i) - perlen(1)*nint(dis(1,i)/perlen(1))
dis(2,i) = rold(2,i) - rv(2,i)
dis(2,i) = dis(2,i) - perlen(2)*nint(dis(2,i)/perlen(2))
dis(3,i) = rold(3,i) - rv(3,i)
dis(3,i) = dis(3,i) - perlen(3)*nint(dis(3,i)/perlen(3))
r(i) = dis(1,i)**2 + dis(2,i)**2 + dis(3,i)**2
2100 continue
c
c determine the maximum displacement and compare with dradn
c
drmax1 = 0.0
drmax2 = 0.0
do 2200 i = 1,natoms
tmp = amin1(drmax1,r(i))
drmax1 = amax1(drmax1,r(i))
drmax2 = amax1(drmax2,tmp)
2200 continue
drmax = sqrt(drmax1) + sqrt(drmax2)
if (drmax.gt.dradn) goto 2500
c
c if here the old nighbor list can be used
c
newlst = 0
return
c----------------2500 continue
c
c if here, a new neighbor list is needed so store the current coordinates
c
277
APPENDIX I. MOLECULAR DYNAMICS CODE
2600
newlst = 1
do 2600 j = 1,3
do 2600 i = 1,natoms
rold(j,i) = rv(j,i)
return
end
I.3.7 Molecular statics subroutines and functions
minimize
c**************************************************************************
c
c this routine minimizes the potential energy using
c va08a (conjugate gradients)
c
subroutine minimize
include ’vap.inc’
external vafunc
data df/-.1/
c
df = order of magnitude of change of f
c
eps = convergence criterion (smallest change in variables)
c
dxmax = largest stepsize allowed
c
eps = -tol
c
c zero all velocities
c
do 5 i=1,ndegfr
do 5 j=4,6
5
y(j,i) = 0.0
c
c
if dxmax has not been set by user, then set dxmax to be a fraction of
c
the nearest neighbour distance
c
if(dxmax.eq.0.0)then
distnn = alat/2.
dxmax = 0.1*distnn
endif
c
n = 3*ndegfr
c
c call minimizer once if nsteps was set by the user or until time
c is up if it has not been set to a non-zero value
c
write(6,9110)nsteps,eps,dxmax
call va08a(vafunc,n,ener,df,eps,nsteps,ipitera,
1
dxmax,iterm)
c
c set mnterm to 1 if the minimization was terminated by nfmax
c
mnterm = iabs(iterm)
25
continue
9110
format(’ calling minimizer (va08a) nfmax = ’,i10,
1
’ eps = ’,g15.5,’ dxmax = ’,g15.5)
return
end
va08a
subroutine va08a (funct,n,fl,dfn,epps,maxfn,iprint,dsmax,
278
APPENDIX I. MOLECULAR DYNAMICS CODE
1
c-c**
c**
c-c-c-c-c-c-c-c-c-c-c--
iterm)
include ’vap.inc’
dimension x(6*natmax)
equivalence (x(1),y(1,1))
va08a has been modified from the original harwell routine.
the original array x,g,and s are now passed to and from this
routine via common/pointer variables
eps has been replaced in argument list by epps and
dsmax has been added to argument list.
the former eps=abs(epps). dsmax will not be referenced
unless epps.lt.0. in that case dsmax will be the magnitude
(in euclidean norm sense) of the largest step size that will
be taken during iteration in moving from any currently best
point to another point.
iterm = 0 if normal termination
iterm = -1 if terminated due to time limit
this modification is brought to you by
thomas jefferson.
common /mincom/ g(3*natmax),s(3*natmax)
c
ntry = 0
nmax = 0
iterm=0
if (iprint.ne.0) write (6,250) n,fl,dfn,epps,maxfn
eps=abs(epps)
z=fl
itn=0
call funct (fl)
flast=fl
smax=0.
fy=1.0e+6
imax=0
igrad=1
c-igrad=1 means that array g(*) contains gradient of f at x()
ifn=1
df=dfn
if (dfn.eq.0.) df=fl-z
if (dfn.lt.0.) df=abs(df*fl)
if (df.le.0.) df=1.
110
continue
do 120 i=1,n
120
s(i)=0.
smaxmx=0.
gg=1.
do 220 icyc=1,n
itn=itn+1
gglast=gg
130
gg=sdot(n,g,1,g,1)
z=gg/gglast
if (iprint.eq.0) go to 140
if (mod(itn,iabs(iprint)).ne.0) go to 140
write (6,260) icyc,itn,ifn,fl,gg,imax,smax
if (iprint.lt.0) go to 140
write (6,270) (x(i),i=1,n)
write (6,270) (g(i),i=1,n)
140
continue
if (z.ne.0.) go to 150
c-if g is gradient at current x we are through. otherwise,
c--evaluate gradient at current x and make test again.
if (igrad.eq.1) go to 240
call funct (fl)
igrad=1
ifn=ifn+1
go to 130
279
APPENDIX I. MOLECULAR DYNAMICS CODE
c-150
160
c--
c-c--
c-c-170
c-c--
c
c
c
c
c-c-c-c--
c-c-c-180
imax=1
do 160 i=1,n
s(i)=z*s(i)-g(i)
if (abs(s(i)) .gt. abs(s(imax))) imax=i
continue
now imax is index of the component of s with largest mag
gs=sdot(n,g,1,s,1)
if (gs.ge.0.) go to 110
if stepsize is to restricted in length to dsmax, then find the
maximum alpha corresponding to the direction given by s vector.
if (epps.lt.0.) then
ss=sdot(n,s,1,s,1)
alphmx=dsmax/sqrt(ss)
endif
gs0=gs
if ((flast-fl).gt.0.) df=flast-fl
flast=fl
alpha=-2.*df/gs
alpha0=0.
alpha0 is the scalar factor multiplying the vector s(*)
thereby giving the step increment from x(i) at this pt
continue
if (ifn.ge.maxfn) go to 240
if maximum stepsize is to be restricted, then restrict it by
limiting alpha.
ntry = ntry + 1
if (alpha.ge.alphmx)nmax = nmax + 1
if (epps.lt.0.) alpha=amin1(alphmx,alpha)
alpha0=alpha0+alpha
the following is modified to handle the rv array which has both
positions and velocities in it ---------msd 11/16/83
do x,y, and z coordinates separately
s is incremented by 3, but x is incremented by 6
call saxpy (ndegfr,alpha,s(1),3,x(1),6)
call saxpy (ndegfr,alpha,s(2),3,x(2),6)
call saxpy (ndegfr,alpha,s(3),3,x(3),6)
call funct (fy)
ifn=ifn+1
igrad=1
icon=0
if (abs(alpha*s(imax)).gt.eps) icon=1
gys=sdot(n,g,1,s,1)
if (fy.ge.fl) go to 180
gys/gs0 is equal to the ratio of the projection of the current
gradient in the s-vector direction to the
projection in the s direction of the gradient at the
start of the minimization in the s direction.
if (abs(gys/gs0).le..1) go to 200
if (gys.gt.0.) go to 180
z=4.
if (gs.lt.gys) z=gys/(gs-gys)
if (z.gt.4.) z=4.
alpha=alpha*z
fl=fy
gs=gys
go to 170
come here if we have gone too far in the s-vector
direction. i.e. either function value is larger or
gradient dot s is now positive.
iset=1
if (icon.eq.0.or.(alpha.eq.0.)) go to 190
z=3.*(fl-fy)/alpha+gys+gs
if (z.eq.0.) go to 190
280
APPENDIX I. MOLECULAR DYNAMICS CODE
c-c-c-190
c
c
c
c
c
w=sqrt(1.-gs/z*gys/z)*abs(z)
z=1.-(gys+w-z)/(2.*w+gys-gs)
iset=2
if iset=2 we will continue minimizing in s direction.
otherwise(iset=1), set x-vector back to its previous value only if
the current function value fy is no improvement.
if (iset.eq.1.and.fy.lt.fl) go to 200
the following is modified to handle the rv array which has both
positions and velocities in it ---------msd 11/16/83
do x,y, and z coordinates separately
s is incremented by 3, but x is incremented by 6
call saxpy (ndegfr,-alpha,s(1),3,x(1),6)
call saxpy (ndegfr,-alpha,s(2),3,x(2),6)
call saxpy (ndegfr,-alpha,s(3),3,x(3),6)
alpha0=alpha0-alpha
igrad=2
alpha=alpha*z
if (iset.eq.2) go to 170
go to 210
c-come here if new f is .lt. previous best f and
c-projection of gradient in s-vector direction has been
c-sufficiently reduced.
c-also come here if we have gone too far in s-direction,
c-yet the change in the unknown parameters is too small to be
c-of significance.
200
fl=fy
c-if parameters have changed sufficiently during this
c-- minimization in this s-direction, then go on to next direction.
c-- otherwise, either start again in gradient direction (icyc=1) or
c-- we are finished
210
smax=alpha0*s(imax)
smaxmx=amax1(smaxmx,abs(smax))
if (abs(smax).le..05*smaxmx) go to 230
if (abs(smax).le.eps) go to 230
220
continue
go to 110
c-start again in gradient direction unless latest minimization was
c-in gradient direction.
230
if (icyc.ne.1) go to 110
c-the end
240
fl=amin1(fl,fy)
if (ifn.ge.maxfn)then
write(6,9240)
9240
format(’ ********warning: minimization terminated due to’,
1
’time limit *********’)
iterm=-1
endif
if (igrad.eq.2) call funct (fl)
if (igrad.eq.2) ifn=ifn+1
c
if (iprint.eq.0) return
gg=sdot(n,g,1,g,1)
icyc=n+1
pmax = real(nmax)/real(ntry)
write (6,260) icyc,itn,ifn,fl,gg,imax,smax
write (6,261) pmax
if (iprint.le.0) return
write (6,270) fl
write (6,270) (x(i),i=1,n)
write (6,270) (g(i),i=1,n)
return
250
format (20h entry to va08a, n=,i5,3h f=,e12.4,5h dfn=,e12.4,6h ep
1ps=,e12.4,7h maxfn=,i5)
281
APPENDIX I. MOLECULAR DYNAMICS CODE
260
261
270
format (17h in va08a--icyc=,i5,5h itn=,i5,5h ifn=,i5,3h f=,e19.11
1,10h g dot g =,e14.6,6h imax=,i5,6h smax=,e12.4)
format(’ in va08a--fraction of steps that were limited by’,
1 ’ maximum step size=’,/,1x,e12.4)
format ((8e15.7))
end
vafunc
c**************************************************************************
c
c this routine sets up the gradient of the energy for va08a
c
subroutine vafunc(ener)
include ’vap.inc’
common /mincom/ grad(3*natmax),s(3*natmax)
c
c
c unscale the coordinates (compute physical coordinates)
c
call colect
call uscale
c
c determine the number of periodic images needed if the periodic
c lengths are dynamic
c
if (ibdtyp.ne.1) call chkper
c
c compute the forces for this configuration
c
call force(t0)
c
c determine the energy and the gradients
c
if (ibdtyp.eq.1) then
do 10 i = 1,natoms
grad(1+3*(i-1)) = -f(1,i)
grad(2+3*(i-1)) = -f(2,i)
grad(3+3*(i-1)) = -f(3,i)
10
continue
ener = totE
else
do 20 i = 1,natoms
grad(1+3*(i-1)) = -perlen(1)*f(1,i)
grad(2+3*(i-1)) = -perlen(2)*f(2,i)
grad(3+3*(i-1)) = -perlen(3)*f(3,i)
20
continue
ener = totE + e0
volume = perlen(1)*perlen(2)*perlen(3)
grad(3*natoms+1) =
1
idynper(1)*((dpress-stresst(1)/volume)*perlen(2)*perlen(3)
2
+ perlen(1)*dstress(1))
grad(3*natoms+2) =
1
idynper(2)*((dpress-stresst(2)/volume)*perlen(1)*perlen(3)
2
+ perlen(2)*dstress(2))
grad(3*natoms+3) =
1
idynper(3)*((dpress-stresst(3)/volume)*perlen(1)*perlen(2)
2
+ perlen(3)*dstress(3))
endif
return
end
282
APPENDIX I. MOLECULAR DYNAMICS CODE
sdot
c***********************************************************************
c
c vector manipulation routines
c
function sdot(n,x,incx,y,incy)
implicit real(a-h,o-z)
dimension x(n),y(n)
tot = 0.0
do 100 i = 1,n
ix = 1 + (i-1)*incx
iy = 1 + (i-1)*incy
tot = tot + x(ix)*y(iy)
100
continue
sdot = tot
return
end
saxpy
100
subroutine saxpy(n,a,x,incx,y,incy)
implicit real(a-h,o-z)
dimension x(n),y(n)
do 100 i = 1,n
ix = 1 + (i-1)*incx
iy = 1 + (i-1)*incy
y(iy) = a*x(ix) + y(iy)
continue
return
end
I.3.8 Molecular dynamics subroutines
nordint
c***************************************************************************
c
c this routine calls the nordsieck integrator
c
subroutine nordint
include ’vap.inc’
external output
c
c
t=t0
write(6,9001)dt
9001 format(’ calling integrator (nordsieck): dt =’,e15.5)
x1 = seconds()
c
c nords produces an output file every noutp time steps
c
otime = dt*noutp
call nords(t,ndegfr,output,otime)
c
x2 = seconds() - x1
write(6,9101)x2
9101 format(’ time for call to integrator ’,e15.5)
write(6,9102)nforce
9102 format(’ number of calls to force subroutine ’,i20)
return
283
APPENDIX I. MOLECULAR DYNAMICS CODE
end
nords
c**************************************************************************
c
c this routine implements the nodsieck integration scheme
c
(see j.r. beeler, "radiation effects computer experiments",
c
p. 100 (1983))
c
subroutine nords(t,n,output,otime)
include ’vap.inc’
common /uu/ u1(3,natmax),u2(3,natmax),u3(3,natmax),
*u4(3,natmax),u5(3,natmax)
common /add/ natadd,ityadd(100)
dimension phi(3,natmax)
data c0,c1,c2,c3,c4,c5/0.1875,0.697222222,1.,0.61111111111,
1
0.16666666667,0.016666666667/
dt2 = 0.5*dt**2
dtrec = 1.0/dt
dt1 = dt
c Dewey changed this from =0 to =1 on 12/14/2004 stick ratio calc
nstrt=1
natadd=0
tshift=.0
layernumber=1
tinit = t
tfinal = tinit + nsteps*dt - dt/100.
timstr = seconds()
neinc=0
if (ivapor .eq. 1) then
yline0=perlb(2)
do 432 i=1,natoms
432
if (yline0 .lt. rv(2,i)) yline0=rv(2,i)
yline0=yline0+10.0
c
c the program assumes a real positive number ratio
c
dtadd1=dtadd
if (ratio .eq. .0) then
dtadd2=tfinal*2.0
else
dtadd2=dtadd/ratio
endif
endif
c New start values by Dewey 12/14/2005 for stick ratio calc
dtrun1=dtadd1
c
c
c
initialize the higher derivatives to zero at the start
do 100 j = 1,3
do 100 i = 1,n
u3(j,i) = 0.0
u4(j,i) = 0.0
u5(j,i) = 0.0
continue
100
c
c set the velocity and acceleration variables
c
call accel(t)
do 200 j = 1,3
do 200 i = 1,n
284
APPENDIX I. MOLECULAR DYNAMICS CODE
u1(j,i) = dt*y(j+3,i)
u2(j,i) = dt2*acc(j,i)
continue
200
c
c the program is now ready to integrate the equations of motion
c
1000 continue
t = t + dt1
c
c first compute the estimated values at the next time step.
c
do 2000 j = 1,3
do 2000 i = 1,n
y(j,i) = y(j,i) + u1(j,i) + u2(j,i) + u3(j,i) +
$
u4(j,i) + u5(j,i)
u1(j,i) = u1(j,i) + 2.0*u2(j,i) + 3.0*u3(j,i) +
$
4.0*u4(j,i) + 5.0*u5(j,i)
y(j+3,i) = dtrec*u1(j,i)
u2(j,i) = u2(j,i) + 3.0*u3(j,i) + 6.0*u4(j,i) + 10.*u5(j,i)
u3(j,i) = u3(j,i) + 4.0*u4(j,i) + 10.0*u5(j,i)
u4(j,i) = u4(j,i) + 5.0*u5(j,i)
2000 continue
c
c determine if vapor atoms are to be added
c
if (ivapor .eq. 1) then
if (t .gt. eqtim .and. nstrt .eq. 0) then
nstrt=1
dtrun1=.0
dtrun2=.0
endif
if (nstrt .eq. 1) then
dtrun1=dtrun1+dt1
dtrun2=dtrun2+dt1
tshift=tshift+dt1
if (tshift .ge. timehlayer(layernumber) .and. neinc .eq. 0) then
evapor=evapor+devapor
neinc=1
endif
if (tshift .ge. timelayer(layernumber)) then
if (layernumber .eq. 1 ) then
layernumber=2
else
layernumber=1
endif
evapor=evapor-devapor
tshift=.0
neinc=0
endif
if (dtrun1 .ge. dtadd1) then
1
dtrun1=dtrun1-dtadd1
natadd=natadd+1
ityadd(natadd)=1
if (dtrun1 .ge. dtadd1) goto 1
endif
if (dtrun2 .ge. dtadd2) then
2
dtrun2=dtrun2-dtadd2
if (inertvary .eq. 1 .and. neinc .eq. 0) goto 142
natadd=natadd+1
ityadd(natadd)=inert
142
continue
if (dtrun2 .ge. dtadd2) goto 2
endif
endif
285
APPENDIX I. MOLECULAR DYNAMICS CODE
if (natadd .gt. 0 .and. depdirtime .gt. .0)
*spinphi=depdirtime*(t-tinit)
endif
c
c
c
compute the actual accelerations at this point
call accel(t)
c
c
c
now compute the displacement function phi
do 3000 i = 1,n
do 3000 j = 1,3
phi(j,i) = dt2*acc(j,i) - u2(j,i)
continue
3000
c
c now correct the predicted values of the functions
c
do 4000 j = 1,3
do 4000 i = 1,n
y(j,i) = y(j,i) + c0*phi(j,i)
u1(j,i) = u1(j,i) + c1*phi(j,i)
y(j+3,i) = dtrec*u1(j,i)
u2(j,i) = u2(j,i) + c2*phi(j,i)
u3(j,i) = u3(j,i) + c3*phi(j,i)
u4(j,i) = u4(j,i) + c4*phi(j,i)
u5(j,i) = u5(j,i) + c5*phi(j,i)
4000 continue
if (ivapor .eq. 1) then
yline=evaporline*(t-tinit)+yline0
call chkvap(t)
endif
c
c output the results if appropriate
c
fiout=mod(t-tinit+0.5*dt1,otime)-0.5*dt1
if (fiout .lt. 0.5*dt1 .and. fiout .ge. -0.5*dt1) then
call output(t,iaccur)
treference=t
tend = t
end if
c
c see if done with the integration
c
8888 if (t.lt.tfinal) goto 1000
tend=t
if (t-treference .gt. .5*otime) call output(t,iaccur)
return
end
accel
c************************************************************************
c
c this routine computes the accleration on the potentially scaled
c variables describing the particle positions and optionally the
c periodic boundaries
c
subroutine accel(time)
include ’vap.inc’
Integer natomsave
c
c unscale the coordinates (compute physical coordinates)
c
286
APPENDIX I. MOLECULAR DYNAMICS CODE
call colect
call uscale
c
c
c
c
determine the number of periodic images needed if the periodic
lengths are dynamic
if (ibdtyp.ne.1) call chkper
c
c
c
compute the forces for this configuration
natomsave=natoms
call force(time)
c Dewey added this code on 12/13/2004
if(natoms-natomsave .gt. 0) then
do 10016 i=natomsave+1,natoms
write (6,1738) "Adatom: ", time, i, itype(i),
*
rv(1,i), rv(2,i), rv(3,i)
10016
continue
end if
1738 format(A,f11.5,’,’,i5,’,’,i4,3(’,’,f11.7))
c
c convert the forces into accelerations on the scaled coordinates
c
c branch to the desired boundary type
c
goto (1000,2000) ibdtyp
write(6,9010) ibdtyp
9010 format(1x,’undefined boundary type: ibdtyp =’,i3)
stop
c
c ibdtyp = 1
c
fixed boundaries, no scaling of variables
c
1000 continue
do 1101 j = 1,natoms
do 1100 i = 1,3
acc(i,j) = f(i,j)/amass(itype(j))
1100 continue
1101 continue
return
c
c ibdtyp = 2
c
lengths of x, y and z sides of the periodic cell dynamic
c
(remains orthogonal)
c
(i.e., transform forces to scale coordinates)
c
2000 continue
do 2101 j = 1,natoms
do 2100 i = 1,3
acc(i,j) = (f(i,j)/amass(itype(j))
1
- 2.*y(i+3,ndegfr)*y(i+3,j))/y(i,ndegfr)
2100 continue
2101 continue
volume = y(1,ndegfr)*y(2,ndegfr)*y(3,ndegfr)
do 2200 i = 1,3
acc(i,ndegfr) = idynper(i)*(
1 ((stresst(i)-dpress*volume)/y(i,ndegfr)
2 - y(i,ndegfr)*dstress(i))/bndmas(i)
3 - bnddrg(i)*y(3+i,ndegfr))
2200 continue
return
end
287
APPENDIX I. MOLECULAR DYNAMICS CODE
addv1
301
401
303
304
305
302
subroutine addv1
include ’vap.inc’
common /uu/ u1(3,natmax),u2(3,natmax),u3(3,natmax),
*u4(3,natmax),u5(3,natmax)
common /add/ natadd,ityadd(100)
common /nm3rold/ rold(3,natmax)
common /neibob/ nbox(nboxx,nboxy,nboxz,nboxn),nxt,nzt,dnxt,dnzt
dimension ityadd0(100)
REAL PI
PI=3.14159265358979
if (follow) then
npt=natoms
ipntrg(npt)=1
npt=npt-1
if (ipntrg(npt) .eq. 0) goto 301
endif
natadd0=natadd
natadd=0
do 401 i=1,natadd0
ityadd0(i)=ityadd(i)
continue
do 302 i=1,natadd0
if (ityadd0(i) .eq. inert) then
natadd=natadd+1
ityadd(natadd)=ityadd0(i)
else
tst=rand(0)
it=0
if (layernumber .eq. 1) then
do 303 mm=ntypes,1,-1
if (tst .lt. fraction1(mm)) it=type1(mm)
endif
if (layernumber .eq. 2) then
do 304 mm=ntypes,1,-1
if (tst .lt. fraction2(mm)) it=type2(mm)
endif
if (it .eq. 0) it=1
do 305 mm=1,dimer(it)
natadd=natadd+1
if (mm .eq. 1) then
ityadd(natadd)=it
else
ityadd(natadd)=0
endif
continue
endif
continue
if (depdirtime .gt. .0) then
ptheta=sqrt(1-depdir(2)*depdir(2))
depdir(1)=-ptheta*cos(spinphi*PI/180.)
depdir(3)=ptheta*sin(spinphi*PI/180.)
mark1=1
mark2=1
if (depdir(1) .lt. .0) mark1=-1
if (depdir(3) .lt. .0) mark2=-1
endif
nboxnei=nboxnei+1
ntopbox=0
if (ibdtyp .eq. 2) then
nxt=perlen(1)/rctroot
dnxt=perlen(1)/real(nxt)
nzt=perlen(3)/rctroot
288
APPENDIX I. MOLECULAR DYNAMICS CODE
1
663
if (nzt .ne. 0) dnzt=perlen(3)/real(nzt)
if (nzt .eq. 0) then
nzt=1
dnzt=perlen(3)
endif
if (nxt .gt. nboxx) then
write(6,*) ’nboxx is too small’
stop
endif
if (nzt .gt. nboxz) then
write(6,*) ’nboxz is too small’
stop
endif
n1=natoms+1
n2=n1+natadd
do 1 i=1,3
y(i,n2)=y(i,n1)
y(i+3,n2)=y(i+3,n1)
u1(i,n2)=u1(i,n1)
u2(i,n2)=u2(i,n1)
u3(i,n2)=u3(i,n1)
u4(i,n2)=u4(i,n1)
u5(i,n2)=u5(i,n1)
continue
endif
do 663 i=1,natoms
nw1=int((rv(1,i)-perlb(1))/dnxt)+1
nw2=int((rv(2,i)-perlb(2))/dnyt)+1
nw3=int((rv(3,i)-perlb(3))/dnzt)+1
if (nbox(nw1,nw2,nw3,nboxn) .ne. nboxnei) then
nbox(nw1,nw2,nw3,nboxn1)=0
nbox(nw1,nw2,nw3,nboxn)=nboxnei
if (nw2 .gt. ntopbox) ntopbox=nw2
endif
nbox(nw1,nw2,nw3,nboxn1)=nbox(nw1,nw2,nw3,nboxn1)+1
nbox(nw1,nw2,nw3,nbox(nw1,nw2,nw3,nboxn1))=i
continue
do 2 i=1,natadd
if (ityadd(i) .ne. 0) then
xemit=rand(0)*perlen(1)+perlb(1)
yemit=dnyt*(ntopbox+2.0)+perlb(2)
zemit=rand(0)*perlen(3)+perlb(3)
else
xdeg=360.0*rand(0)
ydeg=90.0*rand(0)
dvec1=sin(ydeg*PI/180.)*cos(xdeg*PI/180.)
dvec3=sin(ydeg*PI/180.)*sin(xdeg*PI/180.)
dvec2=cos(ydeg*PI/180.)
spacing=dimdis+2.0*(0.5-rand(0))*dimdd
yemit0=yemit+dnyt
xemit=xemit+spacing*dvec1
yemit=yemit+spacing*dvec2
zemit=zemit+spacing*dvec3
if (yemit .lt. yemit0) then
adjust=(yemit-yemit0)/depdir(2)
xemit=xemit-adjust*depdir(1)
yemit=yemit-adjust*depdir(2)
zemit=zemit-adjust*depdir(3)
if (xemit .lt. perlb(1)) xemit=xemit+
*
(1.0-int((xemit-perlb(1))/perlen(1)))*
*
perlen(1)
if (xemit .ge. perub(1)) xemit=xemit*
int((xemit-perlb(1))/perlen(1))*
*
perlen(1)
289
APPENDIX I. MOLECULAR DYNAMICS CODE
if (zemit .lt. perlb(3)) zemit=zemit+
(1.0-int((zemit-perlb(3))/perlen(3)))*
perlen(3)
if (zemit .ge. perub(3)) zemit=zemit*
int((zemit-perlb(3))/perlen(3))*
*
perlen(3)
endif
endif
natoms=natoms+1
ipntfx(natoms)=0
if (follow) ipntrg(natoms)=0
if (ityadd(i) .eq. inert) then
itype(natoms)=ityadd(i)
velo=sqrt(2.0*einert/amass(inert))
else
if (ityadd(i) .ne. 0) then
itype(natoms)=ityadd(i)
else
itype(natoms)=itype(natoms-1)
endif
velo=sqrt(2.0*evapor/amass(itype(natoms)))
endif
if (nECRon .ne. 0) Va(natoms)=Vai(itype(natoms))
velx=velo*depdir(1)
vely=velo*depdir(2)
velz=velo*depdir(3)
shortest=1000.0
nxaa1=1000
nxbb1=-1000
nyaa1=1000
nybb1=-1000
nzaa1=1000
nzbb1=-1000
xx1=xemit
yy1=yemit
zz1=zemit
nxx=(xx1-perlb(1))/dnxt
pmi=dnxt*nxx+perlb(1)
if (pmi .eq. xx1) then
xx0=xx1
else
if (xx1 .gt. perlb(1)) then
xx0=dnxt*nxx+perlb(1)
if (mark1 .eq. -1) xx0=xx0+dnxt
else
xx0=dnxt*nxx+perlb(1)
if (mark1 .eq. 1) xx0=xx0-dnxt
endif
endif
yy0=yy1
nzz=(zz1-perlb(3))/dnzt
pmi=dnzt*nzz+perlb(3)
if (pmi .eq. zz1) then
zz0=zz1
else
if (zz1 .gt. perlb(3)) then
zz0=dnzt*nzz+perlb(3)
if (mark2 .eq. -1) zz0=zz0+dnzt
else
zz0=dnzt*nzz+perlb(3)
if (mark2 .eq. 1) zz0=zz0-dnzt
endif
endif
if (depdir(1) .eq. .0) then
*
*
3
290
APPENDIX I. MOLECULAR DYNAMICS CODE
shift1=1000.0
else
xx2=xx0+dnxt*mark1
shift1=(xx2-xx1)/depdir(1)
endif
yy2=yy0-dnyt
shift2=(yy2-yy1)/depdir(2)
if (depdir(3) .eq. .0) then
shift3=1000.0
else
zz2=zz0+dnzt*mark2
shift3=(zz2-zz1)/depdir(3)
endif
shift=amin1(shift1,shift2,shift3)
xx3=xx1
yy3=yy1
zz3=zz1
xx1=xx1+shift*depdir(1)
yy1=yy1+shift*depdir(2)
zz1=zz1+shift*depdir(3)
if (shift .eq. shift1) xx0=xx2
if (shift .eq. shift2) yy0=yy2
if (shift .eq. shift3) zz0=zz2
xx4=.5*(xx1+xx3)
yy4=.5*(yy1+yy3)
zz4=.5*(zz1+zz3)
nxx=(xx4-perlb(1))/dnxt
pmi=dnxt*nxx+perlb(1)
if (pmi .eq. xx4) then
nxaa=nxx
nxbb=nxx+1
else
if (xx4 .gt. perlb(1)) then
nxaa=nxx
nxbb=nxx+2
else
nxaa=nxx-1
nxbb=nxx+1
endif
endif
nyy=(yy4-perlb(2))/dnyt
nyaa=nyy
nybb=nyy+2
if (nyaa .lt. 1) nyaa=1
if (nybb .gt. ntopbox) nybb=ntopbox
nzz=(zz4-perlb(3))/dnzt
pmi=dnzt*nzz+perlb(3)
if (pmi .eq. zz4) then
nzaa=nzz
nzbb=nzz+1
else
if (zz4 .gt. perlb(3)) then
nzaa=nzz
nzbb=nzz+2
else
nzaa=nzz-1
nzbb=nzz+1
endif
endif
do 4 j1=nxaa,nxbb
nshift1=0
if (j1 .gt. nxt) nshift1=(j1-1)/nxt
if (j1 .lt. 1) nshift1=-1+j1/nxt
k1=j1-nshift1*nxt
291
APPENDIX I. MOLECULAR DYNAMICS CODE
7
6
5
4
do 5 j2=nyaa,nybb
do 6 j3=nzaa,nzbb
if ((j1 .ge. nxaa1 .and. j1 .le. nxbb1) .and.
*(j2 .ge. nyaa1 .and. j2 .le. nybb1) .and.
*(j3 .ge. nzaa1 .and. j3 .le. nzbb1)) goto 6
nshift3=0
if (j3 .gt. nzt) nshift3=(j3-1)/nzt
if (j3 .lt. 1) nshift3=-1+j3/nzt
k3=j3-nshift3*nzt
if (nbox(k1,j2,k3,nboxn) .ne. nboxnei) goto 6
do 7 j4=1,nbox(k1,j2,k3,nboxn1)
k4=nbox(k1,j2,k3,j4)
if (itype(k4) .eq. inert) cycle
xpos=rv(1,k4)+perlen(1)*nshift1
ypos=rv(2,k4)
zpos=rv(3,k4)+perlen(3)*nshift3
dis1=xpos-xemit
dis2=ypos-yemit
dis3=zpos-zemit
dis=dis1**2+dis2**2+dis3**2
sl=dis1*depdir(1)+dis2*depdir(2)+dis3*depdir(3)
if (sl .lt. .0) goto 7
sl2=sl**2
RR=dis-sl2
if (RR .gt. rcutall**2) goto 7
shrun=sl-sqrt(rcutall**2-RR)
if (shrun .lt. shortest) shortest=shrun
continue
continue
continue
continue
nxaa1=nxaa
nxbb1=nxbb
nyaa1=nyaa
nybb1=nybb
nzaa1=nzaa
nzbb1=nzbb
if (shortest .eq. 1000.0) goto 3
yreach=yemit+shortest*depdir(2)
if (yreach .lt. yy1) goto 3
rv(1,natoms)=xemit+shortest*depdir(1)
if (rv(1,natoms) .lt. perlb(1)) rv(1,natoms)=rv(1,natoms)+
*(1.0-int((rv(1,natoms)-perlb(1))/perlen(1)))*perlen(1)
if (rv(1,natoms) .ge. perub(1)) rv(1,natoms)=rv(1,natoms)*int((rv(1,natoms)-perlb(1))/perlen(1))*perlen(1)
rv(2,natoms)=yreach
rv(3,natoms)=zemit+shortest*depdir(3)
if (rv(3,natoms) .lt. perlb(3)) rv(3,natoms)=rv(3,natoms)+
*(1.0-int((rv(3,natoms)-perlb(3))/perlen(3)))*perlen(3)
if (rv(3,natoms) .ge. perub(3)) rv(3,natoms)=rv(3,natoms)*int((rv(3,natoms)-perlb(3))/perlen(3))*perlen(3)
rv(4,natoms)=velx
rv(5,natoms)=vely
rv(6,natoms)=velz
if (ityadd(i) .eq. 0) then
nw1=int((rv(1,natoms-1)-perlb(1))/dnxt)+1
nw2=int((rv(2,natoms-1)-perlb(2))/dnyt)+1
nw3=int((rv(3,natoms-1)-perlb(3))/dnzt)+1
nbox(nw1,nw2,nw3,nboxn1)=nbox(nw1,nw2,nw3,nboxn1)-1
rvn2=rv(2,natoms)
rv(1,natoms)=rv(1,natoms-1)+spacing*dvec1
rv(2,natoms)=rv(2,natoms-1)+spacing*dvec2
rv(3,natoms)=rv(3,natoms-1)+spacing*dvec3
adjust=0.0
292
APPENDIX I. MOLECULAR DYNAMICS CODE
if (rv(2,natoms) .lt. rvn2)
adjust=(rv(2,natoms)-rvn2)/depdir(2)
rv(1,natoms)=rv(1,natoms)-adjust*depdir(1)
rv(2,natoms)=rv(2,natoms)-adjust*depdir(2)
rv(3,natoms)=rv(3,natoms)-adjust*depdir(3)
rv(1,natoms-1)=rv(1,natoms-1)-adjust*depdir(1)
rv(2,natoms-1)=rv(2,natoms-1)-adjust*depdir(2)
rv(3,natoms-1)=rv(3,natoms-1)-adjust*depdir(3)
if (rv(1,natoms) .lt. perlb(1))
*
rv(1,natoms)=rv(1,natoms)+
*
(1.0-int((rv(1,natoms)-perlb(1))/perlen(1)))*
*
perlen(1)
if (rv(1,natoms) .ge. perub(1))
*
rv(1,natoms)=rv(1,natoms)*
int((rv(1,natoms)-perlb(1))/perlen(1))*
*
perlen(1)
if (rv(3,natoms) .lt. perlb(3))
*
rv(3,natoms)=rv(3,natoms)+
*
(1.0-int((rv(3,natoms)-perlb(3))/perlen(3)))*
*
perlen(3)
if (rv(3,natoms) .ge. perub(3))
*
rv(3,natoms)=rv(3,natoms)*
int((rv(3,natoms)-perlb(3))/perlen(3))*
*
perlen(3)
if (rv(1,natoms-1) .lt. perlb(1))
*
rv(1,natoms-1)=rv(1,natoms-1)+
*
(1.0-int((rv(1,natoms-1)-perlb(1))/perlen(1)))*
*
perlen(1)
if (rv(1,natoms-1) .ge. perub(1))
*
rv(1,natoms-1)=rv(1,natoms-1)*
int((rv(1,natoms-1)-perlb(1))/perlen(1))*
*
perlen(1)
if (rv(3,natoms-1) .lt. perlb(3))
*
rv(3,natoms-1)=rv(3,natoms-1)+
*
(1.0-int((rv(3,natoms-1)-perlb(3))/perlen(3)))*
*
perlen(3)
if (rv(3,natoms-1) .ge. perub(3))
*
rv(3,natoms-1)=rv(3,natoms-1)*
int((rv(3,natoms-1)-perlb(3))/perlen(3))*
*
perlen(3)
do 81 j=1,3
if (ibdtyp .eq. 1) then
y(j,natoms-1)=rv(j,natoms-1)
else
y(j,natoms-1)=(rv(j,natoms-1)-perlb(j))/perlen(j)
endif
continue
nw1=int((rv(1,natoms-1)-perlb(1))/dnxt)+1
nw2=int((rv(2,natoms-1)-perlb(2))/dnyt)+1
if (nw2 .gt. nboxy) then
write(6,*) ’nboxy is too small 3’
stop
endif
nw3=int((rv(3,natoms-1)-perlb(3))/dnzt)+1
if (nbox(nw1,nw2,nw3,nboxn) .ne. nboxnei) then
nbox(nw1,nw2,nw3,nboxn)=nboxnei
nbox(nw1,nw2,nw3,nboxn1)=0
if (nw2 .gt. ntopbox) ntopbox=nw2
endif
nbox(nw1,nw2,nw3,nboxn1)=nbox(nw1,nw2,nw3,nboxn1)+1
nbox(nw1,nw2,nw3,nbox(nw1,nw2,nw3,nboxn1))=natoms-1
endif
do 8 j=1,3
if (ibdtyp .eq. 1) then
*
81
293
APPENDIX I. MOLECULAR DYNAMICS CODE
8
2
y(j,natoms)=rv(j,natoms)
y(j+3,natoms)=rv(j+3,natoms)
else
y(j,natoms)=(rv(j,natoms)-perlb(j))/perlen(j)
y(j+3,natoms)=rv(j+3,natoms)/perlen(j)
endif
u1(j,natoms)=dt*y(j+3,natoms)
u2(j,natoms)=.0
u3(j,natoms)=.0
u4(j,natoms)=.0
u5(j,natoms)=.0
continue
nw1=int((rv(1,natoms)-perlb(1))/dnxt)+1
nw2=int((rv(2,natoms)-perlb(2))/dnyt)+1
if (nw2 .gt. nboxy) then
write(6,*) ’nboxy is too small 3’
stop
endif
nw3=int((rv(3,natoms)-perlb(3))/dnzt)+1
if (nbox(nw1,nw2,nw3,nboxn) .ne. nboxnei) then
nbox(nw1,nw2,nw3,nboxn)=nboxnei
nbox(nw1,nw2,nw3,nboxn1)=0
if (nw2 .gt. ntopbox) ntopbox=nw2
endif
nbox(nw1,nw2,nw3,nboxn1)=nbox(nw1,nw2,nw3,nboxn1)+1
nbox(nw1,nw2,nw3,nbox(nw1,nw2,nw3,nboxn1))=natoms
continue
newlst=1
if (ibdtyp .eq. 1) ndegfr=natoms
if (ibdtyp .eq. 2) ndegfr=natoms+1
natadd=-1
return
end
chkvap
subroutine chkvap(time)
include ’vap.inc’
common /nm3rold/ rold(3,natmax)
common /uu/ u1(3,natmax),u2(3,natmax),u3(3,natmax),
*u4(3,natmax),u5(3,natmax)
dimension njud(natmax)
n1=0
if (nECRon .ne. 0) n3=0
c Dewey revised this code in Jan 2005 to fix error in removal of dimer
do 51 i=1,natoms
if ((rv(5,i) .gt. 0 .and. neigh(i) .eq. 0) .or.
$
rv(2,i) .gt. yline) then
if(neigh(i) .ne. 0 ) then
ijy=0
do 716 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (rv(2,j) .le. yline) ijy=ijy+1
716
continue
if(ijy .eq. 0) then
njud(i)=1
n1=n1+1
if (i .le. natoms2 .and. nECRon .ne. 0) n3=n3+1
else
njud(i)=-n1
endif
else
njud(i)=1
294
APPENDIX I. MOLECULAR DYNAMICS CODE
n1=n1+1
if (i .le. natoms2 .and. nECRon .ne. 0) n3=n3+1
endif
c Dewey added this code on 12/13/2004
if(njud(i) .eq. 1 )
*
write (6,1739) "Rmatom: ", time, i, itype(i),
*
rv(1,i), rv(2,i), rv(3,i)
else
njud(i)=-n1
endif
51
continue
1739 format(A,f11.5,’,’,i5,’,’,i4,3(’,’,f11.7))
if (n1 .eq. 0) return
n1=0
if (nECRon .ne. 0) then
now2=nnindx2(n1stps-1)
endif
now1=nnindx(0)
do 1 i=1,natoms
if (newlst .ne. 1) then
npre1=now1
now1=nnindx(i)
endif
if (nECRon .ne. 0 .and. i .ge. n1stps .and. i .le. natoms2)
*
then
npre2=now2
now2=nnindx2(i)
endif
if (njud(i) .eq. 1) then
if (itype(i) .eq. inert) then
nmo=nmo+1
emo=emo+.5*(rv(4,i)**2+rv(5,i)**2+rv(6,i)**2)*
$
amass(itype(i))
endif
goto 1
endif
n1=n1+1
do 52 l=1,3
u1(l,n1)=u1(l,i)
u2(l,n1)=u2(l,i)
u3(l,n1)=u3(l,i)
u4(l,n1)=u4(l,i)
u5(l,n1)=u5(l,i)
y(l,n1)=y(l,i)
y(l+3,n1)=y(l+3,i)
52
continue
posfx(1,n1)=posfx(1,i)
posfx(2,n1)=posfx(2,i)
posfx(3,n1)=posfx(3,i)
ipntrg(n1)=ipntrg(i)
ipntfx(n1)=ipntfx(i)
itype(n1)=itype(i)
if (nECRon .ne. 0 .and. i .ge. n1stps .and. i .le. natoms2) then
nnindx2(n1)=nnindx2(n1-1)
do 93 jtmp=npre2+1,now2
j=nnlst2(jtmp)
if (njud(j) .eq. 1) goto 93
nnindx2(n1)=nnindx2(n1)+1
nnlst2(nnindx2(n1))=j+njud(j)
be(nnindx2(n1),1)=be(jtmp,1)
be(nnindx2(n1),2)=be(jtmp,2)
93
continue
endif
if (newlst .ne. 1) then
295
APPENDIX I. MOLECULAR DYNAMICS CODE
92
2600
1
6
nnindx(n1)=nnindx(n1-1)
do 92 jtmp=npre1+1,now1
j=nnlst(jtmp)
if (njud(j) .eq. 1) goto 92
nnindx(n1)=nnindx(n1)+1
nnlst(nnindx(n1))=j+njud(j)
continue
do 2600 j = 1,3
rold(j,n1) = rold(j,i)
continue
endif
if (nECRon .ne. 0 .and. i .ge. n1stps) then
Va(n1)=Va(i)
endif
continue
natoms=n1
if (ibdtyp.eq.1) ndegfr=natoms
if (ibdtyp.eq.2) then
do 6 i=1,6
y(i,natoms+1)=y(i,ndegfr)
continue
ndegfr=natoms+1
endif
if (nECRon .ne. 0) natoms2=natoms2-n3
return
end
I.3.9 Output subroutine
output
c************************************************************************
c
c this routine outputs the current configuration to file 20
c as well as the instantaneous values of the temperature and
c stress tensor.
c
subroutine output(t,iclfor)
include ’vap.inc’
data ifirst/0/,ipcnt/-1/
c
c
c compute the physical (unscaled) coordinates
c
call colect
call uscale
c
c compute the energy, temperature and pressure
c
call calce(ekin,pot,etot,temp,press,iclfor,t)
c
c determine the maximun change in total energy
c
if(ifirst.eq.0)then
ifirst=1
eold=etot
detops = 0.0
else
de1=abs(etot-eold)
detops = amax1(detops,de1)
eold=etot
endif
296
APPENDIX I. MOLECULAR DYNAMICS CODE
c
c
c
print out energy, temperature and pressure
ipcnt = mod(ipcnt + 1,ipitera)
if(ipcnt.eq.0)then
write(6,9001)t,ekin,pot,etot
9001
format(’ output: time,kin,pot,tot’,f11.3,3e13.5)
write(6,9002)temp,press
9002
format(9x,’temperature:’,g12.5,5x,’pressure:’,g12.5)
if (ifxtmp.ne.0) then
write(6,9004)(ireg,natrg(ireg),acttmp(ireg),ireg=0,nregs)
9004
format(’
region:’,i5,’ number of atoms:’,i10,
.
’ temperature:’,g12.5)
if (ivapor .eq. 1) write(6,9981)ycenter(1),ywidth(1)
9981
format(9x,’
ycenter:’,g12.5,5x,’ ywidth:’,g12.5)
endif
if (ibdtyp.eq.2) then
write(6,9003)(perlen(i),i=1,3)
end if
9003
format(9x,’perlen:’,3g17.8)
endif
c
c increment the average counters
c
nskipd = nskipd + 1
if (nskipd.gt.nequil) then
nave = nave + 1
avpres = avpres + press
avtemp = avtemp + temp
avvol = avvol + perlen(1)*perlen(2)*perlen(3)
avke = avke + ekin
avpe = avpe + pot
do 100 i = 1,3
100
avstrs(i) = avstrs(i) + stresst(i)
do 101 ireg = 0,nregs
101
avtmprg(ireg) = avtmprg(ireg) + acttmp(ireg)
end if
c
c write to file 20
c
if (ivapor .eq. 1 .and. iconf .ne. 0) then
write(20) natoms,ntypes
write(20) (perub(i),i=1,3),(perlb(i),i=1,3)
write(20) (amass(i),ielement(i),i=1,ntypes)
endif
if (iconf.eq.1) then
write(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
write(20) ((rv(i,j),i=1,3),itype(j),j=1,natoms)
end if
if (iconf.eq.2) then
write(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
write(20) ((rv(i,j),i=1,6),itype(j),j=1,natoms)
end if
if (iconf.eq.3) then
write(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
write(20) ((rv(i,j),i=1,3),itype(j),j=1,natoms)
end if
if (iconf.eq.4) then
write(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
write(20) ((rv(i,j),i=1,6),itype(j),j=1,natoms)
end if
call flush(20)
call flush(6)
return
297
APPENDIX I. MOLECULAR DYNAMICS CODE
end
I.3.10 Electron counting subroutines and functions
ECR
1
subroutine ECR()
include ’vap.inc’
do 1 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
ps=gtotb0(i)*rdSGG+1.0
ks=ps
ks=min0(ks,ngrid7-1)
ps=ps-ks
ps=amin1(ps,1.0)
Stotb(i)=((SG3(ks)*ps+SG2(ks))*ps+SG1(ks))*ps+SG(ks)
dStotb(i)=(SG6(ks)*ps+SG5(ks))*ps+SG4(ks)
ps=totb(i)*rddzero+1.0
ks=ps
ks=min0(ks,ngrid7-1)
ps=ps-ks
ps=amin1(ps,1.0)
dbfac(i)=((dzero3(ks)*ps+dzero2(ks))*ps+
*
dzero1(ks))*ps+dzero(ks)
ddbfac(i)=(dzero6(ks)*ps+dzero5(ks))*ps+
*
dzero4(ks)
continue
indx=0
do 8 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 8 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 8
if (itype(j) .eq. inert) cycle
indx=indx+1
if (gtotb0(i) .gt. gtotb0(j)) then
Btotb(indx)=gtotb0(i)
nBm(indx)=i
IBtotb(indx)=0
else
Btotb(indx)=gtotb0(j)
nBm(indx)=j
IBtotb(indx)=0
endif
ntry=0
if (gtotb0m(i) .gt. gtotb0m(j)) then
try=gtotb0m(j)
ntry=ngm(j)
ntry1=j
else
try=gtotb0m(i)
ntry=ngm(i)
ntry1=i
endif
if (Btotb(indx) .lt. try .and. ntry .ne. 0) then
Btotb(indx)=try
nBm(indx)=ntry
IBtotb(indx)=ntry1
endif
ps=Btotb(indx)*rdGG+1.0
ks=ps
ks=min0(ks,ngrid7-1)
298
APPENDIX I. MOLECULAR DYNAMICS CODE
ps=ps-ks
ps=amin1(ps,1.0)
Btotb(indx)=((BG3(ks)*ps+BG2(ks))*ps+BG1(ks))*ps+BG(ks)
dBtotb(indx)=(BG6(ks)*ps+BG5(ks))*ps+BG4(ks)
8
continue
call initialize()
call calbe(1.0e-2,200,1.0e-4,20)
do 2 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
de(i)=de0(i)
2
continue
indx=0
do 3 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 4 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 4
if (itype(j) .eq. inert) cycle
indx=indx+1
de(i)=de(i)-be(indx,1)*Btotb(indx)
de(j)=de(j)-be(indx,2)*Btotb(indx)
4
continue
3
continue
Esbond=0.0
Edbond=0.0
Ebcons=0.0
Edcons=0.0
indx=0
do 6 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
tmpi=Stotb(i)*dbfac(i)*(de(i)-alp(itype(i))*gtotb(i))
Edbond=Edbond+wd(itype(i))*tmpi*tmpi
tmp1=2.0*wd(itype(i))*tmpi*Stotb(i)*
*
(de(i)-alp(itype(i))*gtotb(i))*ddbfac(i)
tmp2=2.0*wd(itype(i))*tmpi*dbfac(i)*
*
(de(i)-alp(itype(i))*gtotb(i))*dStotb(i)
tmp3=-2.0*wd(itype(i))*tmpi*Stotb(i)*dbfac(i)*alp(itype(i))
do 3301 nsum=1,neigh(i)
jsum=neighT(i,nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3301
dpr1=(tmp1*dtotb(i,nsum)+tmp3*dgtotb(i,nsum))/
*
rij(i,nsum)
f(1,i)=f(1,i)-dpr1*disij(1,i,nsum)
f(2,i)=f(2,i)-dpr1*disij(2,i,nsum)
f(3,i)=f(3,i)-dpr1*disij(3,i,nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,i,nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,i,nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,i,nsum)
stresst(1)=stresst(1)*
dpr1*disij(1,i,nsum)*disij(1,i,nsum)/perlen(1)
stresst(2)=stresst(2)*
dpr1*disij(2,i,nsum)*disij(2,i,nsum)/perlen(2)
stresst(3)=stresst(3)*
dpr1*disij(3,i,nsum)*disij(3,i,nsum)/perlen(3)
3301
continue
do 3302 nsum=1,neighb(i)
if (ncalbulk .ne. 0) then
jsum=neighTb(i,nsum)
dpr1=tmp2*dgtotb0(i,nsum)/rijT(i,nsum)
f(1,i)=f(1,i)-dpr1*disijT(1,i,nsum)
f(2,i)=f(2,i)-dpr1*disijT(2,i,nsum)
f(3,i)=f(3,i)-dpr1*disijT(3,i,nsum)
if (jsum .ge. n1stps) then
299
APPENDIX I. MOLECULAR DYNAMICS CODE
f(1,jsum)=f(1,jsum)+dpr1*disijT(1,i,nsum)
f(2,jsum)=f(2,jsum)+dpr1*disijT(2,i,nsum)
f(3,jsum)=f(3,jsum)+dpr1*disijT(3,i,nsum)
endif
stresst(1)=stresst(1)*
dpr1*disijT(1,i,nsum)*disijT(1,i,nsum)/perlen(1)
stresst(2)=stresst(2)*
dpr1*disijT(2,i,nsum)*disijT(2,i,nsum)/perlen(2)
stresst(3)=stresst(3)*
dpr1*disijT(3,i,nsum)*disijT(3,i,nsum)/perlen(3)
else
jsum=neighT(i,nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3302
dpr1=tmp2*dgtotb(i,nsum)/rij(i,nsum)
f(1,i)=f(1,i)-dpr1*disij(1,i,nsum)
f(2,i)=f(2,i)-dpr1*disij(2,i,nsum)
f(3,i)=f(3,i)-dpr1*disij(3,i,nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,i,nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,i,nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,i,nsum)
stresst(1)=stresst(1)*
dpr1*disij(1,i,nsum)*disij(1,i,nsum)/perlen(1)
stresst(2)=stresst(2)*
dpr1*disij(2,i,nsum)*disij(2,i,nsum)/perlen(2)
stresst(3)=stresst(3)*
dpr1*disij(3,i,nsum)*disij(3,i,nsum)/perlen(3)
endif
3302
continue
if (de(i) .lt. 0.0) then
Edcons=Edcons+wc3(itype(i))*de(i)*de(i)
endif
if (de(i) .gt. 2.0*gtotb(i)) then
Edcons=Edcons+wc4(itype(i))*(de(i)-2.0*gtotb(i))**2
tmp3=-4.0*wc4(itype(i))*(de(i)-2.0*gtotb(i))
do 3303 nsum=1,neigh(i)
jsum=neighT(i,nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3303
dpr1=tmp3*dgtotb(i,nsum)/rij(i,nsum)
f(1,i)=f(1,i)-dpr1*disij(1,i,nsum)
f(2,i)=f(2,i)-dpr1*disij(2,i,nsum)
f(3,i)=f(3,i)-dpr1*disij(3,i,nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,i,nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,i,nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,i,nsum)
stresst(1)=stresst(1)*
dpr1*disij(1,i,nsum)*disij(1,i,nsum)/perlen(1)
stresst(2)=stresst(2)*
dpr1*disij(2,i,nsum)*disij(2,i,nsum)/perlen(2)
stresst(3)=stresst(3)*
dpr1*disij(3,i,nsum)*disij(3,i,nsum)/perlen(3)
3303
continue
endif
do 7 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 7
if (itype(j) .eq. inert) cycle
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
300
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
endif
i1=(itype(i)-1)*ntypes+itype(j)
j1=(itype(j)-1)*ntypes+itype(i)
indx=indx+1
tmpj=Stotb(j)*dbfac(j)*(de(j)-alp(itype(j))*gtotb(j))
tmp=2.0*wd(itype(i))*tmpi
tmp1=-tmp*Stotb(i)*dbfac(i)*(1.0-Btotb(indx))*
dqij(indx,1)/(1.0+deltotb(i))
tmp2=-tmp*Stotb(i)*dbfac(i)*
(be(indx,1)-qij(indx,1)/(1.0+deltotb(i)))*dBtotb(indx)
tmp3=tmp*Stotb(i)*dbfac(i)*(1.0-Btotb(indx))*
qij(indx,1)/(1.0+deltotb(i))**2
dpr1=tmp1/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)dpr1*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 3304 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
dpr1=tmp2*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3304
dpr1=tmp2*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disij(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))-
301
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
3304
*
*
*
*
*
*
3305
*
*
*
*
*
*
*
dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
perlen(3)
endif
continue
do 3305 nsum=1,neigh(i)
jsum=neighT(i,nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3305
dpr1=tmp3*ddeltotb(i,nsum)/rij(i,nsum)
f(1,i)=f(1,i)-dpr1*disij(1,i,nsum)
f(2,i)=f(2,i)-dpr1*disij(2,i,nsum)
f(3,i)=f(3,i)-dpr1*disij(3,i,nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,i,nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,i,nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,i,nsum)
stresst(1)=stresst(1)dpr1*disij(1,i,nsum)*disij(1,i,nsum)/
perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,nsum)*disij(2,i,nsum)/
perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,nsum)*disij(3,i,nsum)/
perlen(3)
continue
if (de(i) .lt. 0.0) then
tmp=2.0*wc3(itype(i))*de(i)
tmp1=-tmp*(1.0-Btotb(indx))*dqij(indx,1)/(1.0+deltotb(i))
tmp2=-tmp*(be(indx,1)-qij(indx,1)/(1.0+deltotb(i)))*
dBtotb(indx)
tmp3=tmp*(1.0-Btotb(indx))*qij(indx,1)/(1.0+deltotb(i))**2
dpr1=tmp1/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)dpr1*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 3306 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
dpr1=tmp2*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
302
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
3306
*
*
*
*
*
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3306
dpr1=tmp2*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disij(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
perlen(3)
endif
continue
do 3307 nsum=1,neigh(i)
jsum=neighT(i,nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3307
dpr1=tmp3*ddeltotb(i,nsum)/rij(i,nsum)
f(1,i)=f(1,i)-dpr1*disij(1,i,nsum)
f(2,i)=f(2,i)-dpr1*disij(2,i,nsum)
f(3,i)=f(3,i)-dpr1*disij(3,i,nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,i,nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,i,nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,i,nsum)
stresst(1)=stresst(1)dpr1*disij(1,i,nsum)*disij(1,i,nsum)/
perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,nsum)*disij(2,i,nsum)/
perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,nsum)*disij(3,i,nsum)/
303
APPENDIX I. MOLECULAR DYNAMICS CODE
*
3307
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
perlen(3)
continue
endif
if (de(i) .gt. 2.0*gtotb(i)) then
tmp=2.0*wc4(itype(i))*(de(i)-2.0*gtotb(i))
tmp1=-tmp*(1.0-Btotb(indx))*dqij(indx,1)/(1.0+deltotb(i))
tmp2=-tmp*(be(indx,1)-qij(indx,1)/(1.0+deltotb(i)))*
dBtotb(indx)
tmp3=tmp*(1.0-Btotb(indx))*qij(indx,1)/(1.0+deltotb(i))**2
dpr1=tmp1/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)dpr1*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 3308 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
dpr1=tmp2*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3308
dpr1=tmp2*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disij(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
304
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
3308
*
*
*
*
*
*
3309
*
*
*
*
*
*
*
*
*
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
perlen(3)
endif
continue
do 3309 nsum=1,neigh(i)
jsum=neighT(i,nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3309
dpr1=tmp3*ddeltotb(i,nsum)/rij(i,nsum)
f(1,i)=f(1,i)-dpr1*disij(1,i,nsum)
f(2,i)=f(2,i)-dpr1*disij(2,i,nsum)
f(3,i)=f(3,i)-dpr1*disij(3,i,nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,i,nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,i,nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,i,nsum)
stresst(1)=stresst(1)dpr1*disij(1,i,nsum)*disij(1,i,nsum)/
perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,nsum)*disij(2,i,nsum)/
perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,nsum)*disij(3,i,nsum)/
perlen(3)
continue
endif
tmp=2.0*wd(itype(j))*tmpj
tmp1=-tmp*Stotb(j)*dbfac(j)*(1.0-Btotb(indx))*
dqij(indx,2)/(1.0+deltotb(j))
tmp2=-tmp*Stotb(j)*dbfac(j)*
(be(indx,2)-qij(indx,2)/(1.0+deltotb(j)))*dBtotb(indx)
tmp3=tmp*Stotb(j)*dbfac(j)*(1.0-Btotb(indx))*
qij(indx,2)/(1.0+deltotb(j))**2
dpr1=tmp1/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)dpr1*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 3310 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
dpr1=tmp2*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))-
305
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
3310
*
*
*
*
*
*
dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3310
dpr1=tmp2*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disij(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
perlen(3)
endif
continue
do 3311 nsum=1,neigh(j)
ksum=neighT(j,nsum)
if (itype(ksum) .eq. inert) cycle
if (ksum .lt. n1stps) goto 3311
dpr1=tmp3*ddeltotb(j,nsum)/rij(j,nsum)
f(1,j)=f(1,j)-dpr1*disij(1,j,nsum)
f(2,j)=f(2,j)-dpr1*disij(2,j,nsum)
f(3,j)=f(3,j)-dpr1*disij(3,j,nsum)
f(1,ksum)=f(1,ksum)+dpr1*disij(1,j,nsum)
f(2,ksum)=f(2,ksum)+dpr1*disij(2,j,nsum)
f(3,ksum)=f(3,ksum)+dpr1*disij(3,j,nsum)
stresst(1)=stresst(1)dpr1*disij(1,j,nsum)*disij(1,j,nsum)/
perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,j,nsum)*disij(2,j,nsum)/
perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,j,nsum)*disij(3,j,nsum)/
perlen(3)
306
APPENDIX I. MOLECULAR DYNAMICS CODE
3311
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
continue
if (de(j) .lt. 0.0) then
tmp=2.0*wc3(itype(j))*de(j)
tmp1=-tmp*(1.0-Btotb(indx))*dqij(indx,2)/(1.0+deltotb(j))
tmp2=-tmp*(be(indx,2)-qij(indx,2)/(1.0+deltotb(j)))*
dBtotb(indx)
tmp3=tmp*(1.0-Btotb(indx))*qij(indx,2)/(1.0+deltotb(j))**2
dpr1=tmp1/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)dpr1*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 3312 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
dpr1=tmp2*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3312
dpr1=tmp2*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disij(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
307
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
3312
*
*
*
*
*
*
3313
*
*
*
*
*
*
*
*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
perlen(3)
endif
continue
do 3313 nsum=1,neigh(j)
ksum=neighT(j,nsum)
if (itype(ksum) .eq. inert) cycle
if (ksum .lt. n1stps) goto 3313
dpr1=tmp3*ddeltotb(j,nsum)/rij(j,nsum)
f(1,j)=f(1,j)-dpr1*disij(1,j,nsum)
f(2,j)=f(2,j)-dpr1*disij(2,j,nsum)
f(3,j)=f(3,j)-dpr1*disij(3,j,nsum)
f(1,ksum)=f(1,ksum)+dpr1*disij(1,j,nsum)
f(2,ksum)=f(2,ksum)+dpr1*disij(2,j,nsum)
f(3,ksum)=f(3,ksum)+dpr1*disij(3,j,nsum)
stresst(1)=stresst(1)dpr1*disij(1,j,nsum)*disij(1,j,nsum)/
perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,j,nsum)*disij(2,j,nsum)/
perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,j,nsum)*disij(3,j,nsum)/
perlen(3)
continue
endif
if (de(j) .gt. 2.0*gtotb(j)) then
tmp=2.0*wc4(itype(j))*(de(j)-2.0*gtotb(j))
tmp1=-tmp*(1.0-Btotb(indx))*dqij(indx,2)/(1.0+deltotb(j))
tmp2=-tmp*(be(indx,2)-qij(indx,2)/(1.0+deltotb(j)))*
dBtotb(indx)
tmp3=tmp*(1.0-Btotb(indx))*qij(indx,2)/(1.0+deltotb(j))**2
dpr1=tmp1/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)dpr1*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 3314 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
dpr1=tmp2*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
308
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
3314
*
*
*
*
*
*
3315
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 3314
dpr1=tmp2*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disij(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
perlen(3)
endif
continue
do 3315 nsum=1,neigh(j)
ksum=neighT(j,nsum)
if (itype(ksum) .eq. inert) cycle
if (ksum .lt. n1stps) goto 3315
dpr1=tmp3*ddeltotb(j,nsum)/rij(j,nsum)
f(1,j)=f(1,j)-dpr1*disij(1,j,nsum)
f(2,j)=f(2,j)-dpr1*disij(2,j,nsum)
f(3,j)=f(3,j)-dpr1*disij(3,j,nsum)
f(1,ksum)=f(1,ksum)+dpr1*disij(1,j,nsum)
f(2,ksum)=f(2,ksum)+dpr1*disij(2,j,nsum)
f(3,ksum)=f(3,ksum)+dpr1*disij(3,j,nsum)
stresst(1)=stresst(1)dpr1*disij(1,j,nsum)*disij(1,j,nsum)/
perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,j,nsum)*disij(2,j,nsum)/
perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,j,nsum)*disij(3,j,nsum)/
perlen(3)
continue
endif
tmp1=qij(indx,1)/qij0(i1)+qij(indx,2)/qij0(j1)
309
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
tmp2=be(indx,1)+be(indx,2)-tmp1
tmp3=Btotb(indx)*tmp2
tmp4=dqij(indx,1)/qij0(i1)+dqij(indx,2)/qij0(j1)
tmp5=-4.0*wb(i12)*tmp3*Btotb(indx)*tmp4
tmp6=4.0*wb(i12)*tmp3*tmp2*dBtotb(indx)
Esbond=Esbond+2.0*wb(i12)*tmp3*tmp3
dpr1=tmp5/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)dpr1*disij(1,i,jtmp)*disij(1,i,jtmp)/
perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,jtmp)*disij(2,i,jtmp)/
perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,jtmp)*disij(3,i,jtmp)/
perlen(3)
do 6001 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
dpr1=tmp6*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 6001
dpr1=tmp6*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disij(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
310
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
6001
*
*
*
*
*
*
*
*
*
*
*
*
*
*
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
perlen(3)
endif
continue
tmp11=be(indx,1)+be(indx,2)
if (tmp11 .lt. 0.0) Ebcons=Ebcons+2.0*wc1(i12)*tmp11*tmp11
tmp11=tmp11-2.0
if (tmp11 .gt. 0.0) Ebcons=Ebcons+2.0*wc2(i12)*tmp11*tmp11
tmp1=amax1(real(2.0-Va(j)),
real(Va(i)-8.0*Va(i)/Vai(itype(i))))/qij0(i1)
aijlow=tmp1*qij(indx,1)
tmp2=amin1(real(Va(i)),
real(2.0-Va(j)+8.0*Va(j)/Vai(itype(j))))/qij0(i1)
aijhigh=tmp2*qij(indx,1)
tmp3=amax1(real(2.0-Va(i)),
real(Va(j)-8.0*Va(j)/Vai(itype(j))))/qij0(j1)
ajilow=tmp3*qij(indx,2)
tmp4=amin1(real(Va(j)),
real(2.0-Va(i)+8.0*Va(i)/Vai(itype(i))))/qij0(j1)
ajihigh=tmp4*qij(indx,2)
tmp11a=Btotb(indx)*be(indx,1)+
(1.0-Btotb(indx))*qij(indx,1)/(1.0+deltotb(i))
tmp11b=Btotb(indx)*be(indx,2)+
(1.0-Btotb(indx))*qij(indx,2)/(1.0+deltotb(j))
if (tmp11a .lt. aijlow) then
Ebcons=Ebcons+wc1(i12)*(tmp11a-aijlow)**2
tmp21=(1.0-Btotb(indx))*dqij(indx,1)/(1.0+deltotb(i))
tmp22=(be(indx,1)-qij(indx,1)/(1.0+deltotb(i)))*
dBtotb(indx)
tmp23=-(1.0-Btotb(indx))*qij(indx,1)/(1.0+deltotb(i))**2
tmp24=tmp1*dqij(indx,1)
tmp25=2.0*wc1(i12)*(tmp11a-aijlow)*tmp22
tmp26=2.0*wc1(i12)*(tmp11a-aijlow)*tmp23
dpr1=2.0*wc1(i12)*(tmp11a-aijlow)*
(tmp21-tmp24)/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)-dpr1*
disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 6005 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
dpr1=tmp25*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
311
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
6005
*
*
*
*
*
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 6005
dpr1=tmp25*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disij(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
perlen(3)
endif
continue
do 6201 nsum=1,neigh(i)
jsum=neighT(i,nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 6201
dpr1=tmp26*ddeltotb(i,nsum)/rij(i,nsum)
f(1,i)=f(1,i)-dpr1*disij(1,i,nsum)
f(2,i)=f(2,i)-dpr1*disij(2,i,nsum)
f(3,i)=f(3,i)-dpr1*disij(3,i,nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,i,nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,i,nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,i,nsum)
stresst(1)=stresst(1)dpr1*disij(1,i,nsum)*disij(1,i,nsum)/
perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,nsum)*disij(2,i,nsum)/
perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,nsum)*disij(3,i,nsum)/
312
APPENDIX I. MOLECULAR DYNAMICS CODE
*
6201
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
perlen(3)
continue
endif
if (tmp11a .gt. aijhigh) then
Ebcons=Ebcons+wc2(i12)*(tmp11a-aijhigh)**2
tmp21=(1.0-Btotb(indx))*dqij(indx,1)/(1.0+deltotb(i))
tmp22=(be(indx,1)-qij(indx,1)/(1.0+deltotb(i)))*
dBtotb(indx)
tmp23=-(1.0-Btotb(indx))*qij(indx,1)/(1.0+deltotb(i))**2
tmp24=tmp2*dqij(indx,1)
tmp25=2.0*wc2(i12)*(tmp11a-aijhigh)*tmp22
tmp26=2.0*wc2(i12)*(tmp11a-aijhigh)*tmp23
dpr1=2.0*wc2(i12)*(tmp11a-aijhigh)*
(tmp21-tmp24)/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)-dpr1*
disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 6006 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
dpr1=tmp25*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 6006
dpr1=tmp25*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disij(2,nBm(indx),nsum)
313
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
6006
*
*
*
*
*
*
6202
*
*
*
*
*
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
perlen(3)
endif
continue
do 6202 nsum=1,neigh(i)
jsum=neighT(i,nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 6202
dpr1=tmp26*ddeltotb(i,nsum)/rij(i,nsum)
f(1,i)=f(1,i)-dpr1*disij(1,i,nsum)
f(2,i)=f(2,i)-dpr1*disij(2,i,nsum)
f(3,i)=f(3,i)-dpr1*disij(3,i,nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,i,nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,i,nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,i,nsum)
stresst(1)=stresst(1)dpr1*disij(1,i,nsum)*disij(1,i,nsum)/
perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,i,nsum)*disij(2,i,nsum)/
perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,i,nsum)*disij(3,i,nsum)/
perlen(3)
continue
endif
if (tmp11b .lt. ajilow) then
Ebcons=Ebcons+wc1(i12)*(tmp11b-ajilow)**2
tmp21=(1.0-Btotb(indx))*dqij(indx,2)/(1.0+deltotb(j))
tmp22=(be(indx,2)-qij(indx,2)/(1.0+deltotb(j)))*
dBtotb(indx)
tmp23=-(1.0-Btotb(indx))*qij(indx,2)/(1.0+deltotb(j))**2
tmp24=tmp3*dqij(indx,2)
tmp25=2.0*wc1(i12)*(tmp11b-ajilow)*tmp22
tmp26=2.0*wc1(i12)*(tmp11b-ajilow)*tmp23
dpr1=2.0*wc1(i12)*(tmp11b-ajilow)*
(tmp21-tmp24)/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)-dpr1*
disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 6007 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
314
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
6007
*
dpr1=tmp25*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 6007
dpr1=tmp25*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disij(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
perlen(3)
endif
continue
do 6203 nsum=1,neigh(j)
isum=neighT(j,nsum)
if (itype(isum) .eq. inert) cycle
if (isum .lt. n1stps) goto 6203
dpr1=tmp26*ddeltotb(j,nsum)/rij(j,nsum)
f(1,j)=f(1,j)-dpr1*disij(1,j,nsum)
f(2,j)=f(2,j)-dpr1*disij(2,j,nsum)
f(3,j)=f(3,j)-dpr1*disij(3,j,nsum)
f(1,isum)=f(1,isum)+dpr1*disij(1,j,nsum)
f(2,isum)=f(2,isum)+dpr1*disij(2,j,nsum)
f(3,isum)=f(3,isum)+dpr1*disij(3,j,nsum)
stresst(1)=stresst(1)dpr1*disij(1,j,nsum)*disij(1,j,nsum)/
315
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
6203
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
perlen(1)
stresst(2)=stresst(2)dpr1*disij(2,j,nsum)*disij(2,j,nsum)/
perlen(2)
stresst(3)=stresst(3)dpr1*disij(3,j,nsum)*disij(3,j,nsum)/
perlen(3)
continue
endif
if (tmp11b .gt. ajihigh) then
Ebcons=Ebcons+wc2(i12)*(tmp11b-ajihigh)**2
tmp21=(1.0-Btotb(indx))*dqij(indx,2)/(1.0+deltotb(j))
tmp22=(be(indx,2)-qij(indx,2)/(1.0+deltotb(j)))*
dBtotb(indx)
tmp23=-(1.0-Btotb(indx))*qij(indx,2)/(1.0+deltotb(j))**2
tmp24=tmp4*dqij(indx,2)
tmp25=2.0*wc2(i12)*(tmp11b-ajihigh)*tmp22
tmp26=2.0*wc2(i12)*(tmp11b-ajihigh)*tmp23
dpr1=2.0*wc2(i12)*(tmp11b-ajihigh)*
(tmp21-tmp24)/rij(i,jtmp)
f(1,i)=f(1,i)-dpr1*disij(1,i,jtmp)
f(2,i)=f(2,i)-dpr1*disij(2,i,jtmp)
f(3,i)=f(3,i)-dpr1*disij(3,i,jtmp)
f(1,j)=f(1,j)+dpr1*disij(1,i,jtmp)
f(2,j)=f(2,j)+dpr1*disij(2,i,jtmp)
f(3,j)=f(3,j)+dpr1*disij(3,i,jtmp)
stresst(1)=stresst(1)-dpr1*
disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
stresst(2)=stresst(2)-dpr1*
disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
stresst(3)=stresst(3)-dpr1*
disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 6008 nsum=1,neighb(nBm(indx))
if (ncalbulk .ne. 0) then
jsum=neighTb(nBm(indx),nsum)
dpr1=tmp25*dgtotb0(nBm(indx),nsum)/
rijT(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))dpr1*disijT(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))dpr1*disijT(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))dpr1*disijT(3,nBm(indx),nsum)
if (jsum .ge. n1stps) then
f(1,jsum)=f(1,jsum)+
dpr1*disijT(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+
dpr1*disijT(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+
dpr1*disijT(3,nBm(indx),nsum)
endif
stresst(1)=stresst(1)-dpr1*
disijT(1,nBm(indx),nsum)*disijT(1,nBm(indx),nsum)/
perlen(1)
stresst(2)=stresst(2)-dpr1*
disijT(2,nBm(indx),nsum)*disijT(2,nBm(indx),nsum)/
perlen(2)
stresst(3)=stresst(3)-dpr1*
disijT(3,nBm(indx),nsum)*disijT(3,nBm(indx),nsum)/
perlen(3)
else
jsum=neighT(nBm(indx),nsum)
if (itype(jsum) .eq. inert) cycle
if (jsum .lt. n1stps) goto 6008
316
APPENDIX I. MOLECULAR DYNAMICS CODE
dpr1=tmp25*dgtotb(nBm(indx),nsum)/
rij(nBm(indx),nsum)
f(1,nBm(indx))=f(1,nBm(indx))*
dpr1*disij(1,nBm(indx),nsum)
f(2,nBm(indx))=f(2,nBm(indx))*
dpr1*disij(2,nBm(indx),nsum)
f(3,nBm(indx))=f(3,nBm(indx))*
dpr1*disij(3,nBm(indx),nsum)
f(1,jsum)=f(1,jsum)+dpr1*disij(1,nBm(indx),nsum)
f(2,jsum)=f(2,jsum)+dpr1*disij(2,nBm(indx),nsum)
f(3,jsum)=f(3,jsum)+dpr1*disij(3,nBm(indx),nsum)
stresst(1)=stresst(1)-dpr1*
*
disij(1,nBm(indx),nsum)*disij(1,nBm(indx),nsum)/
*
perlen(1)
stresst(2)=stresst(2)-dpr1*
*
disij(2,nBm(indx),nsum)*disij(2,nBm(indx),nsum)/
*
perlen(2)
stresst(3)=stresst(3)-dpr1*
*
disij(3,nBm(indx),nsum)*disij(3,nBm(indx),nsum)/
*
perlen(3)
endif
6008
continue
do 6204 nsum=1,neigh(j)
isum=neighT(j,nsum)
if (itype(isum) .eq. inert) cycle
if (isum .lt. n1stps) goto 6204
dpr1=tmp26*ddeltotb(j,nsum)/rij(j,nsum)
f(1,j)=f(1,j)-dpr1*disij(1,j,nsum)
f(2,j)=f(2,j)-dpr1*disij(2,j,nsum)
f(3,j)=f(3,j)-dpr1*disij(3,j,nsum)
f(1,isum)=f(1,isum)+dpr1*disij(1,j,nsum)
f(2,isum)=f(2,isum)+dpr1*disij(2,j,nsum)
f(3,isum)=f(3,isum)+dpr1*disij(3,j,nsum)
stresst(1)=stresst(1)*
dpr1*disij(1,j,nsum)*disij(1,j,nsum)/
*
perlen(1)
stresst(2)=stresst(2)*
dpr1*disij(2,j,nsum)*disij(2,j,nsum)/
*
perlen(2)
stresst(3)=stresst(3)*
dpr1*disij(3,j,nsum)*disij(3,j,nsum)/
*
perlen(3)
6204
continue
endif
7
continue
6
continue
totE=Esbond+Edbond+Ebcons+Edcons
c Added by Dewey on 4/25/2005
c to speed up ECR calculation by limiting the maximum force value
fmax=0.0
do 982 i=1,natoms
do 982 j=1,3
if (abs(f(j,i)) .gt. 10) then
write(6,*) "!Maximum force exeeded for atoms ", i, " and ", j
write(6,*) "! force(old)=", f(j,i)
write(6,*) "! force(new)=", f(j,i)/abs(f(j,i))*10
f(j,i)=f(j,i)/abs(f(j,i))*10
endif
982
continue
c done with addition that maxes out force to 10
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
*
317
APPENDIX I. MOLECULAR DYNAMICS CODE
initialize
10
20
3
2
6
5
4
subroutine initialize()
include ’vap.inc’
do 10 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
de0(i)=Va(i)
continue
indx=0
do 20 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 20 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 20
if (itype(j) .eq. inert) cycle
indx=indx+1
de0(i)=de0(i)-(1.0-Btotb(indx))*qij(indx,1)/(1.0+deltotb(i))
de0(j)=de0(j)-(1.0-Btotb(indx))*qij(indx,2)/(1.0+deltotb(j))
continue
if (nforce1 .eq. 0) then
indx=0
do 2 i=n1stps,natoms
nnindx2(i)=nnindx2(i-1)
if (itype(i) .eq. inert) cycle
do 3 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 3
if (itype(j) .eq. inert) cycle
indx=indx+1
nnindx2(i)=nnindx2(i)+1
nnlst2(indx)=j
be(indx,1)=0.0
be(indx,2)=0.0
continue
continue
natoms2=natoms
nforce1=1
else
indx=0
do 4 i=n1stps,natoms2
if (itype(i) .eq. inert) cycle
do 5 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 5
if (itype(j) .eq. inert) cycle
indx=indx+1
do 6 jtmp1=nnindx2(i-1)+1,nnindx2(i)
j1=nnlst2(jtmp1)
if (j1 .eq. j) then
be(indx,1)=be0(jtmp1,1)
be(indx,2)=be0(jtmp1,2)
goto 5
endif
continue
be(indx,1)=0.0
be(indx,2)=0.0
continue
continue
indx=0
do 8 i=n1stps,natoms
nnindx2(i)=nnindx2(i-1)
if (itype(i) .eq. inert) cycle
do 9 jtmp=1,neigh(i)
j=neighT(i,jtmp)
318
APPENDIX I. MOLECULAR DYNAMICS CODE
9
8
if (j .lt. i) goto 9
if (itype(j) .eq. inert) cycle
indx=indx+1
nnindx2(i)=nnindx2(i)+1
nnlst2(indx)=j
if (i .gt. natoms2) then
be(indx,1)=0.0
be(indx,2)=0.0
endif
continue
continue
natoms2=natoms
endif
return
end
calbe
110
120
900
subroutine calbe(eps,maxfn,eps1,maxfn1)
include ’vap.inc’
common /acom/ beg(natmax*neimax/2,2),sr(natmax*neimax/2,2)
call begrad(fl)
flast=fl
ifn=1
continue
indx=0
do 120 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 120 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 120
if (itype(j) .eq. inert) cycle
indx=indx+1
sr(indx,1)=0.0
sr(indx,2)=0.0
continue
gg=1.
do 220 icyc=n1stps,natoms
gglast=gg
gg=0.0
indx=0
do 900 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 900 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 900
if (itype(j) .eq. inert) cycle
indx=indx+1
gg=gg+beg(indx,1)*beg(indx,1)+beg(indx,2)*beg(indx,2)
continue
z=gg/gglast
qgmax=0.0
indx=0.0
do 160 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 160 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 160
if (itype(j) .eq. inert) cycle
indx=indx+1
sr(indx,1)=z*sr(indx,1)-beg(indx,1)
sr(indx,2)=z*sr(indx,2)-beg(indx,2)
if (abs(beg(indx,1)) .gt. qgmax) qgmax=abs(beg(indx,1))
319
APPENDIX I. MOLECULAR DYNAMICS CODE
160
901
220
240
if (abs(beg(indx,2)) .gt. qgmax) qgmax=abs(beg(indx,2))
continue
if (qgmax .lt. eps) goto 240
if (ifn.ge.maxfn) then
if (qgmax .gt. 1.0) then
write(6,*) ’ifn is greater than or equal to maxfn = ’,maxfn
write(6,*) ’but qgmax = ’,qgmax
endif
go to 240
endif
alpha=calalpha(eps1,maxfn1)
indx=0
do 901 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 901 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 901
if (itype(j) .eq. inert) cycle
indx=indx+1
be(indx,1)=be(indx,1)+alpha*sr(indx,1)
be(indx,2)=be(indx,2)+alpha*sr(indx,2)
continue
call begrad(fl)
flast=fl
ifn=ifn+1
continue
go to 110
continue
return
end
calalpha
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
function calalpha(eps,maxfn)
include ’vap.inc’
common /acom/ beg(natmax*neimax/2,2),sr(natmax*neimax/2,2)
dimension sum(natmax)
do 1 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
sum(i)=0.0
1
continue
sum1=0.0
sum2=0.0
indx=0
do 2 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 2 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 2
if (itype(j) .eq. inert) cycle
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
indx=indx+1
i1=(itype(i)-1.0)*ntypes+itype(j)
j1=(itype(j)-1.0)*ntypes+itype(i)
tmp1=qij(indx,1)/qij0(i1)+qij(indx,2)/qij0(j1)
sum1=sum1+4.0*wb(i12)*Btotb(indx)*Btotb(indx)*
320
APPENDIX I. MOLECULAR DYNAMICS CODE
*
2
3
10
(be(indx,1)+be(indx,2)-tmp1)*(sr(indx,1)+sr(indx,2))
sum2=sum2+4.0*wb(i12)*
*
(Btotb(indx)*(sr(indx,1)+sr(indx,2)))**2
sum(i)=sum(i)+sr(indx,1)*Btotb(indx)
sum(j)=sum(j)+sr(indx,2)*Btotb(indx)
continue
do 3 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
tmp=2.0*wd(itype(i))*(Stotb(i)*dbfac(i))**2
sum1=sum1-tmp*(de(i)-alp(itype(i))*gtotb(i))*sum(i)
sum2=sum2+tmp*sum(i)*sum(i)
continue
if (abs(sum2) .gt. 1e-6) then
calalpha=-sum1/sum2
else
calalpha=0.0
endif
ifn=0
continue
ifn=ifn+1
dEs1=sum1+calalpha*sum2
dEs2=sum2
indx=0
do 30 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
if (-de(i)+calalpha*sum(i) .gt. 0.0) then
dEs1=dEs1-2.0*wc3(itype(i))*
*
(de(i)*sum(i)-calalpha*sum(i)*sum(i))
dEs2=dEs2+2.0*wc3(itype(i))*sum(i)*sum(i)
endif
if (de(i)-2.0*gtotb(i)-calalpha*sum(i) .gt. 0.0) then
dEs1=dEs1-2.0*wc4(itype(i))*((de(i)-2.0*gtotb(i))*sum(i)*
calalpha*sum(i)*sum(i))
dEs2=dEs2+2.0*wc4(itype(i))*sum(i)*sum(i)
endif
do 30 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 30
if (itype(j) .eq. inert) cycle
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
i1=(itype(i)-1.0)*ntypes+itype(j)
j1=(itype(j)-1.0)*ntypes+itype(i)
indx=indx+1
tmp1=be(indx,1)+be(indx,2)
tmp2=be(indx,1)+be(indx,2)-2.0
if (tmp1+calalpha*(sr(indx,1)+sr(indx,2)) .lt. 0.0) then
dEs1=dEs1+4.0*wc1(i12)*(tmp1*(sr(indx,1)+sr(indx,2))+
*
calalpha*(sr(indx,1)+sr(indx,2))**2)
dEs2=dEs2+4.0*wc1(i12)*(sr(indx,1)+sr(indx,2))**2
endif
if (tmp2+calalpha*(sr(indx,1)+sr(indx,2)) .gt. 0.0) then
dEs1=dEs1+4.0*wc2(i12)*(tmp2*(sr(indx,1)+sr(indx,2))+
*
calalpha*(sr(indx,1)+sr(indx,2))**2)
dEs2=dEs2+4.0*wc2(i12)*(sr(indx,1)+sr(indx,2))**2
endif
tmp1=Btotb(indx)*be(indx,1)+
*
(1.0-Btotb(indx))*qij(indx,1)/(1.0+deltotb(i))
tmp2=Btotb(indx)*be(indx,2)+
321
APPENDIX I. MOLECULAR DYNAMICS CODE
*
30
(1.0-Btotb(indx))*qij(indx,2)/(1.0+deltotb(j))
aijlow=amax1(2.0-Va(j),Va(i)-8.0*Va(i)/Vai(itype(i)))*
*
qij(indx,1)/qij0(i1)
aijhigh=amin1(Va(i),2.0-Va(j)+8.0*Va(j)/Vai(itype(j)))*
*
qij(indx,1)/qij0(i1)
ajilow=amax1(2.0-Va(i),Va(j)-8.0*Va(j)/Vai(itype(j)))*
*
qij(indx,2)/qij0(j1)
ajihigh=amin1(Va(j),2.0-Va(i)+8.0*Va(i)/Vai(itype(i)))*
*
qij(indx,2)/qij0(j1)
if (tmp1+calalpha*Btotb(indx)*sr(indx,1) .lt. aijlow) then
dEs1=dEs1+2.0*wc1(i12)*
*
((tmp1-aijlow)*sr(indx,1)*Btotb(indx)+
*
calalpha*(sr(indx,1)*Btotb(indx))**2)
dEs2=dEs2+2.0*wc1(i12)*(sr(indx,1)*Btotb(indx))**2
endif
if (tmp1+calalpha*Btotb(indx)*sr(indx,1) .gt. aijhigh) then
dEs1=dEs1+2.0*wc2(i12)*
*
((tmp1-aijhigh)*sr(indx,1)*Btotb(indx)+
*
calalpha*(sr(indx,1)*Btotb(indx))**2)
dEs2=dEs2+2.0*wc2(i12)*(sr(indx,1)*Btotb(indx))**2
endif
if (tmp2+calalpha*Btotb(indx)*sr(indx,2) .lt. ajilow) then
dEs1=dEs1+2.0*wc1(i12)*
*
((tmp2-ajilow)*sr(indx,2)*Btotb(indx)+
*
calalpha*(sr(indx,2)*Btotb(indx))**2)
dEs2=dEs2+2.0*wc1(i12)*(sr(indx,2)*Btotb(indx))**2
endif
if (tmp2+calalpha*Btotb(indx)*sr(indx,2) .gt. ajihigh) then
dEs1=dEs1+2.0*wc2(i12)*
*
((tmp2-ajihigh)*sr(indx,2)*Btotb(indx)+
*
calalpha*(sr(indx,2)*Btotb(indx))**2)
dEs2=dEs2+2.0*wc2(i12)*(sr(indx,2)*Btotb(indx))**2
endif
continue
if (dEs2 .eq. 0.0) dEs2=0.0000000001
calalpha=calalpha-dEs1/dEs2
if (abs(-dEs1/dEs2) .lt. eps*calalpha .or.
*
abs(-dEs1/dEs2) .lt. 1.0e-5) return
if (ifn.ge.maxfn) then
write(6,*) ’ifn is greater than or equal to maxfn’
write(6,*) ’but -dEs1/dEs2 = ’,-dEs1/dEs2
return
endif
goto 10
end
begrad
1
subroutine begrad(ener)
include ’vap.inc’
common /acom/ beg(natmax*neimax/2,2),sr(natmax*neimax/2,2)
do 1 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
de(i)=de0(i)
continue
indx=0
do 2 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 3 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 3
if (itype(j) .eq. inert) cycle
indx=indx+1
322
APPENDIX I. MOLECULAR DYNAMICS CODE
3
2
de(i)=de(i)-be(indx,1)*Btotb(indx)
de(j)=de(j)-be(indx,2)*Btotb(indx)
beg(indx,1)=0.0
beg(indx,2)=0.0
continue
continue
ener=0.0
indx=0
do 5 i=n1stps,natoms
if (itype(i) .eq. inert) cycle
do 6 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 6
if (itype(j) .eq. inert) cycle
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
i1=(itype(i)-1.0)*ntypes+itype(j)
j1=(itype(j)-1.0)*ntypes+itype(i)
indx=indx+1
tmp1=qij(indx,1)/qij0(i1)+qij(indx,2)/qij0(j1)
tmp2=4.0*wb(i12)*Btotb(indx)*Btotb(indx)*
*
(be(indx,1)+be(indx,2)-tmp1)
ener=ener+2.0*wb(i12)*
*
(Btotb(indx)*(be(indx,1)+be(indx,2)-tmp1))**2
beg(indx,1)=beg(indx,1)+tmp2
beg(indx,2)=beg(indx,2)+tmp2
tmp1=be(indx,1)+be(indx,2)
if (tmp1 .lt. 0.0) then
ener=ener+2.0*wc1(i12)*tmp1*tmp1
beg(indx,1)=beg(indx,1)+4.0*wc1(i12)*tmp1
beg(indx,2)=beg(indx,2)+4.0*wc1(i12)*tmp1
endif
tmp2=tmp1-2.0
if (tmp2 .gt. 0.0) then
ener=ener+2.0*wc2(i12)*tmp2*tmp2
beg(indx,1)=beg(indx,1)+4.0*wc2(i12)*tmp2
beg(indx,2)=beg(indx,2)+4.0*wc2(i12)*tmp2
endif
beij=Btotb(indx)*be(indx,1)+
*
(1.0-Btotb(indx))*qij(indx,1)/(1.0+deltotb(i))
beji=Btotb(indx)*be(indx,2)+
*
(1.0-Btotb(indx))*qij(indx,2)/(1.0+deltotb(j))
aijlow=amax1(2.0-Va(j),Va(i)-8.0*Va(i)/Vai(itype(i)))*
*
qij(indx,1)/qij0(i1)
aijhigh=amin1(Va(i),2.0-Va(j)+8.0*Va(j)/Vai(itype(j)))*
*
qij(indx,1)/qij0(i1)
ajilow=amax1(2.0-Va(i),Va(j)-8.0*Va(j)/Vai(itype(j)))*
*
qij(indx,2)/qij0(j1)
ajihigh=amin1(Va(j),2.0-Va(i)+8.0*Va(i)/Vai(itype(i)))*
*
qij(indx,2)/qij0(j1)
if (beij .lt. aijlow) then
ener=ener+wc1(i12)*(beij-aijlow)**2
beg(indx,1)=beg(indx,1)+
*
2.0*wc1(i12)*(beij-aijlow)*Btotb(indx)
endif
if (beij .gt. aijhigh) then
ener=ener+wc2(i12)*(beij-aijhigh)**2
beg(indx,1)=beg(indx,1)+
*
2.0*wc2(i12)*(beij-aijhigh)*Btotb(indx)
323
APPENDIX I. MOLECULAR DYNAMICS CODE
6
5
endif
if (beji .lt. ajilow) then
ener=ener+wc1(i12)*(beji-ajilow)**2
beg(indx,2)=beg(indx,2)+
*
2.0*wc1(i12)*(beji-ajilow)*Btotb(indx)
endif
if (beji .gt. ajihigh) then
ener=ener+wc2(i12)*(beji-ajihigh)**2
beg(indx,2)=beg(indx,2)+
*
2.0*wc2(i12)*(beji-ajihigh)*Btotb(indx)
endif
tmp1=Stotb(i)*dbfac(i)*(de(i)-alp(itype(i))*gtotb(i))
beg(indx,1)=beg(indx,1)-2.0*wd(itype(i))*tmp1*
*
Stotb(i)*dbfac(i)*Btotb(indx)
tmp1=Stotb(j)*dbfac(j)*(de(j)-alp(itype(j))*gtotb(j))
beg(indx,2)=beg(indx,2)-2.0*wd(itype(j))*tmp1*
*
Stotb(j)*dbfac(j)*Btotb(indx)
if (de(i) .lt. 0.0) then
beg(indx,1)=beg(indx,1)*
2.0*wc3(itype(i))*de(i)*Btotb(indx)
endif
if (de(i) .gt. 2.0*gtotb(i)) then
beg(indx,1)=beg(indx,1)*
2.0*wc4(itype(i))*(de(i)-2.0*gtotb(i))*Btotb(indx)
endif
if (de(j) .lt. 0.0) then
beg(indx,2)=beg(indx,2)*
2.0*wc3(itype(j))*de(j)*Btotb(indx)
endif
if (de(j) .gt. 2.0*gtotb(j)) then
beg(indx,2)=beg(indx,2)*
2.0*wc4(itype(j))*(de(j)-2.0*gtotb(j))*Btotb(indx)
endif
continue
tmp1=Stotb(i)*dbfac(i)*(de(i)-alp(itype(i))*gtotb(i))
ener=ener+wd(itype(i))*tmp1*tmp1
if (de(i) .lt. 0.0) then
ener=ener+wc3(itype(i))*de(i)*de(i)
endif
if (de(i) .gt. 2.0*gtotb(i)) then
ener=ener+wc4(itype(i))*(de(i)-2.0*gtotb(i))**2
endif
continue
return
end
I.3.11 Potential energy subroutines
calce
c************************************************************************
c
c this routine computes the instantaneous energies, temperature
c and pressure for the current configuration.
c
subroutine calce(ekin,pot,etot,temp,press,iclfor,time)
include ’vap.inc’
data boltz/8.617e-5/
c
c
c compute the kinetic energy
c
324
APPENDIX I. MOLECULAR DYNAMICS CODE
ekin=0.0
do 20 i=1,natoms
v2 = rv(4,i)**2 + rv(5,i)**2 + rv(6,i)**2
ekin = ekin + amass(itype(i))*v2
ekin = ekin*0.5
20
c
c
c
compute the temperature
temp = 7.7366e+3*ekin/real(natoms)
c
c
c
compute the occupation and temperature of the regions
if(ifxtmp.ne.0)then
do 40 ireg=0,nregs
natrg(ireg) = 0
40
acttmp(ireg) = 0.
ccdir$ novector
do 50 i=1,natoms
ireg = ipntrg(i)
natrg(ireg) = natrg(ireg) + 1
acttmp(ireg) = acttmp(ireg) +
.
amass(itype(i))*(rv(4,i)**2 + rv(5,i)**2 + rv(6,i)**2)
50
continue
do 60 ireg=0,nregs
if(natrg(ireg).ne.0)acttmp(ireg) = acttmp(ireg)/
.
(3.*boltz*real(natrg(ireg)))
60
continue
ccdir$ vector
endif
c
c call force to obtain the potential energy and pressure information
c
if (iclfor.eq.1) call force(time)
c
c compute the potential energy and pressure
c
pot=totE
volume = perlen(1)*perlen(2)*perlen(3)
press = (stresst(1)+stresst(2)+stresst(3))/(3.0*volume)
c
c convert the pressure to bar
c
press = 1.602e6*press
c
etot=ekin+pot
return
end
force
c************************************************************************
c
c this routine compute the forces acting on each of the particles
c as well as the energy of each particle and the contribution of each
c particle to the stress tensor.
c
subroutine force(time)
include ’vap.inc’
common /neibob/ nbox(nboxx,nboxy,nboxz,nboxn),nxt,nzt,dnxt,dnzt
common /add/ natadd,ityadd(100)
c
c
c count the number of times force is called
325
APPENDIX I. MOLECULAR DYNAMICS CODE
c
c
also time the call to force
nforce = nforce + 1
c
c
c
determine if a new neighbor list is required
call chkdis
c
c
c
add vapor atoms as required
if (inte .eq. 1 .and. natadd .gt. 0) call addv1
c
c
c
200
210
c
clear the arrays used for computing running totals
totE=0.0
do 200 i = 1,natoms
f(1,i) = 0.
f(2,i) = 0.
f(3,i) = 0.
continue
do 210 k1 = 1,3
stresst(k1) = 0.0
continue
if (newlst .ne. 0) then
if (natadd .lt. 0) then
natadd=0
goto 664
endif
nboxnei=nboxnei+1
nxt=perlen(1)/rctroot
dnxt=perlen(1)/real(nxt)
nzt=perlen(3)/rctroot
if (nzt .ne. 0) dnzt=perlen(3)/real(nzt)
if (nzt .eq. 0) then
nzt=1
dnzt=perlen(3)
endif
if (ivapor .ne. 1) then
nyt=perlen(2)/rctroot
dnyt=perlen(2)/real(nyt)
if (nyt .gt. nboxy) then
write(6,*) ’nboxy is too small 1’
stop
endif
endif
if (nxt .gt. nboxx) then
write(6,*) ’nboxx is too small’
stop
endif
if (nzt .gt. nboxz) then
write(6,*) ’nboxz is too small’
stop
endif
if (ivapor .eq. 1) ntopbox=0
do 663 i=1,natoms
nw1=int((rv(1,i)-perlb(1))/dnxt)+1
nw2=int((rv(2,i)-perlb(2))/dnyt)+1
nw3=int((rv(3,i)-perlb(3))/dnzt)+1
if (nbox(nw1,nw2,nw3,nboxn) .ne. nboxnei) then
nbox(nw1,nw2,nw3,nboxn1)=0
nbox(nw1,nw2,nw3,nboxn)=nboxnei
if (ivapor .eq. 1 .and. nw2 .gt. ntopbox) ntopbox=nw2
endif
326
APPENDIX I. MOLECULAR DYNAMICS CODE
663
327
nbox(nw1,nw2,nw3,nboxn1)=nbox(nw1,nw2,nw3,nboxn1)+1
if (nbox(nw1,nw2,nw3,nboxn1) .ge. nboxn1) then
write(6,*) ’number in box = ’,nbox(nw1,nw2,nw3,nboxn1),
*
’ .ge. nboxn1 = ’,nboxn1
stop
endif
nbox(nw1,nw2,nw3,nbox(nw1,nw2,nw3,nboxn1))=i
continue
endif
continue
664
c
c obtain the information about the neighbors of atom i
c
call gneigh
Here the set of called subroutines depends on the potential format being used. The potential
subroutines for the SW and Tersoff formats share the same names (calgtheta and calbndorder). In this version of the code, these subroutines are commented out; however, this
can be easily changed. The BOP format calls the theta, sigmaBO, piBO, and PromEner
subroutines.
c
c
c
c
50
Stillinger-Weber or Tersoff format
call calgtheta
call calbndorder
BOP format
call theta
call sigmaBo
call piBo
call PromEner
if (nECRon .eq. nECRrun) call ECR()
n=0
do 1 i=1,natoms
f(1,i)=f(1,i)-dPromi(i,1)
f(2,i)=f(2,i)-dPromi(i,2)
f(3,i)=f(3,i)-dPromi(i,3)
do 50 ktmp=1,nProm(i)
k=itypeProm(i,ktmp)
f(1,k)=f(1,k)-dPromk(i,ktmp,1)
f(2,k)=f(2,k)-dPromk(i,ktmp,2)
f(3,k)=f(3,k)-dPromk(i,ktmp,3)
continue
stresst(1)=stresst(1)-dProml(i,1)
stresst(2)=stresst(2)-dProml(i,2)
stresst(3)=stresst(3)-dProml(i,3)
totE=totE+prom(i)
do 2 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 2
n=n+1
dpr1=(dRepul(i,jtmp)-2.0*dBetaSsq(i,jtmp)*sigB(n)*
2.0*dBetaPsq(i,jtmp)*PiB(n))/rij(i,jtmp)
pp1=2.0*betaSsq(i,jtmp)
pp2=2.0*betaPsq(i,jtmp)
APPENDIX I. MOLECULAR DYNAMICS CODE
3
4
2
1
c
c
c
ftmp1=dpr1*disij(1,i,jtmp)
ftmp2=dpr1*disij(2,i,jtmp)
ftmp3=dpr1*disij(3,i,jtmp)
f(1,i)=f(1,i)-ftmp1+pp1*dSigBi(n,1)+pp2*dPiBi(n,1)
f(1,j)=f(1,j)+ftmp1+pp1*dSigBj(n,1)+pp2*dPiBj(n,1)
f(2,i)=f(2,i)-ftmp2+pp1*dSigBi(n,2)+pp2*dPiBi(n,2)
f(2,j)=f(2,j)+ftmp2+pp1*dSigBj(n,2)+pp2*dPiBj(n,2)
f(3,i)=f(3,i)-ftmp3+pp1*dSigBi(n,3)+pp2*dPiBi(n,3)
f(3,j)=f(3,j)+ftmp3+pp1*dSigBj(n,3)+pp2*dPiBj(n,3)
do 3 ktmp=1,nSigBk(n)
k=itypeSigBk(n,ktmp)
f(1,k)=f(1,k)+pp1*dSigBk(n,ktmp,1)
f(2,k)=f(2,k)+pp1*dSigBk(n,ktmp,2)
f(3,k)=f(3,k)+pp1*dSigBk(n,ktmp,3)
continue
do 4 ktmp=1,nPiBk(n)
k=itypePiBk(n,ktmp)
f(1,k)=f(1,k)+pp2*dPiBk(n,ktmp,1)
f(2,k)=f(2,k)+pp2*dPiBk(n,ktmp,2)
f(3,k)=f(3,k)+pp2*dPiBk(n,ktmp,3)
continue
stresst(1)=stresst(1)*
dpr1*disij(1,i,jtmp)*disij(1,i,jtmp)/
*
perlen(1)+pp1*dSigBl(n,1)+pp2*dPiBl(n,1)
stresst(2)=stresst(2)*
dpr1*disij(2,i,jtmp)*disij(2,i,jtmp)/
*
perlen(2)+pp1*dSigBl(n,2)+pp2*dPiBl(n,2)
stresst(3)=stresst(3)*
dpr1*disij(3,i,jtmp)*disij(3,i,jtmp)/
*
perlen(3)+pp1*dSigBl(n,3)+pp2*dPiBl(n,3)
totE=totE+repul(i,jtmp)*
2.0*betaSsq(i,jtmp)*sigB(n)*
2.0*betaPsq(i,jtmp)*piB(n)
continue
continue
compute the stresses
stresst(1)=stresst(1)*perlen(1)
stresst(2)=stresst(2)*perlen(2)
stresst(3)=stresst(3)*perlen(3)
do 3201 i=1,natoms
stresst(1) = stresst(1)
1
+ amass(itype(i))*rv(4,i)*rv(4,i)
stresst(2) = stresst(2)
1
+ amass(itype(i))*rv(5,i)*rv(5,i)
stresst(3) = stresst(3)
1
+ amass(itype(i))*rv(6,i)*rv(6,i)
3201 continue
c
c add the pv value to the end of the e array when ibdtyp = 2
c
if (ibdtyp.eq.2)
1
e0 = dpress*perlen(1)*perlen(2)*perlen(3)
2
+ 0.5*( dstress(1)*perlen(1)**2
3
+ dstress(2)*perlen(2)**2
4
+ dstress(3)*perlen(3)**2)
c
c add the temperature constraints
c
call fixtmp(time)
c
c add the constraints to the forces
c
328
APPENDIX I. MOLECULAR DYNAMICS CODE
call fixfor(time)
if (nECRon .ne. 0) then
nECRrun=nECRrun+1
if (nECRrun .gt. nECRon) nECRrun=1
endif
return
end
I.3.12 Stillinger-Weber potential subroutines
calgtheta
subroutine calgtheta()
include ’vap.inc’
do 1 i=1,natoms
n=0
do 2 jtmp=1,neigh(i)-1
rj2=rij(i,jtmp)*rij(i,jtmp)
do 3 ktmp=jtmp+1,neigh(i)
n=n+1
rk2=rij(i,ktmp)*rij(i,ktmp)
rj1k1=rij(i,jtmp)*rij(i,ktmp)
rj2k2=rj1k1*rj1k1
rj2k1=rj1k1*rij(i,jtmp)
rj1k2=rj1k1*rij(i,ktmp)
gtheta(i,n)=(disij(1,i,jtmp)*disij(1,i,ktmp)+
*
disij(2,i,jtmp)*disij(2,i,ktmp)+
*
disij(3,i,jtmp)*disij(3,i,ktmp))/rj1k1
if (gtheta(i,n) .lt. -1.0) gtheta(i,n)=-1.0
if (gtheta(i,n) .gt. 1.0) gtheta(i,n)=1.0
dgtheta(i,n,1,1)=((disij(1,i,jtmp)+disij(1,i,ktmp))*rj1k1*
gtheta(i,n)*(disij(1,i,ktmp)*rj2+disij(1,i,jtmp)*rk2))/
*
rj2k2
dgtheta(i,n,1,2)=((disij(2,i,jtmp)+disij(2,i,ktmp))*rj1k1*
gtheta(i,n)*(disij(2,i,ktmp)*rj2+disij(2,i,jtmp)*rk2))/
*
rj2k2
dgtheta(i,n,1,3)=((disij(3,i,jtmp)+disij(3,i,ktmp))*rj1k1*
gtheta(i,n)*(disij(3,i,ktmp)*rj2+disij(3,i,jtmp)*rk2))/
*
rj2k2
dgtheta(i,n,2,1)=(-disij(1,i,ktmp)*rij(i,jtmp)+
*
gtheta(i,n)*disij(1,i,jtmp)*rij(i,ktmp))/rj2k1
dgtheta(i,n,2,2)=(-disij(2,i,ktmp)*rij(i,jtmp)+
*
gtheta(i,n)*disij(2,i,jtmp)*rij(i,ktmp))/rj2k1
dgtheta(i,n,2,3)=(-disij(3,i,ktmp)*rij(i,jtmp)+
*
gtheta(i,n)*disij(3,i,jtmp)*rij(i,ktmp))/rj2k1
dgtheta(i,n,3,1)=(-disij(1,i,jtmp)*rij(i,ktmp)+
*
gtheta(i,n)*disij(1,i,ktmp)*rij(i,jtmp))/rj1k2
dgtheta(i,n,3,2)=(-disij(2,i,jtmp)*rij(i,ktmp)+
*
gtheta(i,n)*disij(2,i,ktmp)*rij(i,jtmp))/rj1k2
dgtheta(i,n,3,3)=(-disij(3,i,jtmp)*rij(i,ktmp)+
*
gtheta(i,n)*disij(3,i,ktmp)*rij(i,jtmp))/rj1k2
dgtheta(i,n,4,1)=(2.0*disij(1,i,jtmp)*disij(1,i,ktmp)*
*
rj1k1-gtheta(i,n)*(rj2*disij(1,i,ktmp)*
*
disij(1,i,ktmp)+rk2*disij(1,i,jtmp)*disij(1,i,jtmp)))/
*
(rj2k2*perlen(1))
dgtheta(i,n,4,2)=(2.0*disij(2,i,jtmp)*disij(2,i,ktmp)*
*
rj1k1-gtheta(i,n)*(rj2*disij(2,i,ktmp)*
*
disij(2,i,ktmp)+rk2*disij(2,i,jtmp)*disij(2,i,jtmp)))/
*
(rj2k2*perlen(2))
dgtheta(i,n,4,3)=(2.0*disij(3,i,jtmp)*disij(3,i,ktmp)*
*
rj1k1-gtheta(i,n)*(rj2*disij(3,i,ktmp)*
329
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
3
2
1
disij(3,i,ktmp)+rk2*disij(3,i,jtmp)*disij(3,i,jtmp)))/
(rj2k2*perlen(3))
continue
continue
continue
return
end
calbndorder
subroutine calbndorder()
include ’vap.inc’
dimension dAAi(3),dAAj(3),dAAk(neimax-1,3),dAAl(3),
*
nAAk(neimax-1),dBBi(3),dBBj(3),dBBk(neimax-1,3),
*
dBBl(3),nBBk(neimax-1)
n=0
do 1 i=1,natoms
do 2 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 2
if (itype(i) .eq. itype(j)) then
iij=itype(i)
else if (itype(i) .lt. itype(j)) then
iij=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
iij=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
n=n+1
nthird(n)=0
AA=0.0
dAAi(1)=0.0
dAAi(2)=0.0
dAAi(3)=0.0
dAAj(1)=0.0
dAAj(2)=0.0
dAAj(3)=0.0
dAAl(1)=0.0
dAAl(2)=0.0
dAAl(3)=0.0
nAA=0
BB=0.0
dBBi(1)=0.0
dBBi(2)=0.0
dBBi(3)=0.0
dBBj(1)=0.0
dBBj(2)=0.0
dBBj(3)=0.0
dBBl(1)=0.0
dBBl(2)=0.0
dBBl(3)=0.0
nBB=0
*
do 101 ktmp=1,neigh(i)
if (ktmp .eq. jtmp) goto 101
k=neighT(i,ktmp)
if (itype(i) .eq. itype(k)) then
iik=itype(i)
else if (itype(i) .lt. itype(k)) then
iik=itype(i)*ntypes.5*itype(i)*(itype(i)+1)+itype(k)
else
iik=itype(k)*ntypes-
330
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
101
102
103
*
*
.5*itype(k)*(itype(k)+1)+itype(i)
endif
if (jtmp .lt. ktmp) then
nang=(jtmp-1)*neigh(i)-jtmp*(jtmp+1)/2+ktmp
ngj=2
ngk=3
else
nang=(ktmp-1)*neigh(i)-ktmp*(ktmp+1)/2+jtmp
ngj=3
ngk=2
endif
gjik=(gtheta(i,nang)+1.0/3.0)**2
dgjik=2.0*(gtheta(i,nang)+1.0/3.0)
AAtmp2=pair1(i,ktmp)*gjik
dAArik=dpair1(i,ktmp)*gjik/rij(i,ktmp)
dAAtheta=pair1(i,ktmp)*dgjik
AA=AA+AAtmp2
dAAi(1)=dAAi(1)+
dAAtheta*dgtheta(i,nang,1,1)+dAArik*disij(1,i,ktmp)
dAAi(2)=dAAi(2)+
dAAtheta*dgtheta(i,nang,1,2)+dAArik*disij(2,i,ktmp)
dAAi(3)=dAAi(3)+
dAAtheta*dgtheta(i,nang,1,3)+dAArik*disij(3,i,ktmp)
dAAj(1)=dAAj(1)+
dAAtheta*dgtheta(i,nang,ngj,1)
dAAj(2)=dAAj(2)+
dAAtheta*dgtheta(i,nang,ngj,2)
dAAj(3)=dAAj(3)+
dAAtheta*dgtheta(i,nang,ngj,3)
nAA=nAA+1
nAAk(nAA)=k
dAAk(nAA,1)=-dAArik*disij(1,i,ktmp)+
dAAtheta*dgtheta(i,nang,ngk,1)
dAAk(nAA,2)=-dAArik*disij(2,i,ktmp)+
dAAtheta*dgtheta(i,nang,ngk,2)
dAAk(nAA,3)=-dAArik*disij(3,i,ktmp)+
dAAtheta*dgtheta(i,nang,ngk,3)
dAAl(1)=dAAl(1)+
dAAtheta*dgtheta(i,nang,4,1)+
dAArik*disij(1,i,ktmp)*disij(1,i,ktmp)/perlen(1)
dAAl(2)=dAAl(2)+
dAAtheta*dgtheta(i,nang,4,2)+
dAArik*disij(2,i,ktmp)*disij(2,i,ktmp)/perlen(2)
dAAl(3)=dAAl(3)+
dAAtheta*dgtheta(i,nang,4,3)+
dAArik*disij(3,i,ktmp)*disij(3,i,ktmp)/perlen(3)
continue
do 102 ki=1,neigh(j)
k=neighT(j,ki)
if (k .eq. i) goto 103
continue
continue
do 104 ktmp=1,neigh(j)
if (ktmp .eq. ki) goto 104
k=neighT(j,ktmp)
if (itype(j) .eq. itype(k)) then
ijk=itype(j)
else if (itype(j) .lt. itype(k)) then
ijk=itype(j)*ntypes.5*itype(j)*(itype(j)+1)+itype(k)
else
ijk=itype(k)*ntypes.5*itype(k)*(itype(k)+1)+itype(j)
endif
331
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
104
if (ktmp .lt. ki) then
nang=(ktmp-1)*neigh(j)-ktmp*(ktmp+1)/2+ki
ngi=3
ngk=2
else
nang=(ki-1)*neigh(j)-ki*(ki+1)/2+ktmp
ngi=2
ngk=3
endif
ps=(gtheta(j,nang)+1.0)*rdtheta+1.0
ks=ps
ks=min0(ks,ntheta-1)
ps=ps-ks
ps=amin1(ps,1.0)
gijk=(gtheta(j,nang)+1.0/3.0)**2
dgijk=2.0*(gtheta(j,nang)+1.0/3.0)
BBtmp2=pair1(j,ktmp)*gijk
dBBrjk=dpair1(j,ktmp)*gijk/rij(j,ktmp)
dBBtheta=pair1(j,ktmp)*dgijk
BB=BB+BBtmp2
dBBi(1)=dBBi(1)+dBBtheta*dgtheta(j,nang,ngi,1)
dBBi(2)=dBBi(2)+dBBtheta*dgtheta(j,nang,ngi,2)
dBBi(3)=dBBi(3)+dBBtheta*dgtheta(j,nang,ngi,3)
dBBj(1)=dBBj(1)+dBBtheta*dgtheta(j,nang,1,1)+
dBBrjk*disij(1,j,ktmp)
dBBj(2)=dBBj(2)+dBBtheta*dgtheta(j,nang,1,2)+
dBBrjk*disij(2,j,ktmp)
dBBj(3)=dBBj(3)+dBBtheta*dgtheta(j,nang,1,3)+
dBBrjk*disij(3,j,ktmp)
nBB=nBB+1
nBBk(nBB)=k
dBBk(nBB,1)=-dBBrjk*disij(1,j,ktmp)+
dBBtheta*dgtheta(j,nang,ngk,1)
dBBk(nBB,2)=-dBBrjk*disij(2,j,ktmp)+
dBBtheta*dgtheta(j,nang,ngk,2)
dBBk(nBB,3)=-dBBrjk*disij(3,j,ktmp)+
dBBtheta*dgtheta(j,nang,ngk,3)
dBBl(1)=dBBl(1)+
dBBtheta*dgtheta(j,nang,4,1)+
dBBrjk*disij(1,j,ktmp)*disij(1,j,ktmp)/perlen(1)
dBBl(2)=dBBl(2)+
dBBtheta*dgtheta(j,nang,4,2)+
dBBrjk*disij(2,j,ktmp)*disij(2,j,ktmp)/perlen(2)
dBBl(3)=dBBl(3)+
dBBtheta*dgtheta(j,nang,4,3)+
dBBrjk*disij(3,j,ktmp)*disij(3,j,ktmp)/perlen(3)
continue
bndord(n)=0.5*(AA+BB)
dbndordi(n,1)=0.5*(dAAi(1)+dBBi(1))
dbndordi(n,2)=0.5*(dAAi(2)+dBBi(2))
dbndordi(n,3)=0.5*(dAAi(3)+dBBi(3))
dbndordj(n,1)=0.5*(dAAj(1)+dBBj(1))
dbndordj(n,2)=0.5*(dAAj(2)+dBBj(2))
dbndordj(n,3)=0.5*(dAAj(3)+dBBj(3))
dbndordl(n,1)=0.5*(dAAl(1)+dBBl(1))
dbndordl(n,2)=0.5*(dAAl(2)+dBBl(2))
dbndordl(n,3)=0.5*(dAAl(3)+dBBl(3))
do 7 npt=1,nAA
nthird(n)=nthird(n)+1
numthird(n,nthird(n))=nAAk(npt)
dbndordk(n,nthird(n),1)=0.5*dAAk(npt,1)
dbndordk(n,nthird(n),2)=0.5*dAAk(npt,2)
dbndordk(n,nthird(n),3)=0.5*dAAk(npt,3)
332
APPENDIX I. MOLECULAR DYNAMICS CODE
7
8
2
1
continue
do 8 npt=1,nBB
nthird(n)=nthird(n)+1
numthird(n,nthird(n))=nBBk(npt)
dbndordk(n,nthird(n),1)=0.5*dBBk(npt,1)
dbndordk(n,nthird(n),2)=0.5*dBBk(npt,2)
dbndordk(n,nthird(n),3)=0.5*dBBk(npt,3)
continue
continue
continue
return
end
I.3.13 Tersoff potential subroutines
calgtheta
subroutine calgtheta()
include ’vap.inc’
do 1 i=1,natoms
n=0
do 2 jtmp=1,neigh(i)-1
rj2=rij(i,jtmp)*rij(i,jtmp)
do 3 ktmp=jtmp+1,neigh(i)
n=n+1
rk2=rij(i,ktmp)*rij(i,ktmp)
rj1k1=rij(i,jtmp)*rij(i,ktmp)
rj2k2=rj1k1*rj1k1
rj2k1=rj1k1*rij(i,jtmp)
rj1k2=rj1k1*rij(i,ktmp)
gtheta(i,n)=(disij(1,i,jtmp)*disij(1,i,ktmp)+
*
disij(2,i,jtmp)*disij(2,i,ktmp)+
*
disij(3,i,jtmp)*disij(3,i,ktmp))/rj1k1
if (gtheta(i,n) .lt. -1.0) gtheta(i,n)=-1.0
if (gtheta(i,n) .gt. 1.0) gtheta(i,n)=1.0
dgtheta(i,n,1,1)=((disij(1,i,jtmp)+disij(1,i,ktmp))*rj1k1*
gtheta(i,n)*(disij(1,i,ktmp)*rj2+disij(1,i,jtmp)*rk2))/
*
rj2k2
dgtheta(i,n,1,2)=((disij(2,i,jtmp)+disij(2,i,ktmp))*rj1k1*
gtheta(i,n)*(disij(2,i,ktmp)*rj2+disij(2,i,jtmp)*rk2))/
*
rj2k2
dgtheta(i,n,1,3)=((disij(3,i,jtmp)+disij(3,i,ktmp))*rj1k1*
gtheta(i,n)*(disij(3,i,ktmp)*rj2+disij(3,i,jtmp)*rk2))/
*
rj2k2
dgtheta(i,n,2,1)=(-disij(1,i,ktmp)*rij(i,jtmp)+
*
gtheta(i,n)*disij(1,i,jtmp)*rij(i,ktmp))/rj2k1
dgtheta(i,n,2,2)=(-disij(2,i,ktmp)*rij(i,jtmp)+
*
gtheta(i,n)*disij(2,i,jtmp)*rij(i,ktmp))/rj2k1
dgtheta(i,n,2,3)=(-disij(3,i,ktmp)*rij(i,jtmp)+
*
gtheta(i,n)*disij(3,i,jtmp)*rij(i,ktmp))/rj2k1
dgtheta(i,n,3,1)=(-disij(1,i,jtmp)*rij(i,ktmp)+
*
gtheta(i,n)*disij(1,i,ktmp)*rij(i,jtmp))/rj1k2
dgtheta(i,n,3,2)=(-disij(2,i,jtmp)*rij(i,ktmp)+
*
gtheta(i,n)*disij(2,i,ktmp)*rij(i,jtmp))/rj1k2
dgtheta(i,n,3,3)=(-disij(3,i,jtmp)*rij(i,ktmp)+
*
gtheta(i,n)*disij(3,i,ktmp)*rij(i,jtmp))/rj1k2
dgtheta(i,n,4,1)=(2.0*disij(1,i,jtmp)*disij(1,i,ktmp)*
*
rj1k1-gtheta(i,n)*(rj2*disij(1,i,ktmp)*
*
disij(1,i,ktmp)+rk2*disij(1,i,jtmp)*disij(1,i,jtmp)))/
*
(rj2k2*perlen(1))
dgtheta(i,n,4,2)=(2.0*disij(2,i,jtmp)*disij(2,i,ktmp)*
*
rj1k1-gtheta(i,n)*(rj2*disij(2,i,ktmp)*
333
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
3
2
1
disij(2,i,ktmp)+rk2*disij(2,i,jtmp)*disij(2,i,jtmp)))/
(rj2k2*perlen(2))
dgtheta(i,n,4,3)=(2.0*disij(3,i,jtmp)*disij(3,i,ktmp)*
*
rj1k1-gtheta(i,n)*(rj2*disij(3,i,ktmp)*
*
disij(3,i,ktmp)+rk2*disij(3,i,jtmp)*disij(3,i,jtmp)))/
*
(rj2k2*perlen(3))
continue
continue
continue
return
end
calbndorder
subroutine calbndorder()
include ’vap.inc’
dimension dAAi(3),dAAj(3),dAAk(neimax-1,3),dAAl(3),
*
nAAk(neimax-1),dBBi(3),dBBj(3),dBBk(neimax-1,3),
*
dBBl(3),nBBk(neimax-1)
n=0
do 1 i=1,natoms
do 2 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 2
if (itype(i) .eq. itype(j)) then
iij=itype(i)
else if (itype(i) .lt. itype(j)) then
iij=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
iij=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
n=n+1
nthird(n)=0
AA=0.0
dAAi(1)=0.0
dAAi(2)=0.0
dAAi(3)=0.0
dAAj(1)=0.0
dAAj(2)=0.0
dAAj(3)=0.0
dAAl(1)=0.0
dAAl(2)=0.0
dAAl(3)=0.0
nAA=0
BB=0.0
dBBi(1)=0.0
dBBi(2)=0.0
dBBi(3)=0.0
dBBj(1)=0.0
dBBj(2)=0.0
dBBj(3)=0.0
dBBl(1)=0.0
dBBl(2)=0.0
dBBl(3)=0.0
nBB=0
do 101 ktmp=1,neigh(i)
if (ktmp .eq. jtmp) goto 101
k=neighT(i,ktmp)
if (itype(i) .eq. itype(k)) then
iik=itype(i)
else if (itype(i) .lt. itype(k)) then
334
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
c
c
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
iik=itype(i)*ntypes.5*itype(i)*(itype(i)+1)+itype(k)
else
iik=itype(k)*ntypes.5*itype(k)*(itype(k)+1)+itype(i)
endif
if (jtmp .lt. ktmp) then
nang=(jtmp-1)*neigh(i)-jtmp*(jtmp+1)/2+ktmp
ngj=2
ngk=3
else
nang=(ktmp-1)*neigh(i)-ktmp*(ktmp+1)/2+jtmp
ngj=3
ngk=2
endif
ps=(gtheta(i,nang)+1.0)*rdtheta+1.0
pstmp=ps
ks=ps
ks=min0(ks,ntheta-1)
ps=ps-ks
ps=amin1(ps,1.0)
gjik=((gang3(iik,ks)*ps+gang2(iik,ks))*ps+
gang1(iik,ks))*ps+gang(iik,ks)
dgjik=(gang6(iik,ks)*ps+gang5(iik,ks))*ps+
gang4(iik,ks)
print ’(A,3(i5,","),3(f11.5,","),i3)’, "jik:",
i,j,k,pstmp,gjik,dgjik,iik
AAtmp1=exp(twom(iik)*(rij(i,jtmp)-rij(i,ktmp)))
AAtmp2=pair3(i,ktmp)*gjik*AAtmp1
dAArij=twom(iik)*AAtmp2/rij(i,jtmp)
dAArik=(dpair3(i,ktmp)*gjik*AAtmp1-twom(iik)*AAtmp2)/
rij(i,ktmp)
dAAtheta=pair3(i,ktmp)*dgjik*AAtmp1
AA=AA+AAtmp2
dAAi(1)=dAAi(1)+dAArij*disij(1,i,jtmp)+
dAAtheta*dgtheta(i,nang,1,1)+dAArik*disij(1,i,ktmp)
dAAi(2)=dAAi(2)+dAArij*disij(2,i,jtmp)+
dAAtheta*dgtheta(i,nang,1,2)+dAArik*disij(2,i,ktmp)
dAAi(3)=dAAi(3)+dAArij*disij(3,i,jtmp)+
dAAtheta*dgtheta(i,nang,1,3)+dAArik*disij(3,i,ktmp)
dAAj(1)=dAAj(1)-dAArij*disij(1,i,jtmp)+
dAAtheta*dgtheta(i,nang,ngj,1)
dAAj(2)=dAAj(2)-dAArij*disij(2,i,jtmp)+
dAAtheta*dgtheta(i,nang,ngj,2)
dAAj(3)=dAAj(3)-dAArij*disij(3,i,jtmp)+
dAAtheta*dgtheta(i,nang,ngj,3)
nAA=nAA+1
nAAk(nAA)=k
dAAk(nAA,1)=-dAArik*disij(1,i,ktmp)+
dAAtheta*dgtheta(i,nang,ngk,1)
dAAk(nAA,2)=-dAArik*disij(2,i,ktmp)+
dAAtheta*dgtheta(i,nang,ngk,2)
dAAk(nAA,3)=-dAArik*disij(3,i,ktmp)+
dAAtheta*dgtheta(i,nang,ngk,3)
dAAl(1)=dAAl(1)+
dAArij*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)+
dAAtheta*dgtheta(i,nang,4,1)+
dAArik*disij(1,i,ktmp)*disij(1,i,ktmp)/perlen(1)
dAAl(2)=dAAl(2)+
dAArij*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)+
dAAtheta*dgtheta(i,nang,4,2)+
dAArik*disij(2,i,ktmp)*disij(2,i,ktmp)/perlen(2)
dAAl(3)=dAAl(3)+
dAArij*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)+
335
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
101
102
103
*
*
*
*
c
c
*
*
*
*
*
*
*
*
*
*
*
dAAtheta*dgtheta(i,nang,4,3)+
dAArik*disij(3,i,ktmp)*disij(3,i,ktmp)/perlen(3)
continue
do 102 ki=1,neigh(j)
k=neighT(j,ki)
if (k .eq. i) goto 103
continue
continue
do 104 ktmp=1,neigh(j)
if (ktmp .eq. ki) goto 104
k=neighT(j,ktmp)
if (itype(j) .eq. itype(k)) then
ijk=itype(j)
else if (itype(j) .lt. itype(k)) then
ijk=itype(j)*ntypes.5*itype(j)*(itype(j)+1)+itype(k)
else
ijk=itype(k)*ntypes.5*itype(k)*(itype(k)+1)+itype(j)
endif
if (ktmp .lt. ki) then
nang=(ktmp-1)*neigh(j)-ktmp*(ktmp+1)/2+ki
ngi=3
ngk=2
else
nang=(ki-1)*neigh(j)-ki*(ki+1)/2+ktmp
ngi=2
ngk=3
endif
ps=(gtheta(j,nang)+1.0)*rdtheta+1.0
pstmp=ps
ks=ps
ks=min0(ks,ntheta-1)
ps=ps-ks
ps=amin1(ps,1.0)
gijk=((gang3(ijk,ks)*ps+gang2(ijk,ks))*ps+
gang1(ijk,ks))*ps+gang(ijk,ks)
dgijk=(gang6(ijk,ks)*ps+gang5(ijk,ks))*ps+
gang4(ijk,ks)
print ’(A,3(i5,","),3(f11.5,","),i3)’, "ijk:",
i,j,k,pstmp,gijk,dgijk
BBtmp1=exp(twom(ijk)*(rij(j,ki)-rij(j,ktmp)))
BBtmp2=pair3(j,ktmp)*gijk*BBtmp1
dBBrij=twom(ijk)*BBtmp2/rij(j,ki)
dBBrjk=(dpair3(j,ktmp)*gijk*BBtmp1-twom(ijk)*BBtmp2)/
rij(j,ktmp)
dBBtheta=pair3(j,ktmp)*dgijk*BBtmp1
BB=BB+BBtmp2
dBBi(1)=dBBi(1)-dBBrij*disij(1,j,ki)+
dBBtheta*dgtheta(j,nang,ngi,1)
dBBi(2)=dBBi(2)-dBBrij*disij(2,j,ki)+
dBBtheta*dgtheta(j,nang,ngi,2)
dBBi(3)=dBBi(3)-dBBrij*disij(3,j,ki)+
dBBtheta*dgtheta(j,nang,ngi,3)
dBBj(1)=dBBj(1)+dBBrij*disij(1,j,ki)+
dBBtheta*dgtheta(j,nang,1,1)+
dBBrjk*disij(1,j,ktmp)
dBBj(2)=dBBj(2)+dBBrij*disij(2,j,ki)+
dBBtheta*dgtheta(j,nang,1,2)+
dBBrjk*disij(2,j,ktmp)
dBBj(3)=dBBj(3)+dBBrij*disij(3,j,ki)+
dBBtheta*dgtheta(j,nang,1,3)+
dBBrjk*disij(3,j,ktmp)
nBB=nBB+1
336
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
104
*
*
*
*
7
8
2
1
nBBk(nBB)=k
dBBk(nBB,1)=-dBBrjk*disij(1,j,ktmp)+
dBBtheta*dgtheta(j,nang,ngk,1)
dBBk(nBB,2)=-dBBrjk*disij(2,j,ktmp)+
dBBtheta*dgtheta(j,nang,ngk,2)
dBBk(nBB,3)=-dBBrjk*disij(3,j,ktmp)+
dBBtheta*dgtheta(j,nang,ngk,3)
dBBl(1)=dBBl(1)+
dBBrij*disij(1,j,ki)*disij(1,j,ki)/perlen(1)+
dBBtheta*dgtheta(j,nang,4,1)+
dBBrjk*disij(1,j,ktmp)*disij(1,j,ktmp)/perlen(1)
dBBl(2)=dBBl(2)+
dBBrij*disij(2,j,ki)*disij(2,j,ki)/perlen(2)+
dBBtheta*dgtheta(j,nang,4,2)+
dBBrjk*disij(2,j,ktmp)*disij(2,j,ktmp)/perlen(2)
dBBl(3)=dBBl(3)+
dBBrij*disij(3,j,ki)*disij(3,j,ki)/perlen(3)+
dBBtheta*dgtheta(j,nang,4,3)+
dBBrjk*disij(3,j,ktmp)*disij(3,j,ktmp)/perlen(3)
continue
bnd1=(1.0+delta(iij)*AA**an(iij))**(-0.5/an(iij))
dbnd1=-0.5/an(iij)*delta(iij)*an(iij)*
(1.0+delta(iij)*AA**an(iij))**(-0.5/an(iij)-1.0)*
AA**(an(iij)-1.0)
bnd2=(1.0+delta(iij)*BB**an(iij))**(-0.5/an(iij))
dbnd2=-0.5/an(iij)*delta(iij)*an(iij)*
(1.0+delta(iij)*BB**an(iij))**(-0.5/an(iij)-1.0)*
BB**(an(iij)-1.0)
bndord(n)=0.5*(bnd1+bnd2)
dbndordi(n,1)=0.5*(dbnd1*dAAi(1)+dbnd2*dBBi(1))
dbndordi(n,2)=0.5*(dbnd1*dAAi(2)+dbnd2*dBBi(2))
dbndordi(n,3)=0.5*(dbnd1*dAAi(3)+dbnd2*dBBi(3))
dbndordj(n,1)=0.5*(dbnd1*dAAj(1)+dbnd2*dBBj(1))
dbndordj(n,2)=0.5*(dbnd1*dAAj(2)+dbnd2*dBBj(2))
dbndordj(n,3)=0.5*(dbnd1*dAAj(3)+dbnd2*dBBj(3))
dbndordl(n,1)=0.5*(dbnd1*dAAl(1)+dbnd2*dBBl(1))
dbndordl(n,2)=0.5*(dbnd1*dAAl(2)+dbnd2*dBBl(2))
dbndordl(n,3)=0.5*(dbnd1*dAAl(3)+dbnd2*dBBl(3))
do 7 npt=1,nAA
nthird(n)=nthird(n)+1
numthird(n,nthird(n))=nAAk(npt)
dbndordk(n,nthird(n),1)=0.5*dbnd1*dAAk(npt,1)
dbndordk(n,nthird(n),2)=0.5*dbnd1*dAAk(npt,2)
dbndordk(n,nthird(n),3)=0.5*dbnd1*dAAk(npt,3)
continue
do 8 npt=1,nBB
nthird(n)=nthird(n)+1
numthird(n,nthird(n))=nBBk(npt)
dbndordk(n,nthird(n),1)=0.5*dbnd2*dBBk(npt,1)
dbndordk(n,nthird(n),2)=0.5*dbnd2*dBBk(npt,2)
dbndordk(n,nthird(n),3)=0.5*dbnd2*dBBk(npt,3)
continue
continue
continue
return
end
337
APPENDIX I. MOLECULAR DYNAMICS CODE
338
I.3.14 Bond-order potential subroutines
Due to the complexity of the BOP format, the variable definitions must be explained to
fully understand the following code. First, five small numbers (smallS1–smallS5) were
added to sigmaBO and two small numbers (smallp1 and smallp2) to piBO to remove
singularities that arise from small numerical errors during a long simulation. These small
numbers do not change any functionality of the BOP—instead they simply guarantee the
continuity of the functions in the code.
The second item involves the use of AA, BB, CC, DD, EE, EE1, F F , AAC, BBC,
CCC, DDC, EEC, and GGC in the sigmaBO subroutine. The BOP format was originally derived with a very complex four moment σ bond order. The discussion in Chapter 6,
however, only included a much simpler second moment derivation for the σ bond order,
and the values for CC, DD, EE, DDC, EEC, and GGC are all equal to zero (due to
the two-level BOP). These variables are not discussed in any detail. The meaning of the
remaining variables are defined as:
AA = Φij,σ × F F
(I.3.1)
BB = Φji,σ × F F
(I.3.2)
AAC = AA + BB
(I.3.3)
BBC = AA × BB
(I.3.4)
CCC = AA2 + BB 2
(I.3.5)
2
F F = βσ,ij
EE1 = R4σ,ij × F F ,
(I.3.6)
(I.3.7)
where Φij,σ and Φji,σ are defined in Eq. 6.2.9, βσ,ij is defined in Eq. 6.2.3, and R4σ,ij is
defined in Eq. 6.2.12.
APPENDIX I. MOLECULAR DYNAMICS CODE
theta
3
2
1
subroutine theta()
include ’vap.inc’
do 1 i=1,natoms
n=0
do 2 jtmp=1,neigh(i)
rj2=rij(i,jtmp)*rij(i,jtmp)
j=neighT(i,jtmp)
do 3 ktmp=jtmp+1,neigh(i)
n=n+1
rk2=rij(i,ktmp)*rij(i,ktmp)
rj1k1=rij(i,jtmp)*rij(i,ktmp)
rj2k2=rj1k1*rj1k1
rj2k1=rj1k1*rij(i,jtmp)
rj1k2=rj1k1*rij(i,ktmp)
k=neighT(i,ktmp)
cosAng(i,n)=(disij(1,i,jtmp)*disij(1,i,ktmp)+
*
disij(2,i,jtmp)*disij(2,i,ktmp)+
*
disij(3,i,jtmp)*disij(3,i,ktmp))/rj1k1
dcosAng(i,n,1,1)=((disij(1,i,jtmp)+disij(1,i,ktmp))*rj1k1*
cosAng(i,n)*(disij(1,i,ktmp)*rj2+disij(1,i,jtmp)*rk2))/
*
rj2k2
dcosAng(i,n,1,2)=((disij(2,i,jtmp)+disij(2,i,ktmp))*rj1k1*
cosAng(i,n)*(disij(2,i,ktmp)*rj2+disij(2,i,jtmp)*rk2))/
*
rj2k2
dcosAng(i,n,1,3)=((disij(3,i,jtmp)+disij(3,i,ktmp))*rj1k1*
cosAng(i,n)*(disij(3,i,ktmp)*rj2+disij(3,i,jtmp)*rk2))/
*
rj2k2
dcosAng(i,n,2,1)=(-disij(1,i,ktmp)*rij(i,jtmp)+
*
cosAng(i,n)*disij(1,i,jtmp)*rij(i,ktmp))/rj2k1
dcosAng(i,n,2,2)=(-disij(2,i,ktmp)*rij(i,jtmp)+
*
cosAng(i,n)*disij(2,i,jtmp)*rij(i,ktmp))/rj2k1
dcosAng(i,n,2,3)=(-disij(3,i,ktmp)*rij(i,jtmp)+
*
cosAng(i,n)*disij(3,i,jtmp)*rij(i,ktmp))/rj2k1
dcosAng(i,n,3,1)=(-disij(1,i,jtmp)*rij(i,ktmp)+
*
cosAng(i,n)*disij(1,i,ktmp)*rij(i,jtmp))/rj1k2
dcosAng(i,n,3,2)=(-disij(2,i,jtmp)*rij(i,ktmp)+
*
cosAng(i,n)*disij(2,i,ktmp)*rij(i,jtmp))/rj1k2
dcosAng(i,n,3,3)=(-disij(3,i,jtmp)*rij(i,ktmp)+
*
cosAng(i,n)*disij(3,i,ktmp)*rij(i,jtmp))/rj1k2
dcosAng(i,n,4,1)=(2.0*disij(1,i,jtmp)*disij(1,i,ktmp)*
*
rj1k1-cosAng(i,n)*(rj2*disij(1,i,ktmp)*
*
disij(1,i,ktmp)+rk2*disij(1,i,jtmp)*disij(1,i,jtmp)))/
*
(rj2k2*perlen(1))
dcosAng(i,n,4,2)=(2.0*disij(2,i,jtmp)*disij(2,i,ktmp)*
*
rj1k1-cosAng(i,n)*(rj2*disij(2,i,ktmp)*
*
disij(2,i,ktmp)+rk2*disij(2,i,jtmp)*disij(2,i,jtmp)))/
*
(rj2k2*perlen(2))
dcosAng(i,n,4,3)=(2.0*disij(3,i,jtmp)*disij(3,i,ktmp)*
*
rj1k1-cosAng(i,n)*(rj2*disij(3,i,ktmp)*
*
disij(3,i,ktmp)+rk2*disij(3,i,jtmp)*disij(3,i,jtmp)))/
*
(rj2k2*perlen(3))
continue
continue
continue
return
end
sigmaBO
subroutine sigmaBo()
include ’vap.inc’
339
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
105
106
dimension
dAAi(3),dAAj(3),dAAk(ntotSigk,3),dAAl(3),
dBBi(3),dBBj(3),dBBk(ntotSigk,3),dBBl(3),
dCCi(3),dCCj(3),dCCk(ntotSigk,3),dCCl(3),
dDDi(3),dDDj(3),dDDk(ntotSigk,3),dDDl(3),
dEEi(3),dEEj(3),dEEk(ntotSigk,3),dEEl(3),
dFFi(3),dFFj(3),dFFl(3),
dAACi(3),dAACj(3),dAACk(ntotSigk,3),dAACl(3),
dBBCi(3),dBBCj(3),dBBCk(ntotSigk,3),dBBCl(3),
dCCCi(3),dCCCj(3),dCCCk(ntotSigk,3),dCCCl(3),
dDDCi(3),dDDCj(3),dDDCk(ntotSigk,3),dDDCl(3),
dEECi(3),dEECj(3),dEECk(ntotSigk,3),dEECl(3),
dUTi(3),dUTj(3),dUTk(ntotSigk,3),dUTl(3),
dFFCi(3),dFFCj(3),dFFCk(ntotSigk,3),dFFCl(3),
dGGCi(3),dGGCj(3),dGGCk(ntotSigk,3),dGGCl(3)
dimension dEE1i(3),dEE1j(3),dEE1k(ntotSigk,3),dEE1l(3)
smallS1=1.0e-5
smallS2=1.0e-5
smallS3=1.0e-5
smallS4=1.0e-5
smallS5=1.0e-5
n=0
do 1 i=1,natoms
do 2 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 2
if (itype(i) .eq. itype(j)) then
iij=itype(i)
else if (itype(i) .lt. itype(j)) then
iij=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
iij=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
n=n+1
do 105 ki=1,neigh(j)
k=neighT(j,ki)
if (k .eq. i) goto 106
continue
continue
nSigBk(n)=0
AA=0.0
dAAi(1)=0.0
dAAi(2)=0.0
dAAi(3)=0.0
dAAj(1)=0.0
dAAj(2)=0.0
dAAj(3)=0.0
dAAl(1)=0.0
dAAl(2)=0.0
dAAl(3)=0.0
BB=0.0
dBBi(1)=0.0
dBBi(2)=0.0
dBBi(3)=0.0
dBBj(1)=0.0
dBBj(2)=0.0
dBBj(3)=0.0
dBBl(1)=0.0
dBBl(2)=0.0
dBBl(3)=0.0
CC=0.0
dCCi(1)=0.0
dCCi(2)=0.0
dCCi(3)=0.0
340
APPENDIX I. MOLECULAR DYNAMICS CODE
*
dCCj(1)=0.0
dCCj(2)=0.0
dCCj(3)=0.0
dCCl(1)=0.0
dCCl(2)=0.0
dCCl(3)=0.0
DD=0.0
dDDi(1)=0.0
dDDi(2)=0.0
dDDi(3)=0.0
dDDj(1)=0.0
dDDj(2)=0.0
dDDj(3)=0.0
dDDl(1)=0.0
dDDl(2)=0.0
dDDl(3)=0.0
EE=0.0
dEEi(1)=0.0
dEEi(2)=0.0
dEEi(3)=0.0
dEEj(1)=0.0
dEEj(2)=0.0
dEEj(3)=0.0
dEEl(1)=0.0
dEEl(2)=0.0
dEEl(3)=0.0
EE1=0.0
dEE1i(1)=0.0
dEE1i(2)=0.0
dEE1i(3)=0.0
dEE1j(1)=0.0
dEE1j(2)=0.0
dEE1j(3)=0.0
dEE1l(1)=0.0
dEE1l(2)=0.0
dEE1l(3)=0.0
agpdpr1=2.0*betaSsq(i,jtmp)*dBetaSsq(i,jtmp)/rij(i,jtmp)
FF=betaSsq(i,jtmp)*betaSsq(i,jtmp)
dFFi(1)=agpdpr1*disij(1,i,jtmp)
dFFi(2)=agpdpr1*disij(2,i,jtmp)
dFFi(3)=agpdpr1*disij(3,i,jtmp)
dFFj(1)=-agpdpr1*disij(1,i,jtmp)
dFFj(2)=-agpdpr1*disij(2,i,jtmp)
dFFj(3)=-agpdpr1*disij(3,i,jtmp)
dFFl(1)=agpdpr1*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
dFFl(2)=agpdpr1*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
dFFl(3)=agpdpr1*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 3 ktmp=1,neigh(i)
if (ktmp .eq. jtmp) goto 3
if (jtmp .lt. ktmp) then
nang=(jtmp-1)*neigh(i)-jtmp*(jtmp+1)/2+ktmp
ngj=2
ngk=3
else
nang=(ktmp-1)*neigh(i)-ktmp*(ktmp+1)/2+jtmp
ngj=3
ngk=2
endif
k=neighT(i,ktmp)
if (itype(i) .eq. itype(k)) then
iik=itype(i)
else if (itype(i) .lt. itype(k)) then
iik=itype(i)*ntypes.5*itype(i)*(itype(i)+1)+itype(k)
341
APPENDIX I. MOLECULAR DYNAMICS CODE
*
111
112
101
102
*
*
*
*
*
else
iik=itype(k)*ntypes.5*itype(k)*(itype(k)+1)+itype(i)
endif
do 111 kNeii=1,neigh(k)
if (neighT(k,kNeii) .eq. i) goto 112
continue
continue
do 101 nsearch=1,nSigBk(n)
ncmp=itypeSigBk(n,nsearch)
if (ncmp .eq. k) then
nk0=nsearch
goto 102
endif
continue
nSigBk(n)=nSigBk(n)+1
nk0=nSigBk(n)
if (nk0 .gt. ntotSigk) then
write(6,*)’nk0 .gt. ntotSigk’
stop
endif
itypeSigBk(n,nk0)=k
dAAk(nk0,1)=0.0
dAAk(nk0,2)=0.0
dAAk(nk0,3)=0.0
dBBk(nk0,1)=0.0
dBBk(nk0,2)=0.0
dBBk(nk0,3)=0.0
dCCk(nk0,1)=0.0
dCCk(nk0,2)=0.0
dCCk(nk0,3)=0.0
dDDk(nk0,1)=0.0
dDDk(nk0,2)=0.0
dDDk(nk0,3)=0.0
dEEk(nk0,1)=0.0
dEEk(nk0,2)=0.0
dEEk(nk0,3)=0.0
dEE1k(nk0,1)=0.0
dEE1k(nk0,2)=0.0
dEE1k(nk0,3)=0.0
continue
pmean1=pg(itype(i),itype(j),itype(k))
cmean1=cg(itype(i),itype(j),itype(k))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor1=pmean+cmean*cosAng(i,nang)+
dmean*cosAng(i,nang)*cosAng(i,nang)
gfactorsq=gfactor1*gfactor1
gprime1=cmean+2.0*dmean*cosAng(i,nang)
gsqprime=2.0*gfactor1*gprime1
AA=AA+gfactorsq*betaSsq(i,ktmp)*betaSsq(i,ktmp)
agpdpr1=2.0*gfactorsq*betaSsq(i,ktmp)*dBetaSsq(i,ktmp)/
rij(i,ktmp)
agpdpr2=2.0*betaSsq(i,ktmp)*betaSsq(i,ktmp)*agpdpr1
app1=betaSsq(i,ktmp)*betaSsq(i,ktmp)*gsqprime
app2=betaSsq(i,ktmp)*betaSsq(i,ktmp)*app1
dAAi(1)=dAAi(1)+agpdpr1*disij(1,i,ktmp)+
app1*dcosAng(i,nang,1,1)
dAAi(2)=dAAi(2)+agpdpr1*disij(2,i,ktmp)+
app1*dcosAng(i,nang,1,2)
dAAi(3)=dAAi(3)+agpdpr1*disij(3,i,ktmp)+
app1*dcosAng(i,nang,1,3)
dAAj(1)=dAAj(1)+app1*dcosAng(i,nang,ngj,1)
342
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
41
42
43
44
dAAj(2)=dAAj(2)+app1*dcosAng(i,nang,ngj,2)
dAAj(3)=dAAj(3)+app1*dcosAng(i,nang,ngj,3)
dAAl(1)=dAAl(1)+
agpdpr1*disij(1,i,ktmp)*disij(1,i,ktmp)/perlen(1)+
app1*dcosAng(i,nang,4,1)
dAAl(2)=dAAl(2)+
agpdpr1*disij(2,i,ktmp)*disij(2,i,ktmp)/perlen(2)+
app1*dcosAng(i,nang,4,2)
dAAl(3)=dAAl(3)+
agpdpr1*disij(3,i,ktmp)*disij(3,i,ktmp)/perlen(3)+
app1*dcosAng(i,nang,4,3)
dAAk(nk0,1)=dAAk(nk0,1)-agpdpr1*disij(1,i,ktmp)+
app1*dcosAng(i,nang,ngk,1)
dAAk(nk0,2)=dAAk(nk0,2)-agpdpr1*disij(2,i,ktmp)+
app1*dcosAng(i,nang,ngk,2)
dAAk(nk0,3)=dAAk(nk0,3)-agpdpr1*disij(3,i,ktmp)+
app1*dcosAng(i,nang,ngk,3)
CC=CC+gfactorsq*betaSsq(i,ktmp)**4
dCCi(1)=dCCi(1)+agpdpr2*disij(1,i,ktmp)+
app2*dcosAng(i,nang,1,1)
dCCi(2)=dCCi(2)+agpdpr2*disij(2,i,ktmp)+
app2*dcosAng(i,nang,1,2)
dCCi(3)=dCCi(3)+agpdpr2*disij(3,i,ktmp)+
app2*dcosAng(i,nang,1,3)
dCCj(1)=dCCj(1)+app2*dcosAng(i,nang,ngj,1)
dCCj(2)=dCCj(2)+app2*dcosAng(i,nang,ngj,2)
dCCj(3)=dCCj(3)+app2*dcosAng(i,nang,ngj,3)
dCCl(1)=dCCl(1)+
agpdpr2*disij(1,i,ktmp)*disij(1,i,ktmp)/perlen(1)+
app2*dcosAng(i,nang,4,1)
dCCl(2)=dCCl(2)+
agpdpr2*disij(2,i,ktmp)*disij(2,i,ktmp)/perlen(2)+
app2*dcosAng(i,nang,4,2)
dCCl(3)=dCCl(3)+
agpdpr2*disij(3,i,ktmp)*disij(3,i,ktmp)/perlen(3)+
app2*dcosAng(i,nang,4,3)
dCCk(nk0,1)=dCCk(nk0,1)-agpdpr2*disij(1,i,ktmp)+
app2*dcosAng(i,nang,ngk,1)
dCCk(nk0,2)=dCCk(nk0,2)-agpdpr2*disij(2,i,ktmp)+
app2*dcosAng(i,nang,ngk,2)
dCCk(nk0,3)=dCCk(nk0,3)-agpdpr2*disij(3,i,ktmp)+
app2*dcosAng(i,nang,ngk,3)
kprime=0
do 41 ltmp=1,neigh(j)
kprime=neighT(j,ltmp)
if (kprime .eq. k) goto 42
continue
continue
if (kprime .eq. k) then
do 43 mtmp=1,neigh(k)
kprime=neighT(k,mtmp)
if (kprime .eq. j) goto 44
continue
continue
if (itype(j) .eq. itype(k)) then
ijk=itype(j)
else if (itype(j) .lt. itype(k)) then
ijk=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(k)
else
ijk=itype(k)*ntypes-.5*itype(k)*(itype(k)+1)+itype(j)
endif
if (ki .lt. ltmp) then
nijk=(ki-1)*neigh(j)-ki*(ki+1)/2+ltmp
ngji=2
343
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
ngjk=3
else
nijk=(ltmp-1)*neigh(j)-ltmp*(ltmp+1)/2+ki
ngji=3
ngjk=2
endif
if (kNeii .lt. mtmp) then
nikj=(kNeii-1)*neigh(k)-kNeii*(kNeii+1)/2+mtmp
ngki=2
ngkj=3
else
nikj=(mtmp-1)*neigh(k)-mtmp*(mtmp+1)/2+kNeii
ngki=3
ngkj=2
endif
pmean1=pg(itype(j),itype(i),itype(k))
cmean1=cg(itype(j),itype(i),itype(k))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor2=pmean+cmean*cosAng(j,nijk)+
dmean*cosAng(j,nijk)*cosAng(j,nijk)
gprime2=cmean+2.0*dmean*cosAng(j,nijk)
pmean1=pg(itype(k),itype(i),itype(j))
cmean1=cg(itype(k),itype(i),itype(j))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor3=pmean+cmean*cosAng(k,nikj)+
dmean*cosAng(k,nikj)*cosAng(k,nikj)
gprime3=cmean+2.0*dmean*cosAng(k,nikj)
gfactor=gfactor1*gfactor2*gfactor3
rfactor=betaSsq(i,ktmp)*betaSsq(j,ltmp)
rcm1=gfactor*betaSsq(j,ltmp)*dBetaSsq(i,ktmp)/
rij(i,ktmp)
rcm2=gfactor*betaSsq(i,ktmp)*dBetaSsq(j,ltmp)/
rij(j,ltmp)
gcm1=rfactor*gprime1*gfactor2*gfactor3
gcm2=rfactor*gfactor1*gprime2*gfactor3
gcm3=rfactor*gfactor1*gfactor2*gprime3
EE1=EE1+gfactor*rfactor
dEE1i(1)=dEE1i(1)+rcm1*disij(1,i,ktmp)+
gcm1*dcosAng(i,nang,1,1)+gcm2*dcosAng(j,nijk,ngji,1)+
gcm3*dcosAng(k,nikj,ngki,1)
dEE1i(2)=dEE1i(2)+rcm1*disij(2,i,ktmp)+
gcm1*dcosAng(i,nang,1,2)+gcm2*dcosAng(j,nijk,ngji,2)+
gcm3*dcosAng(k,nikj,ngki,2)
dEE1i(3)=dEE1i(3)+rcm1*disij(3,i,ktmp)+
gcm1*dcosAng(i,nang,1,3)+gcm2*dcosAng(j,nijk,ngji,3)+
gcm3*dcosAng(k,nikj,ngki,3)
dEE1j(1)=dEE1j(1)+rcm2*disij(1,j,ltmp)+
gcm1*dcosAng(i,nang,ngj,1)+gcm2*dcosAng(j,nijk,1,1)+
gcm3*dcosAng(k,nikj,ngkj,1)
dEE1j(2)=dEE1j(2)+rcm2*disij(2,j,ltmp)+
gcm1*dcosAng(i,nang,ngj,2)+gcm2*dcosAng(j,nijk,1,2)+
gcm3*dcosAng(k,nikj,ngkj,2)
dEE1j(3)=dEE1j(3)+rcm2*disij(3,j,ltmp)+
gcm1*dcosAng(i,nang,ngj,3)+gcm2*dcosAng(j,nijk,1,3)+
gcm3*dcosAng(k,nikj,ngkj,3)
dEE1l(1)=dEE1l(1)+
rcm1*disij(1,i,ktmp)*disij(1,i,ktmp)/perlen(1)+
rcm2*disij(1,j,ltmp)*disij(1,j,ltmp)/perlen(1)+
gcm1*dcosAng(i,nang,4,1)+
gcm2*dcosAng(j,nijk,4,1)+
344
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
103
104
gcm3*dcosAng(k,nikj,4,1)
dEE1l(2)=dEE1l(2)+
rcm1*disij(2,i,ktmp)*disij(2,i,ktmp)/perlen(2)+
rcm2*disij(2,j,ltmp)*disij(2,j,ltmp)/perlen(2)+
gcm1*dcosAng(i,nang,4,2)+
gcm2*dcosAng(j,nijk,4,2)+
gcm3*dcosAng(k,nikj,4,2)
dEE1l(3)=dEE1l(3)+
rcm1*disij(3,i,ktmp)*disij(3,i,ktmp)/perlen(3)+
rcm2*disij(3,j,ltmp)*disij(3,j,ltmp)/perlen(3)+
gcm1*dcosAng(i,nang,4,3)+
gcm2*dcosAng(j,nijk,4,3)+
gcm3*dcosAng(k,nikj,4,3)
dEE1k(nk0,1)=dEE1k(nk0,1)+
rcm1*disij(1,k,kNeii)+
rcm2*disij(1,k,mtmp)+
gcm1*dcosAng(i,nang,ngk,1)+
gcm2*dcosAng(j,nijk,ngjk,1)+
gcm3*dcosAng(k,nikj,1,1)
dEE1k(nk0,2)=dEE1k(nk0,2)+
rcm1*disij(2,k,kNeii)+
rcm2*disij(2,k,mtmp)+
gcm1*dcosAng(i,nang,ngk,2)+
gcm2*dcosAng(j,nijk,ngjk,2)+
gcm3*dcosAng(k,nikj,1,2)
dEE1k(nk0,3)=dEE1k(nk0,3)+
rcm1*disij(3,k,kNeii)+
rcm2*disij(3,k,mtmp)+
gcm1*dcosAng(i,nang,ngk,3)+
gcm2*dcosAng(j,nijk,ngjk,3)+
gcm3*dcosAng(k,nikj,1,3)
endif
do 4 ltmp=1,ktmp-1
if (ltmp .eq. jtmp) goto 4
kprime=neighT(i,ltmp)
if (itype(i) .eq. itype(kprime)) then
iikp=itype(i)
else if (itype(i) .lt. itype(kprime)) then
iikp=itype(i)*ntypes.5*itype(i)*(itype(i)+1)+itype(kprime)
else
iikp=itype(kprime)*ntypes.5*itype(kprime)*(itype(kprime)+1)+itype(i)
endif
do 103 nsearch=1,nSigBk(n)
ncmp=itypeSigBk(n,nsearch)
if (ncmp .eq. kprime) then
nkP=nsearch
goto 104
endif
continue
continue
nkikp=(ltmp-1)*neigh(i)-ltmp*(ltmp+1)/2+ktmp
if (jtmp .lt. ltmp) then
njikp=(jtmp-1)*neigh(i)-jtmp*(jtmp+1)/2+ltmp
nglj=2
ngl=3
else
njikp=(ltmp-1)*neigh(i)-ltmp*(ltmp+1)/2+jtmp
nglj=3
ngl=2
endif
pmean1=pg(itype(i),itype(j),itype(kprime))
cmean1=cg(itype(i),itype(j),itype(kprime))
345
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor2=pmean+cmean*cosAng(i,njikp)+
dmean*cosAng(i,njikp)*cosAng(i,njikp)
gprime2=cmean+2.0*dmean*cosAng(i,njikp)
pmean1=pg(itype(i),itype(k),itype(kprime))
cmean1=cg(itype(i),itype(k),itype(kprime))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor3=pmean+cmean*cosAng(i,nkikp)+
dmean*cosAng(i,nkikp)*cosAng(i,nkikp)
gprime3=cmean+2.0*dmean*cosAng(i,nkikp)
gfactor=gfactor1*gfactor2*gfactor3
rfactorrt=betaSsq(i,ktmp)*betaSsq(i,ltmp)
rfactor=rfactorrt*rfactorrt
agpdpr1=4.0*gfactor*rfactorrt*
betaSsq(i,ltmp)*dBetaSsq(i,ktmp)/rij(i,ktmp)
agpdpr2=4.0*gfactor*rfactorrt*
betaSsq(i,ktmp)*dBetaSsq(i,ltmp)/rij(i,ltmp)
app1=2.0*rfactor*gfactor2*gfactor3*gprime1
app2=2.0*rfactor*gfactor1*gfactor3*gprime2
app3=2.0*rfactor*gfactor1*gfactor2*gprime3
CC=CC+2.0*gfactor*rfactor
dCCi(1)=dCCi(1)+agpdpr1*disij(1,i,ktmp)+
agpdpr2*disij(1,i,ltmp)+app1*dcosAng(i,nang,1,1)+
app2*dcosAng(i,njikp,1,1)+app3*dcosAng(i,nkikp,1,1)
dCCi(2)=dCCi(2)+agpdpr1*disij(2,i,ktmp)+
agpdpr2*disij(2,i,ltmp)+app1*dcosAng(i,nang,1,2)+
app2*dcosAng(i,njikp,1,2)+app3*dcosAng(i,nkikp,1,2)
dCCi(3)=dCCi(3)+agpdpr1*disij(3,i,ktmp)+
agpdpr2*disij(3,i,ltmp)+app1*dcosAng(i,nang,1,3)+
app2*dcosAng(i,njikp,1,3)+app3*dcosAng(i,nkikp,1,3)
dCCj(1)=dCCj(1)+app1*dcosAng(i,nang,ngj,1)+
app2*dcosAng(i,njikp,nglj,1)
dCCj(2)=dCCj(2)+app1*dcosAng(i,nang,ngj,2)+
app2*dcosAng(i,njikp,nglj,2)
dCCj(3)=dCCj(3)+app1*dcosAng(i,nang,ngj,3)+
app2*dcosAng(i,njikp,nglj,3)
dCCl(1)=dCCl(1)+
agpdpr1*disij(1,i,ktmp)*disij(1,i,ktmp)/perlen(1)+
agpdpr2*disij(1,i,ltmp)*disij(1,i,ltmp)/perlen(1)+
app1*dcosAng(i,nang,4,1)+app2*dcosAng(i,njikp,4,1)+
app3*dcosAng(i,nkikp,4,1)
dCCl(2)=dCCl(2)+
agpdpr1*disij(2,i,ktmp)*disij(2,i,ktmp)/perlen(2)+
agpdpr2*disij(2,i,ltmp)*disij(2,i,ltmp)/perlen(2)+
app1*dcosAng(i,nang,4,2)+app2*dcosAng(i,njikp,4,2)+
app3*dcosAng(i,nkikp,4,2)
dCCl(3)=dCCl(3)+
agpdpr1*disij(3,i,ktmp)*disij(3,i,ktmp)/perlen(3)+
agpdpr2*disij(3,i,ltmp)*disij(3,i,ltmp)/perlen(3)+
app1*dcosAng(i,nang,4,3)+app2*dcosAng(i,njikp,4,3)+
app3*dcosAng(i,nkikp,4,3)
dCCk(nk0,1)=dCCk(nk0,1)-agpdpr1*disij(1,i,ktmp)+
app1*dcosAng(i,nang,ngk,1)+app3*dcosAng(i,nkikp,3,1)
dCCk(nk0,2)=dCCk(nk0,2)-agpdpr1*disij(2,i,ktmp)+
app1*dcosAng(i,nang,ngk,2)+app3*dcosAng(i,nkikp,3,2)
dCCk(nk0,3)=dCCk(nk0,3)-agpdpr1*disij(3,i,ktmp)+
app1*dcosAng(i,nang,ngk,3)+app3*dcosAng(i,nkikp,3,3)
dCCk(nkP,1)=dCCk(nkP,1)-agpdpr2*disij(1,i,ltmp)+
app2*dcosAng(i,njikp,ngl,1)+app3*dcosAng(i,nkikp,2,1)
dCCk(nkP,2)=dCCk(nkP,2)-agpdpr2*disij(2,i,ltmp)+
346
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
4
*
*
113
114
app2*dcosAng(i,njikp,ngl,2)+app3*dcosAng(i,nkikp,2,2)
dCCk(nkP,3)=dCCk(nkP,3)-agpdpr2*disij(3,i,ltmp)+
app2*dcosAng(i,njikp,ngl,3)+app3*dcosAng(i,nkikp,2,3)
continue
do 7 ltmp=1,neigh(k)
kprime=neighT(k,ltmp)
if (kprime .eq. i .or. kprime .eq. j) goto 7
if (itype(k) .eq. itype(kprime)) then
ikkp=itype(k)
else if (itype(k) .lt. itype(kprime)) then
ikkp=itype(k)*ntypes.5*itype(k)*(itype(k)+1)+itype(kprime)
else
ikkp=itype(kprime)*ntypes.5*itype(kprime)*(itype(kprime)+1)+itype(k)
endif
if (kNeii .lt. ltmp) then
nikkp=(kNeii-1)*neigh(k)-kNeii*(kNeii+1)/2+ltmp
nglkp=3
ngli=2
else
nikkp=(ltmp-1)*neigh(k)-ltmp*(ltmp+1)/2+kNeii
nglkp=2
ngli=3
endif
do 113 nsearch=1,nSigBk(n)
ncmp=itypeSigBk(n,nsearch)
if (ncmp .eq. kprime) then
nkp=nsearch
goto 114
endif
continue
nSigBk(n)=nSigBk(n)+1
nkp=nSigBk(n)
if (nkp .gt. ntotSigk) then
write(6,*)’nkp .gt. ntotSigk’
stop
endif
itypeSigBk(n,nkp)=kprime
dAAk(nkp,1)=0.0
dAAk(nkp,2)=0.0
dAAk(nkp,3)=0.0
dBBk(nkp,1)=0.0
dBBk(nkp,2)=0.0
dBBk(nkp,3)=0.0
dCCk(nkp,1)=0.0
dCCk(nkp,2)=0.0
dCCk(nkp,3)=0.0
dDDk(nkp,1)=0.0
dDDk(nkp,2)=0.0
dDDk(nkp,3)=0.0
dEEk(nkp,1)=0.0
dEEk(nkp,2)=0.0
dEEk(nkp,3)=0.0
dEE1k(nkp,1)=0.0
dEE1k(nkp,2)=0.0
dEE1k(nkp,3)=0.0
continue
pmean1=pg(itype(k),itype(i),itype(kprime))
cmean1=cg(itype(k),itype(i),itype(kprime))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor2=pmean+cmean*cosAng(k,nikkp)+
347
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
7
119
120
dmean*cosAng(k,nikkp)*cosAng(k,nikkp)
gprime2=cmean+2.0*dmean*cosAng(k,nikkp)
gfactorsq2=gfactor2*gfactor2
gsqprime2=2.0*gfactor2*gprime2
gfactor=gfactorsq*gfactorsq2
rfactorrt=betaSsq(i,ktmp)*betaSsq(k,ltmp)
rfactor=rfactorrt*rfactorrt
agpdpr1=2.0*gfactor*rfactorrt*
betaSsq(k,ltmp)*dBetaSsq(i,ktmp)/rij(i,ktmp)
agpdpr2=2.0*gfactor*rfactorrt*
betaSsq(i,ktmp)*dBetaSsq(k,ltmp)/rij(k,ltmp)
app1=rfactor*gfactorsq2*gsqprime
app2=rfactor*gfactorsq*gsqprime2
CC=CC+gfactor*rfactor
dCCi(1)=dCCi(1)+agpdpr1*disij(1,i,ktmp)+
app1*dcosAng(i,nang,1,1)+app2*dcosAng(k,nikkp,ngli,1)
dCCi(2)=dCCi(2)+agpdpr1*disij(2,i,ktmp)+
app1*dcosAng(i,nang,1,2)+app2*dcosAng(k,nikkp,ngli,2)
dCCi(3)=dCCi(3)+agpdpr1*disij(3,i,ktmp)+
app1*dcosAng(i,nang,1,3)+app2*dcosAng(k,nikkp,ngli,3)
dCCj(1)=dCCj(1)+app1*dcosAng(i,nang,ngj,1)
dCCj(2)=dCCj(2)+app1*dcosAng(i,nang,ngj,2)
dCCj(3)=dCCj(3)+app1*dcosAng(i,nang,ngj,3)
dCCl(1)=dCCl(1)+
agpdpr1*disij(1,i,ktmp)*disij(1,i,ktmp)/perlen(1)+
agpdpr2*disij(1,k,ltmp)*disij(1,k,ltmp)/perlen(1)+
app1*dcosAng(i,nang,4,1)+app2*dcosAng(k,nikkp,4,1)
dCCl(2)=dCCl(2)+
agpdpr1*disij(2,i,ktmp)*disij(2,i,ktmp)/perlen(2)+
agpdpr2*disij(2,k,ltmp)*disij(2,k,ltmp)/perlen(2)+
app1*dcosAng(i,nang,4,2)+app2*dcosAng(k,nikkp,4,2)
dCCl(3)=dCCl(3)+
agpdpr1*disij(3,i,ktmp)*disij(3,i,ktmp)/perlen(3)+
agpdpr2*disij(3,k,ltmp)*disij(3,k,ltmp)/perlen(3)+
app1*dcosAng(i,nang,4,3)+app2*dcosAng(k,nikkp,4,3)
dCCk(nk0,1)=dCCk(nk0,1)-agpdpr1*disij(1,i,ktmp)+
agpdpr2*disij(1,k,ltmp)+app1*dcosAng(i,nang,ngk,1)+
app2*dcosAng(k,nikkp,1,1)
dCCk(nk0,2)=dCCk(nk0,2)-agpdpr1*disij(2,i,ktmp)+
agpdpr2*disij(2,k,ltmp)+app1*dcosAng(i,nang,ngk,2)+
app2*dcosAng(k,nikkp,1,2)
dCCk(nk0,3)=dCCk(nk0,3)-agpdpr1*disij(3,i,ktmp)+
agpdpr2*disij(3,k,ltmp)+app1*dcosAng(i,nang,ngk,3)+
app2*dcosAng(k,nikkp,1,3)
dCCk(nkp,1)=dCCk(nkp,1)-agpdpr2*disij(1,k,ltmp)+
app2*dcosAng(k,nikkp,nglkp,1)
dCCk(nkp,2)=dCCk(nkp,2)-agpdpr2*disij(2,k,ltmp)+
app2*dcosAng(k,nikkp,nglkp,2)
dCCk(nkp,3)=dCCk(nkp,3)-agpdpr2*disij(3,k,ltmp)+
app2*dcosAng(k,nikkp,nglkp,3)
continue
do 9 ltmp=1,neigh(j)
kprime=neighT(j,ltmp)
if (kprime .eq. i .or. kprime .eq. k) goto 9
do 119 kNeikp=1,neigh(k)
if (neighT(k,kNeikp) .eq. kprime) goto 120
continue
goto 9
continue
nfound=0
do 121 nsearch=1,neigh(kprime)
ncmp=neighT(kprime,nsearch)
if (ncmp .eq. j) then
kpNeij=nsearch
348
APPENDIX I. MOLECULAR DYNAMICS CODE
121
122
*
*
*
*
*
*
123
nfound=nfound+1
endif
if (ncmp .eq. k) then
kpNeik=nsearch
nfound=nfound+1
endif
if (nfound .eq. 2) goto 122
continue
continue
if (ki .lt. ltmp) then
nijkp=(ki-1)*neigh(j)-ki*(ki+1)/2+ltmp
ngji=2
ngjkp=3
else
nijkp=(ltmp-1)*neigh(j)-ltmp*(ltmp+1)/2+ki
ngji=3
ngjkp=2
endif
if (kNeii .lt. kNeikp) then
nikkp=(kNeii-1)*neigh(k)-kNeii*(kNeii+1)/2+kNeikp
ngki=2
ngkkp=3
else
nikkp=(kNeikp-1)*neigh(k)-kNeikp*(kNeikp+1)/2+kNeii
ngki=3
ngkkp=2
endif
if (kpNeij .lt. kpNeik) then
njkpk=(kpNeij-1)*neigh(kprime)-kpNeij*(kpNeij+1)/2+
kpNeik
ngkpj=2
ngkpk=3
else
njkpk=(kpNeik-1)*neigh(kprime)-kpNeik*(kpNeik+1)/2+
kpNeij
ngkpj=3
ngkpk=2
endif
if (itype(j) .eq. itype(kprime)) then
ijkp=itype(j)
else if (itype(j) .lt. itype(kprime)) then
ijkp=itype(j)*ntypes.5*itype(j)*(itype(j)+1)+itype(kprime)
else
ijkp=itype(kprime)*ntypes.5*itype(kprime)*(itype(kprime)+1)+itype(j)
endif
if (itype(k) .eq. itype(kprime)) then
ikkp=itype(k)
else if (itype(k) .lt. itype(kprime)) then
ikkp=itype(k)*ntypes.5*itype(k)*(itype(k)+1)+itype(kprime)
else
ikkp=itype(kprime)*ntypes.5*itype(kprime)*(itype(kprime)+1)+itype(k)
endif
do 123 nsearch=1,nSigBk(n)
ncmp=itypeSigBk(n,nsearch)
if (ncmp .eq. kprime) then
nkp=nsearch
goto 124
endif
continue
nSigBk(n)=nSigBk(n)+1
349
APPENDIX I. MOLECULAR DYNAMICS CODE
124
*
*
*
*
*
*
*
nkp=nSigBk(n)
if (nkp .gt. ntotSigk) then
write(6,*)’nkp .gt. ntotSigk’
stop
endif
itypeSigBk(n,nkp)=kprime
dAAk(nkp,1)=0.0
dAAk(nkp,2)=0.0
dAAk(nkp,3)=0.0
dBBk(nkp,1)=0.0
dBBk(nkp,2)=0.0
dBBk(nkp,3)=0.0
dCCk(nkp,1)=0.0
dCCk(nkp,2)=0.0
dCCk(nkp,3)=0.0
dDDk(nkp,1)=0.0
dDDk(nkp,2)=0.0
dDDk(nkp,3)=0.0
dEEk(nkp,1)=0.0
dEEk(nkp,2)=0.0
dEEk(nkp,3)=0.0
dEE1k(nkp,1)=0.0
dEE1k(nkp,2)=0.0
dEE1k(nkp,3)=0.0
continue
pmean1=pg(itype(j),itype(i),itype(kprime))
cmean1=cg(itype(j),itype(i),itype(kprime))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor2=pmean+cmean*cosAng(j,nijkp)+
dmean*cosAng(j,nijkp)*cosAng(j,nijkp)
gprime2=cmean+2.0*dmean*cosAng(j,nijkp)
pmean1=pg(itype(k),itype(i),itype(kprime))
cmean1=cg(itype(k),itype(i),itype(kprime))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor3=pmean+cmean*cosAng(k,nikkp)+
dmean*cosAng(k,nikkp)*cosAng(k,nikkp)
gprime3=cmean+2.0*dmean*cosAng(k,nikkp)
pmean1=pg(itype(kprime),itype(j),itype(k))
cmean1=cg(itype(kprime),itype(j),itype(k))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor4=pmean+cmean*cosAng(kprime,njkpk)+
dmean*cosAng(kprime,njkpk)*cosAng(kprime,njkpk)
gprime4=cmean+2.0*dmean*cosAng(kprime,njkpk)
gfactor=gfactor1*gfactor2*gfactor3*gfactor4
rfactor=betaSsq(i,ktmp)*betaSsq(j,ltmp)*
betaSsq(k,kNeikp)
agpdpr1=gfactor*betaSsq(j,ltmp)*
betaSsq(k,kNeikp)*dBetaSsq(i,ktmp)/rij(i,ktmp)
agpdpr2=gfactor*betaSsq(i,ktmp)*
betaSsq(k,kNeikp)*dBetaSsq(j,ltmp)/rij(j,ltmp)
agpdpr3=gfactor*betaSsq(i,ktmp)*
betaSsq(j,ltmp)*dBetaSsq(k,kNeikp)/rij(k,kNeikp)
app1=rfactor*gfactor2*gfactor3*gfactor4*gprime1
app2=rfactor*gfactor1*gfactor3*gfactor4*gprime2
app3=rfactor*gfactor1*gfactor2*gfactor4*gprime3
app4=rfactor*gfactor1*gfactor2*gfactor3*gprime4
EE=EE+gfactor*rfactor
dEEi(1)=dEEi(1)+agpdpr1*disij(1,i,ktmp)+
350
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
app1*dcosAng(i,nang,1,1)+
app2*dcosAng(j,nijkp,ngji,1)+
app3*dcosAng(k,nikkp,ngki,1)
dEEi(2)=dEEi(2)+agpdpr1*disij(2,i,ktmp)+
app1*dcosAng(i,nang,1,2)+
app2*dcosAng(j,nijkp,ngji,2)+
app3*dcosAng(k,nikkp,ngki,2)
dEEi(3)=dEEi(3)+agpdpr1*disij(3,i,ktmp)+
app1*dcosAng(i,nang,1,3)+
app2*dcosAng(j,nijkp,ngji,3)+
app3*dcosAng(k,nikkp,ngki,3)
dEEj(1)=dEEj(1)+agpdpr2*disij(1,j,ltmp)+
app1*dcosAng(i,nang,ngj,1)+
app2*dcosAng(j,nijkp,1,1)+
app4*dcosAng(kprime,njkpk,ngkpj,1)
dEEj(2)=dEEj(2)+agpdpr2*disij(2,j,ltmp)+
app1*dcosAng(i,nang,ngj,2)+
app2*dcosAng(j,nijkp,1,2)+
app4*dcosAng(kprime,njkpk,ngkpj,2)
dEEj(3)=dEEj(3)+agpdpr2*disij(3,j,ltmp)+
app1*dcosAng(i,nang,ngj,3)+
app2*dcosAng(j,nijkp,1,3)+
app4*dcosAng(kprime,njkpk,ngkpj,3)
dEEl(1)=dEEl(1)+
agpdpr1*disij(1,i,ktmp)*
disij(1,i,ktmp)/perlen(1)+
agpdpr2*disij(1,j,ltmp)*
disij(1,j,ltmp)/perlen(1)+
agpdpr3*disij(1,k,kNeikp)*
disij(1,k,kNeikp)/perlen(1)+
app1*dcosAng(i,nang,4,1)+
app2*dcosAng(j,nijkp,4,1)+
app3*dcosAng(k,nikkp,4,1)+
app4*dcosAng(kprime,njkpk,4,1)
dEEl(2)=dEEl(2)+
agpdpr1*disij(2,i,ktmp)*
disij(2,i,ktmp)/perlen(2)+
agpdpr2*disij(2,j,ltmp)*
disij(2,j,ltmp)/perlen(2)+
agpdpr3*disij(2,k,kNeikp)*
disij(2,k,kNeikp)/perlen(2)+
app1*dcosAng(i,nang,4,2)+
app2*dcosAng(j,nijkp,4,2)+
app3*dcosAng(k,nikkp,4,2)+
app4*dcosAng(kprime,njkpk,4,2)
dEEl(3)=dEEl(3)+
agpdpr1*disij(3,i,ktmp)*
disij(3,i,ktmp)/perlen(3)+
agpdpr2*disij(3,j,ltmp)*
disij(3,j,ltmp)/perlen(3)+
agpdpr3*disij(3,k,kNeikp)*
disij(3,k,kNeikp)/perlen(3)+
app1*dcosAng(i,nang,4,3)+
app2*dcosAng(j,nijkp,4,3)+
app3*dcosAng(k,nikkp,4,3)+
app4*dcosAng(kprime,njkpk,4,3)
dEEk(nk0,1)=dEEk(nk0,1)-agpdpr1*disij(1,i,ktmp)+
agpdpr3*disij(1,k,kNeikp)+
app1*dcosAng(i,nang,ngk,1)+
app3*dcosAng(k,nikkp,1,1)+
app4*dcosAng(kprime,njkpk,ngkpk,1)
dEEk(nk0,2)=dEEk(nk0,2)-agpdpr1*disij(2,i,ktmp)+
agpdpr3*disij(2,k,kNeikp)+
app1*dcosAng(i,nang,ngk,2)+
351
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
9
3
*
*
107
app3*dcosAng(k,nikkp,1,2)+
app4*dcosAng(kprime,njkpk,ngkpk,2)
dEEk(nk0,3)=dEEk(nk0,3)-agpdpr1*disij(3,i,ktmp)+
agpdpr3*disij(3,k,kNeikp)+
app1*dcosAng(i,nang,ngk,3)+
app3*dcosAng(k,nikkp,1,3)+
app4*dcosAng(kprime,njkpk,ngkpk,3)
dEEk(nkp,1)=dEEk(nkp,1)-agpdpr2*disij(1,j,ltmp)+
agpdpr3*disij(1,kprime,kpNeik)+
app2*dcosAng(j,nijkp,ngjkp,1)+
app3*dcosAng(k,nikkp,ngkkp,1)+
app4*dcosAng(kprime,njkpk,1,1)
dEEk(nkp,2)=dEEk(nkp,2)-agpdpr2*disij(2,j,ltmp)+
agpdpr3*disij(2,kprime,kpNeik)+
app2*dcosAng(j,nijkp,ngjkp,2)+
app3*dcosAng(k,nikkp,ngkkp,2)+
app4*dcosAng(kprime,njkpk,1,2)
dEEk(nkp,3)=dEEk(nkp,3)-agpdpr2*disij(3,j,ltmp)+
agpdpr3*disij(3,kprime,kpNeik)+
app2*dcosAng(j,nijkp,ngjkp,3)+
app3*dcosAng(k,nikkp,ngkkp,3)+
app4*dcosAng(kprime,njkpk,1,3)
continue
continue
do 5 ktmp=1,neigh(j)
if (ktmp .eq. ki) goto 5
if (ktmp .lt. ki) then
nang=(ktmp-1)*neigh(j)-ktmp*(ktmp+1)/2+ki
ngi=3
ngk=2
else
nang=(ki-1)*neigh(j)-ki*(ki+1)/2+ktmp
ngi=2
ngk=3
endif
k=neighT(j,ktmp)
if (itype(j) .eq. itype(k)) then
ijk=itype(j)
else if (itype(j) .lt. itype(k)) then
ijk=itype(j)*ntypes.5*itype(j)*(itype(j)+1)+itype(k)
else
ijk=itype(k)*ntypes.5*itype(k)*(itype(k)+1)+itype(j)
endif
do 107 nsearch=1,nSigBk(n)
ncmp=itypeSigBk(n,nsearch)
if (ncmp .eq. k) then
new1=nsearch
goto 108
endif
continue
nSigBk(n)=nSigBk(n)+1
new1=nSigBk(n)
if (new1 .gt. ntotSigk) then
write(6,*)’new1 .gt. ntotSigk’
stop
endif
itypeSigBk(n,new1)=k
dAAk(new1,1)=0.0
dAAk(new1,2)=0.0
dAAk(new1,3)=0.0
dBBk(new1,1)=0.0
dBBk(new1,2)=0.0
352
APPENDIX I. MOLECULAR DYNAMICS CODE
108
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
dBBk(new1,3)=0.0
dCCk(new1,1)=0.0
dCCk(new1,2)=0.0
dCCk(new1,3)=0.0
dDDk(new1,1)=0.0
dDDk(new1,2)=0.0
dDDk(new1,3)=0.0
dEEk(new1,1)=0.0
dEEk(new1,2)=0.0
dEEk(new1,3)=0.0
dEE1k(new1,1)=0.0
dEE1k(new1,2)=0.0
dEE1k(new1,3)=0.0
continue
pmean1=pg(itype(j),itype(i),itype(k))
cmean1=cg(itype(j),itype(i),itype(k))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor1=pmean+cmean*cosAng(j,nang)+
dmean*cosAng(j,nang)*cosAng(j,nang)
gprime1=cmean+2.0*dmean*cosAng(j,nang)
gfactorsq=gfactor1*gfactor1
gsqprime=2.0*gfactor1*gprime1
rfactor1rt=betaSsq(j,ktmp)*betaSsq(j,ktmp)
rfactor1=rfactor1rt*rfactor1rt
agpdpr1=2.0*gfactorsq*
betaSsq(j,ktmp)*dBetaSsq(j,ktmp)/rij(j,ktmp)
agpdpr2=2.0*rfactor1rt*agpdpr1
app1=rfactor1rt*gsqprime
app2=rfactor1rt*app1
BB=BB+gfactorsq*rfactor1rt
dBBi(1)=dBBi(1)+app1*dcosAng(j,nang,ngi,1)
dBBi(2)=dBBi(2)+app1*dcosAng(j,nang,ngi,2)
dBBi(3)=dBBi(3)+app1*dcosAng(j,nang,ngi,3)
dBBj(1)=dBBj(1)+agpdpr1*disij(1,j,ktmp)+
app1*dcosAng(j,nang,1,1)
dBBj(2)=dBBj(2)+agpdpr1*disij(2,j,ktmp)+
app1*dcosAng(j,nang,1,2)
dBBj(3)=dBBj(3)+agpdpr1*disij(3,j,ktmp)+
app1*dcosAng(j,nang,1,3)
dBBl(1)=dBBl(1)+
agpdpr1*disij(1,j,ktmp)*disij(1,j,ktmp)/perlen(1)+
app1*dcosAng(j,nang,4,1)
dBBl(2)=dBBl(2)+
agpdpr1*disij(2,j,ktmp)*disij(2,j,ktmp)/perlen(2)+
app1*dcosAng(j,nang,4,2)
dBBl(3)=dBBl(3)+
agpdpr1*disij(3,j,ktmp)*disij(3,j,ktmp)/perlen(3)+
app1*dcosAng(j,nang,4,3)
dBBk(new1,1)=dBBk(new1,1)-agpdpr1*disij(1,j,ktmp)+
app1*dcosAng(j,nang,ngk,1)
dBBk(new1,2)=dBBk(new1,2)-agpdpr1*disij(2,j,ktmp)+
app1*dcosAng(j,nang,ngk,2)
dBBk(new1,3)=dBBk(new1,3)-agpdpr1*disij(3,j,ktmp)+
app1*dcosAng(j,nang,ngk,3)
DD=DD+gfactorsq*rfactor1
dDDi(1)=dDDi(1)+app2*dcosAng(j,nang,ngi,1)
dDDi(2)=dDDi(2)+app2*dcosAng(j,nang,ngi,2)
dDDi(3)=dDDi(3)+app2*dcosAng(j,nang,ngi,3)
dDDj(1)=dDDj(1)+agpdpr2*disij(1,j,ktmp)+
app2*dcosAng(j,nang,1,1)
dDDj(2)=dDDj(2)+agpdpr2*disij(2,j,ktmp)+
app2*dcosAng(j,nang,1,2)
353
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
109
110
*
*
dDDj(3)=dDDj(3)+agpdpr2*disij(3,j,ktmp)+
app2*dcosAng(j,nang,1,3)
dDDl(1)=dDDl(1)+
agpdpr2*disij(1,j,ktmp)*disij(1,j,ktmp)/perlen(1)+
app2*dcosAng(j,nang,4,1)
dDDl(2)=dDDl(2)+
agpdpr2*disij(2,j,ktmp)*disij(2,j,ktmp)/perlen(2)+
app2*dcosAng(j,nang,4,2)
dDDl(3)=dDDl(3)+
agpdpr2*disij(3,j,ktmp)*disij(3,j,ktmp)/perlen(3)+
app2*dcosAng(j,nang,4,3)
dDDk(new1,1)=dDDk(new1,1)-agpdpr2*disij(1,j,ktmp)+
app2*dcosAng(j,nang,ngk,1)
dDDk(new1,2)=dDDk(new1,2)-agpdpr2*disij(2,j,ktmp)+
app2*dcosAng(j,nang,ngk,2)
dDDk(new1,3)=dDDk(new1,3)-agpdpr2*disij(3,j,ktmp)+
app2*dcosAng(j,nang,ngk,3)
do 6 ltmp=1,ktmp-1
if (ltmp .eq. ki) goto 6
kprime=neighT(j,ltmp)
if (itype(j) .eq. itype(kprime)) then
ijkp=itype(j)
else if (itype(j) .lt. itype(kprime)) then
ijkp=itype(j)*ntypes.5*itype(j)*(itype(j)+1)+itype(kprime)
else
ijkp=itype(kprime)*ntypes.5*itype(kprime)*(itype(kprime)+1)+itype(j)
endif
do 109 nsearch=1,nSigBk(n)
ncmp=itypeSigBk(n,nsearch)
if (ncmp .eq. kprime) then
new2=nsearch
goto 110
endif
continue
continue
nkjkp=(ltmp-1)*neigh(j)-ltmp*(ltmp+1)/2+ktmp
if (ki .lt. ltmp) then
nijkp=(ki-1)*neigh(j)-ki*(ki+1)/2+ltmp
ngli=2
ngl=3
else
nijkp=(ltmp-1)*neigh(j)-ltmp*(ltmp+1)/2+ki
ngli=3
ngl=2
endif
pmean1=pg(itype(j),itype(i),itype(kprime))
cmean1=cg(itype(j),itype(i),itype(kprime))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor2=pmean+cmean*cosAng(j,nijkp)+
dmean*cosAng(j,nijkp)*cosAng(j,nijkp)
gprime2=cmean+2.0*dmean*cosAng(j,nijkp)
pmean1=pg(itype(j),itype(k),itype(kprime))
cmean1=cg(itype(j),itype(k),itype(kprime))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor3=pmean+cmean*cosAng(j,nkjkp)+
dmean*cosAng(j,nkjkp)*cosAng(j,nkjkp)
gprime3=cmean+2.0*dmean*cosAng(j,nkjkp)
gfactor=gfactor1*gfactor2*gfactor3
354
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
6
rfactorrt=betaSsq(j,ktmp)*betaSsq(j,ltmp)
rfactor=rfactorrt*rfactorrt
agpdpr1=4.0*gfactor*rfactorrt*
betaSsq(j,ltmp)*dBetaSsq(j,ktmp)/rij(j,ktmp)
agpdpr2=4.0*gfactor*rfactorrt*
betaSsq(j,ktmp)*dBetaSsq(j,ltmp)/rij(j,ltmp)
app1=2.0*rfactor*gfactor2*gfactor3*gprime1
app2=2.0*rfactor*gfactor1*gfactor3*gprime2
app3=2.0*rfactor*gfactor1*gfactor2*gprime3
DD=DD+2.0*gfactor*rfactor
dDDi(1)=dDDi(1)+app1*dcosAng(j,nang,ngi,1)+
app2*dcosAng(j,nijkp,ngli,1)
dDDi(2)=dDDi(2)+app1*dcosAng(j,nang,ngi,2)+
app2*dcosAng(j,nijkp,ngli,2)
dDDi(3)=dDDi(3)+app1*dcosAng(j,nang,ngi,3)+
app2*dcosAng(j,nijkp,ngli,3)
dDDj(1)=dDDj(1)+agpdpr1*disij(1,j,ktmp)+
agpdpr2*disij(1,j,ltmp)+app1*dcosAng(j,nang,1,1)+
app2*dcosAng(j,nijkp,1,1)+app3*dcosAng(j,nkjkp,1,1)
dDDj(2)=dDDj(2)+agpdpr1*disij(2,j,ktmp)+
agpdpr2*disij(2,j,ltmp)+app1*dcosAng(j,nang,1,2)+
app2*dcosAng(j,nijkp,1,2)+app3*dcosAng(j,nkjkp,1,2)
dDDj(3)=dDDj(3)+agpdpr1*disij(3,j,ktmp)+
agpdpr2*disij(3,j,ltmp)+app1*dcosAng(j,nang,1,3)+
app2*dcosAng(j,nijkp,1,3)+app3*dcosAng(j,nkjkp,1,3)
dDDl(1)=dDDl(1)+
agpdpr1*disij(1,j,ktmp)*disij(1,j,ktmp)/perlen(1)+
agpdpr2*disij(1,j,ltmp)*disij(1,j,ltmp)/perlen(1)+
app1*dcosAng(j,nang,4,1)+app2*dcosAng(j,nijkp,4,1)+
app3*dcosAng(j,nkjkp,4,1)
dDDl(2)=dDDl(2)+
agpdpr1*disij(2,j,ktmp)*disij(2,j,ktmp)/perlen(2)+
agpdpr2*disij(2,j,ltmp)*disij(2,j,ltmp)/perlen(2)+
app1*dcosAng(j,nang,4,2)+app2*dcosAng(j,nijkp,4,2)+
app3*dcosAng(j,nkjkp,4,2)
dDDl(3)=dDDl(3)+
agpdpr1*disij(3,j,ktmp)*disij(3,j,ktmp)/perlen(3)+
agpdpr2*disij(3,j,ltmp)*disij(3,j,ltmp)/perlen(3)+
app1*dcosAng(j,nang,4,3)+app2*dcosAng(j,nijkp,4,3)+
app3*dcosAng(j,nkjkp,4,3)
dDDk(new1,1)=dDDk(new1,1)-agpdpr1*disij(1,j,ktmp)+
app1*dcosAng(j,nang,ngk,1)+
app3*dcosAng(j,nkjkp,3,1)
dDDk(new1,2)=dDDk(new1,2)-agpdpr1*disij(2,j,ktmp)+
app1*dcosAng(j,nang,ngk,2)+
app3*dcosAng(j,nkjkp,3,2)
dDDk(new1,3)=dDDk(new1,3)-agpdpr1*disij(3,j,ktmp)+
app1*dcosAng(j,nang,ngk,3)+
app3*dcosAng(j,nkjkp,3,3)
dDDk(new2,1)=dDDk(new2,1)-agpdpr2*disij(1,j,ltmp)+
app2*dcosAng(j,nijkp,ngl,1)+
app3*dcosAng(j,nkjkp,2,1)
dDDk(new2,2)=dDDk(new2,2)-agpdpr2*disij(2,j,ltmp)+
app2*dcosAng(j,nijkp,ngl,2)+
app3*dcosAng(j,nkjkp,2,2)
dDDk(new2,3)=dDDk(new2,3)-agpdpr2*disij(3,j,ltmp)+
app2*dcosAng(j,nijkp,ngl,3)+
app3*dcosAng(j,nkjkp,2,3)
continue
do 8 ltmp=1,neigh(k)
kprime=neighT(k,ltmp)
if (kprime .eq. i .or. kprime .eq. j) goto 8
if (itype(k) .eq. itype(kprime)) then
ikkp=itype(k)
355
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
115
116
117
118
*
else if (itype(k) .lt. itype(kprime)) then
ikkp=itype(k)*ntypes.5*itype(k)*(itype(k)+1)+itype(kprime)
else
ikkp=itype(kprime)*ntypes.5*itype(kprime)*(itype(kprime)+1)+itype(k)
endif
do 115 kNeij=1,neigh(k)
if (neighT(k,kNeij) .eq. j) goto 116
continue
continue
if (kNeij .lt. ltmp) then
njkkp=(kNeij-1)*neigh(k)-kNeij*(kNeij+1)/2+ltmp
nglkp=3
nglj=2
else
njkkp=(ltmp-1)*neigh(k)-ltmp*(ltmp+1)/2+kNeij
nglkp=2
nglj=3
endif
do 117 nsearch=1,nSigBk(n)
ncmp=itypeSigBk(n,nsearch)
if (ncmp .eq. kprime) then
new2=nsearch
goto 118
endif
continue
nSigBk(n)=nSigBk(n)+1
new2=nSigBk(n)
if (new2 .gt. ntotSigk) then
write(6,*)’new2 .gt. ntotSigk’
stop
endif
itypeSigBk(n,new2)=kprime
dAAk(new2,1)=0.0
dAAk(new2,2)=0.0
dAAk(new2,3)=0.0
dBBk(new2,1)=0.0
dBBk(new2,2)=0.0
dBBk(new2,3)=0.0
dCCk(new2,1)=0.0
dCCk(new2,2)=0.0
dCCk(new2,3)=0.0
dDDk(new2,1)=0.0
dDDk(new2,2)=0.0
dDDk(new2,3)=0.0
dEEk(new2,1)=0.0
dEEk(new2,2)=0.0
dEEk(new2,3)=0.0
dEE1k(new2,1)=0.0
dEE1k(new2,2)=0.0
dEE1k(new2,3)=0.0
continue
pmean1=pg(itype(k),itype(j),itype(kprime))
cmean1=cg(itype(k),itype(j),itype(kprime))
pmean=(1.0-pmean1-cmean1)/(1.0+cmean1)
cmean=pmean1/(1.0+cmean1)
dmean=2.0*cmean1/(1.0+cmean1)
gfactor2=pmean+cmean*cosAng(k,njkkp)+
dmean*cosAng(k,njkkp)*cosAng(k,njkkp)
gprime2=cmean+2.0*dmean*cosAng(k,njkkp)
gfactorsq2=gfactor2*gfactor2
gsqprime2=2.0*gfactor2*gprime2
gfactor=gfactorsq*gfactorsq2
356
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
8
5
rfactorrt=betaSsq(j,ktmp)*betaSsq(k,ltmp)
rfactor=rfactorrt*rfactorrt
agpdpr1=2.0*gfactor*rfactorrt*
betaSsq(k,ltmp)*dBetaSsq(j,ktmp)/rij(j,ktmp)
agpdpr2=2.0*gfactor*rfactorrt*
betaSsq(j,ktmp)*dBetaSsq(k,ltmp)/rij(k,ltmp)
app1=rfactor*gfactorsq2*gsqprime
app2=rfactor*gfactorsq*gsqprime2
DD=DD+gfactor*rfactor
dDDi(1)=dDDi(1)+app1*dcosAng(j,nang,ngi,1)
dDDi(2)=dDDi(2)+app1*dcosAng(j,nang,ngi,2)
dDDi(3)=dDDi(3)+app1*dcosAng(j,nang,ngi,3)
dDDj(1)=dDDj(1)+agpdpr1*disij(1,j,ktmp)+
app1*dcosAng(j,nang,1,1)+
app2*dcosAng(k,njkkp,nglj,1)
dDDj(2)=dDDj(2)+agpdpr1*disij(2,j,ktmp)+
app1*dcosAng(j,nang,1,2)+
app2*dcosAng(k,njkkp,nglj,2)
dDDj(3)=dDDj(3)+agpdpr1*disij(3,j,ktmp)+
app1*dcosAng(j,nang,1,3)+
app2*dcosAng(k,njkkp,nglj,3)
dDDl(1)=dDDl(1)+
agpdpr1*disij(1,j,ktmp)*disij(1,j,ktmp)/perlen(1)+
agpdpr2*disij(1,k,ltmp)*disij(1,k,ltmp)/perlen(1)+
app1*dcosAng(j,nang,4,1)+app2*dcosAng(k,njkkp,4,1)
dDDl(2)=dDDl(2)+
agpdpr1*disij(2,j,ktmp)*disij(2,j,ktmp)/perlen(2)+
agpdpr2*disij(2,k,ltmp)*disij(2,k,ltmp)/perlen(2)+
app1*dcosAng(j,nang,4,2)+app2*dcosAng(k,njkkp,4,2)
dDDl(3)=dDDl(3)+
agpdpr1*disij(3,j,ktmp)*disij(3,j,ktmp)/perlen(3)+
agpdpr2*disij(3,k,ltmp)*disij(3,k,ltmp)/perlen(3)+
app1*dcosAng(j,nang,4,3)+app2*dcosAng(k,njkkp,4,3)
dDDk(new1,1)=dDDk(new1,1)-agpdpr1*disij(1,j,ktmp)+
agpdpr2*disij(1,k,ltmp)+app1*dcosAng(j,nang,ngk,1)+
app2*dcosAng(k,njkkp,1,1)
dDDk(new1,2)=dDDk(new1,2)-agpdpr1*disij(2,j,ktmp)+
agpdpr2*disij(2,k,ltmp)+app1*dcosAng(j,nang,ngk,2)+
app2*dcosAng(k,njkkp,1,2)
dDDk(new1,3)=dDDk(new1,3)-agpdpr1*disij(3,j,ktmp)+
agpdpr2*disij(3,k,ltmp)+app1*dcosAng(j,nang,ngk,3)+
app2*dcosAng(k,njkkp,1,3)
dDDk(new2,1)=dDDk(new2,1)-agpdpr2*disij(1,k,ltmp)+
app2*dcosAng(k,njkkp,nglkp,1)
dDDk(new2,2)=dDDk(new2,2)-agpdpr2*disij(2,k,ltmp)+
app2*dcosAng(k,njkkp,nglkp,2)
dDDk(new2,3)=dDDk(new2,3)-agpdpr2*disij(3,k,ltmp)+
app2*dcosAng(k,njkkp,nglkp,3)
continue
continue
if (FF .le. 1.0e-6) then
sigB(n)=0.0
dSigBi(n,1)=0.0
dSigBi(n,2)=0.0
dSigBi(n,3)=0.0
dSigBj(n,1)=0.0
dSigBj(n,2)=0.0
dSigBj(n,3)=0.0
dSigBl(n,1)=0.0
dSigBl(n,2)=0.0
dSigBl(n,3)=0.0
do 202 npt=1,nSigBk(n)
dSigBk(n,npt,1)=0.0
dSigBk(n,npt,2)=0.0
357
APPENDIX I. MOLECULAR DYNAMICS CODE
202
dSigBk(n,npt,3)=0.0
continue
goto 2
endif
if (AA .lt. 0.0) then
AA=0.0
endif
if (BB .lt. 0.0) then
BB=0.0
endif
if (CC .lt. 0.0) then
CC=0.0
endif
if (DD .lt. 0.0) then
DD=0.0
endif
AAC=AA+BB
BBC=AA*BB
CCC=AA*AA+BB*BB
DDC=CC+DD
if (DDC .lt. CCC) DDC=CCC
EEC=(DDC-CCC)/(AAC+2.0*smallS1)
dAACi(1)=dAAi(1)+dBBi(1)
dAACi(2)=dAAi(2)+dBBi(2)
dAACi(3)=dAAi(3)+dBBi(3)
dAACj(1)=dAAj(1)+dBBj(1)
dAACj(2)=dAAj(2)+dBBj(2)
dAACj(3)=dAAj(3)+dBBj(3)
dAACl(1)=dAAl(1)+dBBl(1)
dAACl(2)=dAAl(2)+dBBl(2)
dAACl(3)=dAAl(3)+dBBl(3)
dBBCi(1)=dAAi(1)*BB+AA*dBBi(1)
dBBCi(2)=dAAi(2)*BB+AA*dBBi(2)
dBBCi(3)=dAAi(3)*BB+AA*dBBi(3)
dBBCj(1)=dAAj(1)*BB+AA*dBBj(1)
dBBCj(2)=dAAj(2)*BB+AA*dBBj(2)
dBBCj(3)=dAAj(3)*BB+AA*dBBj(3)
dBBCl(1)=dAAl(1)*BB+AA*dBBl(1)
dBBCl(2)=dAAl(2)*BB+AA*dBBl(2)
dBBCl(3)=dAAl(3)*BB+AA*dBBl(3)
dCCCi(1)=2.0*AA*dAAi(1)+2.0*BB*dBBi(1)
dCCCi(2)=2.0*AA*dAAi(2)+2.0*BB*dBBi(2)
dCCCi(3)=2.0*AA*dAAi(3)+2.0*BB*dBBi(3)
dCCCj(1)=2.0*AA*dAAj(1)+2.0*BB*dBBj(1)
dCCCj(2)=2.0*AA*dAAj(2)+2.0*BB*dBBj(2)
dCCCj(3)=2.0*AA*dAAj(3)+2.0*BB*dBBj(3)
dCCCl(1)=2.0*AA*dAAl(1)+2.0*BB*dBBl(1)
dCCCl(2)=2.0*AA*dAAl(2)+2.0*BB*dBBl(2)
dCCCl(3)=2.0*AA*dAAl(3)+2.0*BB*dBBl(3)
dDDCi(1)=dCCi(1)+dDDi(1)
dDDCi(2)=dCCi(2)+dDDi(2)
dDDCi(3)=dCCi(3)+dDDi(3)
dDDCj(1)=dCCj(1)+dDDj(1)
dDDCj(2)=dCCj(2)+dDDj(2)
dDDCj(3)=dCCj(3)+dDDj(3)
dDDCl(1)=dCCl(1)+dDDl(1)
dDDCl(2)=dCCl(2)+dDDl(2)
dDDCl(3)=dCCl(3)+dDDl(3)
AACFF=1.0/(AAC+2.0*smallS1)
dEECi(1)=(dDDCi(1)-dCCCi(1)-EEC*dAACi(1))*AACFF
dEECi(2)=(dDDCi(2)-dCCCi(2)-EEC*dAACi(2))*AACFF
dEECi(3)=(dDDCi(3)-dCCCi(3)-EEC*dAACi(3))*AACFF
dEECj(1)=(dDDCj(1)-dCCCj(1)-EEC*dAACj(1))*AACFF
dEECj(2)=(dDDCj(2)-dCCCj(2)-EEC*dAACj(2))*AACFF
358
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
dEECj(3)=(dDDCj(3)-dCCCj(3)-EEC*dAACj(3))*AACFF
dEECl(1)=(dDDCl(1)-dCCCl(1)-EEC*dAACl(1))*AACFF
dEECl(2)=(dDDCl(2)-dCCCl(2)-EEC*dAACl(2))*AACFF
dEECl(3)=(dDDCl(3)-dCCCl(3)-EEC*dAACl(3))*AACFF
UT=EEC*FF+BBC+smallS3
UT=1.0/sqrt(UT)
FFC=BBC*UT
GGC=EEC*UT
bndtmp=FF*(1.0+an2(iij)*GGC)**2+AAC*an1(iij)+
an2(iij)*EE/(betaSsq(i,jtmp)+smallS2)+
an2(iij)*FFC*(2.0+GGC)+smallS4+deltas(iij)*deltas(iij)
UTcom=-0.5*UT**3
dUTi(1)=UTcom*(dEECi(1)*FF+EEC*dFFi(1)+dBBCi(1))
dUTi(2)=UTcom*(dEECi(2)*FF+EEC*dFFi(2)+dBBCi(2))
dUTi(3)=UTcom*(dEECi(3)*FF+EEC*dFFi(3)+dBBCi(3))
dUTj(1)=UTcom*(dEECj(1)*FF+EEC*dFFj(1)+dBBCj(1))
dUTj(2)=UTcom*(dEECj(2)*FF+EEC*dFFj(2)+dBBCj(2))
dUTj(3)=UTcom*(dEECj(3)*FF+EEC*dFFj(3)+dBBCj(3))
dUTl(1)=UTcom*(dEECl(1)*FF+EEC*dFFl(1)+dBBCl(1))
dUTl(2)=UTcom*(dEECl(2)*FF+EEC*dFFl(2)+dBBCl(2))
dUTl(3)=UTcom*(dEECl(3)*FF+EEC*dFFl(3)+dBBCl(3))
dFFCi(1)=dBBCi(1)*UT+BBC*dUTi(1)
dFFCi(2)=dBBCi(2)*UT+BBC*dUTi(2)
dFFCi(3)=dBBCi(3)*UT+BBC*dUTi(3)
dFFCj(1)=dBBCj(1)*UT+BBC*dUTj(1)
dFFCj(2)=dBBCj(2)*UT+BBC*dUTj(2)
dFFCj(3)=dBBCj(3)*UT+BBC*dUTj(3)
dFFCl(1)=dBBCl(1)*UT+BBC*dUTl(1)
dFFCl(2)=dBBCl(2)*UT+BBC*dUTl(2)
dFFCl(3)=dBBCl(3)*UT+BBC*dUTl(3)
dGGCi(1)=dEECi(1)*UT+EEC*dUTi(1)
dGGCi(2)=dEECi(2)*UT+EEC*dUTi(2)
dGGCi(3)=dEECi(3)*UT+EEC*dUTi(3)
dGGCj(1)=dEECj(1)*UT+EEC*dUTj(1)
dGGCj(2)=dEECj(2)*UT+EEC*dUTj(2)
dGGCj(3)=dEECj(3)*UT+EEC*dUTj(3)
dGGCl(1)=dEECl(1)*UT+EEC*dUTl(1)
dGGCl(2)=dEECl(2)*UT+EEC*dUTl(2)
dGGCl(3)=dEECl(3)*UT+EEC*dUTl(3)
do 203 npt=1,nSigBk(n)
dAACk(npt,1)=dAAk(npt,1)+dBBk(npt,1)
dAACk(npt,2)=dAAk(npt,2)+dBBk(npt,2)
dAACk(npt,3)=dAAk(npt,3)+dBBk(npt,3)
dBBCk(npt,1)=dAAk(npt,1)*BB+AA*dBBk(npt,1)
dBBCk(npt,2)=dAAk(npt,2)*BB+AA*dBBk(npt,2)
dBBCk(npt,3)=dAAk(npt,3)*BB+AA*dBBk(npt,3)
dCCCk(npt,1)=2.0*AA*dAAk(npt,1)+2.0*BB*dBBk(npt,1)
dCCCk(npt,2)=2.0*AA*dAAk(npt,2)+2.0*BB*dBBk(npt,2)
dCCCk(npt,3)=2.0*AA*dAAk(npt,3)+2.0*BB*dBBk(npt,3)
dDDCk(npt,1)=dCCk(npt,1)+dDDk(npt,1)
dDDCk(npt,2)=dCCk(npt,2)+dDDk(npt,2)
dDDCk(npt,3)=dCCk(npt,3)+dDDk(npt,3)
dEECk(npt,1)=(dDDCk(npt,1)-dCCCk(npt,1)EEC*dAACk(npt,1))*AACFF
dEECk(npt,2)=(dDDCk(npt,2)-dCCCk(npt,2)EEC*dAACk(npt,2))*AACFF
dEECk(npt,3)=(dDDCk(npt,3)-dCCCk(npt,3)EEC*dAACk(npt,3))*AACFF
dUTk(npt,1)=UTcom*(dEECk(npt,1)*FF+dBBCk(npt,1))
dUTk(npt,2)=UTcom*(dEECk(npt,2)*FF+dBBCk(npt,2))
dUTk(npt,3)=UTcom*(dEECk(npt,3)*FF+dBBCk(npt,3))
dFFCk(npt,1)=dBBCk(npt,1)*UT+BBC*dUTk(npt,1)
dFFCk(npt,2)=dBBCk(npt,2)*UT+BBC*dUTk(npt,2)
dFFCk(npt,3)=dBBCk(npt,3)*UT+BBC*dUTk(npt,3)
359
APPENDIX I. MOLECULAR DYNAMICS CODE
203
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
100
dGGCk(npt,1)=dEECk(npt,1)*UT+EEC*dUTk(npt,1)
dGGCk(npt,2)=dEECk(npt,2)*UT+EEC*dUTk(npt,2)
dGGCk(npt,3)=dEECk(npt,3)*UT+EEC*dUTk(npt,3)
continue
psign=1.0
if (1.0+an2(iij)*GGC .lt. 0.0) psign=-1.0
bndtmp0=1.0/sqrt(bndtmp)
sigB1(n)=psign*betaSsq(i,jtmp)*(1.0+an2(iij)*GGC)*bndtmp0
bndtmp=-0.5*bndtmp0**3
bndtmp1=psign*(1.0+an2(iij)*GGC)*bndtmp0+
psign*betaSsq(i,jtmp)*(1.0+an2(iij)*GGC)*bndtmp*
(2.0*betaSsq(i,jtmp)*(1.0+an2(iij)*GGC)**2an2(iij)*EE/(betaSsq(i,jtmp)+smallS2)**2)
bndtmp1=bndtmp1*dBetaSsq(i,jtmp)/rij(i,jtmp)
bndtmp2=psign*betaSsq(i,jtmp)*(1.0+an2(iij)*GGC)*bndtmp*
an1(iij)
bndtmp3=psign*betaSsq(i,jtmp)*(1.0+an2(iij)*GGC)*bndtmp*
an2(iij)/(betaSsq(i,jtmp)+smallS2)
bndtmp4=psign*betaSsq(i,jtmp)*(1.0+an2(iij)*GGC)*bndtmp*
an2(iij)*(2.0+GGC)
bndtmp5=an2(iij)*psign*betaSsq(i,jtmp)*bndtmp0+
psign*betaSsq(i,jtmp)*(1.0+an2(iij)*GGC)*bndtmp*
(2.0*FF*(1.0+an2(iij)*GGC)*an2(iij)+an2(iij)*FFC)
dSigBi1(n,1)=bndtmp1*disij(1,i,jtmp)+bndtmp2*dAACi(1)+
bndtmp3*dEEi(1)+bndtmp4*dFFCi(1)+bndtmp5*dGGCi(1)
dSigBi1(n,2)=bndtmp1*disij(2,i,jtmp)+bndtmp2*dAACi(2)+
bndtmp3*dEEi(2)+bndtmp4*dFFCi(2)+bndtmp5*dGGCi(2)
dSigBi1(n,3)=bndtmp1*disij(3,i,jtmp)+bndtmp2*dAACi(3)+
bndtmp3*dEEi(3)+bndtmp4*dFFCi(3)+bndtmp5*dGGCi(3)
dSigBj1(n,1)=-bndtmp1*disij(1,i,jtmp)+bndtmp2*dAACj(1)+
bndtmp3*dEEj(1)+bndtmp4*dFFCj(1)+bndtmp5*dGGCj(1)
dSigBj1(n,2)=-bndtmp1*disij(2,i,jtmp)+bndtmp2*dAACj(2)+
bndtmp3*dEEj(2)+bndtmp4*dFFCj(2)+bndtmp5*dGGCj(2)
dSigBj1(n,3)=-bndtmp1*disij(3,i,jtmp)+bndtmp2*dAACj(3)+
bndtmp3*dEEj(3)+bndtmp4*dFFCj(3)+bndtmp5*dGGCj(3)
dSigBl1(n,1)=
bndtmp1*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)+
bndtmp2*dAACl(1)+
bndtmp3*dEEl(1)+bndtmp4*dFFCl(1)+bndtmp5*dGGCl(1)
dSigBl1(n,2)=
bndtmp1*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)+
bndtmp2*dAACl(2)+
bndtmp3*dEEl(2)+bndtmp4*dFFCl(2)+bndtmp5*dGGCl(2)
dSigBl1(n,3)=
bndtmp1*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)+
bndtmp2*dAACl(3)+
bndtmp3*dEEl(3)+bndtmp4*dFFCl(3)+bndtmp5*dGGCl(3)
do 100 npt=1,nSigBk(n)
dSigBk1(n,npt,1)=bndtmp2*dAACk(npt,1)+
bndtmp3*dEEk(npt,1)+bndtmp4*dFFCk(npt,1)+
bndtmp5*dGGCk(npt,1)
dSigBk1(n,npt,2)=bndtmp2*dAACk(npt,2)+
bndtmp3*dEEk(npt,2)+bndtmp4*dFFCk(npt,2)+
bndtmp5*dGGCk(npt,2)
dSigBk1(n,npt,3)=bndtmp2*dAACk(npt,3)+
bndtmp3*dEEk(npt,3)+bndtmp4*dFFCk(npt,3)+
bndtmp5*dGGCk(npt,3)
continue
ps=sigB1(n)*rdBO+1.0
ks=ps
ks=min0(ks,nBOt-1)
ps=ps-ks
ps=amin1(ps,1.0)
dsigB1=((FsigBO3(iij,ks)*ps+
360
APPENDIX I. MOLECULAR DYNAMICS CODE
$
$
204
2
1
FsigBO2(iij,ks))*ps+FsigBO1(iij,ks))*ps+
FsigBO(iij,ks)
dsigB2=(FsigBO6(iij,ks)*ps+
$
FsigBO5(iij,ks))*ps+FsigBO4(iij,ks)
part0=(FF+0.5*AAC+smallS5)
part1=(fij(iij)-0.5)*cij(iij)
part2=1.0-part1*EE1/part0
part3=dsigB1*part1/part0
part4=part3/part0*EE1
sigB(n)=dsigB1*part2
dSigBi(n,1)=
*
dsigB2*part2*dSigBi1(n,1)*
part3*dEE1i(1)+
*
part4*(dFFi(1)+0.5*dAACi(1))
dSigBi(n,2)=
*
dsigB2*part2*dSigBi1(n,2)*
part3*dEE1i(2)+
*
part4*(dFFi(2)+0.5*dAACi(2))
dSigBi(n,3)=
*
dsigB2*part2*dSigBi1(n,3)*
part3*dEE1i(3)+
*
part4*(dFFi(3)+0.5*dAACi(3))
dSigBj(n,1)=
*
dsigB2*part2*dSigBj1(n,1)*
part3*dEE1j(1)+
*
part4*(dFFj(1)+0.5*dAACj(1))
dSigBj(n,2)=
*
dsigB2*part2*dSigBj1(n,2)*
part3*dEE1j(2)+
*
part4*(dFFj(2)+0.5*dAACj(2))
dSigBj(n,3)=
*
dsigB2*part2*dSigBj1(n,3)*
part3*dEE1j(3)+
*
part4*(dFFj(3)+0.5*dAACj(3))
dSigBl(n,1)=
*
dsigB2*part2*dSigBl1(n,1)*
part3*dEE1l(1)+
*
part4*(dFFl(1)+0.5*dAACl(1))
dSigBl(n,2)=
*
dsigB2*part2*dSigBl1(n,2)*
part3*dEE1l(2)+
*
part4*(dFFl(2)+0.5*dAACl(2))
dSigBl(n,3)=
*
dsigB2*part2*dSigBl1(n,3)*
part3*dEE1l(3)+
*
part4*(dFFl(3)+0.5*dAACl(3))
do 204 npt=1,nSigBk(n)
dSigBk(n,npt,1)=
*
dsigB2*part2*dSigBk1(n,npt,1)*
part3*dEE1k(npt,1)+
*
0.5*part4*dAACk(npt,1)
dSigBk(n,npt,2)=
*
dsigB2*part2*dSigBk1(n,npt,2)*
part3*dEE1k(npt,2)+
*
0.5*part4*dAACk(npt,2)
dSigBk(n,npt,3)=
*
dsigB2*part2*dSigBk1(n,npt,3)*
part3*dEE1k(npt,3)+
*
0.5*part4*dAACk(npt,3)
continue
continue
continue
return
end
361
APPENDIX I. MOLECULAR DYNAMICS CODE
piBO
subroutine piBo()
include ’vap.inc’
dimension dAAi(3),dAAj(3),dAAk(ntotPik,3),dAAl(3),
*
dBBi(3),dBBj(3),dBBk(ntotPik,3),dBBl(3)
c changed from -5 to -4 on 2/11/05 to fix sqrt(-#) for Phi4pi
smallp1=1.0e-4
smallp2=1.0e-5
n=0
do 1 i=1,natoms
do 2 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 2
n=n+1
if (itype(i) .eq. itype(j)) then
iij=itype(i)
else if (itype(i) .lt. itype(j)) then
iij=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
iij=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
AA=(betaPsq(i,jtmp)*betaPsq(i,jtmp)+
*
deltap(iij)*deltap(iij))*anp(iij)*anp(iij)
pdpr1=2.0*anp(iij)*anp(iij)*
*
betaPsq(i,jtmp)*dBetaPsq(i,jtmp)/rij(i,jtmp)
dAAi(1)=pdpr1*disij(1,i,jtmp)
dAAi(2)=pdpr1*disij(2,i,jtmp)
dAAi(3)=pdpr1*disij(3,i,jtmp)
dAAj(1)=-dAAi(1)
dAAj(2)=-dAAi(2)
dAAj(3)=-dAAi(3)
dAAl(1)=pdpr1*disij(1,i,jtmp)*disij(1,i,jtmp)/
*
perlen(1)
dAAl(2)=pdpr1*disij(2,i,jtmp)*disij(2,i,jtmp)/
*
perlen(2)
dAAl(3)=pdpr1*disij(3,i,jtmp)*disij(3,i,jtmp)/
*
perlen(3)
BB=0.0
dBBi(1)=0.0
dBBi(2)=0.0
dBBi(3)=0.0
dBBj(1)=0.0
dBBj(2)=0.0
dBBj(3)=0.0
dBBl(1)=0.0
dBBl(2)=0.0
dBBl(3)=0.0
nPiBk(n)=0
do 101 ktmp=1,neigh(i)
if (ktmp .eq. jtmp) goto 101
k=neighT(i,ktmp)
if (itype(i) .eq. itype(k)) then
iik=itype(i)
else if (itype(i) .lt. itype(k)) then
iik=itype(i)*ntypes*
.5*itype(i)*(itype(i)+1)+itype(k)
else
iik=itype(k)*ntypes*
.5*itype(k)*(itype(k)+1)+itype(i)
endif
if (jtmp .lt. ktmp) then
nang=(jtmp-1)*neigh(i)-jtmp*(jtmp+1)/2+ktmp
ngj=2
362
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
ngk=3
else
nang=(ktmp-1)*neigh(i)-ktmp*(ktmp+1)/2+jtmp
ngj=3
ngk=2
endif
cosSq=cosAng(i,nang)*cosAng(i,nang)
sinFactor=.5*(1.0-cosSq)*pfactor(itype(i))*betaSsq(i,ktmp)
cosFactor=.5*(1.0+cosSq)*deltaNg*betaPsq(i,ktmp)
agpdpr1=(sinFactor*2.0*dBetaSsq(i,ktmp)+
cosFactor*2.0*dBetaPsq(i,ktmp))/rij(i,ktmp)
app1=cosAng(i,nang)*(
-pfactor(itype(i))*betaSsq(i,ktmp)*betaSsq(i,ktmp)+
deltaNg*betaPsq(i,ktmp)*betaPsq(i,ktmp))
betaCapSq1=
pfactor(itype(i))*betaSsq(i,ktmp)*betaSsq(i,ktmp)deltaNg*betaPsq(i,ktmp)*betaPsq(i,ktmp)
dbetaCapSq1=
pfactor(itype(i))*2.0*betaSsq(i,ktmp)*dBetaSsq(i,ktmp)deltaNg*2.0*betaPsq(i,ktmp)*dBetaPsq(i,ktmp)
app2=-(1.0-cosSq)*cosAng(i,nang)*
betaCapSq1*betaCapSq1
agpdpr2=.5*(1.0-cosSq)**2*betaCapSq1*dbetaCapSq1/
rij(i,ktmp)
AA=AA+sinFactor*betaSsq(i,ktmp)+
cosFactor*betaPsq(i,ktmp)
dAAi(1)=dAAi(1)+agpdpr1*
disij(1,i,ktmp)+app1*dcosAng(i,nang,1,1)
dAAi(2)=dAAi(2)+agpdpr1*
disij(2,i,ktmp)+app1*dcosAng(i,nang,1,2)
dAAi(3)=dAAi(3)+agpdpr1*
disij(3,i,ktmp)+app1*dcosAng(i,nang,1,3)
dAAj(1)=dAAj(1)+app1*dcosAng(i,nang,ngj,1)
dAAj(2)=dAAj(2)+app1*dcosAng(i,nang,ngj,2)
dAAj(3)=dAAj(3)+app1*dcosAng(i,nang,ngj,3)
dAAl(1)=dAAl(1)+
agpdpr1*disij(1,i,ktmp)*disij(1,i,ktmp)/perlen(1)+
app1*dcosAng(i,nang,4,1)
dAAl(2)=dAAl(2)+
agpdpr1*disij(2,i,ktmp)*disij(2,i,ktmp)/perlen(2)+
app1*dcosAng(i,nang,4,2)
dAAl(3)=dAAl(3)+
agpdpr1*disij(3,i,ktmp)*disij(3,i,ktmp)/perlen(3)+
app1*dcosAng(i,nang,4,3)
BB=BB+.25*(1.0-cosSq)**2*betaCapSq1*betaCapSq1
dBBi(1)=dBBi(1)+agpdpr2*disij(1,i,ktmp)+
app2*dcosAng(i,nang,1,1)
dBBi(2)=dBBi(2)+agpdpr2*disij(2,i,ktmp)+
app2*dcosAng(i,nang,1,2)
dBBi(3)=dBBi(3)+agpdpr2*disij(3,i,ktmp)+
app2*dcosAng(i,nang,1,3)
dBBj(1)=dBBj(1)+app2*dcosAng(i,nang,ngj,1)
dBBj(2)=dBBj(2)+app2*dcosAng(i,nang,ngj,2)
dBBj(3)=dBBj(3)+app2*dcosAng(i,nang,ngj,3)
dBBl(1)=dBBl(1)+
agpdpr2*disij(1,i,ktmp)*disij(1,i,ktmp)/perlen(1)+
app2*dcosAng(i,nang,4,1)
dBBl(2)=dBBl(2)+
agpdpr2*disij(2,i,ktmp)*disij(2,i,ktmp)/perlen(2)+
app2*dcosAng(i,nang,4,2)
dBBl(3)=dBBl(3)+
agpdpr2*disij(3,i,ktmp)*disij(3,i,ktmp)/perlen(3)+
app2*dcosAng(i,nang,4,3)
nPiBk(n)=nPiBk(n)+1
363
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
250
260
*
*
*
*
*
*
*
*
*
*
itypePiBk(n,nPiBk(n))=k
dAAk(nPiBk(n),1)=
-agpdpr1*disij(1,i,ktmp)+app1*dcosAng(i,nang,ngk,1)
dAAk(nPiBk(n),2)=
-agpdpr1*disij(2,i,ktmp)+app1*dcosAng(i,nang,ngk,2)
dAAk(nPiBk(n),3)=
-agpdpr1*disij(3,i,ktmp)+app1*dcosAng(i,nang,ngk,3)
dBBk(nPiBk(n),1)=
-agpdpr2*disij(1,i,ktmp)+app2*dcosAng(i,nang,ngk,1)
dBBk(nPiBk(n),2)=
-agpdpr2*disij(2,i,ktmp)+app2*dcosAng(i,nang,ngk,2)
dBBk(nPiBk(n),3)=
-agpdpr2*disij(3,i,ktmp)+app2*dcosAng(i,nang,ngk,3)
do 201 ltmp=1,ktmp-1
if (ltmp .eq. jtmp) goto 201
kprime=neighT(i,ltmp)
do 250 nsearch=1,nPiBk(n)
ncmp=itypePiBk(n,nsearch)
if (ncmp .eq. kprime) then
nPiBkPrime=nsearch
goto 260
endif
continue
continue
if (itype(i) .eq. itype(kprime)) then
iikp=itype(i)
else if (itype(i) .lt. itype(kprime)) then
iikp=itype(i)*ntypes.5*itype(i)*(itype(i)+1)+itype(kprime)
else
iikp=itype(kprime)*ntypes.5*itype(kprime)*(itype(kprime)+1)+itype(i)
endif
nkikp=(ltmp-1)*neigh(i)-ltmp*(ltmp+1)/2+ktmp
if (jtmp .lt. ltmp) then
njikp=(jtmp-1)*neigh(i)-jtmp*(jtmp+1)/2+ltmp
nglj=2
ngl=3
else
njikp=(ltmp-1)*neigh(i)-ltmp*(ltmp+1)/2+jtmp
nglj=3
ngl=2
endif
betaCapSq2=
pfactor(itype(i))*betaSsq(i,ltmp)*betaSsq(i,ltmp)deltaNg*betaPsq(i,ltmp)*betaPsq(i,ltmp)
dbetaCapSq2=2.0*pfactor(itype(i))*
betaSsq(i,ltmp)*dBetaSsq(i,ltmp)2.0*deltaNg*betaPsq(i,ltmp)*dBetaPsq(i,ltmp)
cosSq1=cosAng(i,njikp)*cosAng(i,njikp)
angFactor=cosAng(i,nkikp)cosAng(i,njikp)*cosAng(i,nang)
angFactor1=4.0*angFactor
angFactor2=-angFactor1*cosAng(i,njikp)+
2.0*cosAng(i,nang)*(1.0-cosSq1)
angFactor3=-angFactor1*cosAng(i,nang)+
2.0*cosAng(i,njikp)*(1.0-cosSq)
angFactor4=2.0*angFactor*angFactor(1.0-cosSq)*(1.0-cosSq1)
betaCapSum=.5*betaCapSq1*betaCapSq2
app1=betaCapSum*angFactor1
app2=betaCapSum*angFactor2
app3=betaCapSum*angFactor3
agpdpr1=.5*angFactor4*dbetaCapSq1*betaCapSq2/
364
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
rij(i,ktmp)
agpdpr2=.5*angFactor4*betaCapSq1*dbetaCapSq2/
rij(i,ltmp)
BB=BB+betaCapSum*angFactor4
dBBi(1)=dBBi(1)+agpdpr1*disij(1,i,ktmp)+
agpdpr2*disij(1,i,ltmp)+
app1*dcosAng(i,nkikp,1,1)+
app2*dcosAng(i,nang,1,1)+
app3*dcosAng(i,njikp,1,1)
dBBi(2)=dBBi(2)+agpdpr1*disij(2,i,ktmp)+
agpdpr2*disij(2,i,ltmp)+
app1*dcosAng(i,nkikp,1,2)+
app2*dcosAng(i,nang,1,2)+
app3*dcosAng(i,njikp,1,2)
dBBi(3)=dBBi(3)+agpdpr1*disij(3,i,ktmp)+
agpdpr2*disij(3,i,ltmp)+
app1*dcosAng(i,nkikp,1,3)+
app2*dcosAng(i,nang,1,3)+
app3*dcosAng(i,njikp,1,3)
dBBj(1)=dBBj(1)+app2*dcosAng(i,nang,ngj,1)+
app3*dcosAng(i,njikp,nglj,1)
dBBj(2)=dBBj(2)+app2*dcosAng(i,nang,ngj,2)+
app3*dcosAng(i,njikp,nglj,2)
dBBj(3)=dBBj(3)+app2*dcosAng(i,nang,ngj,3)+
app3*dcosAng(i,njikp,nglj,3)
dBBl(1)=dBBl(1)+
( agpdpr1*disij(1,i,ktmp)*disij(1,i,ktmp)+
agpdpr2*disij(1,i,ltmp)*disij(1,i,ltmp) )/
perlen(1)+
app1*dcosAng(i,nkikp,4,1)+
app2*dcosAng(i,nang,4,1)+
app3*dcosAng(i,njikp,4,1)
dBBl(2)=dBBl(2)+
( agpdpr1*disij(2,i,ktmp)*disij(2,i,ktmp)+
agpdpr2*disij(2,i,ltmp)*disij(2,i,ltmp) )/
perlen(2)+
app1*dcosAng(i,nkikp,4,2)+
app2*dcosAng(i,nang,4,2)+
app3*dcosAng(i,njikp,4,2)
dBBl(3)=dBBl(3)+
( agpdpr1*disij(3,i,ktmp)*disij(3,i,ktmp)+
agpdpr2*disij(3,i,ltmp)*disij(3,i,ltmp) )/
perlen(3)+
app1*dcosAng(i,nkikp,4,3)+
app2*dcosAng(i,nang,4,3)+
app3*dcosAng(i,njikp,4,3)
dBBk(nPiBk(n),1)=dBBk(nPiBk(n),1)agpdpr1*disij(1,i,ktmp)+
app1*dcosAng(i,nkikp,3,1)+
app2*dcosAng(i,nang,ngk,1)
dBBk(nPiBk(n),2)=dBBk(nPiBk(n),2)agpdpr1*disij(2,i,ktmp)+
app1*dcosAng(i,nkikp,3,2)+
app2*dcosAng(i,nang,ngk,2)
dBBk(nPiBk(n),3)=dBBk(nPiBk(n),3)agpdpr1*disij(3,i,ktmp)+
app1*dcosAng(i,nkikp,3,3)+
app2*dcosAng(i,nang,ngk,3)
dBBk(nPiBkPrime,1)=dBBk(nPiBkPrime,1)agpdpr2*disij(1,i,ltmp)+
app1*dcosAng(i,nkikp,2,1)+
app3*dcosAng(i,njikp,ngl,1)
dBBk(nPiBkPrime,2)=dBBk(nPiBkPrime,2)agpdpr2*disij(2,i,ltmp)+
365
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
201
101
102
103
5
6
*
*
*
*
*
*
*
*
app1*dcosAng(i,nkikp,2,2)+
app3*dcosAng(i,njikp,ngl,2)
dBBk(nPiBkPrime,3)=dBBk(nPiBkPrime,3)agpdpr2*disij(3,i,ltmp)+
app1*dcosAng(i,nkikp,2,3)+
app3*dcosAng(i,njikp,ngl,3)
continue
continue
do 102 ki=1,neigh(j)
k=neighT(j,ki)
if (k .eq. i) goto 103
continue
continue
do 104 ktmp=1,neigh(j)
if (ktmp .eq. ki) goto 104
k=neighT(j,ktmp)
do 5 nsearch=1,nPiBk(n)
ncmp=itypePiBk(n,nsearch)
if (ncmp .eq. k) then
new=nsearch
goto 6
endif
continue
nPiBk(n)=nPiBk(n)+1
itypePiBk(n,nPiBk(n))=k
new=nPiBk(n)
dAAk(new,1)=0.0
dAAk(new,2)=0.0
dAAk(new,3)=0.0
dBBk(new,1)=0.0
dBBk(new,2)=0.0
dBBk(new,3)=0.0
continue
if (itype(j) .eq. itype(k)) then
ijk=itype(j)
else if (itype(j) .lt. itype(k)) then
ijk=itype(j)*ntypes.5*itype(j)*(itype(j)+1)+itype(k)
else
ijk=itype(k)*ntypes.5*itype(k)*(itype(k)+1)+itype(j)
endif
if (ktmp .lt. ki) then
nang=(ktmp-1)*neigh(j)-ktmp*(ktmp+1)/2+ki
ngi=3
ngk=2
else
nang=(ki-1)*neigh(j)-ki*(ki+1)/2+ktmp
ngi=2
ngk=3
endif
cosSq=cosAng(j,nang)*cosAng(j,nang)
sinFactor=.5*(1.0-cosSq)*pfactor(itype(j))*betaSsq(j,ktmp)
cosFactor=.5*(1.0+cosSq)*deltaNg*betaPsq(j,ktmp)
agpdpr1=(sinFactor*2.0*dBetaSsq(j,ktmp)+
cosFactor*2.0*dBetaPsq(j,ktmp))/
rij(j,ktmp)
app1=cosAng(j,nang)*(
-pfactor(itype(j))*betaSsq(j,ktmp)*betaSsq(j,ktmp)+
deltaNg*betaPsq(j,ktmp)*betaPsq(j,ktmp))
betaCapSq1=
pfactor(itype(j))*betaSsq(j,ktmp)*betaSsq(j,ktmp)deltaNg*betaPsq(j,ktmp)*betaPsq(j,ktmp)
dbetaCapSq1=
366
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
350
pfactor(itype(j))*2.0*betaSsq(j,ktmp)*dBetaSsq(j,ktmp)deltaNg*2.0*betaPsq(j,ktmp)*dBetaPsq(j,ktmp)
app2=-(1.0-cosSq)*cosAng(j,nang)*
betaCapSq1*betaCapSq1
agpdpr2=.5*(1.0-cosSq)**2*betaCapSq1*dbetaCapSq1/
rij(j,ktmp)
AA=AA+sinFactor*betaSsq(j,ktmp)+
cosFactor*betaPsq(j,ktmp)
dAAi(1)=dAAi(1)+app1*dcosAng(j,nang,ngi,1)
dAAi(2)=dAAi(2)+app1*dcosAng(j,nang,ngi,2)
dAAi(3)=dAAi(3)+app1*dcosAng(j,nang,ngi,3)
dAAj(1)=dAAj(1)+agpdpr1*disij(1,j,ktmp)+
app1*dcosAng(j,nang,1,1)
dAAj(2)=dAAj(2)+agpdpr1*disij(2,j,ktmp)+
app1*dcosAng(j,nang,1,2)
dAAj(3)=dAAj(3)+agpdpr1*disij(3,j,ktmp)+
app1*dcosAng(j,nang,1,3)
dAAl(1)=dAAl(1)+
agpdpr1*disij(1,j,ktmp)*disij(1,j,ktmp)/perlen(1)+
app1*dcosAng(j,nang,4,1)
dAAl(2)=dAAl(2)+
agpdpr1*disij(2,j,ktmp)*disij(2,j,ktmp)/perlen(2)+
app1*dcosAng(j,nang,4,2)
dAAl(3)=dAAl(3)+
agpdpr1*disij(3,j,ktmp)*disij(3,j,ktmp)/perlen(3)+
app1*dcosAng(j,nang,4,3)
dAAk(new,1)=dAAk(new,1)agpdpr1*disij(1,j,ktmp)+app1*dcosAng(j,nang,ngk,1)
dAAk(new,2)=dAAk(new,2)agpdpr1*disij(2,j,ktmp)+app1*dcosAng(j,nang,ngk,2)
dAAk(new,3)=dAAk(new,3)agpdpr1*disij(3,j,ktmp)+app1*dcosAng(j,nang,ngk,3)
BB=BB+.25*(1.0-cosSq)**2*betaCapSq1*betaCapSq1
dBBi(1)=dBBi(1)+app2*dcosAng(j,nang,ngi,1)
dBBi(2)=dBBi(2)+app2*dcosAng(j,nang,ngi,2)
dBBi(3)=dBBi(3)+app2*dcosAng(j,nang,ngi,3)
dBBj(1)=dBBj(1)+agpdpr2*disij(1,j,ktmp)+
app2*dcosAng(j,nang,1,1)
dBBj(2)=dBBj(2)+agpdpr2*disij(2,j,ktmp)+
app2*dcosAng(j,nang,1,2)
dBBj(3)=dBBj(3)+agpdpr2*disij(3,j,ktmp)+
app2*dcosAng(j,nang,1,3)
dBBl(1)=dBBl(1)+app2*dcosAng(j,nang,4,1)+
agpdpr2*disij(1,j,ktmp)*disij(1,j,ktmp)/perlen(1)
dBBl(2)=dBBl(2)+app2*dcosAng(j,nang,4,2)+
agpdpr2*disij(2,j,ktmp)*disij(2,j,ktmp)/perlen(2)
dBBl(3)=dBBl(3)+app2*dcosAng(j,nang,4,3)+
agpdpr2*disij(3,j,ktmp)*disij(3,j,ktmp)/perlen(3)
dBBk(new,1)=dBBk(new,1)+app2*
dcosAng(j,nang,ngk,1)-agpdpr2*disij(1,j,ktmp)
dBBk(new,2)=dBBk(new,2)+app2*
dcosAng(j,nang,ngk,2)-agpdpr2*disij(2,j,ktmp)
dBBk(new,3)=dBBk(new,3)+app2*
dcosAng(j,nang,ngk,3)-agpdpr2*disij(3,j,ktmp)
do 301 ltmp=1,ktmp-1
if (ltmp .eq. ki) goto 301
kprime=neighT(j,ltmp)
do 350 nsearch=1,nPiBk(n)
ncmp=itypePiBk(n,nsearch)
if (ncmp .eq. kprime) then
nPiBkPrime=nsearch
goto 360
endif
continue
367
APPENDIX I. MOLECULAR DYNAMICS CODE
360
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
continue
if (itype(j) .eq. itype(kprime)) then
ijkp=itype(j)
else if (itype(j) .lt. itype(kprime)) then
ijkp=itype(j)*ntypes.5*itype(j)*(itype(j)+1)+itype(kprime)
else
ijkp=itype(kprime)*ntypes.5*itype(kprime)*(itype(kprime)+1)+itype(j)
endif
nkjkp=(ltmp-1)*neigh(j)-ltmp*(ltmp+1)/2+ktmp
if (ki .lt. ltmp) then
nijkp=(ki-1)*neigh(j)-ki*(ki+1)/2+ltmp
ngli=2
ngl=3
else
nijkp=(ltmp-1)*neigh(j)-ltmp*(ltmp+1)/2+ki
ngli=3
ngl=2
endif
betaCapSq2=
pfactor(itype(j))*betaSsq(j,ltmp)*betaSsq(j,ltmp)deltaNg*betaPsq(j,ltmp)*betaPsq(j,ltmp)
dbetaCapSq2=2.0*pfactor(itype(j))*
betaSsq(j,ltmp)*dBetaSsq(j,ltmp)2.0*deltaNg*betaPsq(j,ltmp)*dBetaPsq(j,ltmp)
cosSq1=cosAng(j,nijkp)*cosAng(j,nijkp)
angFactor=cosAng(j,nkjkp)cosAng(j,nijkp)*cosAng(j,nang)
angFactor1=4.0*angFactor
angFactor2=-angFactor1*cosAng(j,nijkp)+
2.0*cosAng(j,nang)*(1.0-cosSq1)
angFactor3=-angFactor1*cosAng(j,nang)+
2.0*cosAng(j,nijkp)*(1.0-cosSq)
angFactor4=2.0*angFactor*angFactor(1.0-cosSq)*(1.0-cosSq1)
betaCapSum=.5*betaCapSq1*betaCapSq2
app1=betaCapSum*angFactor1
app2=betaCapSum*angFactor2
app3=betaCapSum*angFactor3
agpdpr1=.5*angFactor4*dbetaCapSq1*betaCapSq2/
rij(j,ktmp)
agpdpr2=.5*angFactor4*betaCapSq1*dbetaCapSq2/
rij(j,ltmp)
BB=BB+betaCapSum*angFactor4
dBBi(1)=dBBi(1)+
app2*dcosAng(j,nang,ngi,1)+
app3*dcosAng(j,nijkp,ngli,1)
dBBi(2)=dBBi(2)+
app2*dcosAng(j,nang,ngi,2)+
app3*dcosAng(j,nijkp,ngli,2)
dBBi(3)=dBBi(3)+
app2*dcosAng(j,nang,ngi,3)+
app3*dcosAng(j,nijkp,ngli,3)
dBBj(1)=dBBj(1)+agpdpr1*disij(1,j,ktmp)+
agpdpr2*disij(1,j,ltmp)+
app1*dcosAng(j,nkjkp,1,1)+
app2*dcosAng(j,nang,1,1)+
app3*dcosAng(j,nijkp,1,1)
dBBj(2)=dBBj(2)+agpdpr1*disij(2,j,ktmp)+
agpdpr2*disij(2,j,ltmp)+
app1*dcosAng(j,nkjkp,1,2)+
app2*dcosAng(j,nang,1,2)+
app3*dcosAng(j,nijkp,1,2)
368
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
301
450
460
dBBj(3)=dBBj(3)+agpdpr1*disij(3,j,ktmp)+
agpdpr2*disij(3,j,ltmp)+
app1*dcosAng(j,nkjkp,1,3)+
app2*dcosAng(j,nang,1,3)+
app3*dcosAng(j,nijkp,1,3)
dBBl(1)=dBBl(1)+
( agpdpr1*disij(1,j,ktmp)*disij(1,j,ktmp)+
agpdpr2*disij(1,j,ltmp)*disij(1,j,ltmp) )/
perlen(1)+
app1*dcosAng(j,nkjkp,4,1)+
app2*dcosAng(j,nang,4,1)+
app3*dcosAng(j,nijkp,4,1)
dBBl(2)=dBBl(2)+
( agpdpr1*disij(2,j,ktmp)*disij(2,j,ktmp)+
agpdpr2*disij(2,j,ltmp)*disij(2,j,ltmp) )/
perlen(2)+
app1*dcosAng(j,nkjkp,4,2)+
app2*dcosAng(j,nang,4,2)+
app3*dcosAng(j,nijkp,4,2)
dBBl(3)=dBBl(3)+
( agpdpr1*disij(3,j,ktmp)*disij(3,j,ktmp)+
agpdpr2*disij(3,j,ltmp)*disij(3,j,ltmp) )/
perlen(3)+
app1*dcosAng(j,nkjkp,4,3)+
app2*dcosAng(j,nang,4,3)+
app3*dcosAng(j,nijkp,4,3)
dBBk(new,1)=dBBk(new,1)agpdpr1*disij(1,j,ktmp)+
app1*dcosAng(j,nkjkp,3,1)+
app2*dcosAng(j,nang,ngk,1)
dBBk(new,2)=dBBk(new,2)agpdpr1*disij(2,j,ktmp)+
app1*dcosAng(j,nkjkp,3,2)+
app2*dcosAng(j,nang,ngk,2)
dBBk(new,3)=dBBk(new,3)agpdpr1*disij(3,j,ktmp)+
app1*dcosAng(j,nkjkp,3,3)+
app2*dcosAng(j,nang,ngk,3)
dBBk(nPiBkPrime,1)=dBBk(nPiBkPrime,1)agpdpr2*disij(1,j,ltmp)+
app1*dcosAng(j,nkjkp,2,1)+
app3*dcosAng(j,nijkp,ngl,1)
dBBk(nPiBkPrime,2)=dBBk(nPiBkPrime,2)agpdpr2*disij(2,j,ltmp)+
app1*dcosAng(j,nkjkp,2,2)+
app3*dcosAng(j,nijkp,ngl,2)
dBBk(nPiBkPrime,3)=dBBk(nPiBkPrime,3)agpdpr2*disij(3,j,ltmp)+
app1*dcosAng(j,nkjkp,2,3)+
app3*dcosAng(j,nijkp,ngl,3)
continue
do 401 ltmp=1,neigh(i)
if (ltmp .eq. jtmp) goto 401
kprime=neighT(i,ltmp)
do 450 nsearch=1,nPiBk(n)
ncmp=itypePiBk(n,nsearch)
if (ncmp .eq. kprime) then
nPiBkPrime=nsearch
goto 460
endif
continue
continue
if (itype(i) .eq. itype(kprime)) then
iikp=itype(i)
369
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
else if (itype(i) .lt. itype(kprime)) then
iikp=itype(i)*ntypes.5*itype(i)*(itype(i)+1)+itype(kprime)
else
iikp=itype(kprime)*ntypes.5*itype(kprime)*(itype(kprime)+1)+itype(i)
endif
if (ltmp .lt. jtmp) then
njikp=(ltmp-1)*neigh(i)-ltmp*(ltmp+1)/2+jtmp
ngl=2
nglj=3
else
njikp=(jtmp-1)*neigh(i)-jtmp*(jtmp+1)/2+ltmp
ngl=3
nglj=2
endif
betaCapSq2=
pfactor(itype(i))*betaSsq(i,ltmp)*betaSsq(i,ltmp)deltaNg*betaPsq(i,ltmp)*betaPsq(i,ltmp)
dbetaCapSq2=2.0*pfactor(itype(i))*
betaSsq(i,ltmp)*dBetaSsq(i,ltmp)2.0*deltaNg*betaPsq(i,ltmp)*dBetaPsq(i,ltmp)
dotV=( disij(1,j,ktmp)*disij(1,i,ltmp)+
disij(2,j,ktmp)*disij(2,i,ltmp)+
disij(3,j,ktmp)*disij(3,i,ltmp) )/
( rij(j,ktmp)*rij(i,ltmp) )
cosSq1=cosAng(i,njikp)*cosAng(i,njikp)
angFactor=dotV+cosAng(i,njikp)*cosAng(j,nang)
angRfactor=4.0*angFactor*dotV
dAngR1=-angRfactor/rij(j,ktmp)
dAngR2=-angRfactor/rij(i,ltmp)
angFactor1=4.0*angFactor*cosAng(i,njikp)+
2.0*cosAng(j,nang)*(1.0-cosSq1)
angFactor2=4.0*angFactor*cosAng(j,nang)+
2.0*cosAng(i,njikp)*(1.0-cosSq)
angFactor3=2.0*angFactor*angFactor(1.0-cosSq)*(1.0-cosSq1)
betaCapSum=.5*betaCapSq1*betaCapSq2
app1=betaCapSum*angFactor1
app2=betaCapSum*angFactor2
agpdpr1=( .5*angFactor3*dbetaCapSq1*betaCapSq2+
betaCapSum*dAngR1 )/rij(j,ktmp)
agpdpr2=( .5*angFactor3*betaCapSq1*dbetaCapSq2+
betaCapSum*dAngR2 )/rij(i,ltmp)
agpdpr3=4.0*betaCapSum*angFactor/
( rij(i,ltmp)*rij(j,ktmp) )
BB=BB+betaCapSum*angFactor3
dBBi(1)=dBBi(1)+agpdpr2*disij(1,i,ltmp)+
agpdpr3*disij(1,j,ktmp)+
app1*dcosAng(j,nang,ngi,1)+
app2*dcosAng(i,njikp,1,1)
dBBi(2)=dBBi(2)+agpdpr2*disij(2,i,ltmp)+
agpdpr3*disij(2,j,ktmp)+
app1*dcosAng(j,nang,ngi,2)+
app2*dcosAng(i,njikp,1,2)
dBBi(3)=dBBi(3)+agpdpr2*disij(3,i,ltmp)+
agpdpr3*disij(3,j,ktmp)+
app1*dcosAng(j,nang,ngi,3)+
app2*dcosAng(i,njikp,1,3)
dBBj(1)=dBBj(1)+agpdpr1*disij(1,j,ktmp)+
agpdpr3*disij(1,i,ltmp)+
app1*dcosAng(j,nang,1,1)+
app2*dcosAng(i,njikp,nglj,1)
dBBj(2)=dBBj(2)+agpdpr1*disij(2,j,ktmp)+
370
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
401
104
agpdpr3*disij(2,i,ltmp)+
app1*dcosAng(j,nang,1,2)+
app2*dcosAng(i,njikp,nglj,2)
dBBj(3)=dBBj(3)+agpdpr1*disij(3,j,ktmp)+
agpdpr3*disij(3,i,ltmp)+
app1*dcosAng(j,nang,1,3)+
app2*dcosAng(i,njikp,nglj,3)
dBBl(1)=dBBl(1)+
( agpdpr1*disij(1,j,ktmp)*disij(1,j,ktmp)+
agpdpr2*disij(1,i,ltmp)*disij(1,i,ltmp)+
2.0*agpdpr3*disij(1,j,ktmp)*disij(1,i,ltmp) )/
perlen(1)+
app1*dcosAng(j,nang,4,1)+
app2*dcosAng(i,njikp,4,1)
dBBl(2)=dBBl(2)+
( agpdpr1*disij(2,j,ktmp)*disij(2,j,ktmp)+
agpdpr2*disij(2,i,ltmp)*disij(2,i,ltmp)+
2.0*agpdpr3*disij(2,j,ktmp)*disij(2,i,ltmp) )/
perlen(2)+
app1*dcosAng(j,nang,4,2)+
app2*dcosAng(i,njikp,4,2)
dBBl(3)=dBBl(3)+
( agpdpr1*disij(3,j,ktmp)*disij(3,j,ktmp)+
agpdpr2*disij(3,i,ltmp)*disij(3,i,ltmp)+
2.0*agpdpr3*disij(3,j,ktmp)*disij(3,i,ltmp) )/
perlen(3)+
app1*dcosAng(j,nang,4,3)+
app2*dcosAng(i,njikp,4,3)
dBBk(new,1)=dBBk(new,1)agpdpr1*disij(1,j,ktmp)agpdpr3*disij(1,i,ltmp)+
app1*dcosAng(j,nang,ngk,1)
dBBk(new,2)=dBBk(new,2)agpdpr1*disij(2,j,ktmp)agpdpr3*disij(2,i,ltmp)+
app1*dcosAng(j,nang,ngk,2)
dBBk(new,3)=dBBk(new,3)agpdpr1*disij(3,j,ktmp)agpdpr3*disij(3,i,ltmp)+
app1*dcosAng(j,nang,ngk,3)
dBBk(nPiBkPrime,1)=dBBk(nPiBkPrime,1)agpdpr2*disij(1,i,ltmp)agpdpr3*disij(1,j,ktmp)+
app2*dcosAng(i,njikp,ngl,1)
dBBk(nPiBkPrime,2)=dBBk(nPiBkPrime,2)agpdpr2*disij(2,i,ltmp)agpdpr3*disij(2,j,ktmp)+
app2*dcosAng(i,njikp,ngl,2)
dBBk(nPiBkPrime,3)=dBBk(nPiBkPrime,3)agpdpr2*disij(3,i,ltmp)agpdpr3*disij(3,j,ktmp)+
app2*dcosAng(i,njikp,ngl,3)
continue
continue
BBrt=sqrt(BB+smallp1)
AB1=AA+BBrt
AB2=AA-BBrt+sqrt(smallp1)+smallp2
BBrtR=1.0/BBrt
ABrtR1=1.0/sqrt(AB1)
ABrtR2=1.0/sqrt(AB2)
piB(n)=(ABrtR1+ABrtR2)*anp(iij)*betaPsq(i,jtmp)
dPiB1=-.5*(ABrtR1**3+ABrtR2**3)*anp(iij)*betaPsq(i,jtmp)
dPiB2=.25*BBrtR*(ABrtR2**3-ABrtR1**3)*anp(iij)*betaPsq(i,jtmp)
dPiB3=(ABrtR1+ABrtR2)*anp(iij)*dBetaPsq(i,jtmp)/rij(i,jtmp)
371
APPENDIX I. MOLECULAR DYNAMICS CODE
100
2
1
dPiBi(n,1)=dPiB1*dAAi(1)+dPiB2*dBBi(1)+dPiB3*disij(1,i,jtmp)
dPiBi(n,2)=dPiB1*dAAi(2)+dPiB2*dBBi(2)+dPiB3*disij(2,i,jtmp)
dPiBi(n,3)=dPiB1*dAAi(3)+dPiB2*dBBi(3)+dPiB3*disij(3,i,jtmp)
dPiBj(n,1)=dPiB1*dAAj(1)+dPiB2*dBBj(1)-dPiB3*disij(1,i,jtmp)
dPiBj(n,2)=dPiB1*dAAj(2)+dPiB2*dBBj(2)-dPiB3*disij(2,i,jtmp)
dPiBj(n,3)=dPiB1*dAAj(3)+dPiB2*dBBj(3)-dPiB3*disij(3,i,jtmp)
dPiBl(n,1)=dPiB1*dAAl(1)+dPiB2*dBBl(1)+
*
dPiB3*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
dPiBl(n,2)=dPiB1*dAAl(2)+dPiB2*dBBl(2)+
*
dPiB3*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
dPiBl(n,3)=dPiB1*dAAl(3)+dPiB2*dBBl(3)+
*
dPiB3*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
do 100 npt=1,nPiBk(n)
dPiBk(n,npt,1)=dPiB1*dAAk(npt,1)+
*
dPiB2*dBBk(npt,1)
dPiBk(n,npt,2)=dPiB1*dAAk(npt,2)+
*
dPiB2*dBBk(npt,2)
dPiBk(n,npt,3)=dPiB1*dAAk(npt,3)+
*
dPiB2*dBBk(npt,3)
continue
continue
continue
return
end
PromEner
1
subroutine PromEner()
include ’vap.inc’
do 1 i=1,natoms
prom(i)=1.0
nProm(i)=0
dPromi(i,1)=0.0
dPromi(i,2)=0.0
dPromi(i,3)=0.0
dProml(i,1)=0.0
dProml(i,2)=0.0
dProml(i,3)=0.0
continue
n=0
do 2 i=1,natoms
do 3 jtmp=1,neigh(i)
j=neighT(i,jtmp)
if (j .lt. i) goto 3
n=n+1
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
parai=proA(i12)*(betaSsq(i,jtmp)/delta(itype(i)))**2
paraj=proA(i12)*(betaSsq(i,jtmp)/delta(itype(j)))**2
proAs=0.0
proAp=0.0
parasi=proAs*(betaSsq(i,jtmp)/delta(itype(i)))**2
parasj=proAs*(betaSsq(i,jtmp)/delta(itype(j)))**2
parapi=proAp*(betaSsq(i,jtmp)/delta(itype(i)))**2
parapj=proAp*(betaSsq(i,jtmp)/delta(itype(j)))**2
para1i=proA(i12)*2.0*betaSsq(i,jtmp)*dBetaSsq(i,jtmp)/
*
(delta(itype(i))**2*rij(i,jtmp))
para1j=proA(i12)*2.0*betaSsq(i,jtmp)*dBetaSsq(i,jtmp)/
372
APPENDIX I. MOLECULAR DYNAMICS CODE
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
101
102
103
(delta(itype(j))**2*rij(i,jtmp))
prom(i)=prom(i)+parai
prom(j)=prom(j)+paraj
dPromi(i,1)=dPromi(i,1)+parasi*dSigBi1(n,1)+
parapi*dPiBi(n,1)+para1i*disij(1,i,jtmp)
dPromi(i,2)=dPromi(i,2)+parasi*dSigBi1(n,2)+
parapi*dPiBi(n,2)+para1i*disij(2,i,jtmp)
dPromi(i,3)=dPromi(i,3)+parasi*dSigBi1(n,3)+
parapi*dPiBi(n,3)+para1i*disij(3,i,jtmp)
dPromi(j,1)=dPromi(j,1)+parasj*dSigBj1(n,1)+
parapj*dPiBj(n,1)-para1j*disij(1,i,jtmp)
dPromi(j,2)=dPromi(j,2)+parasj*dSigBj1(n,2)+
parapj*dPiBj(n,2)-para1j*disij(2,i,jtmp)
dPromi(j,3)=dPromi(j,3)+parasj*dSigBj1(n,3)+
parapj*dPiBj(n,3)-para1j*disij(3,i,jtmp)
st1i=parasi*dSigBl1(n,1)+
parapi*dPiBl(n,1)+
para1i*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
st2i=parasi*dSigBl1(n,2)+
parapi*dPiBl(n,2)+
para1i*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
st3i=parasi*dSigBl1(n,3)+
parapi*dPiBl(n,3)+
para1i*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
st1j=parasj*dSigBl1(n,1)+
parapj*dPiBl(n,1)+
para1j*disij(1,i,jtmp)*disij(1,i,jtmp)/perlen(1)
st2j=parasj*dSigBl1(n,2)+
parapj*dPiBl(n,2)+
para1j*disij(2,i,jtmp)*disij(2,i,jtmp)/perlen(2)
st3j=parasj*dSigBl1(n,3)+
parapj*dPiBl(n,3)+
para1j*disij(3,i,jtmp)*disij(3,i,jtmp)/perlen(3)
dProml(i,1)=dProml(i,1)+st1i
dProml(i,2)=dProml(i,2)+st2i
dProml(i,3)=dProml(i,3)+st3i
dProml(j,1)=dProml(j,1)+st1j
dProml(j,2)=dProml(j,2)+st2j
dProml(j,3)=dProml(j,3)+st3j
do 101 ni=1,nProm(i)
ncmp=itypeProm(i,ni)
if (ncmp .eq. j) then
nki=ni
goto 102
endif
continue
nProm(i)=nProm(i)+1
nki=nProm(i)
itypeProm(i,nki)=j
dPromk(i,nki,1)=0.0
dPromk(i,nki,2)=0.0
dPromk(i,nki,3)=0.0
continue
do 103 nj=1,nProm(j)
ncmp=itypeProm(j,nj)
if (ncmp .eq. i) then
nkj=nj
goto 104
endif
continue
nProm(j)=nProm(j)+1
nkj=nProm(j)
itypeProm(j,nkj)=i
dPromk(j,nkj,1)=0.0
373
APPENDIX I. MOLECULAR DYNAMICS CODE
104
*
*
*
*
*
*
105
106
107
108
6
109
dPromk(j,nkj,2)=0.0
dPromk(j,nkj,3)=0.0
continue
dPromk(i,nki,1)=dPromk(i,nki,1)+parasi*dSigBj1(n,1)+
parapi*dPiBj(n,1)-para1i*disij(1,i,jtmp)
dPromk(i,nki,2)=dPromk(i,nki,2)+parasi*dSigBj1(n,2)+
parapi*dPiBj(n,2)-para1i*disij(2,i,jtmp)
dPromk(i,nki,3)=dPromk(i,nki,3)+parasi*dSigBj1(n,3)+
parapi*dPiBj(n,3)-para1i*disij(3,i,jtmp)
dPromk(j,nkj,1)=dPromk(j,nkj,1)+parasj*dSigBi1(n,1)+
parapj*dPiBi(n,1)+para1j*disij(1,i,jtmp)
dPromk(j,nkj,2)=dPromk(j,nkj,2)+parasj*dSigBi1(n,2)+
parapj*dPiBi(n,2)+para1j*disij(2,i,jtmp)
dPromk(j,nkj,3)=dPromk(j,nkj,3)+parasj*dSigBi1(n,3)+
parapj*dPiBi(n,3)+para1j*disij(3,i,jtmp)
do 6 ktmp=1,nSigBk(n)
k=itypeSigBk(n,ktmp)
do 105 ni=1,nProm(i)
ncmp=itypeProm(i,ni)
if (ncmp .eq. k) then
nki=ni
goto 106
endif
continue
nProm(i)=nProm(i)+1
nki=nProm(i)
itypeProm(i,nki)=k
dPromk(i,nki,1)=0.0
dPromk(i,nki,2)=0.0
dPromk(i,nki,3)=0.0
continue
do 107 nj=1,nProm(j)
ncmp=itypeProm(j,nj)
if (ncmp .eq. k) then
nkj=nj
goto 108
endif
continue
nProm(j)=nProm(j)+1
nkj=nProm(j)
itypeProm(j,nkj)=k
dPromk(j,nkj,1)=0.0
dPromk(j,nkj,2)=0.0
dPromk(j,nkj,3)=0.0
continue
dPromk(i,nki,1)=dPromk(i,nki,1)+parasi*dSigBk1(n,ktmp,1)
dPromk(i,nki,2)=dPromk(i,nki,2)+parasi*dSigBk1(n,ktmp,2)
dPromk(i,nki,3)=dPromk(i,nki,3)+parasi*dSigBk1(n,ktmp,3)
dPromk(j,nkj,1)=dPromk(j,nkj,1)+parasj*dSigBk1(n,ktmp,1)
dPromk(j,nkj,2)=dPromk(j,nkj,2)+parasj*dSigBk1(n,ktmp,2)
dPromk(j,nkj,3)=dPromk(j,nkj,3)+parasj*dSigBk1(n,ktmp,3)
continue
do 7 ktmp=1,nPiBk(n)
k=itypePiBk(n,ktmp)
do 109 ni=1,nProm(i)
ncmp=itypeProm(i,ni)
if (ncmp .eq. k) then
nki=ni
goto 110
endif
continue
nProm(i)=nProm(i)+1
nki=nProm(i)
itypeProm(i,nki)=k
374
APPENDIX I. MOLECULAR DYNAMICS CODE
110
111
112
7
3
2
5
4
dPromk(i,nki,1)=0.0
dPromk(i,nki,2)=0.0
dPromk(i,nki,3)=0.0
continue
do 111 nj=1,nProm(j)
ncmp=itypeProm(j,nj)
if (ncmp .eq. k) then
nkj=nj
goto 112
endif
continue
nProm(j)=nProm(j)+1
nkj=nProm(j)
itypeProm(j,nkj)=k
dPromk(j,nkj,1)=0.0
dPromk(j,nkj,2)=0.0
dPromk(j,nkj,3)=0.0
continue
dPromk(i,nki,1)=dPromk(i,nki,1)+parapi*dPiBk(n,ktmp,1)
dPromk(i,nki,2)=dPromk(i,nki,2)+parapi*dPiBk(n,ktmp,2)
dPromk(i,nki,3)=dPromk(i,nki,3)+parapi*dPiBk(n,ktmp,3)
dPromk(j,nkj,1)=dPromk(j,nkj,1)+parapj*dPiBk(n,ktmp,1)
dPromk(j,nkj,2)=dPromk(j,nkj,2)+parapj*dPiBk(n,ktmp,2)
dPromk(j,nkj,3)=dPromk(j,nkj,3)+parapj*dPiBk(n,ktmp,3)
continue
continue
continue
do 4 i=1,natoms
para=0.5*delta(itype(i))*prom(i)**(-1.5)
prom(i)=delta(itype(i))*(1.0-prom(i)**(-0.5))
dPromi(i,1)=para*dPromi(i,1)
dPromi(i,2)=para*dPromi(i,2)
dPromi(i,3)=para*dPromi(i,3)
dProml(i,1)=para*dProml(i,1)
dProml(i,2)=para*dProml(i,2)
dProml(i,3)=para*dProml(i,3)
do 5 j=1,nProm(i)
dPromk(i,j,1)=para*dPromk(i,j,1)
dPromk(i,j,2)=para*dPromk(i,j,2)
dPromk(i,j,3)=para*dPromk(i,j,3)
continue
continue
return
end
375
Appendix J
Molecular Dynamics Code: Potential
Parameters
J.1 Stillinger-Weber potential
The potential file generation program for the SW potential format is included with the
parameters set for the combined parametrization of Angelo and Mills and Grein et al. [75,
76] (SW-AMG+).
J.1.1 Parameter code
include ’inc.sw’
51
call setparameters()
call write()
continue
stop
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setparameters()
include ’inc.sw’
ntypes=2
ielement(1)=31
amass(1)=69.72
376
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 377
ielement(2)=33
amass(2)=74.9216
c A
S(1)=4.2558
S(2)=16.984
S(3)=8.5130
c B
De(1)=0.7672
De(2)=2.3538
De(3)=0.7820
c p
c(1)=4.0
c(2)=4.0
c(3)=4.0
c q
d(1)=0.0
d(2)=0.0
d(3)=0.0
c a
c
c
c
c
11
re(1)=1.794
re(2)=1.794
re(3)=1.794
lambda
beta(1)=27.0
beta(2)=27.0
beta(3)=27.0
gamma
gamma(1)=1.0
gamma(2)=1.0
gamma(3)=1.0
sigma
h(1)=2.1
h(2)=2.3
h(3)=2.1
ep
twom(1)=1.409
twom(2)=1.409
twom(3)=1.409
do 11 i=1,ntypes*(ntypes+1)/2
rcut(i)=re(i)*h(i)
dr(i)=rcut(i)/(nr-1)
rdr(i)=1.0/dr(i)
rcutsq(i)=rcut(i)*rcut(i)
rctsqn(i)=(rcut(i)+0.5)**2
continue
rs=0.1
nnindx(0)=0
filep=’pot-GaAs-SW-AngeloGrien’
1
do 1 i1=1,ntypes*(ntypes+1)/2
call setVR(i1)
call setVA(i1)
continue
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setVR(i1)
include ’inc.sw’
do 1 i=1,nr
r=(i-1.0)*dr(i1)
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 378
1
3
4
5
if (r .lt. rs) r=rs
if (r .ge. rcut(i1)-0.03) then
VR(i1,i)=.0
else
VR(i1,i)=(
.
twom(i1)*S(i1)*De(i1)*h(i1)**c(i1)*r**(-c(i1)).
twom(i1)*S(i1)*h(i1)**d(i1)*r**(-d(i1))
.
)*
.
exp( h(i1)/(r-rcut(i1)) )
endif
continue
VR(i1,nr)=0.0
VR1(i1,1)=VR(i1,2)-VR(i1,1)
VR1(i1,2)=0.5*(VR(i1,3)-VR(i1,1))
VR1(i1,nr-1)=0.5*(VR(i1,nr)-VR(i1,nr-2))
VR1(i1,nr)=VR(i1,nr)-VR(i1,nr-1)
do 3 k=3,nr-2
VR1(i1,k)=((VR(i1,k-2)-VR(i1,k+2))+
*
8.0*(VR(i1,k+1)-VR(i1,k-1)))/12.0
continue
do 4 k=1,nr-1
VR2(i1,k)=3.0*(VR(i1,k+1)-VR(i1,k))*
2.0*VR1(i1,k)-VR1(i1,k+1)
VR3(i1,k)=VR1(i1,k)+VR1(i1,k+1)*
2.0*(VR(i1,k+1)-VR(i1,k))
continue
VR2(i1,nr)=0.0
VR3(i1,nr)=0.0
do 5 k=1,nr
VR4(i1,k)=VR1(i1,k)/dr(i1)
VR5(i1,k)=2.0*VR2(i1,k)/dr(i1)
VR6(i1,k)=3.0*VR3(i1,k)/dr(i1)
continue
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setVA(i1)
include ’inc.sw’
1
3
do 1 i=1,nr
r=(i-1.0)*dr(i1)
if (r .lt. rs) r=rs
if (r .ge. rcut(i1)-0.05) then
VA(i1,i)=.0
else
VA(i1,i)=sqrt(beta(i1)*twom(i1))*
.
exp( h(i1)*gamma(i1)/(r-rcut(i1)) )
endif
continue
VA(i1,nr)=0.0
VA1(i1,1)=VA(i1,2)-VA(i1,1)
VA1(i1,2)=0.5*(VA(i1,3)-VA(i1,1))
VA1(i1,nr-1)=0.5*(VA(i1,nr)-VA(i1,nr-2))
VA1(i1,nr)=VA(i1,nr)-VA(i1,nr-1)
do 3 k=3,nr-2
VA1(i1,k)=((VA(i1,k-2)-VA(i1,k+2))+
*
8.0*(VA(i1,k+1)-VA(i1,k-1)))/12.0
continue
do 4 k=1,nr-1
VA2(i1,k)=3.0*(VA(i1,k+1)-VA(i1,k))*
2.0*VA1(i1,k)-VA1(i1,k+1)
VA3(i1,k)=VA1(i1,k)+VA1(i1,k+1)*
2.0*(VA(i1,k+1)-VA(i1,k))
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 379
4
continue
VA2(i1,nr)=0.0
VA3(i1,nr)=0.0
do 5 k=1,nr
VA4(i1,k)=VA1(i1,k)/dr(i1)
VA5(i1,k)=2.0*VA2(i1,k)/dr(i1)
VA6(i1,k)=3.0*VA3(i1,k)/dr(i1)
continue
return
end
5
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine write()
include ’inc.sw’
open(unit=1,file=filep)
write(1,2)ntypes
format(i5)
write(1,2)nr
do 4 i=1,ntypes
write(1,5)ielement(i),amass(i)
continue
format(i5,e16.8)
do 6 i1=1,ntypes*(ntypes+1)/2
write(1,7)rcut(i1),dr(i1)
continue
format(2e16.8)
format(5e16.8)
do 8 i1=1,ntypes*(ntypes+1)/2
write(1,9)(VR(i1,i),i=1,nr)
write(1,9)(VA(i1,i),i=1,nr)
continue
close(1)
return
end
2
4
5
6
7
9
8
J.1.2 Include file (inc.sw)
parameter (natmax=1500,neimax=40,nelmax=3,
npair=nelmax*(1+nelmax)/2,nr=2000,ntheta=2000)
common /lattice/ perub(3),perlb(3),perlen(3),perlenH(3),
*
natoms,ntypes,rv(6,natmax),itype(natmax),ielement(nelmax),
*
amass(nelmax),nttype
character*80 filep
common /parameters/ De(npair),S(npair),
*
beta(npair),re(npair),h(npair),c(npair),d(npair),
*
gamma(npair),twom(npair),filep,filen,rnear
common /neigh/ rcut(npair),rcutsq(npair),rctsqn(npair),
*
dr(npair),rdr(npair),nnindx(0:natmax),nnlst(natmax*neimax),
*
neigh(natmax),neighT(natmax,neimax),disij(3,natmax,neimax),
*
rij(natmax,neimax),dtheta,rs
*
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 380
J.2 Tersoff potential
The potential file generation program for the Tersoff format is included with the parameter
set developed by Albe et al. [71] (TR-ANNK).
J.2.1 Parameter code
include ’inc.tersoff’
call setparameters()
call write()
stop
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setparameters()
include ’inc.tersoff’
ntypes=2
ielement(1)=31
amass(1)=69.72
ielement(2)=33
amass(2)=74.9216
c rcut = R + D
rcut(1)=3.10
rcut(2)=3.60
rcut(3)=3.3
c rround = R - D
rround(1)=2.80
rround(2)=3.2
rround(3)=2.9
do 11 i=1,ntypes*(ntypes+1)/2
dr(i)=rcut(i)/(nr-1)
rdr(i)=1.0/dr(i)
rcutsq(i)=rcut(i)*rcut(i)
rctsqn(i)=(rcut(i)+0.5)**2
11
continue
dtheta=2.0/(ntheta-1.0)
nnindx(0)=0
c ??
alpha(1)=1.0
alpha(2)=1.0
alpha(3)=1.0
c \nu (Dewey’s name for variable)
an(1)=1.0
an(2)=1.0
an(3)=1.0
c \gamma
gamma(1)=0.007874
gamma(2)=0.455
gamma(3)=0.0166
c S
S(1)=1.11
S(2)=1.86
S(3)=1.1417
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 381
c \beta
beta(1)=1.08
beta(2)=1.435
beta(3)=1.5228
c D0
De(1)=1.4
De(2)=3.96
De(3)=2.10
c r0
re(1)=2.3235
re(2)=2.1
re(3)=2.35
c c
c(1)=1.918
c(2)=0.1186
c(3)=1.29
c d
d(1)=0.75
d(2)=0.1612
d(3)=0.56
c h
h(1)=0.3013
h(2)=0.07748
h(3)=0.237
c 2*\mu
twom(1)=1.846
twom(2)=3.161
twom(3)=0.0
filep=’pot-GaAs-TR-Albe’
1
do 1 i1=1,ntypes*(ntypes+1)/2
call setVR(i1)
call setVA(i1)
call setg(i1)
call setfc(i1)
continue
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setVR(i1)
include ’inc.tersoff’
1
do 1 i=1,nr
r=(i-1.0)*dr(i1)
if (r .ge. rcut(i1)) then
VR(i1,i)=.0
else
VR(i1,i)=De(i1)/(S(i1)-1.0)*
.
exp(-beta(i1)*sqrt(2.0*S(i1))*(r-re(i1)))
if (r .ge. rround(i1)) VR(i1,i)=VR(i1,i)*
.
(.5-.5*sind(90.0*(2.0*r-rcut(i1)-rround(i1))/
.
(rcut(i1)-rround(i1))))
endif
continue
VR(i1,nr)=0.0
VR1(i1,1)=VR(i1,2)-VR(i1,1)
VR1(i1,2)=0.5*(VR(i1,3)-VR(i1,1))
VR1(i1,nr-1)=0.5*(VR(i1,nr)-VR(i1,nr-2))
VR1(i1,nr)=VR(i1,nr)-VR(i1,nr-1)
do 3 k=3,nr-2
VR1(i1,k)=((VR(i1,k-2)-VR(i1,k+2))+
*
8.0*(VR(i1,k+1)-VR(i1,k-1)))/12.0
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 382
3
4
5
continue
do 4 k=1,nr-1
VR2(i1,k)=3.0*(VR(i1,k+1)-VR(i1,k))*
2.0*VR1(i1,k)-VR1(i1,k+1)
VR3(i1,k)=VR1(i1,k)+VR1(i1,k+1)*
2.0*(VR(i1,k+1)-VR(i1,k))
continue
VR2(i1,nr)=0.0
VR3(i1,nr)=0.0
do 5 k=1,nr
VR4(i1,k)=VR1(i1,k)/dr(i1)
VR5(i1,k)=2.0*VR2(i1,k)/dr(i1)
VR6(i1,k)=3.0*VR3(i1,k)/dr(i1)
continue
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setVA(i1)
include ’inc.tersoff’
1
3
4
5
do 1 i=1,nr
r=(i-1.0)*dr(i1)
if (r .ge. rcut(i1)) then
VA(i1,i)=.0
else
VA(i1,i)=S(i1)*De(i1)/(S(i1)-1.0)*
.
exp(-beta(i1)*sqrt(2.0/S(i1))*
.
(r-re(i1)))
if (r .ge. rround(i1)) VA(i1,i)=VA(i1,i)*
.
(.5-.5*sind(90.0*(2.0*r-rcut(i1)-rround(i1))/
.
(rcut(i1)-rround(i1))))
endif
continue
VA(i1,nr)=0.0
VA1(i1,1)=VA(i1,2)-VA(i1,1)
VA1(i1,2)=0.5*(VA(i1,3)-VA(i1,1))
VA1(i1,nr-1)=0.5*(VA(i1,nr)-VA(i1,nr-2))
VA1(i1,nr)=VA(i1,nr)-VA(i1,nr-1)
do 3 k=3,nr-2
VA1(i1,k)=((VA(i1,k-2)-VA(i1,k+2))+
*
8.0*(VA(i1,k+1)-VA(i1,k-1)))/12.0
continue
do 4 k=1,nr-1
VA2(i1,k)=3.0*(VA(i1,k+1)-VA(i1,k))*
2.0*VA1(i1,k)-VA1(i1,k+1)
VA3(i1,k)=VA1(i1,k)+VA1(i1,k+1)*
2.0*(VA(i1,k+1)-VA(i1,k))
continue
VA2(i1,nr)=0.0
VA3(i1,nr)=0.0
do 5 k=1,nr
VA4(i1,k)=VA1(i1,k)/dr(i1)
VA5(i1,k)=2.0*VA2(i1,k)/dr(i1)
VA6(i1,k)=3.0*VA3(i1,k)/dr(i1)
continue
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setfc(i1)
include ’inc.tersoff’
do 1 i=1,nr
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 383
1
3
4
5
r=(i-1.0)*dr(i1)
if (r .ge. rcut(i1)) then
fc(i1,i)=.0
else
fc(i1,i)=1.0
if (r .ge. rround(i1)) fc(i1,i)=
.
.5-.5*sind(90.0*(2.0*r-rcut(i1)-rround(i1))/
.
(rcut(i1)-rround(i1)))
endif
continue
fc(i1,nr)=0.0
fc1(i1,1)=fc(i1,2)-fc(i1,1)
fc1(i1,2)=0.5*(fc(i1,3)-fc(i1,1))
fc1(i1,nr-1)=0.5*(fc(i1,nr)-fc(i1,nr-2))
fc1(i1,nr)=fc(i1,nr)-fc(i1,nr-1)
do 3 k=3,nr-2
fc1(i1,k)=((fc(i1,k-2)-fc(i1,k+2))+
*
8.0*(fc(i1,k+1)-fc(i1,k-1)))/12.0
continue
do 4 k=1,nr-1
fc2(i1,k)=3.0*(fc(i1,k+1)-fc(i1,k))*
2.0*fc1(i1,k)-fc1(i1,k+1)
fc3(i1,k)=fc1(i1,k)+fc1(i1,k+1)*
2.0*(fc(i1,k+1)-fc(i1,k))
continue
fc2(i1,nr)=0.0
fc3(i1,nr)=0.0
do 5 k=1,nr
fc4(i1,k)=fc1(i1,k)/dr(i1)
fc5(i1,k)=2.0*fc2(i1,k)/dr(i1)
fc6(i1,k)=3.0*fc3(i1,k)/dr(i1)
continue
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setg(i1)
include ’inc.tersoff’
1
3
4
do 1 i=1,ntheta
theta=-1.0+(i-1.0)*dtheta
g(i1,i)=1.0+(c(i1)/d(i1))**2.
c(i1)**2/(d(i1)**2+(h(i1)+theta)**2)
g(i1,i)=g(i1,i)*gamma(i1)
continue
g1(i1,1)=g(i1,2)-g(i1,1)
g1(i1,2)=0.5*(g(i1,3)-g(i1,1))
g1(i1,ntheta-1)=0.5*(g(i1,ntheta)-g(i1,ntheta-2))
g1(i1,ntheta)=g(i1,ntheta)-g(i1,ntheta-1)
do 3 k=3,ntheta-2
g1(i1,k)=((g(i1,k-2)-g(i1,k+2))+
*
8.0*(g(i1,k+1)-g(i1,k-1)))/12.0
continue
do 4 k=1,ntheta-1
g2(i1,k)=3.0*(g(i1,k+1)-g(i1,k))*
2.0*g1(i1,k)-g1(i1,k+1)
g3(i1,k)=g1(i1,k)+g1(i1,k+1)*
2.0*(g(i1,k+1)-g(i1,k))
continue
g2(i1,ntheta)=g2(i1,ntheta-1)
g3(i1,ntheta)=g3(i1,ntheta-1)
do 5 k=1,ntheta
g4(i1,k)=g1(i1,k)/dtheta
g5(i1,k)=2.0*g2(i1,k)/dtheta
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 384
g6(i1,k)=3.0*g3(i1,k)/dtheta
continue
return
end
5
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine write()
include ’inc.tersoff’
open(unit=1,file=filep)
write(1,2)ntypes
format(i5)
write(1,3)nr,ntheta,dtheta
format(2i5,e16.8)
do 4 i=1,ntypes
write(1,5)ielement(i),amass(i)
continue
format(i5,e16.8)
do 6 i1=1,ntypes*(ntypes+1)/2
write(1,7)alpha(i1),an(i1),rcut(i1),dr(i1),twom(i1)
continue
format(5e16.8)
do 8 i1=1,ntypes*(ntypes+1)/2
write(1,7)(VR(i1,i),i=1,nr)
write(1,7)(VA(i1,i),i=1,nr)
continue
do 10 i1=1,ntypes*(ntypes+1)/2
write(1,7)(g(i1,i),i=1,ntheta)
write(1,7)(fc(i1,i),i=1,nr)
continue
close(1)
return
end
2
3
4
5
6
7
8
10
J.2.2 Include file (inc.tersoff)
parameter (natmax=1500,neimax=40,nelmax=3,
npair=nelmax*(1+nelmax)/2,nr=2000,ntheta=2000)
common /lattice/ perub(3),perlb(3),perlen(3),perlenH(3),
*
natoms,ntypes,rv(6,natmax),itype(natmax),ielement(nelmax),
*
amass(nelmax),nttype
character*80 filep,filen(30)
common /parameters/ alpha(npair),an(npair),De(npair),S(npair),
*
beta(npair),re(npair),h(npair),c(npair),d(npair),
*
gamma(npair),twom(npair),filep,filen,rnear
common /neigh/ rcut(npair),rcutsq(npair),rctsqn(npair),
*
dr(npair),rdr(npair),nnindx(0:natmax),nnlst(natmax*neimax),
*
neigh(natmax),neighT(natmax,neimax),disij(3,natmax,neimax),
*
rij(natmax,neimax),rround(npair),dtheta
*
J.3 Bond-order potential
The parameters for the BOP were written using Mathematica. The notebook is included
to identify how the parameters were written. The internal parameter set name used is
GaMnAs-5b9a9a9a1b-r2, and it includes the individual parametrizations of gallium (XZDM5br),
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 385
arsenic (XZDM9ar), and GaAs (XZDM9a). Additional parameters are included for GaMn,
MnAs, and manganese; however, these parameters are not reliable and are only included
because the code was developed to work with ternary systems.
Dump Parameters to MDvap96 code for BOP4
by Dewey Murdick, Dec 2002, revised March 2005
Off[General::"spell1"];
Off[General::"spell"];
Off[General::"unfl"];
potflag = "bop";
<< Graphics‘Legend‘
rzero = {{r011, r012, r013}, {r012, r022, r023}, {r013, r023, r033}}
rc = {{rc11, rc12, rc13}, {rc12, rc22, rc23}, {rc13, rc23, rc33}}
nc = {{nc11, nc12, nc13}, {nc12, nc22, nc23}, {nc13, nc23, nc33}}
rone = {{r111, r112, r113}, {r112, r122, r123}, {r113, r123, r133}}
rcutoff = {{rcut11, rcut12, rcut13}, {rcut12, rcut22, rcut23},
{rcut13, rcut23, rcut33}}
m\[Phi] = {{nf11, nf12, nf13}, {nf12, nf22, nf23}, {nf13, nf23, nf33}}
\[Beta]zero\[Sigma] = {{\[Beta]\[Sigma]011, \[Beta]\[Sigma]012,
\[Beta]\[Sigma]013}, {\[Beta]\[Sigma]012, \[Beta]\[Sigma]022,
\[Beta]\[Sigma]023}, {\[Beta]\[Sigma]013, \[Beta]\[Sigma]023,
\[Beta]\[Sigma]033}}
n\[Sigma] = {{ns11, ns12, ns13}, {ns12, ns22, ns23}, {ns13, ns23, ns33}}
p\[Sigma] = {{{p111, p112, p113}, {p112, p122, p123}, {p113, p123, p133}},
{{p211, p212, p213}, {p212, p222, p223}, {p213, p223, p233}},
{{p311, p312, p313}, {p312, p322, p323}, {p313, p323, p333}}}
c\[Sigma] = {{{c111, c112, c113}, {c112, c122, c123}, {c113, c123, c133}},
{{c211, c212, c213}, {c212, c222, c223}, {c213, c223, c233}},
{{c311, c312, c313}, {c312, c322, c323}, {c313, c323, c333}}}
b2o = {{b2o11, b2o12, b2o13}, {b2o12, b2o22, b2o23}, {b2o13, b2o23, b2o33}}
b2n = {{b2n11, b2n12, b2n13}, {b2n12, b2n22, b2n23}, {b2n13, b2n23, b2n33}}
f\[Sigma] = {{f11, f12, f13}, {f12, f22, f23}, {f13, f23, f33}}
k\[Sigma] = {{k11, k12, k13}, {k12, k22, k23}, {k13, k23, k33}}
\[Beta]zero\[Pi] = {{\[Beta]\[Pi]011, \[Beta]\[Pi]012, \[Beta]\[Pi]013},
{\[Beta]\[Pi]012, \[Beta]\[Pi]022, \[Beta]\[Pi]023},
{\[Beta]\[Pi]013, \[Beta]\[Pi]023, \[Beta]\[Pi]033}}
\[Delta]\[Pi] = {{"dp11", "dp12", "dp13"},
{"dp12", "dp22", "dp23"},
{"dp13", "dp23", "dp33"}};
pNg = {{pn1, pn1, pn1}, {pn2, pn2, pn2}, {pn3, pn3, pn3}}
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 386
\[Delta]\[Kappa]C = 1
\[Delta]sp = {{"dprom11", "dprom12", "dprom13"},
{"dprom12", "dprom22", "dprom23"},
{"dprom13", "dprom23", "dprom33"}};
Asp = {{"cprom11", "cprom12", "cprom13"},
{"cprom12", "cprom22", "cprom23"},
{"cprom13", "cprom23", "cprom33"}};
GSP[rr_, i_, j_, rzero_, rc_, nc_, n_] :=
UnitStep[rone[[i]][[j]] - rr]*A\[Dash]GSP[rr, i, j, rzero, rc, nc, n] +
(1 - UnitStep[rone[[i]][[j]] - rr])*UnitStep[rcutoff[[i]][[j]] - rr]*
CSpline[rr, i, j, rzero, rc, nc, n, rone, rcutoff]
A\[Dash]GSP[rr_, i_, j_, rzero_, rc_, nc_, n_] :=
(rzero[[i]][[j]]/rr)ˆn[[i]][[j]]*
Exp[n[[i]][[j]]*((rzero[[i]][[j]]/rc[[i]][[j]])ˆnc[[i]][[j]] (rr/rc[[i]][[j]])ˆnc[[i]][[j]])]
CSpline[rr_, i_, j_, rzero_, rc_, nc_, n_, r1_, rcut_] :=
(1/(r1[[i]][[j]]*(r1[[i]][[j]] - rcut[[i]][[j]])ˆ3))*
(Eˆ(n[[i]][[j]]*((rzero[[i]][[j]]/rc[[i]][[j]])ˆnc[[i]][[j]] (r1[[i]][[j]]/rc[[i]][[j]])ˆnc[[i]][[j]]))*
(rzero[[i]][[j]]/r1[[i]][[j]])ˆn[[i]][[j]]*(rcut[[i]][[j]] - rr)ˆ2*
(3*r1[[i]][[j]]ˆ2 + n[[i]][[j]]*r1[[i]][[j]]ˆ2 r1[[i]][[j]]*rcut[[i]][[j]] - n[[i]][[j]]*r1[[i]][[j]]*
rcut[[i]][[j]] + n[[i]][[j]]*nc[[i]][[j]]*(r1[[i]][[j]]/rc[[i]][[j]])ˆ
nc[[i]][[j]]*(r1[[i]][[j]] - rcut[[i]][[j]])*(r1[[i]][[j]] - rr) 2*r1[[i]][[j]]*rr - n[[i]][[j]]*r1[[i]][[j]]*rr +
n[[i]][[j]]*rcut[[i]][[j]]*rr))
BOnew[Q0_, f_] := Block[{alpha, fc, y},
alpha = 5/8;
fc = (4/3)*(Q0 - alpha);
y = 1/2 - f;
Tr[{
(Q0-(9/8)*(1/(1-Q0+10ˆ(-9)))*yˆ2+
(27/256)*(1/(1-Q0+10ˆ(-9)))ˆ3*yˆ4)*
(1-UnitStep[alpha-Q0])*UnitStep[f-fc]*(1-UnitStep[f-1+fc]),
2*f*(1-UnitStep[f-fc]),
(2-2*f)*UnitStep[f-1+fc],
2*f*(1-f)*(1+f*(1-f)+4*(8*Q0-5)*(f*(1-f))ˆ2)*
UnitStep[alpha-Q0]
}]
WriteParam3[dir1_, pset_, param_, matltypes_] :=
Block[{ntypes, nr, pdump, i, j, k, tmp, tmp1, ibo, myBO},
Print["File Written in ", Directory[], " and is called ", pset, "-param.txt"];
pdump = OpenWrite[pset <> "-param.txt"];
realfmt = {10, 8};
intfmt = 4;
writexyz[num_] := WriteString[pdump,
If[!IntegerQ[num],
ScientificForm[N[num], {realfmt[[1]], realfmt[[2]]},
NumberPadding -> {" ", "0"}, NumberSigns -> {"-", " "},
ExponentFunction -> (#1 + 1 &),
NumberFormat -> (#1 <> "E" <>
If[StringMatchQ[#3, ""], "+00",
If[StringMatchQ[#3, "-*"],
If[StringLength[#3] >= 3, #3,
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 387
"-0" <> StringDrop[#3, 1]],
If[StringLength[#3] >= 2, "+" <> #3,
"+0" <> #3]]] &)],
NumberForm[num, intfmt, NumberPadding -> " "]]];
ntypes = Length[matltypes];
arraylength = ntypes(ntypes + 1)/2;
k2ij = Join[Table[{k, k}, {k, 1, ntypes}],
Select[Flatten[
Table[If[i < j, {i, j}, {0, 0}], {i, 1, ntypes}, {j, 1, ntypes}],
1], # != {0, 0} &]];
(* define the number of elements used to discritize the pair functions *)
nr = 2000;
(*r step range*)
dr = rcutoff/(nr - 1);
(* define the # of elem in BO table *)
nBOt = 200;
dBO = 1/(nBOt - 1);
(*minimum r distance*)
rcore = .1;
indx = 0*Range[1, arraylength];
fij[rr_, i_, j_] := \[Phi]zero[[i]][[j]]
GSP[rr, i, j, rzero, rc, nc, m\[Phi]] /. param;
bsij[rr_, i_, j_] := \[Beta]zero\[Sigma][[i]][[j]]
GSP[rr, i, j, rzero, rc, nc, n\[Sigma]] /. param;
bpij[rr_, i_, j_] := \[Beta]zero\[Pi][[i]][[j]]
GSP[rr, i, j, rzero, rc, nc, n\[Sigma]] /. param;
Print["Write header..."];
writexyz[ntypes];
writexyz[nr];
WriteString[pdump, "\n"];
For[k = 1, k < ntypes + 1, ++k,
For[ik = 1, ik < 2 + 1, ++ik,
writexyz[matltypes[[k]][[ik]]];
];
writexyz[\[Delta]sp[[k]][[k]] /. param];
WriteString[pdump, "\n"];
];
For[k = 1, k < arraylength + 1, ++k,
aij = Part[k2ij, k];
ai = Part[aij, 1];
aj = Part[aij, 2];
Print["-->", {k, ai, aj}];
writexyz[rcutoff[[ai]][[aj]] /. param];
writexyz[dr[[ai]][[aj]] /. param];
WriteString[pdump, "\n"];
writexyz[b2n[[ai]][[aj]] /. param];
writexyz[b2o[[ai]][[aj]] /. param];
WriteString[pdump, "\n"];
writexyz[anp /. anp -> 1.0];
writexyz[Asp[[ai]][[aj]] /. param // N];
WriteString[pdump, "\n"];
writexyz[\[Delta]\[Sigma][[ai]][[aj]] /. param // N];
writexyz[\[Delta]\[Pi][[ai]][[aj]] /. param // N];
WriteString[pdump, "\n"];
];
For[i = 1, i <= ntypes, i++,
For[j = 1, j <= ntypes, j++,
For[k = 1, k <= ntypes, k++,
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 388
writexyz[p\[Sigma][[i]][[j]][[k]] /. param];
writexyz[c\[Sigma][[i]][[j]][[k]] /. param];
WriteString[pdump, "\n"];
]
]
];
Print["Write repulsive pair function..."];
For[k = 1, k < arraylength + 1, ++k,
aij = Part[k2ij, k];
ai = Part[aij, 1];
aj = Part[aij, 2];
Print["-->", {k, ai, aj}];
For[ir = 1, ir < nr + 1, ++ir,
rr = (ir - 1)* dr[[ai]][[aj]] /. param;
If [rr < rcore, rr = rcore];
tmp = fij[rr, ai, aj];
writexyz[tmp];
If[Mod[ir, 5] == 0, WriteString[pdump, "\n"]];
];
];
Print["Write beta sigma pair function..."];
For[k = 1, k < arraylength + 1, ++k,
aij = Part[k2ij, k];
ai = Part[aij, 1];
aj = Part[aij, 2];
Print["-->", {k, ai, aj}];
For[ir = 1, ir < nr + 1, ++ir,
rr = (ir - 1)*dr[[ai]][[aj]] /. param;
If [rr < rcore, rr = rcore];
tmp = bsij[rr, ai, aj];
writexyz[tmp];
If[Mod[ir, 5] == 0, WriteString[pdump, "\n"]];
];
];
Print["Write beta pi pair function..."];
For[k = 1, k < arraylength + 1, ++k,
aij = Part[k2ij, k];
ai = Part[aij, 1];
aj = Part[aij, 2];
Print["-->", {k, ai, aj}];
For[ir = 1, ir < nr + 1, ++ir,
rr = (ir - 1)*dr[[ai]][[aj]] /. param;
If [rr < rcore, rr = rcore];
tmp = bpij[rr, ai, aj];
writexyz[tmp];
If[Mod[ir, 5] == 0, WriteString[pdump, "\n"]];
];
];
For[k = 1, k < arraylength + 1, ++k,
aij = Part[k2ij, k];
ai = Part[aij, 1];
aj = Part[aij, 2];
writexyz[pNg[[ai]][[aj]] /. param];
writexyz[1.0];
WriteString[pdump, "\n"];
];
Print["Write BO table..."];
writexyz[nBOt];
writexyz[dBO];
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 389
WriteString[pdump, "\n"];
For[k = 1, k < arraylength + 1, ++k,
aij = Part[k2ij, k];
ai = Part[aij, 1];
aj = Part[aij, 2];
Print["-->", {k, ai, aj}];
writexyz[f\[Sigma][[ai]][[aj]] /. param];
writexyz[k\[Sigma][[ai]][[aj]] /. param];
WriteString[pdump, "\n"];
For[ibo = 1, ibo < nBOt + 1, ++ibo,
myBO = (ibo - 1)*dBO /. param;
tmp = BOnew[myBO, f\[Sigma][[ai]][[aj]] /. param] // N;
writexyz[tmp];
If[Mod[ibo, 5] == 0, WriteString[pdump, "\n"]];
];
];
Print["Close->", Close[pdump]];
]
(* define parameter set *)
param = {b2n11 -> 1.5192792669919408, b2o11 -> 0,
c111 -> 0.10356260777928843, cprom11 -> 0, dprom11 -> 1, ds11 -> 0,
f11 -> 0.4455501561958573, k11 -> 25.64850714778326, nc11 -> 2.62344,
nf11 -> 1.4509, ns11 -> 0.72545, p111 -> 0.7947420746305105,
pn1 -> 0.720160386939669, r011 -> 2.4235, r111 -> 3., rc11 -> 2.4235,
rcut11 -> 3.7, \[Beta]\[Pi]011 -> 0.09752010527994559,
\[Beta]\[Sigma]011 -> 1.5232611420919813, \[Phi]011 -> 1.552,
b2n22 -> 3.6016218009535583, b2o22 -> 0, c222 -> 0.1457719261639829,
cprom22 -> 0, dprom22 -> 1, ds22 -> 0, f22 -> 0.6557946537529159,
k22 -> -0.7600390894099901, nc22 -> 2.63039, nf22 -> 1.30585,
ns22 -> 0.65293, p222 -> 0.8784940547811132, pn2 -> 0.42709517877897585,
r022 -> 2.12, r122 -> 3., rc22 -> 2.12, rcut22 -> 3.65,
\[Beta]\[Pi]022 -> 0.926321433031419, \[Beta]\[Sigma]022 ->
3.0877381074503836, \[Phi]022 -> 3.98, b2n33 -> 2.7007959851730763,
b2o33 -> 0, c333 -> 0.3465090236934886, cprom33 -> 0, dprom33 -> 1,
ds33 -> 0, f33 -> 0.2606585568827081, k33 -> 10.439065521577673,
nc33 -> 4.301222323982744, nf33 -> 1.3078330043215172,
ns33 -> 0.9341664316582265, p333 -> 0.7329257713912666, pn3 -> 0,
r033 -> 2.48592, r133 -> 3., rc33 -> 2.48592, rcut33 -> 3.45,
\[Beta]\[Pi]033 -> 0, \[Beta]\[Sigma]033 -> 2.2226755344151985,
\[Phi]033 -> 1.7016134329690418, b2n12 -> 0.8533842397102164,
b2o12 -> 0, cprom12 -> 0, dp12 -> 0, dprom12 -> 1, ds12 -> 0,
f12 -> 1/2, k12 -> 0, nc12 -> 2.62343, nf12 -> 1.96519, ns12 -> 0.98259,
r012 -> 2.38, r112 -> 3., rc12 -> 2.38, rcut12 -> 3.7,
\[Beta]\[Pi]012 -> 0.3233252298548853, \[Beta]\[Sigma]012 ->
1.7958947891071089, \[Phi]012 -> 2.1, p122 -> 0.6947019467139551,
c122 -> 0.03906678456931396, p211 -> 0.7657725492728018, c211 -> 0,
p112 -> 0.8119556989808355, c112 -> 0.12746509486761773,
p212 -> 0.8729057292664644, c212 -> 0.1642009159872469,
b2n13 -> 0.9773512630518671, b2o13 -> 0, cprom13 -> 0, dp13 -> 0,
dprom13 -> 1, ds13 -> 0, f13 -> 0.38162705454294343,
k13 -> 8.440681027280652, nc13 -> 5.100632258417142, nf13 -> 0.75,
ns13 -> 0.4658542439412987, r013 -> 2.43, r113 -> 3.,
rc13 -> 2.3300520812276186, rcut13 -> 3.7, \[Beta]\[Pi]013 ->
7.034576163688819*ˆ-9, \[Beta]\[Sigma]013 -> 2.09640733948837,
\[Phi]013 -> 1.98780049108613, p133 -> 0.5511468113869182,
c133 -> 0.08382489553329908, p311 -> 0.9447221045571419,
c311 -> 0.43016381369216516, p113 -> 0.799849618034612,
c113 -> 0.1735923062555215, p313 -> 0.7529776121328176,
c313 -> 0.23167403274946702, b2n23 -> 0.5, b2o23 -> 0, cprom23 -> 0,
dp23 -> 0, dprom23 -> 1, ds23 -> 0, f23 -> 0.4116856870532465,
k23 -> -5.007600543420193, nc23 -> 3.1914927363545362,
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 390
nf23 -> 1.670264023992173, ns23 -> 1.116346774012903, r023 -> 2.239,
r123 -> 3., rc23 -> 2.6733516976756833, rcut23 -> 3.6,
\[Beta]\[Pi]023 -> 0.10445717342570594, \[Beta]\[Sigma]023 ->
4.201394718467827, \[Phi]023 -> 5.127537051771569,
p233 -> 0.08703871403931474, c233 -> 0.2854189353064535,
p322 -> 0.9025204338451974, c322 -> 0.21080907396182894,
p223 -> 0.8204661361072405, c223 -> 0.205077344878688,
p323 -> 0.7754616532793941, c323 -> 0.26657297416573766, dp11 -> 0,
dp22 -> 0, dp33 -> 0}
paramsetused = "BOP-GaMnAs-5b9a9a1a1b-r2"
(* setup directory *)
CreateDirectory["C:\\" <> paramsetused]
SetDirectory["C:\\" <> paramsetused]
(* write parameter file *)
WriteParam3["FitParam", paramsetused, N[param],
{{31, 69.723}, {33, 74.9212593}, {25, 54.9380}}]
J.4 Electron counting potential
The parameters for the EC potential were developed to work with the BOP format. The
following subroutines create the GaAs-ECR parameter file.
J.4.1 Parameter code
include ’inc.ec’
ntypes=3
ielement(1)=31
ielement(2)=33
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c the Mn data is bogus and should not be used, this file is
c only intended for use for GaAs
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ielement(3)=25
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
c rcut() and nr must match BOP!
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
rcut(1)=0.37000000E+01
rcut(2)=0.36500000E+01
rcut(3)=0.37000000E+01
rcut(4)=0.37000000E+01
rcut(5)=0.37000000E+01
rcut(6)=0.37000000E+01
ncalbulk=1
r0(1)=2.398
r0(2)=2.220
r0(3)=2.448
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 391
r0(4)=2.448
r0(5)=2.448
r0(6)=2.448
rcq(1)=2.918
rcq(2)=3.5
rcq(3)=3.22
rcq(4)=3.22
rcq(5)=3.22
rcq(6)=3.22
1
c
2
3
dradn=0.5
do 1 i=1,ntypes
wd(i)=1.83616
wc3(i)=100.0
wc4(i)=100.0
if (ielement(i) .eq. 25) then
alp(i)=0.0
Vai(i)=2.0
endif
if (ielement(i) .eq. 31) then
alp(i)=0.0
Vai(i)=3.0
endif
if (ielement(i) .eq. 33) then
alp(i)=2.0
Vai(i)=5.0
endif
continue
dGG=4.0/(ngrid7-1.0)
rdGG=1.0/dGG
dSGG=4.0/(ngrid7-1.0)
rdSGG=1.0/dSGG
ddzero=1.0/(ngrid7-1.0)
rddzero=1.0/ddzero
do 2 i=1,ntypes*(ntypes+1)/2
wb(i)=2.68128
wb(i)=4.45
wc1(i)=100.0
wc2(i)=100.0
dr(i)=rcut(i)/(nr-1.0)
rdr(i)=1.0/dr(i)
rcutsq(i)=rcut(i)*rcut(i)
rctsqn(i)=(rcut(i)+dradn)**2
rcutqb(i)=rcq(i)*rcq(i)/r0(i)
rcutqbsq(i)=rcutqb(i)*rcutqb(i)
rcutqbsqn(i)=(rcutqb(i)+dradn)**2
if (ncalbulk .ne. 0) then
rctsqn(i)=amax1(float(rctsqn(i)),float(rcutqbsqn(i)))
endif
continue
call qijTable
nnindx(n1stps-1)=0
nnindx1(n1stps-1)=0
do 3 i=n1stps,natoms
ntp=itype(i)
Va(i)=Vai(ntp)
if (rv(2,i) .ge. y1st(1) .and. rv(2,i) .lt. y1st(2))
*
then
Va(i)=Va(i)/2.0
endif
continue
call setgrids8
call setgrids9
call setgrids10
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 392
nforce=0
open(unit=1,file=’GaAs-ECR’)
write(1,9904)ngrid7
write(1,9915)dGG,dSGG,ddzero
do 7100 i=1,ntypes*(ntypes+1)/2
write(1,9914)r0(i),rcq(i)
write(1,9915)wb(i),wc1(i),wc2(i)
7100 continue
do 7001 i=1,ntypes
write(1,9903)wd(i),wc3(i),wc4(i),alp(i),Vai(i)
7001 continue
do 7002 i=1,ntypes*ntypes
write(1,9908) qij0(i)
write(1,9903)(qijT(i,j),j=1,nr)
7002 continue
write(1,9903)(BG(j),j=1,ngrid7)
write(1,9903)(SG(j),j=1,ngrid7)
write(1,9903)(dzero(j),j=1,ngrid7)
close(1)
9904 format(i5)
9908 format(e16.8)
9914 format(2e16.8)
9915 format(3e16.8)
9916 format(4e16.8)
9903 format(5e16.8)
stop
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine qijTable()
include ’inc.ec’
dimension as(nelmax,nelmax),r1(nelmax,nelmax)
as(1,1)=3.0/4.0
as(1,2)=3.0/4.0
as(2,1)=5.0/4.0
as(2,2)=5.0/4.0
r1(1,1)=2.6
r1(1,2)=2.7
r1(2,1)=2.7
r1(2,2)=2.8
c
c
c
c
do 1 i=1,ntypes
do 1 j=1,ntypes
if (i .eq. 1 .and. j .eq. 1) open(unit=1,file=’GaGa’)
if (i .eq. 2 .and. j .eq. 2) open(unit=1,file=’AsAs’)
if (i .eq. 1 .and. j .eq. 2) open(unit=1,file=’GaAs’)
if (i .eq. 2 .and. j .eq. 1) open(unit=1,file=’AsGa’)
if (i .eq. j) then
i12=i
else if (i .lt. j) then
i12=i*ntypes-.5*i*(i+1)+j
else
i12=j*ntypes-.5*j*(j+1)+i
endif
iij=(i-1)*ntypes+j
qij0(iij)=as(i,j)
do 2 k=1,nr
r=(k-1.0)*dr(i12)
if (r .ge. rcq(i12)) then
qijT(iij,k)=0.0
else if (r .le. r1(i,j)) then
qijT(iij,k)=as(i,j)
else
qijT(iij,k)=as(i,j)*(3.0*r1(i,j)-rcq(i12)-2.0*r)*
*
(rcq(i12)-r)**2/(r1(i,j)-rcq(i12))**3
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 393
endif
write(1,*)r,qijT(iij,k)
continue
close(1)
qijT1(iij,1)=qijT(iij,2)-qijT(iij,1)
qijT1(iij,2)=0.5*(qijT(iij,3)-qijT(iij,1))
qijT1(iij,nr-1)=0.5*(qijT(iij,nr)-qijT(iij,nr-2))
qijT1(iij,nr)=qijT(iij,nr)-qijT(iij,nr-1)
do 3 k=3,nr-2
qijT1(iij,k)=((qijT(iij,k-2)-qijT(iij,k+2))+
*
8.0*(qijT(iij,k+1)-qijT(iij,k-1)))/12.0
3
continue
do 4 k=1,nr-1
qijT2(iij,k)=3.0*(qijT(iij,k+1)-qijT(iij,k))*
2.0*qijT1(iij,k)-qijT1(iij,k+1)
qijT3(iij,k)=qijT1(iij,k)+qijT1(iij,k+1)*
2.0*(qijT(iij,k+1)-qijT(iij,k))
4
continue
qijT2(iij,nr)=0.0
qijT3(iij,nr)=0.0
do 5 k=1,nr
qijT4(iij,k)=qijT1(iij,k)/dr(i12)
qijT5(iij,k)=2.0*qijT2(iij,k)/dr(i12)
qijT6(iij,k)=3.0*qijT3(iij,k)/dr(i12)
5
continue
1
continue
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setgrids8
include ’inc.ec’
gstart=0.5
gfinish=0.75
c
2
c
1
3
4
5
do 1 j=1,ngrid7
x=(j-1.0)*dGG
if (x .le. gstart) then
BG(j)=0.0
else if (x .lt. gfinish) then
vari1=x-gstart
vari2=gfinish-gstart
BG(j)=(1.0-cosd(180.0*vari1/vari2))/2.0
else
BG(j)=1.0
endif
continue
BG1(1)=BG(2)-BG(1)
BG1(2)=0.5*(BG(3)-BG(1))
BG1(ngrid7-1)=0.5*(BG(ngrid7)-BG(ngrid7-2))
BG1(ngrid7)=BG(ngrid7)-BG(ngrid7-1)
do 3 k=3,ngrid7-2
BG1(k)=((BG(k-2)-BG(k+2))+8.0*(BG(k+1)-BG(k-1)))/12.0
continue
do 4 k=1,ngrid7-1
BG2(k)=3.0*(BG(k+1)-BG(k))-2.0*BG1(k)-BG1(k+1)
BG3(k)=BG1(k)+BG1(k+1)-2.0*(BG(k+1)-BG(k))
continue
BG2(ngrid7)=0.0
BG3(ngrid7)=0.0
do 5 k=1,ngrid7
BG4(k)=BG1(k)/dGG
BG5(k)=2.0*BG2(k)/dGG
BG6(k)=3.0*BG3(k)/dGG
continue
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 394
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setgrids9
include ’inc.ec’
gstart=0.25
gfinish=0.5
do 1 j=1,ngrid7
x=(j-1.0)*dSGG
if (x .le. gstart) then
SG(j)=0.0
else if (x .lt. gfinish) then
vari1=x-gstart
vari2=gfinish-gstart
SG(j)=(1.0-cosd(180.0*vari1/vari2))/2.0
else
SG(j)=1.0
endif
1
continue
SG1(1)=SG(2)-SG(1)
SG1(2)=0.5*(SG(3)-SG(1))
SG1(ngrid7-1)=0.5*(SG(ngrid7)-SG(ngrid7-2))
SG1(ngrid7)=SG(ngrid7)-SG(ngrid7-1)
do 3 k=3,ngrid7-2
SG1(k)=((SG(k-2)-SG(k+2))+8.0*(SG(k+1)-SG(k-1)))/12.0
3
continue
do 4 k=1,ngrid7-1
SG2(k)=3.0*(SG(k+1)-SG(k))-2.0*SG1(k)-SG1(k+1)
SG3(k)=SG1(k)+SG1(k+1)-2.0*(SG(k+1)-SG(k))
4
continue
SG2(ngrid7)=0.0
SG3(ngrid7)=0.0
do 5 k=1,ngrid7
SG4(k)=SG1(k)/dSGG
SG5(k)=2.0*SG2(k)/dSGG
SG6(k)=3.0*SG3(k)/dSGG
5
continue
return
end
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine setgrids10
include ’inc.ec’
gstart=0.26
gfinish=0.40
do 1 j=1,ngrid7
x=(j-1.0)*ddzero
if (x .le. gstart) then
dzero(j)=0.0
else if (x .lt. gfinish) then
vari1=x-gstart
vari2=gfinish-gstart
dzero(j)=(1.0-cosd(180.0*vari1/vari2))/2.0
else
dzero(j)=1.0
endif
1
continue
dzero1(1)=dzero(2)-dzero(1)
dzero1(2)=0.5*(dzero(3)-dzero(1))
dzero1(ngrid7-1)=0.5*(dzero(ngrid7)-dzero(ngrid7-2))
dzero1(ngrid7)=dzero(ngrid7)-dzero(ngrid7-1)
do 3 k=3,ngrid7-2
dzero1(k)=((dzero(k-2)-dzero(k+2))+
*
8.0*(dzero(k+1)-dzero(k-1)))/12.0
3
continue
APPENDIX J. MOLECULAR DYNAMICS CODE: POTENTIAL PARAMETERS 395
4
5
do 4 k=1,ngrid7-1
dzero2(k)=3.0*(dzero(k+1)-dzero(k))*
2.0*dzero1(k)-dzero1(k+1)
dzero3(k)=dzero1(k)+dzero1(k+1)*
2.0*(dzero(k+1)-dzero(k))
continue
dzero2(ngrid7)=0.0
dzero3(ngrid7)=0.0
do 5 k=1,ngrid7
dzero4(k)=dzero1(k)/ddzero
dzero5(k)=2.0*dzero2(k)/ddzero
dzero6(k)=3.0*dzero3(k)/ddzero
continue
return
end
J.4.2 Include file (inc.ec)
implicit real*8(a-h,o-z)
parameter (natmax=7000,neimax=400,nelmax=3,
npair=nelmax*(1+nelmax)/2,nr=2000,ngrid7=2000)
character*80 fileR(100)
common /lattice/ perub(3),perlb(3),perlen(3),perlenH(3),
*
natoms,ntypes,rv(6,natmax),itype(natmax),fileR,
*
be(natmax*neimax/2,2),de(natmax),de0(natmax),
*
amass(nelmax),ielement(nelmax),Vai(nelmax),Va(natmax),
*
alp(nelmax),y1st(2),wd(nelmax),wb(npair),wc1(npair),
*
wc2(npair),wc3(nelmax),wc4(nelmax),n1stps,n1stpf,nforce
common /neigh/ newlst,dradn,rcut(npair),rcutsq(npair),
*
rctsqn(npair),dr(npair),rdr(npair),nnindx(0:natmax),
*
nnlst(natmax*neimax),neigh(natmax),neighT(natmax,neimax),
*
disij(3,natmax,neimax),rij(natmax,neimax)
common /BS/ ncalbulk,r0(npair),rnearest(natmax),
*
nnindx1(0:natmax),nnlst1(3*natmax*neimax),
*
rij1(3*natmax*neimax),disij1(3,3*natmax*neimax),
*
rcutqb(npair),rcutqbsq(npair),rcutqbsqn(npair),
*
totb0(natmax),gtotb0(natmax),gtotb0m(natmax),
*
qij(natmax*neimax/2,2),dqij(natmax*neimax/2,2)
common /single/ totb(natmax),deltotb(natmax),gtotb(natmax),
*
Stotb(natmax),dStotb(natmax),dbfac(natmax)
common /double1/ Btotb(natmax*neimax/2),dBtotb(natmax*neimax/2),
*
IBtotb(natmax*neimax/2)
common /grids6/ qijT(nelmax*nelmax,nr),qijT1(nelmax*nelmax,nr),
*
qijT2(nelmax*nelmax,nr),qijT3(nelmax*nelmax,nr),
*
qijT4(nelmax*nelmax,nr),qijT5(nelmax*nelmax,nr),
*
qijT6(nelmax*nelmax,nr),rcq(npair),qij0(nelmax*nelmax)
common /grids7/ BG(ngrid7),BG1(ngrid7),BG2(ngrid7),BG3(ngrid7),
*
BG4(ngrid7),BG5(ngrid7),BG6(ngrid7),dGG,rdGG
common /grids8/ SG(ngrid7),SG1(ngrid7),SG2(ngrid7),SG3(ngrid7),
*
SG4(ngrid7),SG5(ngrid7),SG6(ngrid7),dSGG,rdSGG
common /grids9/ dzero(ngrid7),dzero1(ngrid7),dzero2(ngrid7),
*
dzero3(ngrid7),dzero4(ngrid7),dzero5(ngrid7),dzero6(ngrid7),
*
ddzero,rddzero
common /EF/ f(3,natmax),stresst(3),totE,e0,Esbond,Ebbond,
*
Edbond,Ebcons,Edcons,dtotb(natmax,neimax),neighb(natmax),
*
neighTb(natmax,neimax),disijT(3,natmax,neimax),
*
rijT(natmax,neimax),dtotb0(natmax,neimax),
*
ddeltotb(natmax,neimax),dgtotb(natmax,neimax),
*
dgtotb0(natmax,neimax),ngm(natmax),ngm1(natmax),
*
dgtotb0m(natmax),nBm(natmax*neimax/2),ddbfac(natmax)
*
Appendix K
Molecular Dynamics Code: Input Files
K.1 Input file (a.i)
K.1.1 Brief tutorial
In molecular dynamics (MD) simulation of deposition, the positions of the atoms are solved
from Newton’s equations of motion. A computational crystal is created by assigning atom
positions to lattice sites, see Fig. K.1. To extend the lateral crystal size, periodic boundary
conditions are used in the x and z directions where atoms at one boundary interact with
the images of the atoms at the other boundaries (by periodic translation). Free surfaces are
introduced along the y-axis. Atoms fill only a small part of the periodic length along the
y-axis so that atoms at the top surface do not see the image of the bottom surface. The
free surface is used for vapor deposition. Atoms and molecules with a given kinetic energy
(evapor) are randomly injected to the top y surface at incident directions defined by θ and
φ, as defined in depdir and Fig. K.1.
The a.i file is composed of a number of cards listed in a predesigned sequence. Each
card pertains to a given category and enables users to define a set of variables to perform
396
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
φ
θ
y
397
@ @ x
z
Figure K.1: The computational cell used to simulate vapor deposition in the MDvap96
FORTRAN code.
certain functions. The card starts with &cardname and ends with &end (see the example
a.i in the last section). No sequence is required for the variables within each card. In the
following, we explain the cards in the sequence in which they should be written in the a.i.
Not all the variables that can be defined in each card are explained. Please reference the
MDvap96 code to identify their functions.
prntcard: Define how the output is constructed. Variables in this card:
1. printf: a character string representing the name of an output file that contains information, such as energy of the crystal, stresses, volume, temperature, the conditions
of the jobs, starting and finishing times of the runs, etc. If printf is set to “none,” no
printf file will be created.
2. rstrtf: a character string representing the name of an output file that contains the final
crystal (i.e., the positions and velocities of all the atoms as well as crystal boundaries), see Appendix L. If rstrtf is set to “none,” no rstrtf file will be created.
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
398
3. conff: a character string representing the name of a movie file that contains many
intermediate crystals. The conff file is unformatted and can be converted to the rstrtf
type of file using the cread.f90 program, see Appendix L. If conff is set to “none,”
no conff file will be created.
4. iconf: iconf is normally set to 2, which formats the rstrtf and conff output files to
include both atom positions and velocities. Other values between 0 and 4 provide
additional options to output more information (such as stresses, temperature, etc.) in
conff.
headcard: Allow the user to give a title for the run. Variables in this card:
1. header: a character string representing a title for this run. This title will appear in the
three output files.
funccard: Define the potential functions for one element. Users can include more funccard
to do alloy simulations but will need an empty funccard to indicate the end of the element
list. Variables in this card:
1. setfl: a character string representing the name of the potential file to be used, see
Appendix J.
2. nECRon: is set to 0 when the electron counting (EC) functions are not called and
is set to 1 when they are to be used. The EC potential can only be used with the
bond-order potential (BOP).
3. setECR: a character string representing the name of the EC potential file to be used,
see Appendix J. The string is only read in if nECRon = 1.
4. ncalbulk: is set to 0 when the rescaling functionality of the EC potential is not to be
used. This feature is used when ncalcbulk = 1 and is important when calculating the
bulk modulus of a crystal when nECRon = 1.
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
399
5. y1st: a two integer array that defines the bottom and top y positions of the region of
atoms that are not included in the EC potential calculation when nECRon = 1.
vaporcard: Define the vapor deposition conditions. Variables in this card:
1. ivapor: ivapor = 1 simulates vapor deposition. ivapor = 0 simulates the annealing of
the crystal without vapor deposition.
2. dimer: an array of integers for each of the elements defined in the simulation. Each
element can have a value of 1 or 2, which defines whether an atom (1) or dimer (2)
is deposited at each deposition event.
3. dimerdis: the initial interatomic distance of the deposited dimer.
4. dimdd: the maximum value the dimer interatomic distance can be randomly displaced prior to being introduced into the simulation cell by vapor deposition.
5. type1: The code allows the user to repeatedly deposit two different layers. Type1
contains five integers (may be changed in the source code “vap.inc”) defining the
species in the first layer during multilayer deposition. Example, if type1 is set to 1,
2, 5, 0, 0, and the funccards have defined elements in the following sequence: Cu,
Ni, Al, Co, Fe, Zr, then the first layer will contain the first, second, and fifth elements
Cu, Ni, and Fe.
6. fraction1: five float numbers, defining the relative content of the elements. In the
example above, if fraction1 = 0.65, 0.15, 0.20, 0.0, 0.0, then the first layer will contain
0.65Cu, 0.15Ni, and 0.20Fe.
7. type2: similar to type1 but is used to define the second layer during multilayer deposition.
8. fraction2: similar to fraction1 but is used to define the second layer during multilayer
deposition.
9. evapor: adatom energy in eV. The recommended value for the highest energy is
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
400
between 0.1 and 5.0 eV (highest energy that can be achieved during simulation is
evapor+devapor, see below). The need to use high fluxes and small crystals limits
the energy range that can be simulated.
10. depdir: three float numbers, − sin θ cos φ, − cos θ, and − sin θ sin φ, define the incident directions.
11. vdep: deposition rate, in units of mm/sec. Normally one can use < 250 mm/sec
for semiconductors. Lower values always get better results but take longer time to
calculate. Higher values may get unsatisfactory results.
12. TbndV: expanding rate for isothermal region. If the number is positive, 80–95% of
the vdep value should be used; however, if a negative value is used, the temperaturecontrolled region grows with the number of atoms added times the absolute magnitude of TbndV.
13. nTbnd: the initial number of atoms used to determine the number of atoms that were
added during vapor deposition for the calculation of TbndV, when TbndV< 0.
14. devapor: a float number with default equal to 0.0 for constant energy deposition.
Non-zero value allows the modulated energy deposition. For instance, if evapor is
set to 0.1 and devapor is set to 4.9, then the first half of a given layer is deposited at
0.1 eV and the remaining half of that layer is deposited at evapor+devapor = 5.0 eV.
After the layer is finished, the energy is reset to evapor = 0.1 eV for the deposition of
a new layer.
15. subspin: a float number specifying the real experimental substrate rotation rate in
turns/min.
16. vdepreal: a float number specifying the real experimental deposition rate in Å/ps.
17. timelayer: contains two float numbers, defining the times (in picoseconds) used to
deposit each layer. This will determine the thickness of the layers (thickness equals
time multiplied by vdep).
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
401
initcard: Used to define the initial crystal. Variables in this card:
1. initf: a character string, represents a file (in rstrtf format, see a later section for an
example) that contains the initial crystal. This allows the simulation to be continued
from a crystal obtained from a previous calculation. If no previous crystal exists, initf
can be set to “none.”
2. genlat: can be set to either .true. or .false.: .true. means a new crystal will be created
(in which case the initial crystal defined in initf is ignored); .false. means no new
crystal will be created.
3. genvel: can be set to either .true. or .false.. If it is set to .true., the crystal temperature
(i.e., atom velocities) will be reinitialized to the temperature defined in velcard.
4. scale: three float numbers with default set to 1.0, 1.0, 1.0. The scale can be set to
other values to induce strains of the initial crystal in the x, y, and z directions.
latcard: Used to define the crystal if the lattice is to be created (see initcard). Variables in
this card:
1. lattype: a character string specifying lattice such as “fcc” and “bcc.” This can be
overridden.
2. avec, bvec, cvec: each contains three float numbers that specify the coordinates of an
atom in the primitive cell. Hence, avec, bvec, cvec can allow users to create a crystal
by defining the coordinates of all three atoms in a primitive cell of a crystal. This
overwrites the crystal defined with lattype, which is useful because only fcc and bcc
structures are currently available in the lattype mode.
3. alat: a float number for the lattice constant in Å.
4. xrot, yrot, zrot: each contains three float numbers, specifying the directions in the x,
y, and z axes.
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
402
5. perub, perlb: the high and low periodic boundaries. The recommended values for
perlb are −0.5, −0.5, −0.5. A slight shift from zero avoids the coincidence of an
atomic plane sitting on the boundary, hence giving a better view when the crystal is
visualized. At a given perlb, perub has to be chosen to account for the periodicity
of the crystal (in the x and z directions only). Assume that the crystal structure is
fcc and the x direction is [112]. In this direction, the (224) planes have the shortest
√
spacing d = alat/ 22 + 22 + 42 , and the stacking sequence of the (224) planes is
ABCDEF ABCDEF ..., perub(1)–perlb(1) must therefore be a multiplicity of 6 × d.
The recommended value for perub(2) is 900.0 for vapor deposition (a big enough
value to create a free surface).
6. xbound, ybound, zbound: each with two float numbers for the low and high bounds
within which atoms are filled. Default values are set to fill the entire periodic length.
So for vapor deposition, only ybound needs to be specified. For instance, ybound(1)
is set to the same value as perlb(2), and ybound(2) is set to the value so that ybound(2)–
ybound(1) is equal to the initial thickness of the substrate.
7. ncell: an integer to specify number of sublattices. Default is 1. In some cases, it may
be desirable to create more sublattices. For example, diamond structure consists of
two interweaving fcc lattices.
8. rcell: consists of 30 (may be changed in the source code) float numbers, with three
consecutive numbers specifying the coordinates of the origin of each of a total of 10
sublattices.
9. ccell: consists of nelmax ×10 float numbers, where the value of nelmax can be found
in the include file of the source code (see Appendix I). The consecutive nelmax numbers can completely define the composition in one sublattice (similar to the fraction1
and fraction2 in vaporcard). A total of 10 sublattice compositions can be defined.
10. iseed: a variable to hold the random number seed for statistically varying the calcu-
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
403
lations.
velcard: Used to define the initial temperature when the genvel in the initcard is set to
.true.. Variables in this card:
1. temp: the initial temperature in K.
bndcard: Define the boundary mode. Variables in this card:
1. ibdtyp: when set to 1, the periodic length is fixed during simulation. When set to 2,
the periodic length can change, which relaxes the stress.
2. dpress: external hydrostatic stress.
3. dstress: three float numbers, specifying the external normal stresses in the three coordinate directions.
4. idynper: three integers with default values of 1, 1, 1. When ibdtyp is set to 2, the
user can turn individual periodic length into fixed length by setting the corresponding
idynper to 0.
neicard: Define the way the neighbors of atoms are found. Variables in this card:
1. dradn: just a numerical value that can change the calculation efficiency (try 0.1–
1 Å range or maybe beyond to see if the calculation is faster).
defcard: Used to create some defects. Users can include more defcard, but need an empty
defcard to indicate the end of the list. Variables in this card:
1. xmin, xmax, ymin, ymax, zmin, zmax: specify a region within which some changes
are to be made to the atoms. Default is the entire periodic cell.
2. oldtype: an integer, further indicating that in the range defined above, changes are
made only to the atoms that are the oldtype in the funccard (default is all atoms).
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
404
3. delpos: three float numbers indicate the displacement magnitude of these atoms in
the three coordinate directions.
4. newtype: an integer indicating that those atoms types will be changed to newtype, as
defined in the funccard. If newtype is set to 0, those atoms will be removed.
fixcard: Used to define how atoms are fixed. Users can include more fixcard, but need an
empty fixcard to indicate the end of the list. Variables in this card:
1. xmin, xmax, ymin, ymax, zmin, zmax: specify the region to apply the fix. Default is
the entire periodic cell. In order to apply the fix shown in Fig. K.1, only ymax needs
to be defined: ymax = perlb(2) + d0 .
2. vector: three float numbers defining a direction.
3. mode: an integer. mode = 0 means that the atoms are not fixed. mode = 1 means
that atoms are fixed in the vector (defined above) direction but are allowed to move
in a plane normal to this direction (i.e., takes away one degree of freedom). mode =
2 means that atoms can only move in the vector direction but are fixed in the plane
normal to that direction (i.e., takes away two degrees of freedom). mode = 3 means
that atoms are completely fixed (takes away all three degrees of freedom). For the
case shown in Fig. K.1, mode = 3.
tmpcard: Used to define how the temperature is controlled. Variables in this card:
1. ifxtmp: an integer from 1 to 3 that activates one of the three numerical methods for
controlling temperatures. We have used ifxtmp = 1 extensively in the past.
2. follow: if follow = .false., then the temperature control algorithm is applied to regions
defined in regcard below. This is also the case shown in Fig. K.1. If follow = .true.,
then the temperature control algorithm is applied to atoms. Note that although these
atoms are initially determined in a defined region, they can move out of this region.
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
405
regcard: Used to define the temperature control regions. Users can include more regcards
but need an empty regcard to indicate the end of the list. Variables in this card:
1. xmin, xmax, ymin, ymax, zmin, zmax: define the region to apply the temperature
control.
2. destmp: the desired temperature in K for that region.
3. tmptim: determine how fast temperature equilibrium is achieved. The default value
is recommended unless a problem arises.
avecard: Define how the average properties are calculated. The properties are averaged
over outputs at an outtim (defined in intcard below) interval. Variables in this card:
1. eqtim: the average properties are calculated only after a period defined by eqtim to
allow the system to reach equilibrium.
intcard: Define how the numerical calculations are done. Variables in this card:
1. tottim: total simulation time in ps. In the sample a.i file, 10000 ps is used as the
simulation time, taking about three weeks to finish the run.
2. outtim: time interval to output the data to the conff file.
3. dt: time step to numerically integrate Newton’s equations of motion is typically
0.001–0.004 ps. Use small values for higher rate and energy deposition.
4. inte: an integer value, specifying the mode of calculation. inte = 1 initiates molecular dynamics simulations. inte = −1 initiates the molecular statics calculations and
simply minimizes the energy without deposition.
strncard: Define the strain on a computational cell. Used to calculate the relaxed elastic
constants at 0 K (i.e., inte = −1). Variables in this card:
1. strn: six float numbers that define the 3 ×3 strain matrix. For example, the c 44 energy
curve can be calculated by strn = 0.0, 0.0, 0.0, x, 0.0, 0.0, where x can vary between
−0.01 and 0.01.
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
406
K.1.2 Example
An example a.i file is included for a sample vapor deposition run using the BOP version
of MDvap96. The BOP and EC parameters are found in the GaAs-POT and GaAs-ECR
files, respectively (see Appendix J). The initial lattice file is found in r0 (see the next
section).
&prntcard
ipinter=0
ipatoms=0
iconst=0
sortp=.false.
typep=0.0
printf=’p’
rstrtf=’r’
conff=’c’
iconf=2
&end
&headcard header=’My Header Here’ &end
&funccard
setfl=’GaAs-POT’
nECRon=0
setECR=’GaAs-ECR’
ncalbulk=0
y1st=-100.0,0.5
&end
&vaporcard
ivapor=1
dimer=1,2,1
dimdis=2.22437
dimdd=0.1
type1=2,1,3,0,0
fraction1=0.667,0.333,0,0.0,0.0
type2=0,0,0,0,0
fraction2=0.0,0.0,0.0,0.0,0.0
evapor=0.17
devapor=0.0
depdir=0.0,-1.0,0.0
vdep=150
TbndV=-.0221253125
nTbnd=560
ratio=0.0
inert=4
timelayer=100000000.00,0.00
&end
&initcard
initf=’r0’,
genvel=.true.
genlat=.false.
gendis=.false.
dismag=0.0
sort=.false.
&end
&latcard
lattype=’fcc’
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
407
avec=1.0,1.0,0.0
bvec=0.0,1.0,1.0
cvec=1.0,0.0,1.0
alat=5.66408
xrot=1.0,0.0,-1.0
yrot=0.0,1.0,0.0
zrot=1.0,0.0,1.0
ncell=2
rcell=0.0,0.0,0.0,0.5,0.5,0.5,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
ccell=1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,
0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0
iseed=12005
&end
&velcard temp=0900 &end
&bndcard ibdtyp=1 &end
&neicard &end
&defcard &end
&fixcard mode=3,ymax=2.12403000 &end
&fixcard &end
&tmpcard ifxtmp=1,follow=.false. &end
&regcard
destmp=0900
ymin=2.12403000
ymax=7.78811000
tmptim=0.1
&end
&regcard &end
&avecard eqtim=0.5 &end
&intcard
inte=1
dt=0.004
tottim=10000
outtim=5.0
iaccur=1
tol=1.0e-9
nfmax=200000
stmax=0.01
&end
&strncard
strn=0.0,0.0,0.0,0.0,0.0,0.0
&end
K.2 Restart file (r)
An example restart (or r0) file is included. This file has 560 atoms (second line first
column), which are configured in the β(2 × 4) reconstruction on the GaAs (001) surface
(first line contains the header information). Note that the surface notation used here is (010)
because the y-axis is the growth direction. There are two types of atoms (second column
in second line) and no simulation time has transpired (third column in second line). The
APPENDIX K. MOLECULAR DYNAMICS CODE: INPUT FILES
408
upper and lower boundaries are defined for x, y, and z in the third and fourth lines. The
atom types and masses (in units used by MDvap96) are defined in the fifth and sixth lines.
Every set of three lines thereafter contains the x, y, and z positions and velocities of the
atoms, while the last line contains the type of the atom. The entire file ends with a final line
of three zeros.
GaAs(010)-b12x4 surface for vapor depostion
560
2 0.00000000E+00
0.3154087400000000E+02
0.9950000000000000E+02
-0.5000000000000000E+00 -0.9500000000000000E+01
0.7226789400000000E-02
31
0.7765588400000000E-02
33
-0.1009229700000000E-07 -0.3054738000000000E-06
0.0000000000000000E+00
0.0000000000000000E+00
2
-0.1009229700000000E-07
0.1416019900000000E+01
0.0000000000000000E+00
0.0000000000000000E+00
1
0.4005109300000000E+01 -0.3054738000000000E-06
0.0000000000000000E+00
0.0000000000000000E+00
2
0.2002554400000000E+01
0.2832039400000000E+01
0.0000000000000000E+00
0.0000000000000000E+00
2
-0.1009229700000000E-07 -0.3054738000000000E-06
0.0000000000000000E+00
0.0000000000000000E+00
2
0.4005109300000000E+01
0.1416019900000000E+01
0.0000000000000000E+00
0.0000000000000000E+00
1
0.2002554400000000E+01
0.4248059700000000E+01
-0.1174706300000000E-01 -0.7368346700000000E-02
1
-0.1009229700000000E-07
0.5664079700000000E+01
-0.1096428200000000E-01
0.1284238000000000E-01
2
0.4005109300000000E+01 -0.3054738000000000E-06
0.0000000000000000E+00
0.0000000000000000E+00
2
<snip>
0.3003832100000000E+02
0.8496120500000000E+01
-0.1279251300000000E-02 -0.1278877300000000E-01
2
0.0000000000000000E+00
0.0000000000000000E+00
0.3154087400000000E+02
-0.5000000000000000E+00
-0.1009229700000000E-07
0.0000000000000000E+00
0.2002554400000000E+01
0.0000000000000000E+00
-0.1009229700000000E-07
0.0000000000000000E+00
0.2002554400000000E+01
0.0000000000000000E+00
0.4005109300000000E+01
0.0000000000000000E+00
0.2002554400000000E+01
0.0000000000000000E+00
-0.1009229700000000E-07
-0.2524437400000000E-01
-0.1009229700000000E-07
0.8805623300000000E-02
0.4005109300000000E+01
0.0000000000000000E+00
0.3003832100000000E+02
0.1450460400000000E-01
0.0000000000000000E+00
Appendix L
Molecular Dynamics Code: Output
Analysis
L.1 Print and restart files
The printf (or p) file is a text file that is generated by write(6,*) commands in the MDvap96
code. The file is very readable and any questions can be traced back into the code. The other
output file is the restart (or r) file. The format was already discussed in Appendix K. These
files are generated at the completion of every run and can be used to restart a subsequent
calculation, if desired.
L.2 Binary file and the cread program (cread.f90)
The conff (or c) file is generated by the MDvap96 code. These binary files contain all
the information in the typical restart (or r) files. The cread program automatically generates a cread.i file on the first run that can be subsequently modified to the user’s
specifications. The cread program can be used to generate restart files, write files for image creation with Pov–Ray (www.povray.org), calculate the electron counting criteria for a
system with two free surfaces (used in Chapter 5), calculate the pair-correlation function,
generate a distribution of angles, and track atom dynamics. It is important that the iconf
409
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
and inte variables match the values used to generate the file in a.i.
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
! Program written to convert c files made by MDvap96 into format
!
useable for restart files, data explorer (dx)
! Author: X.Zhou and Dewey Murdick (Feb 2004)
! Added povray format, dep stats and pair correlation function
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
PROGRAM c2r
INCLUDE ’cread.h’
namelist /initcard/ ivapor, iconf, inte, &
pbc, extendx, extendy, &
nc, istat, irange, ilast, igr, nelem, rcut, ecrfl, &
cxmin,cymin,czmin,cxmax,cymax,czmax
namelist /gcard/ igr, igth, gymax, gymin
namelist /tracecard/ ftstat, itrace, tatoms
integer i, n, ioerr, inflag
! init variables
ecrfl=0
natoms1=0
iconf=2
ivapor=1
inte=1
nc=1
pbc=0
extendx=1
extendy=1
itrace=0
tatoms(1:2)=0
ntrace=0
istat=1
ilast=1
irange(1:2)=0
igr=0
igth=0
nelem=2
rcut(1:npair)=3.70
ftstat="stat-trace.csv"
gymin=-10**5
gymax=10**5
rvsave(1:6,1:maxatom)=0.0
cxmin=-9999.9
cxmax=9999.9
cymin=-9999.9
cymax=9999.9
czmin=-9999.9
czmax=9999.9
! match iconf, inte, ivapor to what is in MD a.i file
open(unit=17,file="cread.i", status=’OLD’,IOSTAT=ioerr)
if(ioerr.ne.0) then
write(0,*)"Error in opening ./cread.i (", ioerr, ")."
write(0,*)"Writting an example cread.i. Stopping. Please Rerun."
open(unit=17,file="cread.i", status=’unknown’)
write (17,*) "&initcard"
write (17,*) "! match value in a.i"
write (17,*) " iconf=2"
write (17,*) " ivapor=1"
write (17,*) " inte=1"
write (17,*) "! output file type (=1 xatoms, =2 dx, =3 povray)"
write (17,*) " nc=3"
410
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
!
!
!
1
write (17,*) "! Use periodic bnd cond? (=0 as is, =1 extend)"
write (17,*) " pbc=1"
write (17,*) " extendx=2"
write (17,*) " extendy=1"
write (17,*) "! boundaries used to trim cell "
write (17,*) "! use cxmin,cxmax, etc "
write (17,*) "! stats (=0 no, =1 dep stats, =2 just trace stats"
write (17,*) " istat=0"
write (17,*) "! range of files to print"
write (17,*) "
irange=0,0"
write (17,*) "! print just last record?"
write (17,*) " ilast=0"
write (17,*) "! # of elements in simulation"
write (17,*) " nelem=2"
write (17,*) " rcut=3.7,3.7,3.7"
write (17,*) "&end"
write (17,*) "&gcard"
write (17,*) "! print g(r), i.e. pair correlation function"
write (17,*) " igr=0"
write (17,*) "! print g(theta), i.e. angular dist function"
write (17,*) " igth=0"
write (17,*) "! region to use (gymin to gymax) in g calcs"
write (17,*) " gymin=2.82"
write (17,*) "&end"
write (17,*) "&tracecard"
write (17,*) "! File name for trace stats"
write (17,*) " ftstat=\"stat-trace.csv\""
write (17,*) "! Follow atoms? (=0 no as is, =1 yes)"
write (17,*) " itrace=0"
write (17,*) "! total number of atoms to follow"
write (17,*) " ntatoms=0"
write (17,*) "! begin and end # of atoms to follow"
write (17,*) " tatoms=0,0"
write (17,*) "&end"
close(17)
stop
end if
read(UNIT=17,NML=initcard,IOSTAT=ioerr)
if(ioerr.ne.0) then
write(0,*) "READ ERROR(", ioerr,") in initcard"
stop
end if
read(UNIT=17,NML=gcard,IOSTAT=ioerr)
if(ioerr.ne.0) then
write(0,*) "READ ERROR(", ioerr,") in gcard"
stop
end if
read(UNIT=17,NML=tracecard,IOSTAT=ioerr)
if(ioerr.ne.0) then
write(0,*) "READ ERROR(", ioerr,") in tracecard"
stop
end if
close(17)
call set()
n=0
number of atoms to trace
ntrace=tatoms(2)-tatoms(1)+1
call readc(n)
goto 1
end
subroutine set()
INCLUDE ’cread.h’
character*120 fnamestr
411
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
integer iargc, i, ioerr
if (ivapor .eq. 2) then
iconf=1
natoms0=0
t0=.0
end if
If (iargc() .eq. 1) then
CALL GetArg(1, fnamestr)
write(6,*) "Opening", fnamestr
else
fnamestr=’c’
end if
open(unit=20,file=fnamestr,form=’unformatted’,status=’unknown’)
if (iconf.ne.0) then
read(20,IOSTAT=ioerr) header
if(ioerr.gt.0) then
write(0,*) "READ HEADER ERR: trying again, skip header"
close(20)
open(unit=20,file=fnamestr,&
form=’unformatted’,status=’unknown’)
else
write(6,*) header
end if
if (ivapor .eq. 1 .and. inte .ne. -1) then
continue
else
!
write(0,*) "Got Here (1)", ivapor
read(20) natoms
natoms0=natoms
!
write(0,*) "Got Here (2)", natoms
read(20) (perub(i),i=1,3),(perlb(i),i=1,3)
!
write(0,*) "Got Here (3)", (perub(i),i=1,3),(perlb(i),i=1,3)
read(20) ntypes
!
write(0,*) "Got Here (4)", ntypes
read(20) (amass(i),ielement(i),i=1,ntypes)
!
write(0,*) "Got Here (5)", (amass(i),ielement(i),i=1,ntypes)
end if
end if
if(itrace.eq.1) then
open(unit=10,file=ftstat,form=’formatted’,status=’unknown’)
end if
return
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine readc(n)
INCLUDE ’cread.h’
real t, temp, press
integer n, i,j
!
save atom positions if itrace=1
if(n.gt.0.and.itrace.eq.1.and.tatoms(1).ne.0.and.tatoms(2).ne.0) then
rvsave(1:6,1:maxatom)=0.0
rvsave(1:6,tatoms(1):tatoms(2))=rv(1:6,tatoms(1):tatoms(2))
end if
! from md code dynamo.f
if (iconf.ne.0.and.inte.eq.-1.and.n.lt.1) then
t = 0.0
temp = 0.0
if (iconf.eq.1) then
read(20,end=2) t,temp,press,(perlen(i),bndvel(i),i=1,3)
read(20) ((rv(i,j),i=1,3),itype(j),j=1,natoms)
end if
if (iconf.eq.2) then
412
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
read(20,end=2) t,temp,press,(perlen(i),bndvel(i),i=1,3)
read(20) ((rv(i,j),i=1,6),itype(j),j=1,natoms)
end if
if (iconf.eq.3) then
read(20,end=2) t,temp,press,(perlen(i),bndvel(i),i=1,3)
read(20) ((rv(i,j),i=1,3),itype(j),j=1,natoms)
end if
if (iconf.eq.4) then
read(20,end=2) t,temp,press,(perlen(i),bndvel(i),i=1,3)
read(20) ((rv(i,j),i=1,6),itype(j),j=1,natoms)
end if
else
! from md code output.f
if (ivapor .eq. 1 .and. iconf .ne. 0) then
read(20,end=2) natoms,ntypes
read(20) (perub(i),i=1,3),(perlb(i),i=1,3)
read(20) (amass(i),ielement(i),i=1,ntypes)
end if
if (ivapor .eq. 0 .and. iconf .ne. 0) then
natoms=natoms0
end if
if (iconf.eq.1) then
read(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
read(20) ((rv(i,j),i=1,3),itype(j),j=1,natoms)
end if
if (iconf.eq.2) then
read(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
read(20) ((rv(i,j),i=1,6),itype(j),j=1,natoms)
end if
if (iconf.eq.3) then
read(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
read(20) ((rv(i,j),i=1,3),itype(j),j=1,natoms)
end if
if (iconf.eq.4) then
read(20) t,temp,press,(perlen(i),bndvel(i),i=1,3)
read(20) ((rv(i,j),i=1,6),itype(j),j=1,natoms)
end if
end if
t0=t
if (ivapor .eq. 2) then
if (t .lt. t0) then
natoms0=0
t0=.0
else
t0=t
end if
end if
!
!
n=n+1
stop running if there is no use and n > irange
if (n.gt.irange(2).and.irange(2).ne.0) goto 999
if(nc.ne.1.and.pbc.ne.0) then
if(pbc.ne.0) then
if(n.ge.irange(1).or.(irange(1)+irange(2).eq.0)) then
call extend(extendx,extendy)
end if
else
natoms0=natoms
end if
if (ecrfl.eq.1) call eadjcalc(n)
if (n .gt. 0 .and. itrace .eq. 1) call tracestat(n)
413
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
if (n .gt. 0 .and. ilast .eq. 0) then
irange!=0,0 -> limit with irange
if(n.ge.irange(1).or.(irange(1)+irange(2).eq.0)) then
if(istat.eq.1) call prntstat(n)
if (nc .eq. 1) call writec1(n)
if (nc .eq. 2) call writec2(n)
if (nc .eq. 3) call writec3(n)
if (igr.eq.1) call grcalc(n)
if (igr.eq.2) call ycompp(n)
call flush(6)
end if
else
! if ilast=1 (true) and istat=1 (true) then call prntstat(1)
if (n.eq.1.and.istat.eq.1) then
write(6,*) "FIRST=",n
call prntstat(n)
end if
end if
return
2
write(0,*) "LAST=", n
if (ilast .ne. 0) then
if (istat .eq. 1) call prntstat(n)
if (n .gt. 0 .and. inte.ne.-1 .and. ilast.eq.1) then
if (nc .eq. 1) call writec1(n)
if (nc .eq. 2) call writec2(n)
if (nc .eq. 3) call writec3(n)
end if
end if
!
if (igr.eq.1) call grcalc(n)
call flush(6)
999
close(1)
close(10)
stop
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
! Calculate the composition profile along y-axis
subroutine ycompp(n)
INCLUDE ’cread.h’
integer i, n
!
write(6,*) "dump of y posistions and type (", n, ")..."
do i=1,natoms
write(6,*) rv(2,i), ",", itype(i)
end do
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine grcalc(n)
INCLUDE ’cread.h’
integer, parameter :: maxbin = 2000
integer :: n, i, j, mybin(maxelem,maxbin), totbin, nbin, atcnt(maxelem)
real :: binwid, rmin, rmax, prefac, ravg, ymin
real :: dx, dy, dz, rmag, atomvol
mybin(1:maxelem,1:maxbin)=0
atcnt(1:maxelem)=0
atomvol=(alat**3)/8 !atomic vol for diamond cubic or zincblende
!
!
binwid=0.04 !Angs, arb choise, makes a good looking plot
ymin=alat/2+.1 !Angs, don’t count atoms that are fixed (must set by hand)
ymin=-1000.0 !Angs, don’t count atoms that are fixed (must set by hand)
rmin=alat/4.0 !Angs, good choise for GaAs systems
find the smallest periodic dir and use it as the limit on the g(r) table
414
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
415
rmax= perlen(1)/2.0 !Angs
if(perlen(2)/2.0.lt.rmax) rmax=perlen(2)/2.0
if(perlen(3)/2.0.lt.rmax) rmax=perlen(3)/2.0
totbin=NInt((rmax-rmin)/binwid)
!
!
!
!
!
outer: do i=1,natoms
if(rv(2,i).lt.ymin) cycle outer ! if atoms are fixed don’t count them
atcnt(itype(i))=atcnt(itype(i))+1
inner: do j=i,natoms
if(i.eq.j) cycle inner
dx=rv(1,j)-rv(1,i)
dy=rv(2,j)-rv(2,i)
dz=rv(3,j)-rv(3,i)
begin periodicity, I used less efficient NInt instead of if statements
dx=dx-perlen(1)*NINT(dx/perlen(1))
dy=dy-perlen(2)*NINT(dy/perlen(2))
dz=dz-perlen(3)*NINT(dz/perlen(3))
end periodicity
rmag = sqrt(dx*dx + dy*dy + dz*dz)
if(rmag.le.rmax.and.rmag.gt.rmin) then
nbin=NInt((rmag-rmin)/binwid)
mybin(itype(i),nbin)=mybin(itype(i),nbin)+1
mybin(itype(j),nbin)=mybin(itype(j),nbin)+1
print ’(f10.5,5I5)’, rmag, i, itype(i), j, itype(j), nbin
end if
end do inner
end do outer
write(6,*) "starting g(r)"
write(6,*) "total=", natoms, "atcnt = ", ",",(atcnt(i), i=1, ntypes)
print header
write (6,’(A,$)’) ’\"rij\"’
write (6,’(A,I1,A,$)’) (’,\"g’,j,’(r)\"’, j=1, ntypes)
write (6, ’(A)’) " "
print g(r)
do i=1,totbin
ravg=rmin+binwid*(REAL(i)-0.5) ! use r as middle of bin
prefac=atomvol/(4*PI*(ravg**2))
write (6,’(f10.4,$)’) ravg
write (6,’(",",f10.4,$)’) (prefac*REAL(mybin(j,i))/REAL(atcnt(j)), j=1, ntypes)
write (6,’(A)’) " "
end do
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine eadjcalc(n)
INCLUDE ’cread.h’
real, parameter :: subtop = (17.0-0.5)*alat/4.0, subbot = (7.0+0.5)*alat/4.0
integer :: n, i, j, i12
integer :: zcnt(maxatom), atcnt=0, cnt(maxelem) ! counters
real :: valence(maxelem), Na=0.0, Nr=0.0
real :: dx, dy, dz, rmag
cnt(1:maxelem)=0
zcnt(1:maxatom)=0 ! reset coordination counter
! warning
valence(1)=3.0 ! Ga, fixed by hand, but should be automatic
valence(2)=5.0 ! As, fixed by hand, but should be automatic
valence(3)=0.0 ! not used
outer: do i=1,natoms
if(rv(2,i).gt.subbot .and. rv(2,i).lt.subtop) cycle outer ! don’t count bulk atoms
! count # of each type of atoms
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
416
cnt(itype(i))=cnt(itype(i))+1
! count all atoms
atcnt=atcnt+1
inner: do j=1,natoms
if(i.eq.j) cycle inner
! don’t count bonds with layers under substrate (above is substrate is on lower surface)
if(rv(2,j).gt.subbot .and. rv(2,j).lt.subtop) cycle inner
! check type of interaction so rcut is ref’d correctly
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
dx=rv(1,j)-rv(1,i)
dy=rv(2,j)-rv(2,i)
dz=rv(3,j)-rv(3,i)
! begin periodicity, I used less efficient NInt instead of if statements
dx=dx-perlen(1)*NINT(dx/perlen(1))
dy=dy-perlen(2)*NINT(dy/perlen(2))
dz=dz-perlen(3)*NINT(dz/perlen(3))
! end periodicity
rmag = sqrt(dx*dx + dy*dy + dz*dz)
if(rmag.le.rcut(i12)) zcnt(i)=zcnt(i)+1 ! add to zcnt
end do inner
! warning!!!! another hard wire of Arsenic = itype2 & bulk coordination=4
if(itype(i).eq.2) then ! if As count bonds (zcnt) and dangling bonds
Nr=Nr+2.*((4.-REAL(zcnt(i)))+REAL(zcnt(i))/2.0)
!
write(0,*) "As: bond=", REAL(zcnt(i))/2., ", dangle_bond=", 4-zcnt(i)
else ! if Ga, only count bonds
!
write(0,*) "Ga: bond=", REAL(zcnt(i))/2.
Nr=Nr+2.*REAL(zcnt(i))/2.
end if
!
! if the layer is the layer right above the substrate, then count half the e-’s
if(rv(2,i).lt.subtop+alat/4.0 .and. rv(2,i).gt.subbot-alat/4.0) then
Na=Na+valence(itype(i))/2.0 ! count # of e- avaliable (half in lower layer)
else
Na=Na+valence(itype(i)) ! count # of e- avaliable (all in top layer)
print ’(3i4,2f10.4)’, i, itype(i), zcnt(i), rv(2,i), valence(itype(i))
end if
end do outer
write(6,*) "bottom & top arb sub:", subbot, "&", subtop
write(6,’(3(A,i4),3(A,f10.4))’) &
"--> Natom=", atcnt, ", N1=", cnt(1), ", N2=", cnt(2), &
", Na=", Na, ", Nr=", Nr, ", Na-Nr=", Na-Nr
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine tracestat(n)
! calc and print statistics to stdout
INCLUDE ’cread.h’
integer :: n, i, i12, j, k, zcoord, Zcnt(maxelem,maxelem)
double precision :: dx, dy, dz, rmag, ravg, rmin, rmax
!
!
write(0,*) "In tracestat(",n,"); nelem=", nelem
zero out coordination counter
Zcnt(1:maxelem,1:maxelem)=0
150
155
Format(i5,",",f11.4,",",$) ! n and t0
Format(i5,",",i2,",",2(i5,","),$) ! at #, type, # neighbors for each type
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
160
!
!
!
!
!
Format(i5,",",3(f11.4,","),$) ! z,rmin,rmax,ravg
if(tatoms(1).le.natoms) write(10,150) n,t0
t_loop: do i=tatoms(1),tatoms(2),1 ! go through atoms we’ve been asked to trace
if(i.gt.natoms) cycle t_loop ! skip if atoms in trace list isn’t here
ravg=0.0
rmin=4.0
rmax=0.0
zcoord=0
all_loop: do j=1,natoms ! go through all atoms
if(i.eq.j) cycle all_loop ! cycle if trace atom # = j
dx=rv(1,j) - rv(1,i)
dy=rv(2,j) - rv(2,i)
dz=rv(3,j) - rv(3,i)
begin periodicity, I used less efficient NInt instead of if statements
dx=dx-perlen(1)*NINT(dx/perlen(1))
dy=dy-perlen(2)*NINT(dy/perlen(2))
dz=dz-perlen(3)*NINT(dz/perlen(3))
end periodicity
rmag = sqrt(dx*dx + dy*dy + dz*dz)
check type of interaction so i can access rcut correctly
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
count Z if within cutoff and has the same type
if(rmag.le.rcut(i12)) then
ravg=ravg+rmag
if(rmag.gt.rmax) rmax=rmag
if(rmag.lt.rmin) rmin=rmag
Zcnt(itype(i),itype(j)) = Zcnt(itype(i),itype(j))+1
zcoord=zcoord+1
end if
end do all_loop
write(10,155) i,itype(i),(Zcnt(itype(i),k), k=1,nelem)
write(10,160) zcoord,rmin,rmax,ravg/zcoord
zero out coordination counter
Zcnt(1:maxelem,1:maxelem)=0
end do t_loop
if(tatoms(1).le.natoms) write(10,’(X)’)
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine prntstat(n)
! calc and print statistics to stdout
INCLUDE ’cread.h’
integer n, i, j, zcoord, myNatoms
real ymax, Rgrow, RN1, RN2, ymaxest, Zval, dx, dy, dz, rmag
double precision dt
ymax=0.01
myNatoms=natoms
!
zero out atom type counter
nattype(1:maxelem)=0
!
use growth rate estimate to guess the maximum height
if(n.gt.1) then
dt = dble(t0) - dble(t1) !time from n=1
!est growth rate [A/ps]
Rgrow = Real((natoms-natoms1)/mfactor)/Real(Real(NPL)*dt)*(alat/4.0)
if(Rgrow.lt.0.0) Rgrow=0.0
417
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
ymaxest=y1+Real(Rgrow*dt)
else
Rgrow = 0.0
dt = 0.0
ymaxest = perub(2)
end if
! loop through atoms and see if any are higher than ymaxest+alat
! if there are and Z>2, then don’t count them
do 20 i=1,natoms
if(rv(2,i).gt.ymaxest+alat) then
zcoord = 0
do 21 j=1,natoms
dx=rv(1,j) - rv(1,i)
dy=rv(2,j) - rv(2,i)
dz=rv(3,j) - rv(3,i)
!
begin periodicity, I used less efficient NInt
dx=dx-perlen(1)*NINT(dx/perlen(1))
dy=dy-perlen(2)*NINT(dy/perlen(2))
dz=dz-perlen(3)*NINT(dz/perlen(3))
!
end periodicity
rmag = sqrt(dx*dx + dy*dy + dz*dz)
! count Z if within cutoff and has the same type
if(rmag<3.7) zcoord=zcoord+1
!
if(rmag<3.7.and.i.ne.j.and.itype(i).eq.itype(j)) zcoord=zcoord+1
21
continue
if (zcoord.le.3.or.(rv(2,i)-ymaxest).gt.2.0*alat) then
myNatoms=myNatoms-1 !delete atom from overall count
else
nattype(itype(i))=nattype(itype(i))+1 !add high atom to count
if(rv(2,i).gt.ymax) ymax=rv(2,i) !keep ymax up-to-date
write(0,*) "!!", i, ",", itype(i), ",", zcoord, ",", rv(2,i)
end if
else
nattype(itype(i))=nattype(itype(i))+1 ! add atom to count
if(rv(2,i).gt.ymax) ymax=rv(2,i) !keep ymax up-to-date
end if
20
continue
if(n.eq.1) then ! setup some variables if n=1
t1=t0
mfactor=natoms/natoms0 ! calc mfactor
natoms1=myNatoms !use my atoms count
y1=ymax
NPL = (natoms1/mfactor) / NInt(y1/(alat/4.0) + 1.0)
write(0,*) "n=",n,",N=",natoms1/mfactor,",N/N0=", &
mfactor,", NPL=",NPL
do 30 i=1,maxelem
nattype1(i)=nattype(i)
30
continue
RN1 = 0.0
RN2 = 0.0
else ! otherwise calc some other variables for each step n>1
!#1 atoms that stick to surface
RN1 = (1000.0/Real(mfactor)) * Dble(nattype(1)-nattype1(1))/dt
!#2 atoms that stick to surface
RN2 = (1000.0/Real(mfactor)) * Dble(nattype(2)-nattype1(2))/dt
!growth rate in Angs/ps
Rgrow = Real((myNatoms-natoms1)/mfactor)/Real(Real(NPL)*dt)*(alat/4.0)
end if
!
if(ntypes.eq.2) then
!time,#at in cell,dN
write(6,177) n, t0, myNatoms/mfactor, & !(myNatoms-natoms1)/mfactor, &
418
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
nattype(1)/mfactor, nattype(2)/mfactor, & !#1 atoms, #2 atoms
Real(nattype(2))/Real(myNatoms), & !As composition fraction
!
Real(nattype(2))/Real(nattype(1)), & !As/Ga ratio
Rgrow*10**5, RN1, RN2, ymax, & !growth rate (mm/sec), #1add/ns, #2add/ns,
natoms-myNatoms
!
end if
177
Format(i5,",",f9.2,",",3(i5,","),f10.7,",",4(f10.5,","), i3)
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine writec1(n)
INCLUDE ’cread.h’
integer n,i,j
write(c,501)n
501
format("c",i6)
do 502 j=1,6
if (c(j:j) .eq. ’ ’) c(j:j)=’0’
502
continue
open(unit=50,file=c)
write (50,3) header
3
format(a80)
write (50,4)natoms,ntypes,t0
4
format(2i10,e15.8)
write (50,5)(perub(i),i=1,3),(perlb(i),i=1,3)
5
format(3e25.16)
write (50,6)(amass(i),ielement(i),i=1,ntypes)
6
format(e25.16,i10)
write (50,7)((rv(i,j),i=1,6),itype(j),j=1,natoms)
7
format(3e25.16/3e25.16/i10)
write (50,5)(bndvel(i),i=1,3)
write(6,*) "#=", n, ", t0=", NInt(t0), "(",t0,")"
close(50)
return
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine writec2(n)
INCLUDE ’cread.h’
integer n,i,j
real ff
write(c,501)n
format("c",i6)
do 502 j=1,5
if (c(j:j) .eq. ’ ’) c(j:j)=’0’
502
continue
open(unit=50,file=c)
write(50,1)natoms
1
format(’ points = ’,i5)
write(50,*)’ format = text’
write(50,*)’ interleaving = field’
write(50,*)’ field = locations, xvalue, yvalue, zvalue’
write(50,*)’ structure = 3-vector, scalar, scalar, scalar’
write(50,*)’ type = float, float, float, float’
write(50,*)
write(50,*)’ end’
do 2 i=1,natoms
ff=float(itype(i))
write(50,3)rv(1,i),rv(2,i),rv(3,i),ff,rv(2,i),rv(3,i)
2
continue
3
format(6f10.4)
write(6,*)n
close(50)
return
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
501
419
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
subroutine writec3(n)
INCLUDE ’cread.h’
integer n,i,j,i12,terr
real r2d, hpi, dx, dy, dz, rmag, rtmp, dth1, dth2
real rsscale
real sgn
r2d = (180.0/PI)
hpi = (PI/2.0)
!
!
!
!
501
!
502
!
503
!
!
!
!
!
!
check and see if extend messed things up!
if(ntrace.ne.(tatoms(2)-tatoms(1)+1)) then
write(0,*) "change in # of trace atoms:", ntrace, "->", &
tatoms(2)-tatoms(1)+1
terr=1
else
terr=0
end if
make the file name and open the file for writing
write(c,501)n
format("pov",i6,".inc")
replace spaces with zeros in string c
do 502 j=1,10
if (c(j:j) .eq. ’ ’) c(j:j)=’0’
continue
open(unit=50,file=c)
write(50,503) c, t0
print file name at top of output file
format("//file=",A20,", t0=",F10.5)
main loop for writing
outer: do i=1,natoms
if(rv(1,i).gt.cxmax .or. rv(1,i).lt.cxmin) cycle outer
if(rv(2,i).gt.cymax .or. rv(2,i).lt.cymin) cycle outer
if(rv(3,i).gt.czmax .or. rv(3,i).lt.czmin) cycle outer
if(itrace.eq.1) then
only print atom positions of atoms being traced (special case if ntrace=2)
if((terr.eq.1.and.ntrace.eq.2 .and. &
i.eq.tatoms(1) .or. i.eq.tatoms(2)) .or. &
(terr.eq.0.and.i.ge.tatoms(1) .and. i.le.tatoms(2))) then
check and see if trace atoms have moved to next cell
dx=rv(1,i) - rvsave(1,i)
dy=rv(2,i) - rvsave(2,i)
if(rvsave(1,i)+rvsave(2,i).gt.0.0) then
if(dx.gt.perlen(1)/2.0) &
rv(1,i)=rv(1,i)-perlen(1)/2.0
if(-1*dx.gt.perlen(1)/2.0) &
rv(1,i)=rv(1,i)+perlen(1)/2.0
if(dy.gt.perlen(2)/2.0) &
rv(2,i)=rv(2,i)-perlen(2)/2.0
if(-1*dy.gt.perlen(2)/2.0) &
rv(2,i)=rv(2,i)+perlen(2)/2.0
end if
dx=rv(1,i) - rvsave(1,i)
dy=rv(2,i) - rvsave(2,i)
print ’(I5,2(A,F12.8),A)’, n, ", (", dx, ",", dy, ")"
write(50,20) "object { AtomObject", itype(i), " //", i
if(ntrace.gt.10) then
write(50,30) " pigment { Atom_Color", itype(i), " } "
else
write(50,30) " pigment { Trace_Color", &
i-tatoms(1), " } "
420
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
!
!
end if
write(50,30) " scale Atom_Radius", itype(i), " "
write(50,40) " translate <", &
rv(1,i),",", &
rv(2,i),",", &
rv(3,i), ">"
write(50,* ) "}"
end if
else ! otherwise, print all atoms
write(50,20) "object { AtomObject", itype(i), " //", i
write(50,30) " pigment { Atom_Color", itype(i), " } "
write(50,30) " scale Atom_Radius", itype(i), " "
write(50,40) " translate <", &
rv(1,i),",", &
rv(2,i),",", &
rv(3,i), ">"
write(50,* ) "}"
end if
second loop for atoms bonded to atom i
inner: do j=i,natoms
if(rv(1,j).gt.cxmax .or. rv(1,j).lt.cxmin) cycle inner
if(rv(2,j).gt.cymax .or. rv(2,j).lt.cymin) cycle inner
if(rv(3,j).gt.czmax .or. rv(3,j).lt.czmin) cycle inner
only print atom positions of atoms being traced (special case if ntrace=2)
if(itrace.eq.1) then
if((i.lt.tatoms(1) .or. i.gt.tatoms(2)) .and. &
(j.lt.tatoms(1) .or. j.gt.tatoms(2))) cycle inner
if(terr.eq.1.and.ntrace.eq.2.) then
if(i.ne.tatoms(1) .and. &
i.ne.tatoms(2) .and. &
j.ne.tatoms(1) .and. &
j.ne.tatoms(2)) cycle inner
end if
end if
!
!
!
!
!
if(i.ne.j) then
use i as centeral atom
dx=rv(1,j) - rv(1,i)
dy=rv(2,j) - rv(2,i)
dz=rv(3,j) - rv(3,i)
rtmp = sqrt(dx*dx + dy*dy + dz*dz)
begin periodicity, I used less efficient NInt instead of if statements
if(itrace.ne.1) then
dx=dx-perlen(1)*NINT(dx/perlen(1))
dy=dy-perlen(2)*NINT(dy/perlen(2))
dz=dz-perlen(3)*NINT(dz/perlen(3))
end if
rmag = sqrt(dx*dx + dy*dy + dz*dz)
end periodicity
if (itype(i) .eq. itype(j)) then
i12=itype(i)
else if (itype(i) .lt. itype(j)) then
i12=itype(i)*ntypes-.5*itype(i)*(itype(i)+1)+itype(j)
else
i12=itype(j)*ntypes-.5*itype(j)*(itype(j)+1)+itype(i)
endif
get rid of extra bars that go noware
if (rmag.ne.rtmp.and.rmag.lt.(rcut(i12)-1.0)) rmag=rtmp
if rmag is longer than the cutoff, don’t bother to calc anything else
if (rmag .gt. rcut(i12) .or. rmag .lt. 0.05) cycle inner
if(abs(dy).lt.0.0001) then
421
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
dth1=0.0
else
dth1=asin(1/sqrt(1+(dx/dy)**2+(dz/dy)**2))*r2d
end if
if(abs(dx).lt.0.0001) then
dth2=90.0
else
dth2=acos(1/sqrt(1+(dz/dx)**2))*r2d
end if
if (dx.ge.0 .and. dy.ge.0 .and. dz.ge.0) then
dth1=-1.*dth1
dth2=90.-dth2
else if (dx.lt.0 .and. dy.lt.0 .and. dz.lt.0) then
dth2=-dth2-90.
else if (dx.lt.0 .and. dy.ge.0 .and. dz.ge.0) then
dth1=-1.*dth1
dth2=dth2-90.
else if (dx.ge.0 .and. dy.lt.0 .and. dz.lt.0) then
dth2=dth2+90.
else if (dx.lt.0 .and. dy.lt.0 .and. dz.ge.0) then
dth1=dth1
dth2=sgn(dx)*(90.+sgn(dy)*dth2)
else if (dx.lt.0 .and. dy.ge.0 .and. dz.lt.0) then
dth1=sgn(dz)*dth1
dth2=sgn(dx)*(90.+sgn(dy)*dth2)
else if (dx.ge.0 .and. dy.ge.0 .and. dz.lt.0) then
dth1=sgn(dz)*dth1
dth2=sgn(dx)*(90.+sgn(dy)*dth2)
else if (dx.ge.0 .and. dy.lt.0 .and. dz.ge.0) then
dth1=sgn(dz)*dth1
dth2=sgn(dx)*(90.+sgn(dy)*dth2)
end if
!
functions for the thickness of the connecting bars
rsscale=1.0/(1.0+(10.0*EE-1.0)**(1.0+2.0*(rmag-rcut(i12))))
dz=rv(3,j) - rv(3,i)
! I forgot what the second part of the if statement was for...
!
if(rsscale.ge.0.05.and.(rv(3,j)-rv(3,i))**2.lt.(perlen(3)/2.0)**2.) then
if(rsscale.ge.0.04) then
write(50,25) "object { StickObject // ",i,":",j,";", rmag
write(50,* ) " pigment { AllStickColor } "
write(50,35) " scale ",rmag,"*z + (x+y) * StickRadius *", rsscale
write(50,36) " rotate <", dth1, ",", dth2, ",0>"
write(50,40) " translate <", &
rv(1,i), ",", &
rv(2,i), ",", &
rv(3,i), ">"
write(50,* ) "}"
end if
end if
end do inner
end do outer
20
format(X,A,I1,A,I5,A)
25
format(X,A,I5,A,I5,A,f10.5)
30
format(X,A,I1,A)
31
format(X,A,I3,A)
35
format(X,A,f10.5,A,f7.4)
36
format(X,A,f10.5,A,f10.5,A)
40
format(X,A,3(f12.5,A))
!
write(6,*)n
close(50)
return
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
REAL function sgn(value)
422
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
REAL value
If(value.ge.0) sgn = 1.0
If(value.lt.0) sgn = -1.0
end
!ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
subroutine extend(nx,ny)
INCLUDE ’cread.h’
integer nx, ny, nx0, ny0
real rv0
integer itype0, i, j, k
dimension rv0(3,maxatom),itype0(maxatom)
if(itrace.eq.1) then
nx0=-nx
ny0=-ny
else
nx0=0
ny0=0
end if
natoms0=natoms
perlen(1)=perub(1)-perlb(1)
perlen(3)=perub(3)-perlb(3)
2
1
!
!
4
do 1 i=1,natoms
itype0(i)=itype(i)
do 2 j=1,3
rv0(j,i)=rv(j,i)
continue
continue
natoms=0
atomloop: do i=1,natoms0
do 4 j=nx0,nx
do 4 k=ny0,ny
natoms=natoms+1
if(itrace.eq.1.and.i.eq.tatoms(1).and.j.eq.0.and.k.eq.0)
tatoms(1)=natoms
write(0,*) "i=", i, ", j=", j, ", k=", k, "natoms=",
end if
if(itrace.eq.1.and.i.eq.tatoms(2).and.j.eq.0.and.k.eq.0)
tatoms(2)=natoms
write(0,*) "i=", i, ", j=", j, ", k=", k, "natoms=",
end if
rv(1,natoms)=rv0(1,i)+perlen(1)*j
rv(3,natoms)=rv0(3,i)+perlen(3)*k
rv(2,natoms)=rv0(2,i)
itype(natoms)=itype0(i)
continue
end do atomloop
perlen(1)=perlen(1)*(nx+1.0)
perlen(3)=perlen(3)*(ny+1.0)
perub(1)=perlb(1)+perlen(1)
perub(3)=perlb(3)+perlen(3)
return
end
L.3 Include file (cread.h)
IMPLICIT NONE
then
natoms
then
natoms
423
APPENDIX L. MOLECULAR DYNAMICS CODE: OUTPUT ANALYSIS
424
character*80 header, c, ftstat
integer :: itype, ntypes, ielement, iconf, ivapor, inte, nc, pbc
integer :: natoms, natoms1, natoms0, nattype, nattype1, mfactor
integer :: istat, ilast, irange, itrace, tatoms,ecrfl
integer :: extendx,extendy
integer :: NPL, igr, igth, nelem, ntrace
real :: t1, t0
real :: gymax, gymin
real :: perub, perlb, perlen, rv, rvsave, e, slocal, amass
real :: bndvel, y1
real :: rcut
real :: cxmin,cxmax,cymin,cymax,czmin,czmax
real, parameter :: alat=5.66408E+00 ! zb lat constant in Angs
integer, parameter :: maxelem=3, maxatom=100000
integer, parameter :: npair=maxelem*(1+maxelem)/2
!---- Fundamental constants ---------------------------------------------double precision, parameter :: PI=3.1415926535897932D+00
double precision, parameter :: EE=2.7182818284590452D+00
common /lattice/ natoms,ntypes,perub(3),perlb(3),perlen(3), &
rv(6,maxatom), rvsave(6,maxatom), &
itype(maxatom),e(maxatom),slocal(3,3,maxatom), &
amass(maxelem),ielement(maxelem),bndvel(3),header,c,natoms0,t0,nc,rcut(npair), nelem
common /flags/ iconf,ivapor,inte,istat,ilast,irange(2), &
pbc,extendx,extendy,ntrace,ecrfl
! statistic values
common /stats/ natoms1, t1, nattype1(maxelem), nattype(maxelem), mfactor, y1, NPL
! common variables for tracking atoms
common /trace/ itrace, tatoms(2), ftstat
common /gfunc/ igr, igth, gymax, gymin
common /trim/ cxmin,cxmax,cymin,cymax,czmin,czmax
Bibliography
[1] Silicon Strategies, “Gallium arsenide IC market “worth $2.9 billion in 2004”.” Internet World Wide Web.
Available from:
http://www.siliconstrategies.com/showArticle.jhtml?articleID=47204085
[cited
31 January 2004].
[2] A. Anwar, “GaAs industry forecast: 2003-2008,” tech. rep., Strategy Analytics, Inc.,
Newton Centre, MA, August 2004.
[3] P. K. Bhattacharya, “GaAs-based heterostructures for optoelectronic devices,” in
Properties of Gallium Arsenide (M. R. Brozel and G. E. Stillman, eds.), vol. 16,
pp. 861–873, London: INSPEC, 3rd ed., 1996.
[4] M. Feng, P. J. Apostolakis, and W.-H. Chang, “GaAs MESFET: discrete, power and
MMIC microwave devices,” in Properties of Gallium Arsenide (M. R. Brozel and
G. E. Stillman, eds.), vol. 16, pp. 785–798, London: INSPEC, 3rd ed., 1996.
[5] H. Ohno, “Making nonmagnetic semiconductors ferromagnetic,” Science, vol. 281,
no. 5379, pp. 951–956, 1998.
[6] J. I. Landman, C. G. Morgan, J. T. Schick, P. Papoulias, and A. Kumar, “Arsenic
interstitials and interstitial complexes in low-temperature grown GaAs,” Phys. Rev.
B, vol. 55, no. 23, pp. 15581–15586, 1997.
[7] R. Kaspi, “Introduction to epitaxy,” in Properties of Gallium Arsenide (M. R. Brozel
and G. E. Stillman, eds.), vol. 16, pp. 601–607, London: INSPEC, 3rd ed., 1996.
[8] K. Mahalingam, N. Otsuka, M. R. Melloch, J. M. Woodall, and A. C. Warren,
“Substrate temperature dependence of arsenic precipitate formation in AlGaAs and
GaAs,” J. Vac. Sci. Technol. B, vol. 9, no. 4, pp. 2328–2332, 1991.
[9] M. R. Brozel and G. E. Stillman, eds., Properties of Gallium Arsenide, vol. 16 of
EMIS Datareviews Series. London: INSPEC, 3rd ed., 1996.
[10] R. K. Kawakami, E. Johnston-Halperin, L. F. Chen, M. Hanson, N. Guebels, J. S.
Speck, A. C. Gossard, and A. A. Awschalom, “(Ga,Mn)As as a digital ferromagnetic
heterostructure,” Appl. Phys. Lett., vol. 77, no. 15, pp. 2379–81, 2000.
425
BIBLIOGRAPHY
426
[11] M. A. Scarpulla, U. Daud, K. M. Yu, O. Monteiro, Z. Liliental-Weber, D. Zakharov,
W. Walukiewicz, and O. D. Dubon, “Diluted magnetic semiconductors formed by
ion implantation and pulsed-laser melting,” Physica B, vol. 340-342, pp. 908–912,
2003.
[12] M. Pristovsek, S. Tsukamoto, A. Ohtake, N. Koguchi, B. G. Orr, W. G. Schmidt,
and J. Bernholc, “Gallium-rich reconstructions on GaAs(001),” Phys. Status Solidi
B, vol. 240, no. 1, pp. 91–98, 2003.
[13] Q.-K. Xue, T. Hashizume, and T. Sakurai, “Scanning tunneling microscopy study of
GaAs(001) surfaces,” Appl. Surf. Sci., vol. 141, no. 3-4, pp. 244–263, 1999.
[14] A. Y. Cho, “Recent developments in molecular beam epitaxy (MBE),” J. Vac. Sci.
Technol., vol. 16, no. 2, pp. 275–284, 1979.
[15] J. R. Arthur, “Molecular beam epitaxy,” Surf. Sci., vol. 500, no. 1-3, pp. 189–217,
2002.
[16] A. Y. Cho, “How molecular beam epitaxy (MBE) began and its projection into the
future,” J. Cryst. Growth, vol. 201-202, pp. 1–7, 1999.
[17] R. Evans, “High temperature MBE growth of GaAs,” in Properties of Gallium Arsenide (M. R. Brozel and G. E. Stillman, eds.), vol. 16, pp. 655–661, London: INSPEC, 3rd ed., 1996.
[18] R. L. Lee, W. J. Schaffer, Y. G. Chai, D. Liu, and J. S. Harris, “Material effects
on the cracking efficiency of molecular-beam epitaxy arsenic cracking furnaces,” J.
Vac. Sci. Technol. B, vol. 4, no. 2, pp. 568–570, 1986.
[19] J. R. Arthur, “Interaction of Ga and As2 molecular beams with GaAs surfaces,” J.
Appl. Phys., vol. 39, no. 8, pp. 4032–4034, 1968.
[20] J. R. Arthur, “Surface stoichiometry and structure of GaAs,” Surf. Sci., vol. 43, no. 2,
pp. 449–461, 1974.
[21] C. T. Foxon and B. A. Joyce, “Interaction kinetics of As2 and Ga on 100 GaAs
surfaces,” Surf. Sci., vol. 64, no. 1, pp. 293–304, 1977.
[22] J. M. Van Hove and P. I. Cohen, “Mass-action control of AlGaAs and GaAs growth
in molecular beam epitaxy,” Appl. Phys. Lett., vol. 47, no. 7, pp. 726–728, 1985.
[23] G. R. Bell, T. S. Jones, and B. A. Joyce, “Direct observation of anisotropic step
activity on GaAs(001),” Surf. Sci., vol. 429, pp. L492–L496, 1999.
[24] M. Missous, “Low temperature GaAs: growth dynamics and effects on As:Ga flux
ratio,” in Properties of Gallium Arsenide (M. R. Brozel and G. E. Stillman, eds.),
vol. 16, pp. 679–683, London: INSPEC, 3rd ed., 1996.
BIBLIOGRAPHY
427
[25] M. Missous and S. O’Hagan, “Nonstoichiometry and dopants related phenomena in
low temperature GaAs grown by molecular beam epitaxy,” J. Appl. Phys., vol. 75,
no. 7, pp. 3396–3401, 1994.
[26] E. S. Tok, J. H. Neave, J. Zhang, B. A. Joyce, and T. S. Jones, “Arsenic incorporation
kinetics in GaAs(001) homoepitaxy revisited,” Surf. Sci., vol. 374, no. 1-3, pp. 397–
405, 1997.
[27] M. Kaminska, E. R. Weber, Z. Liliental-Weber, R. Leon, and Z. U. Rek,
“Stoichiometry-related defects in GaAs grown by molecular-beam epitaxy at low
temperatures,” J. Vac. Sci. Technol. B, vol. 7, no. 4, pp. 710–713, 1989.
[28] D. J. Eaglesham, “Semiconductor molecular-beam epitaxy at low temperatures,” J.
Appl. Phys., vol. 77, no. 8, pp. 3597–3617, 1995.
[29] H. Ohno, A. Shen, F. Matsukura, A. Oiwa, A. Endo, S. Katsumoto, and Y. Iye,
“(Ga,Mn)As: A new diluted magnetic semiconductor based on GaAs,” Appl. Phys.
Lett., vol. 69, no. 3, pp. 363–365, 1996.
[30] H. Ohno, “Semiconductors—toward functional spintronics,” Science, vol. 291,
no. 5505, pp. 840–841, 2001.
[31] H. Ohno, “Ferromagnetic III-V semiconductors and their heterostructures,” in Semiconductor spintronics and quantum computation (D. Awschalom, D. Loss, and
N. Samarth, eds.), Nanoscience and Technology, pp. 1–30, New York: Springer,
2002.
[32] V. Avrutin, D. Humienik, S. Frank, A. Koeder, W. Schoch, W. Limmer, R. Sauer,
and A. Waag, “Growth of GaMnAs under near-stoichiometric conditions,” J. Appl.
Phys., vol. 98, p. 023909, 2005.
[33] A. Suda and N. Otsuka, “Arsenic flux dependence of incorporation of excess arsenic
in molecular beam epitaxy of GaAs at low temperature,” Appl. Phys. Lett., vol. 73,
no. 11, pp. 1529–1531, 1998.
[34] D. J. Eaglesham, L. N. Pfeiffer, K. W. West, and D. R. Dykaar, “Limited thickness
epitaxy in GaAs molecular-beam epitaxy near 200-degrees-C,” Appl. Phys. Lett.,
vol. 58, no. 1, pp. 65–67, 1991.
[35] M. C. Payne, M. P. Teter, D. C. Allan, T. A. Arias, and J. D. Joannopoulos, “Iterative
minimization techniques for ab initio total-energy calculations - molecular-dynamics
and conjugate gradients,” Rev. Mod. Phys., vol. 64, no. 4, pp. 1045–1097, 1992.
[36] K. Ohno, K. Esfarjani, and Y. Kawazoe, Computational materials science: from ab
initio to Monte Carlo methods, vol. 129 of Springer series in solid state sciences.
New York: Springer-Verlag, 1999.
BIBLIOGRAPHY
428
[37] D. D. Vvedensky, “Epitaxial phenomena across length and time scales,” Surf. Interface Anal., vol. 31, no. 7, pp. 627–636, 2001.
[38] C. H. Grein, R. Benedek, and T. de la Rubia, “Epitaxial growth simulation employing
a combined molecular dynamics and Monte Carlo approach,” Comp. Mater. Sci.,
vol. 6, no. 2, pp. 123–126, 1996.
[39] W. Kohn, A. D. Becke, and R. G. Parr, “Density functional theory of electronic
structure,” J. Phys. Chem., vol. 100, no. 31, pp. 12974–12980, 1996.
[40] W. Kohn and L. J. Sham, “Self-consistent equations including exchange and correlation effects,” Phys. Rev., vol. 140, no. 4A, pp. A1133–A1138, 1965.
[41] R. O. Jones and O. Gunnarsson, “The density functional formalism, its applications
and prospects,” Rev. Mod. Phys., vol. 61, no. 3, pp. 689–746, 1989.
[42] J. P. Perdew, K. Burke, and M. Ernzerhof, “Generalized gradient approximation
made simple,” Phys. Rev. Lett., vol. 77, no. 18, pp. 3865–3868, 1996.
[43] G. Kresse, “Ab initio molecular dynamics: recent progresses and limitations,” J.
Non-Cryst. Solids, vol. 312-314, pp. 52–59, 2002.
[44] A. A. Demkov, O. F. Sankey, J. Gryko, and P. F. McMillan, “Theoretical predictions
of expanded-volume phases of GaAs,” Phys. Rev. B, vol. 55, no. 11, pp. 6904–6913,
1997.
[45] O. H. Nielsen and R. M. Martin, “Stresses in semiconductors: Ab initio calculations
on Si, Ge, and GaAs,” Phys. Rev. B, vol. 32, no. 6, pp. 3792–3805, 1985.
[46] J. J. BelBruno, “Bonding and energetics in small clusters of gallium and arsenic,”
Heteroatom Chem., vol. 14, no. 2, pp. 189–196, 2003.
[47] S.-H. Lee, W. Moritz, and M. Scheffler, “GaAs(001) surface under conditions of
low As pressure: Evidence for a novel surface geometry,” Phys. Rev. Lett., vol. 85,
no. 18, pp. 3890–3893, 2000.
[48] J. E. Northrup and S. B. Zhang, “Dopant and defect energetics: Si in GaAs,” Phys.
Rev. B, vol. 47, no. 11, pp. R6791–R6794, 1993.
[49] S. Pöykkö, M. J. Puska, and R. M. Nieminen, “Ab initio study of fully relaxed divacancies in GaAs,” Phys. Rev. B, vol. 53, no. 7, pp. 3813–3819, 1996.
[50] C. G. Morgan, P. Kratzer, and M. Scheffler, “Arsenic dimer dynamics during MBE
growth: Theoretical evidence for a novel chemisorption state of As 2 molecules on
GaAs surfaces,” Phys. Rev. Lett., vol. 82, no. 24, pp. 4886–4889, 1999.
BIBLIOGRAPHY
429
[51] J. C. Slater and G. F. Koster, “Simplified LCAO method for the periodic potential
problem,” Phys. Rev., vol. 94, no. 6, pp. 1498–1524, 1954.
[52] M. Finnis, Interatomic Forces in Condensed Matter. Oxford Series on Materials
Modelling, Oxford: Oxford University Press, 2003.
[53] L. Goodwin, A. J. Skinner, and D. G. Pettifor, “Generating transferable tight-binding
parameters - application to silicon,” Europhys. Lett., vol. 9, no. 7, pp. 701–706, 1989.
[54] C. H. Xu, C. Z. Wang, C. T. Chan, and K. M. Ho, “A transferable tight-binding
potential for carbon,” J. Phys.: Condens. Matter, vol. 4, no. 28, pp. 6047–6054,
1992.
[55] D. Nguyen-Manh, D. G. Pettifor, and V. Vitek, “Analytic environment-dependent
tight-binding bond integrals: Application to MoSi2,” Phys. Rev. Lett., vol. 85, no. 19,
pp. 4136–4139, 2000.
[56] J. C. Cressoni and D. G. Pettifor, “Theory of structural trends within the sp bonded
elements,” J. Phys.: Condens. Matter, vol. 3, no. 5, pp. 495–511, 1991.
[57] C. Kittel, Introduction to Solid State Physics. New York: J. Wiley & Sons, 7th ed.,
1996.
[58] L. Verlet, “Computer “experiments” on classical fluids. I. Thermodynamical properties of Lennard-Jones molecules,” Phys. Rev., vol. 159, no. 1-5, p. 98, 1967.
[59] M. S. Daw, “Model of metallic cohesion: The embedded-atom method,” Phys. Rev.
B, vol. 39, no. 11, pp. 7441–7452, 1989.
[60] M. S. Daw and M. I. Baskes, “Embedded-atom method: Derivation and application
to impurities, surfaces, and other defects in metals,” Phys. Rev. B, vol. 29, no. 12,
pp. 6443–6453, 1984.
[61] R. A. Johnson, “Alloy models with the embedded-atom method,” Phys. Rev. B,
vol. 39, no. 17, pp. 12554–12559, 1989.
[62] X. W. Zhou, H. N. G. Wadley, J.-S. Filhol, and M. N. Neurock, “Modified charge
transfer-embedded atom method potential for metal/metal oxide system,” Phys. Rev.
B, vol. 69, p. 035402, 2004.
[63] P. Daniel, M. Rousseau, A. Desert, A. Ratuszna, and F. Ganot, “Raman scattering
study and lattice-dynamics investigation of the NaMnF 3 perovskite,” Phys. Rev. B,
vol. 51, no. 18, pp. 12337–12346, 1995.
[64] M. Baudin and K. Hermansson, “Metal oxide surface dynamics from molecular
dynamics simulations: the α-Al 2 O3 (0001) surface,” Surf. Sci., vol. 474, no. 1-3,
pp. 107–113, 2001.
BIBLIOGRAPHY
430
[65] B. G. Dick, Jr. and A. W. Overhauser, “Theory of the dielectric constants of alkali
halide crystals,” Phys. Rev., vol. 112, no. 1, pp. 90–103, 1958.
[66] H. Balamane, T. Halicioglu, and W. A. Tiller, “Comparative study of silicon empirical interatomic potentials,” Phys. Rev. B, vol. 46, no. 4, pp. 2250–2279, 1992.
[67] S. J. Cook and P. Clancy, “Comparison of semi-empirical potential functions for
silicon and germanium,” Phys. Rev. B, vol. 47, no. 13, pp. 7686–7699, 1993.
[68] F. H. Stillinger and T. A. Weber, “Computer simulation of local order in condensed
phases of silicon,” Phys. Rev. B, vol. 31, no. 8, pp. 5262–5271, 1985.
[69] J. Tersoff, “New empirical approach for the structure and energy of covalent systems,” Phys. Rev. B, vol. 37, no. 12, pp. 6991–7000, 1988.
[70] J. Tersoff, “Modeling solid-state chemistry: Interatomic potentials for multicomponent systems,” Phys. Rev. B, vol. 39, no. 8, pp. R5566–R5568, 1989.
[71] K. Albe, K. Nordlund, J. Nord, and A. Kuronen, “Modeling of compound semiconductors: Analytical bond-order potential for Ga, As, and GaAs,” Phys. Rev. B,
vol. 66, p. 035205, 2002.
[72] M. Nakamura, H. Fujioka, K. Ono, M. Takeuchi, T. Mitsui, and M. Oshima, “Molecular dynamics simulation of III-V compound semiconductor growth with MBE,” J.
Cryst. Growth, vol. 209, no. 2-3, pp. 232–236, 2000.
[73] M. Sayed, J. H. Jefferson, A. B. Walker, and A. G. Cullis, “Molecular dynamics
simulations of implantation damage and recovery in semiconductors,” Nucl. Instrum.
Methods B, vol. 102, no. 1-4, pp. 218–222, 1995.
[74] R. Smith, “A semi-empirical many-body interatomic potential for modelling dynamic processes in gallium arsenide,” Nucl. Instrum. Methods B, vol. 67, no. 1-4,
pp. 335–339, 1992.
[75] J. E. Angelo and M. J. Mills, “Investigations of the misfit dislocation structure
at a CdTe(001)/GaAs(001) interface using Stillinger-Weber potentials and highresolution transmission electron microscopy,” Philos. Mag. A, vol. 72, no. 3,
pp. 635–649, 1995.
[76] C. H. Grein, J. P. Faurie, V. Bousquet, E. Tournié, R. Benedek, and T. de la Rubia, “Simulations of ZnSe/GaAs heteroepitaxial growth,” J. Cryst. Growth, vol. 178,
no. 3, pp. 258–267, 1997.
[77] S. Kodiyalam, A. Chatterjee, I. Ebbsjö, R. K. Kalia, H. Kikuchi, A. Nakano, J. P.
Rino, and P. Vashishta, “Pressure induced structural transformations in nanocluster
assembled gallium arsenide,” Mat. Res. Soc. Symp. Proc, vol. 536, pp. 545–550,
1999.
BIBLIOGRAPHY
431
[78] S. Kodiyalam, R. K. Kalia, H. Kikuchi, A. Nakano, F. Shimojo, and P. Vashishta,
“Grain boundaries in gallium arsenide nanocrystals under pressure: A parallel
molecular-dynamics study,” Phys. Rev. Lett., vol. 86, no. 1, pp. 55–58, 2001.
[79] J. P. Rino, A. Chatterjee, I. Ebbsjö, R. K. Kalia, A. Nakano, F. Shimojo, and
P. Vashishta, “Pressure-induced structural transformation in GaAs: A moleculardynamics study,” Phys. Rev. B, vol. 65, p. 195206, 2002.
[80] Z. Q. Wang and D. Stroud, “Monte carlo study of liquid GaAs: Bulk and surface
properties,” Phys. Rev. B, vol. 42, no. 8, pp. 5353–5356, 1990.
[81] D. K. Choi, T. Takai, S. Erkoç, T. Halicioglu, and W. A. Tiller, “Free surfaces and
multilayer interfaces in the GaAs/AlAs system,” J. Cryst. Growth, vol. 85, no. 1-2,
pp. 9–15, 1987.
[82] S. Erkoç and H. Kökten, “Energetics of arsenic terminated GaAs(001) surfaces,” Int.
J. Mod. Phys. C, vol. 11, no. 6, pp. 1225–1237, 2000.
[83] T. Ito, K. E. Khor, and S. Das Sarma, “Systematic approach to developing empirical
potentials for compound semiconductors,” Phys. Rev. B, vol. 41, no. 6, pp. R3893–
R3896, 1990.
[84] T. Ito and K. Shiraishi, “A theoretical investigation of migration potentials of Ga
adatoms near step edges on GaAs(001)-c(4 × 4) surface,” Jpn. J. Appl. Phys. 2,
vol. 35, no. 8B, pp. L1016–L1018, 1996.
[85] T. Ito and K. Shiraishi, “Electron counting Monte Carlo simulation of the structural
change of the GaAs(001)-c(4 × 4) surface during Ga predeposition,” Jpn. J. Appl.
Phys. 2, vol. 37, no. 3A, pp. L262–L264, 1998.
[86] T. Ito and K. Shiraishi, “Theoretical investigations of adsorption behavior on
GaAs(001) surfaces,” Jpn. J. Appl. Phys. 1, vol. 37, no. 8, pp. 4234–4243, 1998.
[87] D. Conrad and K. Scheerschmidt, “Empirical bond-order potential for semiconductors,” Phys. Rev. B, vol. 58, no. 8, pp. 4538–4542, 1998.
[88] A. P. Horsfield, A. M. Bratkovsky, M. Fearn, D. G. Pettifor, and M. Aoki, “Bondorder potentials: Theory and implementation,” Phys. Rev. B, vol. 53, no. 19,
pp. 12694–12712, 1996.
[89] D. G. Pettifor and I. I. Oleinik, “Analytic bond-order potentials beyond TersoffBrenner: I. Theory,” Phys. Rev. B, vol. 59, no. 13, pp. 8487–8499, 1999.
[90] D. G. Pettifor and I. I. Oleinik, “Bounded analytic bond-order potentials for σ and π
bonds,” Phys. Rev. Lett., vol. 84, no. 18, pp. 4124–4127, 2000.
BIBLIOGRAPHY
432
[91] D. G. Pettifor and I. I. Oleinik, “Analytic bond-order potential for open and closepacked phases,” Phys. Rev. B, vol. 65, p. 172103, 2002.
[92] M. J. Cawkwell, D. Nguyen-Manh, D. G. Pettifor, and V. Vitek, “Construction, assessment and application of a bond-order potential for iridium.” submitted to Phys.
Rev. B.
[93] R. Drautz, D. A. Murdick, D. Nguyen-Manh, X. Zhou, H. N. G. Wadley, and D. G.
Pettifor, “An analytic bond-order potential for predicting structural trends across the
sp-valent elements,” Phys. Rev. B, vol. 72, p. 144105, 2005.
[94] L. D. Landau and E. M. Lifshitz, Mechanics. New York: Pergamon Press, 3rd ed.,
1976.
[95] H. C. Andersen, “Molecular dynamics simulations at constant pressure and/or temperature,” J. Chem. Phys., vol. 72, no. 4, pp. 2384–2393, 1980.
[96] W. G. Hoover, “Canonical dynamics: Equilibrium phase-space distributions,” Phys.
Rev. A, vol. 31, no. 3, pp. 1695–1697, 1985.
[97] X. W. Zhou, R. A. Johnson, and H. N. G. Wadley, “A molecular dynamics study of
nickel vapor deposition: Temperature, incident angle, and adatom energy effects,”
Acta. Mater., vol. 45, no. 4, pp. 1513–1524, 1997.
[98] N. Moll, A. Kley, E. Pehlke, and M. Scheffler, “GaAs equilibrium crystal shape from
first principles,” Phys. Rev. B, vol. 54, no. 12, pp. 8844–8855, 1996.
[99] G. Zollo, Y. J. Lee, and R. M. Nieminen, “Properties of intrinsic di-interstitials in
GaAs,” J. Phys.: Condens. Matter, vol. 16, pp. 8991–9000, 2004.
[100] G. Zollo and R. M. Nieminen, “Small self-interstitial clusters in GaAs,” J. Phys.:
Condens. Matter, vol. 15, no. 6, pp. 843–853, 2003.
[101] R. Car and M. Parrinello, “Unified approach for molecular dynamics and densityfunctional theory,” Phys. Rev. Lett., vol. 55, no. 22, pp. 2471–2474, 1985.
[102] F. Gygi and G. Galli, “Ab initio simulation in extreme conditions,” Materials Today,
vol. 8, no. 11, pp. 26–32, 2005.
[103] M. Bockstedte, A. Kley, J. Neugebauer, and M. Scheffler, “Density-functional theory
calculations for poly-atomic systems: electronic structure, static and elastic properties and ab initio molecular dynamics,” Comput. Phys. Commun., vol. 107, no. 1-3,
pp. 187–222, 1997.
[104] Y. P. Feng, C. K. Ong, H. C. Poon, and D. Tomnek, “Tight-binding molecular
dynamics simulations of semiconductor alloys: clusters, surfaces, and defects,” J.
Phys.: Condens. Matter, vol. 9, no. 21, pp. 4345–4364, 1997.
BIBLIOGRAPHY
433
[105] H. K. Quek, Y. P. Feng, and C. K. Ong, “Tight binding molecular dynamics studies
of Gam Asn and Alm Asn clusters,” Z. Phys. D, vol. 42, no. 4, pp. 309–317, 1997.
[106] M. P. Allen and D. J. Tildesley, Computer simulation of liquids. Oxford science
publications, New York: Clarendon Press, 1989.
[107] A. Nordsieck, “On numerical integration of ordinary differential equations,” Math.
Comput., vol. 16, no. 77, pp. 22–49, 1962.
[108] W. C. Swope, H. C. Andersen, P. H. Berens, and K. R. Wilson, “A computer simulation method for the calculation of equilibrium constants for the formation of physical
clusters of molecules: Application to small water clusters,” J. Chem. Phys., vol. 76,
no. 1, pp. 637–649, 1982.
[109] M. E. Tuckerman, B. J. Berne, and G. J. Martyna, “Reversible multiple time scale
molecular dynamics,” J. Chem. Phys., vol. 97, no. 3, pp. 1990–2001, 1992.
[110] M. E. Bachlechner, A. Omeltchenko, A. Nakano, R. K. Kalia, P. Vashishta, I. Ebbsjö,
and A. Madhukar, “Dislocation emission at the silicon/silicon nitride interface: A
million atom molecular dynamics simulation on parallel computers,” Phys. Rev.
Lett., vol. 84, no. 2, pp. 322–325, 2000.
[111] X. Su, R. K. Kalia, A. Nakano, P. Vashishta, and A. Madhukar, “Million-atom
molecular dynamics simulation of flat InAs overlayers with self-limiting thickness
on GaAs square nanomesas,” Appl. Phys. Lett., vol. 78, no. 23, pp. 3717–3719, 2001.
[112] M. E. J. Newman and G. T. Barkema, Monte Carlo methods in statistical physics.
Oxford: Clarendon Press, 1999.
[113] M. Itoh, “Atomic-scale homoepitaxial growth simulations of reconstructed III-V surfaces,” Prog. Surf. Sci., vol. 66, no. 3-5, pp. 53–153, 2001.
[114] M. Itoh, G. R. Bell, A. R. Avery, T. S. Jones, B. A. Joyce, and D. D. Vvedensky,
“Island nucleation and growth on reconstructed GaAs(001) surfaces,” Phys. Rev.
Lett., vol. 81, no. 3, pp. 633–636, 1998.
[115] P. Kratzer, E. Penev, and M. Scheffler, “Understanding the growth mechanisms of
GaAs and InGaAs thin films by employing first-principles calculations,” Appl. Surf.
Sci., vol. 216, no. 1-4, pp. 436–446, 2003.
[116] T. R. Mattsson and H. Metiu, “Kinetic Monte Carlo simulations of nucleation on
a surface with periodic strain: Spatial ordering and island-size distribution,” Appl.
Phys. Lett., vol. 75, no. 7, pp. 926–928, 1999.
[117] G. R. Bell, M. Itoh, T. S. Jones, B. A. Joyce, and D. D. Vvedensky, “Islands and
defects on the growing InAs(001)-(2 × 4) surface,” Surf. Sci., vol. 433-435, pp. 455–
459, 1999.
BIBLIOGRAPHY
434
[118] B. A. Joyce, D. D. Vvedensky, G. R. Bell, J. G. Belk, M. Itoh, and T. S. Jones,
“Nucleation and growth mechanisms during MBE of III-V compounds,” Mater. Sci.
Eng. B-Solid, vol. 67, no. 1-2, pp. 7–16, 1999.
[119] D. D. Vvedensky, M. Itoh, G. R. Bell, T. S. Jones, and B. A. Joyce, “Island nucleation
and growth during homoepitaxy on GaAs(001)-(2 x 4),” J. Cryst. Growth, vol. 201202, pp. 56–61, 1999.
[120] P. Kratzer and M. Scheffler, “Surface knowledge: Toward a predictive theory of
materials,” Comput. Sci. Eng., vol. 3, no. 6, pp. 16–25, 2001.
[121] P. Kratzer and M. Scheffler, “Reaction-limited island nucleation in molecular beam
epitaxy of compound semiconductors,” Phys. Rev. Lett., vol. 88, p. 036102, 2002.
[122] P. Kratzer, E. Penev, and M. Scheffler, “First-principles studies of kinetics in epitaxial growth of III-V semiconductors,” Appl. Phys. A-Mater., vol. 75, no. 1, pp. 79–88,
2002.
[123] J. Villain, “Continuum models of crystal growth from atomic beams with and without desorption,” J. Phys. I (France), vol. 1, pp. 19–42, 1991.
[124] A. Pimpinelli and J. Villain, Physics of crystal growth. New York: Cambridge University Press, 1998.
[125] A.-L. Barabási and H. E. Stanley, Fractal concepts in surface growth. New York:
University of Cambridge, 1995.
[126] J. A. Sethian, Level set methods and fast marching methods. Cambridge, U.K.; New
York: Cambridge University Press, 2nd ed., 1999.
[127] M. F. Gyure, C. Ratsch, B. Merriman, R. E. Caflisch, S. Osher, J. J. Zinck, and D. D.
Vvedensky, “Level-set methods for the simulation of epitaxial phenomena,” Phys.
Rev. E, vol. 58, no. 6, pp. R6927–R6930, 1998.
[128] C. Ratsch, M. F. Gyure, R. E. Caflisch, F. Gibou, M. Petersen, M. Kang, J. Garcia,
and D. D. Vvedensky, “Level-set method for island dynamics in epitaxial growth,”
Phys. Rev. B, vol. 65, p. 195403, 2002.
[129] D. A. Murdick, X. W. Zhou, and H. N. G. Wadley, “Low temperature atomic assembly of stoichiometric gallium arsenide from equiatomic vapor,” J. Cryst. Growth,
2005. In press.
[130] D. A. Murdick, X. W. Zhou, and H. N. G. Wadley, “Assessment of interatomic potentials for molecular dynamics simulations of GaAs deposition,” Phys. Rev. B, vol. 72,
p. 205340, 2005.
BIBLIOGRAPHY
435
[131] J. Tersoff, “Erratum: Modeling solid-state chemistry: Interatomic potentials for multicomponent systems [Phys. Rev. B 39, R5566 (1989)],” Phys. Rev. B, vol. 41, no. 5,
p. 3248, 1990.
[132] D. W. Brenner, “Empirical potential for hydrocarbons for use in simulating the
chemical vapor deposition of diamond films,” Phys. Rev. B, vol. 42, no. 15, pp. 9458–
9471, 1990.
[133] J. S. Blakemore, “Semiconducting and other major properties of gallium arsenide,”
J. Appl. Phys., vol. 53, no. 10, pp. R123–R181, 1982.
[134] P. Villars and L. D. Calvert, eds., vol. 1 of Pearson’s handbook of crystallographic
data for intermetallic phases, pp. 1134–1135. Materials Park, Ohio: ASM International, 2nd ed., 1991.
[135] J. Donohue, The structures of the elements. New York: Wiley, 1974.
[136] F. Reif, Fundamentals of statistical and thermal physics. Boston: McGraw Hill,
1965.
[137] D. R. Lide, ed., CRC Handbook of Chemistry and Physics. Boca Raton, FL: CRC
Press, 83rd ed., 2003.
[138] L. Brewer, “The cohesive energies of the elements,” Tech. Rep. LBL-3720,
Lawrence Berkeley Laboratory, May 1977.
[139] O. Kubaschewski, C. B. Alcock, and P. J. Spencer, Materials Thermochemistry,
pp. 1–27. New York: Pergamon Press, 6th ed., 1993.
[140] S. Adachi, “Specific heat and Debye temperature of GaAs,” in Properties of Gallium Arsenide (M. R. Brozel and G. E. Stillman, eds.), vol. 16, pp. 27–31, London:
INSPEC, 3rd ed., 1996.
[141] E. A. Brandes and G. B. Brook, eds., Smithells metals reference book. Oxford;
Boston: Butterworth-Heinemann, 7th ed., 1998.
[142] J. L. C. Daams, P. Villars, and J. H. N. van Vucht, eds., Atlas of crystal structure
types for intermetallic phases, vol. 1-4. Materials Park, Ohio: ASM International,
2nd ed., 1991.
[143] A. Mujica, R. J. Needs, and A. Munoz, “First-principles pseudopotential study of the
phase stability of the III-V semiconductors GaAs and AlAs,” Phys. Rev. B, vol. 52,
no. 12, pp. 8881–8892, 1995.
[144] G. Kresse and J. Hafner, “Norm-conserving and ultrasoft pseudopotentials for firstrow and transition elements,” J. Phys.: Condens. Matter, vol. 6, pp. 8245–8257,
1994.
BIBLIOGRAPHY
436
[145] G. Kresse and J. Hafner, “Ab initio molecular dynamics for liquid metals,” Phys.
Rev. B., vol. 47, pp. R558–R561, 1993.
[146] G. Kresse and J. Hafner, “Ab initio molecular-dynamics simulation of the liquidmetalamorphous-semiconductor transition in germanium,” Phys. Rev. B., vol. 49,
pp. 14251–14269, 1994.
[147] G. Kresse and J. Furthmüller, “Efficiency of ab-initio total energy calculations for
metals and semiconductors using a plane-wave basis set,” Comput. Mat. Sci., vol. 6,
pp. 15–50, 1996.
[148] G. Kresse and J. Furthmüller, “Efficient iterative schemes for ab initio total-energy
calculations using a plane-wave basis set,” Phys. Rev. B, vol. 54, pp. 11169–11186,
1996.
[149] M. Bernasconi, G. L. Chiarotti, and E. Tosatti, “Ab initio calculations of structural
and electronic properties of gallium solid-state phases,” Phys. Rev. B, vol. 52, no. 14,
pp. 9988–9998, 1995.
[150] M. I. Baskes, S. P. Chen, and F. J. Cherne, “Atomistic model of gallium,” Phys. Rev.
B, vol. 66, p. 104107, 2002.
[151] C. W. Snyder, B. G. Orr, D. Kessler, and L. M. Sander, “Effect of strain on surfacemorphology in highly strained InGaAs films,” Phys. Rev. Lett., vol. 66, no. 23,
pp. 3032–3035, 1991.
[152] K. R. Lyall and J. F. Cochran, “Velocity of sound and acoustic attenuation in pure
gallium single crystals,” Can. J. Phys., vol. 49, no. 9, p. 1074, 1971.
[153] H. J. Beister, K. Strössner, and K. Syassen, “Rhombohedral to simple-cubic phase
transition in arsenic under pressure,” Phys. Rev. B, vol. 41, no. 9, pp. 5535–5543,
1990.
[154] H. J. McSkimin, A. Jayaraman, and P. Andreatch, Jr., “Elastic moduli of GaAs at
moderate pressures and the evaluation of compression to 250 kbar,” J. Appl. Phys.,
vol. 38, no. 5, pp. 2362–2364, 1967.
[155] S. B. Zhang and J. E. Northrup, “Chemical potential dependence of defect formation
energies in GaAs: application to Ga self-diffusion,” Phys. Rev. Lett., vol. 67, no. 17,
pp. 2339–2342, 1991.
[156] G. Zollo, J. Tarus, and R. M. Nieminen, “Reliability of analytical potentials for
point-defect simulation in GaAs,” J. Phys.: Condens. Matter, vol. 16, no. 23,
pp. 3923–3932, 2004.
BIBLIOGRAPHY
437
[157] J. R. Morris, C. Z. Wang, K. M. Ho, and C. T. Chan, “Melting line of aluminum
from simulations of coexisting phases,” Phys. Rev. B, vol. 49, no. 5, pp. 3109–3115,
1994.
[158] H. Wenzl, A. Dahlen, A. Fattah, S. Petersen, K. Mika, and D. Henkel, “Phase relations in GaAs crystal growth,” J. Cryst. Growth, vol. 109, no. 1-4, pp. 191–204,
1991.
[159] K. P. Huber and G. Herzberg, Molecular spectra and molecular structure: IV. Constants of diatomic molecules, vol. 4. New York: Van Nostrand Reinhold Company,
1979.
[160] J. J. Murray, C. Pupp, and R. F. Pottie, “Heat of dissociation of As 4 (g) and the heat
of formation of As2 (g),” J. Chem. Phys., vol. 58, no. 6, pp. 2569–2578, 1973.
[161] D. Paget, O. Pulci, M. Sauvage, Y. Garreau, L. Reining, P. Chiaradia, F. Bechstedt,
and R. Pinchaux, “Do we understand the structure of the gallium-rich surface of
GaAs(001)? Experimental and theoretical approaches,” Surf. Rev. Lett., vol. 9, no. 34, pp. 1497–1510, 2002.
[162] S. Tsukamoto, M. Pristovsek, A. Ohtake, B. G. Orr, G. R. Bell, T. Ohno,
and N. Koguchi, “Ga-rich GaAs(001) surfaces observed by STM during hightemperature annealing in MBE,” J. Cryst. Growth, vol. 251, no. 1-4, pp. 46–50,
2003.
[163] D. J. Chadi, “Atomic structure of GaAs(100)-(2 × 1) and (2 × 4) reconstructed
surfaces,” J. Vac. Sci. Technol. A, vol. 5, no. 4, pp. 834–837, 1987.
[164] J. E. Northrup and S. Froyen, “Energetics of GaAs(100)-(2 × 4) and -(4 × 2) reconstructions,” Phys. Rev. Lett., vol. 71, no. 14, pp. 2276–2279, 1993.
[165] J. E. Northrup and S. Froyen, “Structure of GaAs(001) surfaces: The role of electrostatic interactions,” Phys. Rev. B, vol. 50, no. 3, pp. R2015–R2018, 1994.
[166] P. Laukkanen, M. Kuzmin, R. E. Perälä, M. Ahola, S. Mattila, I. J. Väyrynen, J. Sadowski, J. Konttinen, T. Jouhti, C. S. Peng, M. Saarinen, and M. Pessa, “Electronic
and structural properties of GaAs(100)(2×4) and InAs(100)(2×4) surfaces studied by core-level photoemission and scanning tunneling microscopy,” Phys. Rev. B,
vol. 72, p. 045321, 2005.
[167] D. K. Biegelsen, R. D. Bringans, J. E. Northrup, and L. E. Swartz, “Surface reconstructions of GaAs(100) observed by scanning tunneling microscopy,” Phys. Rev. B,
vol. 41, no. 9, pp. 5701–5706, 1990.
[168] Q.-K. Xue, T. Hashizume, and T. Sakurai, “Scanning tunneling microscopy of III-V
compound semiconductor (001) surfaces,” Prog. Surf. Sci., vol. 56, no. 1-2, pp. 1–
131, 1997.
BIBLIOGRAPHY
438
[169] G.-X. Qian, R. M. Martin, and D. J. Chadi, “First-principles study of the atomic
reconstructions and energies of Ga- and As-stabilized GaAs(100) surfaces,” Phys.
Rev. B, vol. 38, no. 11, pp. 7649–7663, 1988.
[170] K. Reuter and M. Scheffler, “Composition, structure, and stability of RuO 2 (110) as
a function of oxygen pressure,” Phys. Rev. B, vol. 65, p. 035406, 2001.
[171] W. A. Harrison, “Theory of polar semiconductor surfaces,” J. Vac. Sci. Technol.,
vol. 16, no. 5, pp. 1492–1496, 1979.
[172] J. P. Harbison and H. H. Farrell, “Molecular-beam epitaxial growth mechanisms on
the GaAs(001) surface,” J. Vac. Sci. Technol. B, vol. 6, no. 2, pp. 733–735, 1988.
[173] M. D. Pashley, “Electron counting model and its applications to island structures on
molecular-beam epitaxy grown GaAs(001) and ZeSe(001),” Phys. Rev. B, vol. 40,
no. 15, pp. 10481–10487, 1989.
[174] A. Ohtake and N. Koguchi, “Two types of structures for the GaAs(001)-c(4 × 4)
surface,” Appl. Phys. Lett., vol. 83, no. 25, pp. 5193–5195, 2003.
[175] A. Ohtake, M. Ozeki, T. Yasuda, and T. Hanada, “Atomic structure of the
GaAs(001)-(2 × 4) surface under As flux,” Phys. Rev. B, vol. 65, p. 165315, 2002.
[176] D. A. Murdick, X. W. Zhou, H. N. G. Wadley, R. Drautz, and D. G. Pettifor, “Molecular dynamics simulation of GaAs molecular beam epitaxy,” vol. 859E, pp. JJ9.7.1–
JJ9.7.6, Mater. Res. Soc. Symp. Proc., 2005.
[177] J. Kioseoglou, H. M. Polatoglou, L. Lymperakis, G. Nouet, and P. Komninou, “A
modified empirical potential for energetic calculations of planar defects in GaN,”
Comp. Mater. Sci., vol. 27, pp. 43–49, 2003.
[178] K. Ding and H. C. Andersen, “Molecular-dynamics simulation of amorphous germanium,” Phys. Rev. B, vol. 34, no. 10, pp. 6987–6990, 1986.
[179] C. Roland and G. H. Gilmer, “Epitaxy on surfaces vicinal to Si(001). I. Diffusion of
silicon adatoms over the terraces,” Phys. Rev. B, vol. 46, no. 20, pp. 13428–13436,
1992.
[180] C. Roland and G. H. Gilmer, “Epitaxy on surfaces vicinal to Si(001). II. Growth
properties of Si(001) steps,” Phys. Rev. B, vol. 46, no. 20, pp. 13437–13451, 1992.
[181] G. H. Gilmer and C. Roland, “Simulations of crystal growth: Effects of atomic beam
energy,” Appl. Phys. Lett., vol. 65, no. 7, pp. 824–826, 1994.
[182] M. H. Liang, X. Xie, and S. Li, “Computer simulation of epitaxial growth of silicon
on Si (001) surface,” Int. J. Mod. Phys. B, vol. 16, no. 1-2, pp. 227–232, 2002.
BIBLIOGRAPHY
439
[183] H. Hensel, P. Klein, H. M. Urbassek, and T. Frauenheim, “Comparison of classical
and tight-binding molecular dynamics for silicon growth,” Phys. Rev. B, vol. 53,
no. 24, pp. 16497–16503, 1996.
[184] G. C. Abell, “Empirical chemical pseudopotential theory of molecular and metallic
bonding,” Phys. Rev. B, vol. 31, no. 10, pp. 6184–6196, 1985.
[185] L. F. Mattheiss, D. R. Hamann, and W. Weber, “Structural calculations for bulk As,”
Phys. Rev. B, vol. 34, no. 4, pp. 2190–2198, 1986.
[186] X. Gonze, J.-P. Michenaud, and J.-P. Vigneron, “First-principles study of As, Sb,
and Bi electronic properties,” Phys. Rev. B, vol. 41, no. 17, pp. 11827–11836, 1990.
[187] R. B. Phillips, Crystals, defects and microstructures: Modeling across scales,
pp. 476–484. New York: Cambridge University Press, 2001.
[188] W. H. Press, Numerical recipes in Fortran 77: the art of scientific computing, vol. 1.
New York: Cambridge University Press, 2nd ed., 1996.
[189] D. A. Murdick, X. W. Zhou, H. N. G. Wadley, and D. Nguyen-Manh, “Modeling
GaAs surfaces with interatomic potentials and electron counting,” J. Phys.: Condens. Matter, vol. 17, pp. 6123–6137, 2005.
[190] X. W. Zhou, H. N. G. Wadley, R. A. Johnson, D. J. Larson, N. Tabat, A. Cerezo,
A. K. Petford-Long, G. D. W. Smith, P. H. Clifton, R. L. Martens, and T. F. Kelly,
“Atomic scale structure of sputtered metal multilayers,” Acta. Mater., vol. 49, no. 19,
pp. 4005–4015, 2001.
[191] R. M. Tromp, R. J. Hamers, and J. E. Demuth, “Si(001) dimer structure observed
with scanning tunneling microscopy,” Phys. Rev. Lett., vol. 55, no. 12, pp. 1303–
1306, 1985.
[192] R. J. Hamers, R. M. Tromp, and J. E. Demuth, “Scanning tunneling microscopy of
Si(001),” Phys. Rev. B, vol. 34, no. 8, pp. 5343–5357, 1986.
[193] H. H. Farrell and C. J. Palmstrøn, “Reflection high energy electron diffraction characteristic absences in GaAs(100) (2 × 4)-As: A tool for determining the surface
stoichiometry,” J. Vac. Sci. Technol. B, vol. 8, no. 4, pp. 903–907, 1990.
[194] H. Yamaguchi and Y. Horikoshi, “Surface structure transitions on InAs and GaAs
(001) surfaces,” Phys. Rev. B, vol. 51, no. 15, pp. 9836–9854, 1995.
[195] D. J. Frankel, C. Yu, J. P. Harbison, and H. H. Farrell, “High-resolution electronenergy-loss spectroscopy studies of GaAs(001) surfaces,” J. Vac. Sci. Technol. B,
vol. 5, no. 4, pp. 1113–1118, 1987.
BIBLIOGRAPHY
440
[196] M. Sauvage-Simkin, R. Pinchaux, J. Massies, P. Calverie, N. Jedrecy, J. Bonnet,
and I. K. Robinson, “Fractional stoichiometry of the GaAs(001) c(4×4) surface: An
in-situ x-ray scattering study,” Phys. Rev. Lett., vol. 62, no. 5, pp. 563–566, 1989.
[197] M. Takahasi, Y. Yoneda, N. Yamamoto, and J. Mizuki, “Domain boundaries in the
GaAs(001)-(2 × 4) surface,” Phys. Rev. B, vol. 68, p. 085321, 2003.
[198] K. Reuter and M. Scheffler, “Composition, structure, and stability of RuO 2 (110) as
a function of oxygen pressure,” Phys. Rev. B, vol. 65, p. 035406, 2002.
[199] T. Ohno, “Theoretical study of atomic structures and dynamics on semiconductor
surfaces,” Thin Solid Films, vol. 272, no. 2, pp. 331–344, 1996.
[200] C. Sgiarovello, N. Binggeli, and A. Baldereschi, “Surface morphology and ionization potentials of polar semiconductors: The case of GaAs,” Phys. Rev. B, vol. 69,
p. 035320, 2004.
[201] J. E. Northrup and S. Froyen, “Structure and thermodynamic stability of GaAs(001)
surfaces,” Mater. Sci. Eng. B-Solid, vol. 30, no. 2-3, pp. 81–86, 1995.
[202] W. G. Schmidt and F. Bechstedt, “Geometry and electronic structure of GaAs(001)(2
x 4) reconstructions,” Phys. Rev. B, vol. 54, no. 23, pp. 16742–16748, 1996.
[203] W. A. Harrison, Electronic structure and the properties of solids: the physics of the
chemical bond. New York: Dover, 1989.
[204] O. K. Andersen, C. Arcangeli, R. W. Tank, T. Dasgupta, G. Krier, O. Jepsen, and
I. Dasgupta, “Third-generation TB-LMTO,” in Tight-Binding Approach to Computational Materials Science (P. E. A. Turchi, A. Gonis, and L. Colombo, eds.), vol. 491,
pp. 3–34, MRS Symposium Proceedings, 1998.
[205] D. Nguyen-Manh, T. Saha-Dasgupta, and O. K. Andersen, “Tight-binding model
for carbon from third-generation LMTO method: A study of transferability,” Bull.
Mater. Sci., vol. 26, no. 1, pp. 27–33, 2003.
[206] W. A. Harrison, Electronic structure and the properties of solids: the physics of the
chemical bond. San Francisco: Freeman, 1980.
[207] J. H. Shen, P. Jiang, and X. D. Xie, “The difference between the surface reconstructions of AlAs(001) and GaAs(001),” Surf. Rev. Lett., vol. 6, no. 6, pp. 1167–1171,
1999.
[208] D. A. Murdick, X. W. Zhou, H. N. G. Wadley, D. Nguyen-Manh, R. Drautz, and
D. G. Pettifor, “An analytic bond-order potential for gallium arsenide,” Phys. Rev. B,
vol. 73, 2006. In press.
BIBLIOGRAPHY
441
[209] D. G. Pettifor, “New many-body potential for the bond order,” Phys. Rev. Lett.,
vol. 63, no. 22, pp. 2480–2483, 1989.
[210] D. G. Pettifor, M. W. Finnis, D. Nguyen-Manh, D. A. Murdick, X. W. Zhou, and
H. N. G. Wadley, “Analytic bond-order potentials for multi-component systems,”
Mater. Sci. Eng. A-Struct., vol. 365, no. 1-2, pp. 2–13, 2004.
[211] D. G. Pettifor, Bonding and structure of molecules and solids. Oxford science publications, Oxford: Oxford University Press, 1995.
[212] D. G. Pettifor, From Exact to Approximate Theory: The Tight Binding Bond Model
and Many-Body Potentials, vol. 48 of Springer Proc. Phys., pp. 64–84. Heidelberg:
Springer-Verlag Berlin, 1990.
[213] C. Lanczos, “An iteration method for the solution of the eigenvalue problem of linear
differential and integral operators,” J. Res. Natl. Bur. Stand., vol. 45, pp. 225–282,
1950.
[214] R. Haydock, Solid State Physics: Advances in Research and Applications, vol. 35,
p. 216. New York: Academic Press, 1980.
[215] R. Jones and M. W. Lewis, “Electronic charge densities and the recursion method,”
Philos. Mag. B, vol. 49, no. 1, pp. 95–100, 1984.
[216] J. Inoue and Y. Ohta, “Orbital symmetrisation of the recursion method,” J. Phys. C,
vol. 20, no. 13, pp. 1947–1964, 1987.
[217] F. Cyrot-Lackmann, “On the electronic structure of liquid transitional metals,” Adv.
Phys., vol. 16, pp. 393–400, 1967.
[218] M. Parrinello and A. Rahman, “Strain fluctuations and elastic constants,” J. Chem.
Phys., vol. 76, no. 5, pp. 2662–2666, 1982.
[219] J. R. Ray and A. Rahman, “Stastical ensembles and molecular dynamics studies of
anisotropic solids,” J. Chem. Phys., vol. 80, no. 9, pp. 4423–4428, 1984.
[220] S. Wolfram, The Mathematica Book. Champaign, Illinois: Wolfram Research, Inc.,
5 ed., 2004.
[221] S. L. Bennett, J. L. Margrave, J. L. Franklin, and J. E. Hudson, “High temperature negative ions: Electron impact of As 4 vapor,” J. Chem. Phys., vol. 59, no. 11,
pp. 5814–5819, 1973.
[222] L.-S. Wang, Y. T. Lee, D. A. Shirley, K. Balasubramanian, and P. Feng, “Photoelectron spectroscopy and electronic structure of clusters of the group V elements. I.
Dimers,” J. Chem. Phys., vol. 93, no. 9, pp. 6310–6317, 1990.
BIBLIOGRAPHY
442
[223] G. W. Lemire, G. A. Bishea, S. A. Heidecke, and M. D. Morse, “Spectroscopy and
electronic structure of jet-cooled GaAs,” J. Chem. Phys., vol. 92, no. 1, pp. 121–132,
1990.
[224] D. Nguyen-Manh, D. G. Pettifor, S. Znam, and V. Vitek, “Negative Cauchy pressure
within the tight-binding approximation,” in Tight-Binding Approach to Computational Materials Science (P. E. A. Turchi, A. Gonis, and L. Colombo, eds.), vol. 491,
pp. 353–358, MRS Symposium Proceedings, 1998.
[225] S. Znam, D. Nguyen-Manh, D. G. Pettifor, and V. Vitek, “Atomistic modelling of
TiAl I. Bond-order potentials with environmental dependence,” Phil. Mag., vol. 83,
no. 4, pp. 415–438, 2003.
[226] J. Crain, S. J. Clark, G. J. Ackland, P. D. Hatton, B. J. Reid, M. C. Payne, and
V. Milman, “Theoretical study of high-density phases of covalent semiconductors. I.
ab initio treatment,” Phys. Rev. B, vol. 49, no. 8, pp. 5329–5340, 1994.
[227] W. L. Roberts, T. J. Campbell, and G. R. Rapp, Encyclopedia of minerals. New
York: Van Nostrand Reinhold, 2nd ed., 1990.
[228] M. Ishimaru, K. Yoshida, and T. Motooka, “Application of empirical interatomic
potentials to liquid si,” Phys. Rev. B, vol. 53, no. 11, pp. 7176–7181, 1996.
[229] D. C. Look, “Point defects in LT GaAs,” in Properties of Gallium Arsenide (M. R.
Brozel and G. E. Stillman, eds.), vol. 16, pp. 684–688, London: INSPEC, 3rd ed.,
1996.
[230] D. J. Chadi, “Self-interstitial bonding configurations in GaAs and Si,” Phys. Rev. B,
vol. 46, no. 15, pp. 9400–9407, 1992.
[231] M. A. Salmi, M. Alatalo, T. Ala-Nissila, and R. M. Nieminen, “Energetics and diffusion paths of gallium and arsenic adatoms on flat and stepped GaAs(001) surfaces,”
Surf. Sci., vol. 425, no. 1, pp. 31–47, 1999.
[232] X. W. Zhou, D. A. Murdick, and H. N. G. Wadley, “Electron counting interatomic
potentials for covalent semiconductor systems.” submitted to J. Appl. Phys.
[233] D. A. Murdick, X. W. Zhou, and H. N. G. Wadley, “Condensation mechanisms of an
arsenic-rich vapor on GaAs (001) surfaces.” submitted to Phys. Rev. B.
[234] S. Y. Karpov and M. A. Maiorov, “Analysis of V-group molecules sticking to III-V
compound surfaces,” Surf. Sci., vol. 344, no. 1-2, pp. 11–22, 1995.
[235] A. Suda and N. Otsuka, “Surface atomic process of incorporation of excess arsenic
in molecular-beam epitaxy of GaAs,” Surf. Sci., vol. 458, pp. 162–172, 2000.
BIBLIOGRAPHY
443
[236] A. Madhukar, “Far from equilibrium vapour phase growth of lattice matched III-V
compound semiconductor interfaces: Some basic concepts and Monte-Carlo computer simulations,” Surf. Sci., vol. 132, no. 1-3, pp. 344–374, 1983.
[237] A. Madhukar and S. V. Ghaisas, “The nature of molecular beam epitaxial growth
examined via computer simulations,” CRC Crit. Rev. Solid State Mater. Sci., vol. 14,
no. 1, pp. 1–130, 1988.
[238] E. S. Tok, J. H. Neave, F. E. Allegretti, J. Zhang, T. S. Jones, and B. A. Joyce,
“Incorporation kinetics of As2 and As4 on GaAs(110),” Surf. Sci., vol. 371, no. 2-3,
pp. 277–288, 1997.
[239] E. S. Tok, T. S. Jones, J. H. Neave, J. Zhang, and B. A. Joyce, “Is the arsenic incorporation kinetics important when growing GaAs(001), (110), and (111)A films?,”
Appl. Phys. Lett., vol. 71, no. 22, pp. 3278–3280, 1997.
[240] J. H. Neave, P. J. Dobson, B. A. Joyce, and J. Zhang, “Reflection high-energy electron diffraction oscillations from vicinal surfaces—a new approach to surface diffusion measurements,” Appl. Phys. Lett., vol. 47, no. 2, pp. 100–102, 1985.
[241] J. R. Taylor, An introduction to error analysis, pp. 245–255. Sausalito, California:
University Science Books, 2nd ed., 1997.
[242] G. Grosso and G. Pastori Parravicini, Solid state physics. San Diego: Academic
Press, 2000.
[243] Center for Computational Materials Science of the United States Naval Research
Laboratory, “Crystal lattice structures.” Internet World Wide Web. Available from:
http://cst-www.nrl.navy.mil/lattice/ [cited 15 June 2005].
[244] T. Hahn, ed., Space-group Symmetry, vol. A of International tables for crystallography. Dordrecht; Boston: International Union of Crystallography, Kluwer Academic
Publishers, 4th ed., 1995.
[245] W. Borchardt-Ott, Crystallography. Berlin; New York: Springer-Verlag, 2nd ed.,
1995.
[246] R. J. Nelmes, M. I. McMahon, N. G. Wright, and D. R. Allan, “Crystal structure of
ZnTe III at 16 GPa,” Phys. Rev. Lett., vol. 73, no. 13, pp. 1805–1808, 1994.
[247] S. Wolfram, The Mathematica Book, p. 106ff. Champaign, Illinois: Wolfram Research, Inc., 5th ed., 2004.
[248] B. M. Axilrod and E. Teller, “Interactions of the van der Waals type between three
atoms,” J. Chem. Phys., vol. 11, no. 6, pp. 299–300, 1943.
BIBLIOGRAPHY
444
[249] T. Ito, K. E. Khor, and S. Das Sarma, “Empirical potential-based Si-Ge interatomic
potential and its application to superlattice stability,” Phys. Rev. B, vol. 40, no. 14,
pp. 9715–9722, 1989.
[250] D. C. Wallace, Thermodynamics of crystals. New York: John Wiley and Sons, Inc.,
1972.
[251] T. Ito, “Recent progress in computer-aided materials design for compound semiconductors,” J. Appl. Phys., vol. 77, no. 10, pp. 4845–4886, 1995.
[252] K. Nordlund, J. Nord, J. Frantz, and J. Keinonen, “Strain-induced Kirkendall mixing
at semiconductor interfaces,” Comp. Mater. Sci., vol. 18, no. 3-4, pp. 283–294, 2000.
[253] K. Nordlund and A. Kuronen, “Non-equilibrium properties of GaAs interatomic potentials,” Nucl. Instrum. Methods B, vol. 159, no. 3, pp. 183–186, 1999.
[254] A. Kuronen, J. Tarus, and K. Nordlund, “Defect creation by low-energy ion bombardment on GaAs(001) and Ge(001) surfaces,” Nucl. Instrum. Methods B, vol. 153,
pp. 209–212, 1999.
[255] N. E. Cusack, The physics of structurally disordered matter: an introduction, ch. 1-2,
pp. 5, 19, 40. Philadelphia: Adam Hilger, 1987.
[256] D. G. Pettifor, Bonding and structure of molecules and solids, pp. 77–81. Oxford:
Oxford University Press, 1995.
[257] W. H. Press, Numerical recipes in Fortran 77: the art of scientific computing, vol. 1,
pp. 402–406. New York: Cambridge University Press, 2nd ed., 1996.
[258] M. I. McMahon, R. J. Nelmes, D. R. Allan, S. A. Belmonte, and T. Bovornratanaraks, “Observation of a simple-cubic phase of GaAs with a 16-atom basis (sc16),”
Phys. Rev. Lett., vol. 80, no. 25, pp. 5564–5567, 1998.
[259] A. Kelly and G. W. Groves, Crystallography and Crystal Defects. London: Longman, 1973.
[260] J. F. Nye, Physical properties of crystals: their representation by tensors and matrices. Oxford science publications, Oxford, England: Oxford University Press, 1985.