Commit adebe903 authored by charlie sievers's avatar charlie sievers
Browse files

Optimized Dynamical Matrix

parent 682b456a
Loading
Loading
Loading
Loading
+48 −0
Original line number Diff line number Diff line
# dynamical_matrix command

## Syntax

```
dynamical_matrix group-ID style args keyword value ...
```

* group-ID = ID of group of atoms to displace
* style = *regular* or *eskm*
```
*regular* args = gamma
  gamma = finite difference displacement length
*eskm* args = gamma
  gamma = finite difference displacement length
```
* zero or more keyword/value pairs may be appended
* keyword = *file* or *binary*
```
*file* value = output_file
  output_file = name of file to dump the dynamical matrix into
*binary* values = *yes* or *no* or *gzip*
```

## Examples

```
dynamical_matrix 1 regular 0.000001
dynamical_matrix 1 eskm 0.000001
dynamical_matrix 3 regular 0.00004 file dynmat.dat
dynamical_matrix 5 eskm 0.00000001 file dynamical.dat binary yes
```

## Description

Calculate the dynamical matrix of the selected group.

## Restrictions

None

## Related commands

None

## Default

The option defaults are file = "dynmat.dyn", binary = no  
+21 −0
Original line number Diff line number Diff line
# LAMMPS LATTICE DYNAMICS COMMANDS

## DYNAMICAL MATRIX CALCULATOR

This directory contains the ingredients to calculate a dynamical matrix.  

Example:
```
NP=4 #number of processors
mpirun -np $NP lmp_mpi < in.silicon > out.silicon
```

To test out a different silicon example:
```
LMP_FILE=amorphous_silicon.lmp
cp lmp_bank/$LMP_FILE ./silicon_input_file.lmp
NP=4 #number of processors
mpirun -np $NP lmp_mpi < in.silicon > out.silicon
```

## Requires: MANYBODY and MOLECULE packages
+66 −0
Original line number Diff line number Diff line
# Tersoff parameters for various elements and mixtures
# multiple entries can be added to this file, LAMMPS reads the ones it needs
# these entries are in LAMMPS "metal" units:
#   A,B = eV; lambda1,lambda2,lambda3 = 1/Angstroms; R,D = Angstroms
#   other quantities are unitless

# Aidan Thompson (athomps at sandia.gov) takes full blame for this
# file.  It specifies various potentials published by J. Tersoff for
# silicon, carbon and germanium. Since Tersoff published several
# different silicon potentials, I refer to them using atom types
# Si(B), Si(C) and Si(D). The last two are almost almost identical but
# refer to two different publications. These names should be used in
# the LAMMPS command when the file is invoked. For example:
# pair_coeff * * SiCGe.tersoff Si(B).  The Si(D), C and Ge potentials
# can be used pure silicon, pure carbon, pure germanium, binary SiC,
# and binary SiGe, but not binary GeC or ternary SiGeC. LAMMPS will
# generate an error if this file is used with any combination
# involving C and Ge, since there are no entries for the GeC
# interactions (Tersoff did not publish parameters for this
# cross-interaction.)

# format of a single entry (one or more lines):
#   element 1, element 2, element 3, 
#   m, gamma, lambda3, c, d, costheta0, n, beta, lambda2, B, R, D, lambda1, A

# The original Tersoff potential for Silicon, Si(B)
# J. Tersoff, PRB, 37, 6991 (1988) 

Si(B)  Si(B)   Si(B)  3.0 1.0 1.3258 4.8381 2.0417 0.0000 22.956
             0.33675  1.3258  95.373  3.0  0.2  3.2394  3264.7

# The later Tersoff potential for Silicon, Si(C)
# J. Tersoff, PRB, 38, 9902 (1988) 

Si(C)  Si(C)   Si(C)  3.0 1.0 1.7322 1.0039e5 16.218 -0.59826 0.78734
             1.0999e-6  1.7322  471.18  2.85  0.15  2.4799  1830.8

# The later Tersoff potential for Carbon, Silicon, and Germanium
# J. Tersoff, PRB, 39, 5566 (1989) + errata (PRB 41, 3248)
# The Si and C parameters are very close to those in SiC.tersoff

C      C       C         3.0 1.0 0.0 3.8049e4 4.3484 -0.57058 0.72751 1.5724e-7  2.2119  346.74    1.95    0.15   3.4879  1393.6
Si(D)  Si(D)   Si(D)     3.0 1.0 0.0 1.0039e5 16.217 -0.59825 0.78734 1.1000e-6  1.7322  471.18    2.85    0.15   2.4799  1830.8
Ge     Ge      Ge        3.0 1.0 0.0 1.0643e5 15.652 -0.43884 0.75627 9.0166e-7  1.7047  419.23    2.95    0.15   2.4451  1769.0

C      Si(D)   Si(D)     3.0 1.0 0.0 3.8049e4 4.3484 -0.57058 0.72751 1.5724e-7  1.97205 395.1451  2.3573  0.1527 2.9839  1597.3111
C      Si(D)   C         3.0 1.0 0.0 3.8049e4 4.3484 -0.57058 0.72751 0.0        0.0     0.0       1.95    0.15   0.0     0.0
C      C       Si(D)     3.0 1.0 0.0 3.8049e4 4.3484 -0.57058 0.72751 0.0        0.0     0.0       2.3573  0.1527 0.0     0.0

