# Bond Energy and Distance for Carbon Diamond

Hello,

I am still trying to get LAMMPS to run a basic calculation of the bond energy and distance for carbon using the tersoff potential. I tried using pair/local, but it states that the tersoff potential can’t do pair/local. I am doing this to help myself learn how to use LAMMPS, but I am in need of some help.

The code is:

units metal

dimension 3

boundary p p p

atom_style full

# Create the atoms

lattice diamond 3.567 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1

region box block 0 1 0 1 0 1 units lattice

create_box 1 box

create_atoms 1 box

mass 1 12.0107

bond_style morse

# Define the potential

pair_style tersoff

pair_coeff * * SiC.tersoff C

neighbor 0.1 bin

neigh_modify delay 10 check yes

# Define Computations

compute bonleng all pair/local dist

compute bleng all reduce ave c_bonleng

compute boneng all pair/local engpot

compute beng all reduce ave c_boneng

compute cordnum all coord/atom cutoff 2.1

compute coord all reduce ave c_cordnum

# Minimize energy

reset_timestep 0

thermo 10

thermo_style custom step c_bleng c_beng c_coord

min_style cg

minimize 1e-25 1e-25 1 1

# Define Variables

variable bondeng equal “c_beng”

variable bondleng equal “c_bleng”

variable coordNum equal “c_coord”

# Print values

print “Pairwise Distance (Angstroms) = \${bondleng};”

print “Pair Energy (eV) = \${bondeng};”

print “Coordination Number = \${coordNum};”

print “This ran!”

Thank you!

Philip Chrostoski

PhD Candidate

Department of Physics and Astronomy

Center for Nanoscience

University of Missouri - St. Louis

Hello,

I am still trying to get LAMMPS to run a basic calculation of the bond energy and distance for carbon using the tersoff potential. I tried using pair/local, but it states that the tersoff potential can’t do pair/local. I am doing this to help myself learn how to use LAMMPS, but I am in need of some help.

as steve already pointed out, there is no such thing as a “bond energy” in a tersoff potential, with tersoff being a manybody potential having pairwise energy terms and energy terms depending on the position of 3 atoms.

of course, for a homogeneous compound you can assume equal distribution of energy and thus simply divide the total energy by the number of (unique!) bonds per unit cell, if you want a (arbitrary) decomposition into pairwise nearest neighbor terms.

axel.