# [lammps-users] total energy negative

Hello Steve

I am trying to find surface energy of triclinic cell of Al using the energy minimization techniques.
My input file goes as

# Atom definition

variable lat equal 4.05
variable skin equal 0.3
variable cutoff equal {lat}/sqrt(2.0)+{skin}
variable T_initial equal 2
variable T_final equal 2
variable steps equal 50000
units metal
boundary p p s
atom_style atomic
lattice fcc 4.05
region box prism 0 10 0 10 0 10 0 0 0
create_box 1 box
create_atoms 1 box
pair_style eam
pair_coeff * * Al_jnp.eam
neighbor \${skin} bin
neigh_modify delay 5
region lower block INF INF INF INF INF 0.25
region upper block INF INF INF INF 5.75 INF
group lower region lower
group upper region upper
group boundary union lower upper
group mobile subtract all boundary

######### Thermo output (Loop Start) ############

fix 1 lower setforce 0.0 0.0 0.0
thermo 10
thermo_style custom step cpu etotal ke lx ly lz pxx pyy pzz pxy pyz pxz temp press #c_vir_ken
thermo_modify line one format float %11.7g
variable loop1 equal 5
variable n_strain loop {loop1} variable lambda equal 1+0.001*{n_strain}
displace_box all x scale {lambda} y scale {lambda} xy final 1.005
print “”
print “"
print “with strain: n_strain = {n_strain}, lambda = {lambda}”
print "

print “”
minimize 1.0e-9 1.0e-8 1000 10000
next n_strain
jump in.Surf22

############# LOOP END ##################

The strain is applied in (11), (22) and (12) direction wile keeping the prism non periodic in Z. I want to plot Total energy as a function of thickness. It should be a linear curve and the intercept will give me a value for surface energy. My problem is when I run the minimization I get a negative value of Surface energy, while I expect the value to be positive.

Can you look at the input script and point out any potential errors (if any).

Regards

I don't see any obvious problem. If you want to
figure out why one surf eng is negative, I wouldn't
run it in a loop. I would run a single minimization
of that geometry and try it with different minimizers
and options and see if you get the (nearly) same
answer. There is no intrinsic region the energy
can't be negative.

Steve