lammps energy minimization with external force

Dear All,

I am using fix_external to add an additional force to the standard mechanical force of the nanowire system. I used lammps library, and a driver code to call my force.cpp code. During the energy minimization, things get wired. The results does not converge, no local minimum could be found. And the total force become extremely large. I copied one line from the dump at 100 steps:

Total Force:

ITEM: ATOMS x y z fx fy fz
-17.7367 -9.53506 -9.94941 4.56247e+33 5.09221e+32 1.93939e+33

However, when I use the same coordination of the atoms, and compute the Mechanical force and my external force separately, they are actually not that large.

Mechanical Force:

ITEM: ATOMS x y z fx fy fz
-17.7367 -9.53506 -9.94941 -5.43189 -1.52532 -1.60951

External Force:

ITEM: ATOMS x y z fx fy fz
-17.7367 -9.53506 -9.94941 4.44857e-05 0.000386507 0.000307891

I also used the code to return the total force, which is correct.

ITEM: ATOMS x y z fx fy fz
-17.7367 -9.53506 -9.94941 -5.43182 -1.52486 -1.60913

I am wondering whether the forces become so strange during energy minimization after a few steps. Appreciate your suggestions in dealing with this! Thanks a lot.

Xue

Dear All,

I am using fix_external to add an additional force to the standard
mechanical force of the nanowire system. I used lammps library, and a driver
code to call my force.cpp code. During the energy minimization, things get
wired. The results does not converge, no local minimum could be found. And
the total force become extremely large. I copied one line from the dump at
100 steps:

Total Force:
ITEM: ATOMS x y z fx fy fz
-17.7367 -9.53506 -9.94941 4.56247e+33 5.09221e+32 1.93939e+33

However, when I use the same coordination of the atoms, and compute the
Mechanical force and my external force separately, they are actually not
that large.

Mechanical Force:
ITEM: ATOMS x y z fx fy fz
-17.7367 -9.53506 -9.94941 -5.43189 -1.52532 -1.60951

External Force:
ITEM: ATOMS x y z fx fy fz
-17.7367 -9.53506 -9.94941 4.44857e-05 0.000386507 0.000307891

I also used the code to return the total force, which is correct.
ITEM: ATOMS x y z fx fy fz
-17.7367 -9.53506 -9.94941 -5.43182 -1.52486 -1.60913

I am wondering whether the forces become so strange during energy
minimization after a few steps. Appreciate your suggestions in dealing with
this! Thanks a lot.

impossible to say. possibly there are some assumptions in your
external force code that are not in keeping with what LAMMPS expects
and provides.

axel.