Commit 968f4460 authored by Sievers's avatar Sievers
Browse files

Updated doc page with delta info and simplified example

parent 0723bf3d
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -49,6 +49,24 @@ by two times *Delta*.

.. note::

It is important to choose a suitable value for delta, the magnitude of
atom displacements that are used to generate finite difference
approximations to the exact forces.  For typical systems, a value in
the range 1e-xxx to 1e-yyy will probably work well.  However, the
best value will depend on a multitude of factors including the LAMMPS
unit style, the stiffness of the interatomic potential,the
thermodynamic state of the material being probed, and so on. The only
way to be sure that you have made a good choice is to do a
sensitivity study on a representative atomic configuration, sweeping 
over a wide range of values of delta.  If delta is too small, the
output forces will vary erratically due to truncation effects. If
delta is increased beyond a certain point, the output forces will
start to vary smoothly with delta, due to growing contributions from
higher order derivatives. In between these two limits, the numerical
force values should be largely independent of delta.

.. note::

The cost of each energy evaluation is essentially the cost of an MD
timestep.  This invoking this fix once has a cost of 2N timesteps,
where N is the total number of atoms in the system (assuming all atoms

examples/numdiff/argon.lmp

deleted100644 → 0
+0 −886

File deleted.

Preview size limit exceeded, changes collapsed.

examples/numdiff/ff-argon.lmp

deleted100644 → 0
+0 −20
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 Ar equal 1

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

mass ${Ar}      39.903

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

pair_style      lj/cubic
pair_coeff      * * 0.0102701 3.42
+9 −5
Original line number Diff line number Diff line
# Numerical difference calculation of error in forces

units   	metal
atom_style      full
atom_style      atomic

boundary 	p p p
read_data argon.lmp

include ff-argon.lmp
lattice fcc 5.358000
region box block 0 6 0 6 0 6
create_box 1 box
create_atoms 1box
mass 1 39.903

velocity all create 10 2357 mom yes dist gaussian

pair_style lj/cubic
pair_coeff * * 0.0102701 3.42

neighbor 1 bin

timestep 0.001