How to convert tersoff potential unit from metal to real

Hello dear Lammps users
please i need your assistance and guidance
I am new in this field and I would like to know how to convert tersoff potential parameter unit from metal to real.
I have attached the input script where i converted the energy unit from ev to Kcal/mol, the time unit from ps to fs and the pressure unit from bars to atmosphere.
The problem is that i really don`t know how to proceed and complete the tersoff unit conversion from metal to real successfully. Really need your guidance.
best regards;
Maska

Crystalline_eq_script1.data (2.5 KB)

Why not run this simulation in metal units, and then convert your desired output quantities to real?

If you have a sufficiently recent LAMMPS version and your Tersoff potential file has a suitable tag indicating the units it requires, there is no need to convert it. You can just use real units and LAMMPS will convert it automatically when reading the parameters.

okay, thank you

Okay, thank you.

What do you mean with a “suitable Tag”
I use “real” units in my input, and in my Tersoff file, does LAMMPS do the conversion automatically?
Or I need to add a command to do this?

This is my tersoff file
"C C C 3.0 1.0 0.0 38049.0 4.3484 -0.93 0.72751
1.5724e-7 2.2119 9916 1.95 0.15 3.4879 32137.17
"

1 Like

Here is the corresponding part of the pair style tersoff documentation:

The Tersoff potential files provided with LAMMPS (see the potentials directory) are parameterized for “metal” units. In addition the pair style supports converting potential parameters on-the-fly between “metal” and “real” units. You can use the tersoff pair style variants with any LAMMPS units setting, but you would need to create your own Tersoff potential file with coefficients listed in the appropriate units if your simulation does not use “metal” or “real” units.

If you look at the potential/*.tersoff files you will find that they all have some comment(s) at the top of the file, e.g.:

# DATE: 2007-10-22 UNITS: metal CONTRIBUTOR: Xiaowang Zhou, xzhou @ sandia.gov CITATION: Nord, Albe, Erhart and Nordlund, J. Phys Condens Matter, 15, 5649 (2003)

DATE:, UNITS:, CONTRIBUTOR: and CITATIONS: are supported metadata tags. The value used with the UNITS: tag is used for confirmation of the units.
If the file has UNITS: metal and your input has units metal, no conversion happens.
If the file has UNITS: metal and your input has units real, the parameters are converted.
If the file has UNITS: real and your input has units metal, the parameters are converted.
If the file has UNITS: real and your input has units real, no conversion happens.
If the file has UNITS: real and your input has units lj LAMMPS stops with an error.
If the file does not have units metadata, no check is made and no conversion happens.

Bottom line. If a parameter file (for supported pair styles) has either “real” or “metal” units, then you can freely choose between units real and units metal and LAMMPS will convert. If the pair style does not support conversion (e.g. airebo) you get an error if the units setting does not match the file.

1 Like