LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] [EXT] Re: Movement of atom layer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] [EXT] Re: Movement of atom layer


From: "Jeong, Jae Young" <JaeyoungJeong@...1598...>
Date: Mon, 14 May 2018 17:00:29 +0000

Hi, 


Thank you for your comments.

I used "fix spring/self" to restrain the center of mass distance between the two groups.

As below my scripts, I checked "fix spring/self" before calculation of VACF and it worked.

Two groups had the initial position. After that, I added the calculation part of VACF, two groups close to each other. They did not keep initial position while calculating VACF.

If you tell me what's wrong, I'd really appreciate it.


Thanks,

Jaeyoung Jeong



#================================#
# Equilibriate the system in NVE #
#================================#
reset_timestep  0
fix             2 all nve
fix             3 all momentum 1000 linear 1 1 1
fix 4 C spring/self 5
dump DUMP_NVE all xyz 100000 dump_NVE.xyz
dump_modify DUMP_NVE element C Cu
variable        tt0 equal step
run             500000
unfix           3  

#================================================================#
# Calculation of properties velocity autocorelation  in NVE #
#================================================================#
variable        tt1 equal ${tt0}
compute 1 C  vacf
compute 2 Cu vacf
variable        Cxxvacf equal c_1[1]
variable        Cyyvacf equal c_1[2]
variable        Czzvacf equal c_1[3]
variable        Callvacf equal c_1[4]
variable        Cuxxvacf equal c_2[1]
variable        Cuyyvacf equal c_2[2]
variable        Cuzzvacf equal c_2[3]
variable        Cuallvacf equal c_2[4]
variable        tt equal (step)*0.0005

reset_timestep 0
thermo          10
thermo_style    custom step c_1[1] c_1[2] c_1[3] c_1[4] c_2[1] c_2[2] c_2[3] c_2[4]
fix             vacfresult all print 10 "${tt} ${Cxxvacf} ${Cyyvacf} ${Czzvacf} ${Callvacf} ${Cuxxvacf} ${Cuyyvacf} ${Cuzzvacf} ${Cuallvacf}" screen no file vacf.txt title "# Velocity Autocorrelation"

run             1000000
write_restart   graphene.restart



보낸 사람: Axel Kohlmeyer <akohlmey@...24...>
보낸 날짜: 2018년 5월 2일 수요일 오전 11:55:31
받는 사람: Jeong, Jae Young
참조: LAMMPS Users Mailing List
제목: [EXT] Re: [lammps-users] Movement of atom layer
 
You could use fix spring to restrain the center of mass distance between the two groups of atoms. 

Axel 



--
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.

On Wed, May 2, 2018, 11:17 Jeong, Jae Young <JaeyoungJeong@...1598...> wrote:

Hi, LAMMPS users

I have a question about fixing the initial position of atoms. I'm calculating the velocity autocorrelation of graphene on Cu with different distance between two materials. When I set 40angstrom for the distance and ran LAMMPS. Graphene layer moved to the Cu surface while calculating. In order word, graphene layer was at the initial position but it closed the Cu when the calculation started as attached files. How can I fix graphene layer above Cu surface with 40angstrong distance?

Here is my input script. I'd really appreciate it if you give me comments.

Thanks,

Jaeyoung

#  This is the control script for LAMMPS
echo both
#=======================================#
# Input file for phonon density of state
#=======================================#
units           metal
atom_style      atomic
boundary        p p p

read_data       g40-cu.data

group           C  type 1
group           Cu  type 2

#=======================================#
# Define interatomic potential
#=======================================#
pair_style       hybrid eam lj/cut 9.0 tersoff
pair_coeff       * * eam Cu_u3.eam
pair_coeff       * * tersoff tersoff.coeffs C NULL
pair_coeff       1 2 lj/cut 0.02578 3.6

neighbor        2.0 bin
neigh_modify    delay 0 every 1 check yes

#===========================================#
# Minimization
#============================================#

thermo 50
thermo_style custom step temp pe ke etotal press vol
min_style       cg
minimize        1.0e-8 1.0e-8 5000 10000

#==================================================#
# Relaxation of the lattice to the potential in NPT
#==================================================#
velocity        all create 300.00 156467 rot yes mom yes dist gaussian
timestep 0.0005
fix             1 all npt temp 300.00 300.00 0.02 iso 0.0 0.0 0.2
reset_timestep 0
run 50000
unfix           1

#================================#
# Equilibriate the system in NVE #
#================================#
reset_timestep  0
fix             2 all nve
fix             3 all momentum 1000 linear 1 1 1 
dump DUMP_NVE all xyz 100000 dump_NVE.xyz
dump_modify DUMP_NVE element C Cu
variable        tt0 equal step
run             500000
unfix           3  

#================================================================#
# Calculation of properties velocity autocorelation  in NVE #
#================================================================#
variable        tt1 equal ${tt0}
compute 1 C  vacf
compute 2 Cu vacf
variable        Cxxvacf equal c_1[1]
variable        Cyyvacf equal c_1[2]
variable        Czzvacf equal c_1[3]
variable        Callvacf equal c_1[4]
variable        Cuxxvacf equal c_2[1]
variable        Cuyyvacf equal c_2[2]
variable        Cuzzvacf equal c_2[3]
variable        Cuallvacf equal c_2[4]
variable        tt equal (step)*0.0005

reset_timestep 0
thermo          10
thermo_style    custom step c_1[1] c_1[2] c_1[3] c_1[4] c_2[1] c_2[2] c_2[3] c_2[4]
fix             vacfresult all print 10 "${tt} ${Cxxvacf} ${Cyyvacf} ${Czzvacf} ${Callvacf} ${Cuxxvacf} ${Cuyyvacf} ${Cuzzvacf} ${Cuallvacf}" screen no file vacf.txt title "# Velocity Autocorrelation"

run             1000000

write_restart   graphene.restart



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
lammps-users mailing list
lammps-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users