Sunteți pe pagina 1din 8

a simple example of lammps: UO2 lattice at

1000K
a simple example is shown using computation of UO2 system at 1000K.
Computation of behavior of UO2 system under conditions:
Number of atoms,Pressure,Temperature are constant: NPT fixed
periodic boundary condition is employed: necessary for Ewald method.

a lammps script file: in.1000


#Initialization:
atom_style charge
units metal
boundary
p p p
dimension
3
newton
on
#default is on
#Atom definition:
read_data data.fcc111
# set position of atoms
mass 1 238
group
1 type 1
mass 2 16
group
2 type 2
#Force fields:
pair_style hybrid/overlay born/coul/long 10.0 morse 10.0
pair_coeff 1 1 born/coul/long 0.013806784 0.32702 3.26 0.0 0.0 10.0
pair_coeff 1 2 born/coul/long 0.013806827 0.327021 3.54 0.0 0.0 10.0
pair_coeff 1 2 morse 0.57745 1.65 2.369 10.0
pair_coeff 2 2 born/coul/long 0.013806869 0.327022 3.82 3.950633264 0.0 10.0
# refered to http://lammps.sandia.gov/threads/msg13365.html
kspace_style pppm 1.0e-4
log log.UO2_fcc111-1000K
# set log file name
velocity all create 1000.0 78621 dist gaussian
# initial distribution of
velocity of atoms
fix NPT all npt temp 1000.0 1000.0 0.005 iso 0.0 0.0 10.0 drag 0.2
thermo 10
# thermo step 10
dump 1 all atom 10 dump.UO2_fcc111-1000K.gz # zipped dump file with step 10
run 2000

Execution of lammps
$
$
$
$

./fcc111.py > data.fcc111 # generate a lammps data; U=1000, O=2000


./dat2cfg < data.fcc111 > fcc111.cfg
# atomeye data
atomeye fcc111.cfg &
mpirun -np 2 lmp_openmpi < in.1000
# run lammps as two mpi-process

viewing the lattice of UO2 with atomeye

via / [pixiv] in japanese


"a big tree of black honey and a sprig of hot water" / illustration by poko [pixiv]
download: in.1000
download: fcc111.py
download: dat2cfg.py
Analyzing log with Octave:
octave-3.6.1:1> a=readlog("log.UO2_fcc111-1000K");
octave-3.6.1:9> a
WARNING: terminal is not fully functional
a =(press RETURN)
scalar structure containing the fields:
Chead =

[1,1]
[1,2]
[1,3]
[1,4]
[1,5]
[1,6]
[1,7]
[1,8]

=
=
=
=
=
=
=
=

Step
Temp
E_pair
E_mol
TotEng
Press
Volume

}
data =
{
[1,1] =
0.0000e+00
1.0000e+03 -3.0472e+04
4.6630e+05
4.3399e+04
1.0000e+01
3.6121e+03 -3.7732e+04
1.0384e+05
4.3401e+04
2.0000e+01
8.8344e+02 -3.7458e+04
9.5518e+04
4.3405e+04
3.0000e+01
2.0197e+03 -3.8183e+04
5.8506e+04
4.3411e+04
4.0000e+01
1.5293e+03 -3.8463e+04
5.4620e+04
4.3417e+04
5.0000e+01
1.8013e+03 -3.8959e+04
4.6632e+04
4.3424e+04
6.0000e+01
1.6175e+03 -3.9292e+04
4.1967e+04
4.3432e+04
7.0000e+01
1.7681e+03 -3.9738e+04
4.9086e+04
4.3440e+04
8.0000e+01
1.6729e+03 -4.0127e+04
6.2420e+04
4.3450e+04
9.0000e+01
1.5952e+03 -4.0459e+04
6.8996e+04
4.3459e+04
warning: broken pipe -- some output may be lost
octave-3.6.1:2> b=a.data(1){};
octave-3.6.1:3> plot(b(:,1),b(:,2))

0.0000e+00

-3.0085e+04

0.0000e+00

-3.6332e+04

0.0000e+00

-3.7116e+04

0.0000e+00

-3.7400e+04

0.0000e+00

-3.7871e+04

0.0000e+00

-3.8261e+04

0.0000e+00

-3.8665e+04

0.0000e+00

-3.9052e+04

0.0000e+00

-3.9478e+04

0.0000e+00

-3.9841e+04

download: readlog.m (a modified version)

via / [pixiv] in japanese


"a big tree of black honey and a sprig of hot water" / illustration by poko [pixiv]
generating anime files with atomeye as follows:
(on making animations for lammps, see "animations with atomeye in this site" for
details.)
$ gzcat dump.UO2_fcc111-1000K.gz > dump.UO2_fcc111-1000K
$ lmp2cfg < input.txt
------input.txt--------20000
2
'dump.UO2_fcc111-1000K'
1
10000
1
234.0000
'U'
2

16.0000
'O'
------input.txt--------$ atomeye 00001.cfg &
$ cd Jpg/
$ ffmpeg -r 20 -i "%05d.jpg" -vcodec mjpeg -sameq uo2_at_1000K.avi
$ mv uo2_at_1000K.avi ../
$ cd ..
$ rm -rf Jpg/ *.cfg

download: input.txt
download: lmp2cfg.f (a modified version)

a movie generation by ffmpeg


via / [pixiv] in japanese
"a big tree of black honey and a sprig of hot water" / illustration by poko [pixiv]
a movie: UO2 at 1000K of a fcc 111 latice cut with a slant plane

S-ar putea să vă placă și