# dimer energy vs bond length?

Hi,

Is there a simple way to do an molecular statics calculation for a dimer in LAMMPS? I’d like to just calculate potential energy as a function of bond length. Seems like displace_atoms + run 0 would work, but the output would be rather cumbersome. Any other thoughts? We doing some potential fitting and would like to reproduce an ab initio E vs. r curve (among other things).

Thanks.
Dave

Hi,

Is there a simple way to do an molecular statics calculation for a dimer in
LAMMPS? I'd like to just calculate potential energy as a function of bond
length. Seems like displace_atoms + run 0 would work, but the output would
be rather cumbersome. Any other thoughts? We doing some potential fitting
and would like to reproduce an ab initio E vs. r curve (among other things).

sounds to me a lot like a job for the python wrapper.

axel.

I reckon some sort scripting would work. We’re interfacing all the fitting routines through Mathematica anyway. I guess we’ll just have it vary the coordinate of interest, write a coord file, call lammps to get the energy, then read the data back in and a bunch of times.

Dave

Hi Dave,

This is really easy. Try this out:

echo both
units real
atom_style charge
boundary p p p
pair_style reax
pair_coeff * * ffield.reax 1 1

timestep 1.0
neighbor 2.0 bin
thermo 1
thermo_style custom step temp press pxx pyy pzz vol etotal
thermo_modify lost warn

units real
timestep 1.0
thermo_style custom step etotal
dump 1 all atom 1 dimer.lammpstrj

group go type 2
group stay type 1

fix A go move linear 0.0 0.0 -0.01 units box
fix B stay nve
fix C stay setforce 0.0 0.0 0.0
run 400

In principle this will work for any potential. What you are doing is
fixing 1 atom of the dimer and moving the 2nd atom at a constant velocity
by the fix move. The NVE does the time integration and it outputs energy
for a given separation based on your velocity. In this example, energy is
outputted every 0.01 angstrom. So in principle you can use this to sample
an energy profile of a dimer (or any other system you want).

Best,
John