Si(D)  C       C         3.0 1.0 0.0 1.0039e5 16.217 -0.59825 0.78734 1.1000e-6  1.97205 395.1451  2.3573  0.1527 2.9839  1597.3111
Si(D)  Si(D)   C         3.0 1.0 0.0 1.0039e5 16.217 -0.59825 0.78734 0.0        0.0     0.0       2.3573  0.1527 0.0     0.0
Si(D)  C       Si(D)     3.0 1.0 0.0 1.0039e5 16.217 -0.59825 0.78734 0.0        0.0     0.0       2.85    0.15   0.0     0.0
 
Si(D)  Ge      Ge        3.0 1.0 0.0 1.0039e5 16.217 -0.59825 0.78734 1.1000e-6  1.71845 444.7177  2.8996  0.1500 2.4625  1799.6347
Si(D)  Si(D)   Ge        3.0 1.0 0.0 1.0039e5 16.217 -0.59825 0.78734 0.0        0.0     0.0       2.8996  0.1500 0.0     0.0
Si(D)  Ge      Si(D)     3.0 1.0 0.0 1.0039e5 16.217 -0.59825 0.78734 0.0        0.0     0.0       2.85    0.15   0.0     0.0
 
Ge     Si(D)   Si(D)     3.0 1.0 0.0 1.0643e5 15.652 -0.43884 0.75627 9.0166e-7  1.71845 444.7177  2.8996  0.1500 2.4625  1799.6347
Ge     Si(D)   Ge        3.0 1.0 0.0 1.0643e5 15.652 -0.43884 0.75627 0.0        0.0     0.0       2.95    0.15   0.0     0.0
Ge     Ge      Si(D)     3.0 1.0 0.0 1.0643e5 15.652 -0.43884 0.75627 0.0        0.0     0.0       2.8996  0.1500 0.0     0.0

# Optimized Tersoff for Carbon: Lindsay and Broido PRB 81, 205441 (2010) 
#   element 1, element 2, element 3, 
#   m, gamma, lambda3, c, d, costheta0, n, beta, lambda2, B, R, D, lambda1, A
C(O)    C(O)   C(O)     3.0 1.0 0.0 3.8049e4 4.3484 -0.930 0.72751 1.5724e-7  2.2119  430.0    1.95    0.15   3.4879  1393.6
+19 −0
Original line number Diff line number Diff line
#############################
#Atoms types - mass - charge#
#############################
#@ 1 atom types #!THIS LINE IS NECESSARY DON'T SPEND HOURS FINDING THAT OUT!#

variable Si equal 1

#############
#Atom Masses#
#############

mass ${Si}     28.08550 

###########################
#Pair Potentials - Tersoff#
###########################

pair_style      tersoff
pair_coeff      * *  Si.opt.tersoff Si(D)
+89 −0
Original line number Diff line number Diff line
###############################mm
# Atom style - charge/vdw/bonded#
#################################
atom_style full

##############################################
#Units Metal : eV       - ps - angstrom - bar#
#      Real  : kcal/mol - fs - angstrom - atm#
##############################################
units   	metal

############
#Run number#
############
variable run_no   equal   0             # is it a restart? 
variable res_no   equal   ${run_no}-1   # restart file number 

#######################################
#Random Seeds and Domain Decomposition#
#######################################
variable iseed0 equal 2357  
variable iseed1 equal 26488 
variable iseed2 equal 10669 
processors      * * *

###########
#Data File#
###########
variable inpfile   string   silicon_input_file.lmp
variable resfile   string   final_restart.${res_no}
variable ff_file   string   ff-silicon.lmp

##########
#Run Type#
##########
variable minimise equal    0   #Energy Minimization

###############################
#Molecular Dynamics Parameters#
###############################
neighbor 1 bin

################################
#Energy Minimization Parameters#
################################
variable mtraj    equal        1       # trajectory output frequency - all system
variable etol     equal     1e-5       # % change in energy
variable ftol     equal     1e-5       # max force threshold (force units)
variable maxiter  equal    10000       # max # of iterations

########################
#3D Periodic Simulation#
########################
boundary 	p p p

#############################
#Reading the input structure#
#############################
if "${run_no} == 0" then "read_data ${inpfile}" else "read_restart ${resfile}"

#############
#Force Field#
#############
include ${ff_file}

######################
#Thermodynamic Output#
######################
variable str_basic string 'step time pe temp press'

#####################
#Energy Minimization#
#####################
if "${minimise} <= 0 || ${run_no} > 0" then "jump SELF end_minimise"
  print "Doing CG minimisation"
  dump mdcd all dcd ${mtraj} min.dcd
  dump_modify mdcd unwrap yes
  min_style cg
  min_modify line quadratic
  minimize ${etol} ${ftol} ${maxiter} ${maxiter}
  reset_timestep 0
  undump mdcd
label end_minimise

##################
#Dynamical Matrix#
##################
dynamical_matrix all eskm 0.000001 file dynmat.dat binary no
Loading