Different units in one simulation

Dear LAMMPS users,

I have a basic question about units in a simulation which I could not find the answer for that in manuals.
Assume that you are using “Yukawa” as pair potential and as you may know length scale of this system is described by kappa (screening length).
In the other hand assume that you confined your system between two LJ walls (e.g. fix wall/lj126) which units are based on sigma.
So in this case what is the units of e.g.
a) distance between particles
b) distance between particles and walls
c) box dimensions
d) energies
and etc.
How one should connect them.
So, is it a good idea two use "pair_style yukawa” and "fix wall/…” together in LAMMPS?
What I can imagine as a solution is using Hard-core Yukawa Potential, which I should implement by myself in LAMMPS.
Any idea or suggestion?

Cheers
Moji

Dear LAMMPS users,

I have a basic question about units in a simulation which I could not find
the answer for that in manuals.
Assume that you are using “Yukawa” as pair potential and as you may know
length scale of this system is described by kappa (screening length).
In the other hand assume that you confined your system between two LJ walls
(e.g. fix wall/lj126) which units are based on sigma.
So in this case what is the units of e.g.
a) distance between particles
b) distance between particles and walls
c) box dimensions
d) energies
and etc.
How one should connect them.
So, is it a good idea two use "pair_style yukawa” and "fix wall/…” together
in LAMMPS?
What I can imagine as a solution is using Hard-core Yukawa Potential, which
I should implement by myself in LAMMPS.
Any idea or suggestion?

you are looking at this from the wrong way. the units being used are
defined by the units keyword in LAMMPS and are consistent throughout.
of course you can use LJ walls with yukawa. both are using the same
unit of length.

axel.

Dear Axel,

Thanks for the answer.
You mean that the Yukawa that has been implemented in LAMMPS is in sigma units not kappa? like

u® = (epsilon*sigma) * (exp(-kappa(r/sigma)) / r

In this case I survived :slight_smile:

cheers
Moji

Dear Axel,

Thanks for the answer.
You mean that the Yukawa that has been implemented in LAMMPS is in sigma
units not kappa? like

u(r) = (epsilon*sigma) * (exp(-kappa(r/sigma)) / r

In this case I survived :slight_smile:

you seem to be confusing how units and specifically reduced units are
to be handled.

length is specified in the selected unit of distance, energy in the
unit of energy and so on. this is straightforward for using a setting
of "units metal". however there really is no conceptual difference to
using reduced units. for reduced units that means, energy is in units
of epsilon, but it obviously cannot be "every epsilon", but the one
epsilon that you choose to be the reference i.e. which requires to
input an epsilon parameter of 1.0 and all energies are specified in as
multiples of that reference. same for the distance.

the yukawa parameter kappa is entered in units of inverse length, that
would be angstrom^-1 for units metal and sigma^-1 for units lj.

the code itself doesn't care and there doesn't have to be an
expression like you gave above, for as long as units that are
consistent with each other are used.
for certain expressions, however, conversions factors are required and
those are set in the function Update::set_units(), but those are
global and don't require any knowledge about any specific choice of
fixes or potentials.

in your particular case, kappa is expressed and terms of the sigma
that would be used as sigma=1.0 in a lj/cut pair style or a lj wall.

axel.