Units conversion in lammps

Hello i want to get same results as unit lj command for given lammps script

#script for lj potential


#---initialization---
units		lj
dimension 	3
boundary 	p p p
atom_style	atomic
lattice		fcc 0.3
region 		box block 0 5 0 5 0 5


create_box	1 box
create_atoms 	1 box
mass            1 1.0
velocity	all create 1.0 45454





#---system potential---
pair_style 	lj/cut 2.5
pair_coeff	1 1 1.0 1.0 2.5

neighbor	0.3 bin
neigh_modify 	every 1 delay 0 check yes



#---variables---

compute         myTemp all temp
compute         myVir all pressure myTemp

variable	curstep equal step
variable	curT equal temp
variable	curP equal (c_myVir[1]+c_myVir[2]+c_myVir[3])/3.0
variable	curPE equal pe
variable	curKE equal ke
variable	curE equal etotal
variable	curV equal vol
variable	curH equal enthalpy


thermo_style    custom step temp press pe ke etotal vol enthalpy
thermo          100


fix             myData all print 1 "${curstep} ${curT} ${curP} ${curPE} ${curKE} ${curE} ${curV} ${curH}" screen no file ljReduced1.dat title "#Step Temp Pres PE KE TotlE Vol Enthalpy"


#---run---
timestep        0.005
fix 		1 all nvt temp 1.0 1.0 1.0

run 		5000

If i change unit to metal then how should conversion look ,output should be same;

That is not possible.

then how can i change reduced unit to metal unit,if i want to rescale

If you want to change from “reduced” units to “absolute” units, you need to specify which reference you are using for the reduction.

So your LJ epsilon of 1.0 and LJ sigma of 1.0 represent some “absolute” value for some specific interaction, say 0.012 eV and 3.5 Angstrom for example. With that and the mass and values for certain constants (E.g kB) you can determine all other parameters and settings (e.g. timestep, temperature and so on) in your units of choice. This may take a little effort and checking.

But most importantly, if you need to work with metal units, why don’t you just parametrize the interactions directly on that scale? Note that your setup describes the phase behaviour of a noble gas.

Hmm… isn’t LJ solid at T^* = 1.0?

Sure it is! I mean, as a class of materials :wink:

I have conversion ratio as
Temperature T* T* X 2.5173 x 10^4 K

Length r* r* x 0.20951 nm
(sigma = 0.20951 nm)

Mass M M* x 28.06
Time t* t* x 7.66 x 10^-14 s
t* x 7.66 x 10^-5 ns

Diffusion coefficient
D* Dsigma^2/tau = D x .005730345 cm^2/s

Density rho* rho* x 0.1087391 atoms/Angstrom^3
rho* x 5.0517 gm/cm^3

in unit lj lammps script is
////////********
#script for lj potential

#—initialization—
units lj
dimension 3
boundary p p p
atom_style atomic
lattice fcc 0.3
region box block 0 5 0 5 0 5

create_box 1 box
create_atoms 1 box
mass 1 1.0
velocity all create 1.0 45454

#—system potential—
pair_style lj/cut 2.5
pair_coeff 1 1 1.0 1.0 2.5

neighbor 0.3 bin
neigh_modify every 1 delay 0 check yes

#—variables—

compute myTemp all temp
compute myVir all pressure myTemp

variable curstep equal step
variable curT equal temp
variable curP equal (c_myVir[1]+c_myVir[2]+c_myVir[3])/3.0
variable curPE equal pe
variable curKE equal ke
variable curE equal etotal
variable curV equal vol
variable curH equal enthalpy

thermo_style custom step temp press pe ke etotal vol enthalpy
thermo 100

fix myData all print 1 “{curstep} {curT} {curP} {curPE} {curKE} {curE} {curV} {curH}” screen no file ljReduced1.dat title “#Step Temp Pres PE KE TotlE Vol Enthalpy”

#—run—
timestep 0.005
fix 1 all nvt temp 1.0 1.0 1.0

run 5000

////////********

And in metal unit after multiplying conversion ratio lammps script

////////********

#script for lj potential

#—initialization—
units metal
dimension 3
boundary p p p
atom_style atomic
lattice fcc 1.46457

variable lencon equal 2.0951
variable engcon equal 2.1683
variable timeCon equal 0.005*7.53e-14

region box block 0 10.4755 0 10.4755 0 10.4755

create_box 1 box
create_atoms 1 box
mass 1 28.06
velocity all create 25163 454543

#—system potential—
pair_style lj/cut 5.23775
pair_coeff 1 1 2.0951 2.1683 5.23775

neighbor 0.62853 bin
neigh_modify every 1 delay 0 check yes

#—variables—

compute myTemp all temp
compute myVir all pressure myTemp

variable curstep equal step
variable curT equal temp
variable curP equal (c_myVir[1]+c_myVir[2]+c_myVir[3])/3.0
variable curPE equal pe
variable curKE equal ke
variable curE equal etotal
variable curV equal vol
variable curH equal enthalpy

thermo_style custom step temp press pe ke etotal vol enthalpy
thermo 100

fix myData all print 1 “{curstep} {curT} {curP} {curPE} {curKE} {curE} {curV} {curH}” screen no file ljMetal1.dat title “#Step Temp Pres PE KE TotlE Vol Enthalpy”

#—run—
timestep 7.53e-14
fix 1 all nvt temp 25163.0 25163.0 1.0

run 5000

////////********

But both results are far from equal ,These conversion ratios are correct for silicon.

Your conversion looks bogus. Most of the values you use in metal units make no sense when compared to existing parameters for Si from force fields and experimental data.
Sigma seems too small. You would expect something around 3.5 angstrom.
Epsilon seem very large. You would expect something < 0.01 eV
Timestep is tiny. You would expect something around 1fs, i.e. 0.001 ps
Temperature is excessive. At 25,000 K classical MD makes little sense. For comparison, this is about 5x the temperature of the surface of the sun.

Please have a look at the examples/UNITS folder in the LAMMPS source code.
It compares liquid argon in reduced units, metal units and real units. Please have a close look at what is said in the README file in that folder.