Dear Users/Developers
I am a newbie in LAMMPS, and I am stuck at one point. I searched the
documentation and the mailing list to no avail.
I would like to read a geometry from a file, and use the Tersoff
potential to do my calculations
When I use the prescribed "create_atom" route (i.e. in Tutorial 1,2),
an energy is calculated
however, when I try to input the system I actually want to calculate
using read_data, the calculated energy is 0, it is as if no atom is
interacting with each other.
The data file works with a Dreiding potential
I tried "full", "molecule", "atom" style formatted data files. Nothing
changes. Energy is still zero
Is there something special I need to do using a bond order potential
with read_data?
Please find the tests I've performed attached.
Best,
Baris
-Test 1- Fails, Energy is always 0
Input:
# ---------- Initialize Simulation ---------------------
clear
units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map array
# ---------- Create Atoms ---------------------
read_data rod001-7mrh8_5-relaxed-100nm-tersoff.lammps05
# ---------- Define Interatomic Potential ---------------------
pair_style tersoff
pair_coeff * * SiH-obm.tersoff Si H
mass 1 23.74
neighbor 2.0 bin
neigh_modify delay 10 check yes
# ---------- Define Settings ---------------------
compute eng all pe/atom
compute eatoms all reduce sum c_eng
# ---------- Run Minimization ---------------------
reset_timestep 0
fix 1 all box/relax iso 0.0 vmax 0.001
thermo 10
thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms
min_style cg
minimize 1e-25 1e-25 5000 10000
variable natoms equal "count(all)"
variable teng equal "c_eatoms"
variable length equal "lx"
variable ecoh equal "v_teng/v_natoms"
print "Total energy (eV) = \{teng\};"
print "Number of atoms = {natoms};"
print "Lattice constant (Angstoms) = \{length\};"
print "Cohesive energy \(eV\) = {ecoh};"
print "All done!"
Output:
...
Total energy (eV) = 0;
Number of atoms = 8280;
Lattice constant (Angstoms) = 50;
Cohesive energy (eV) = 0;
All done!
-----Test 2 -- Unphysical system to see if create atoms route works,
at least it calculates energy
# ---------- Initialize Simulation ---------------------
clear
units metal
dimension 3
boundary p p p
atom_style atomic
atom_modify map array
# ---------- Create Atoms ---------------------
lattice fcc 4
region box block 0 1 0 1 0 1 units lattice
create_box 1 box
lattice fcc 4 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1
create_atoms 1 box
replicate 1 1 1
# ---------- Define Interatomic Potential ---------------------
pair_style tersoff
pair_coeff * * SiH-obm.tersoff Si
mass 1 23.74
neighbor 2.0 bin
neigh_modify delay 10 check yes
# ---------- Define Settings ---------------------
compute eng all pe/atom
compute eatoms all reduce sum c_eng
# ---------- Run Minimization ---------------------
reset_timestep 0
fix 1 all box/relax iso 0.0 vmax 0.001
thermo 10
thermo_style custom step pe lx ly lz press pxx pyy pzz c_eatoms
min_style cg
minimize 1e-25 1e-25 5000 10000
variable natoms equal "count(all)"
variable teng equal "c_eatoms"
variable length equal "lx"
variable ecoh equal "v_teng/v_natoms"
print "Total energy (eV) = \{teng\};"
print "Number of atoms = {natoms};"
print "Lattice constant (Angstoms) = \{length\};"
print "Cohesive energy \(eV\) = {ecoh};"
print "All done!"
-Output-----
Total energy (eV) = -15.467621918130557646;
Number of atoms = 4;
Lattice constant (Angstoms) = 3.8975156250000040359;
Cohesive energy (eV) = -3.8669054795326394114;
All done!