fix ID group-ID sgcmc every_nsteps swap_fraction temperature deltamu ...
ID, group-ID:fix命令的id和原子组的id sgcmc:该命令的关键词 every_nsteps:每隔every_nsteps步执行一次MC循环 swap_fraction:每一个MC循环周期内执行的交换步数的比例 temperature:MC循环中的温度,通常这个温度与MD模拟的温度相同,也可不同 deltamu:化学势差
fix mc all sgcmc 50 0.1 400.0 -0.55
fix 1 all nvt temp 300 300 0.1
# general variables
variable temperature equal 700
variable size equal 20
# variables for 'fix sgcmc'
variable nsteps_mc equal 100
variable swap_fraction equal 0.2
variable temperature_mc equal ${temperature}
variable deltamu equal -0.70
variable target_concentration equal 0.02
variable kappa equal 1e3
# general settings
units metal
atom_style atomic
# set up structure
boundary p p p
lattice bcc 2.88
region box block 0 ${size} 0 ${size} 0 ${size}
create_box 2 box
create_atoms 1 box
reset_timestep 0
timestep 0.0025
# set up interaction
pair_style eam/fs
pair_coeff * * FeCu.pasianot.eamfs Fe Cu
# initialize velocities
variable double_temp equal ${temperature}*2
velocity all create ${double_temp} 428459 dist gaussian
# what and how to run
fix integrate all npt &
temp ${temperature} ${temperature} 1.7 &
aniso 0.0 0.0 1.5
fix mc all sgcmc ${nsteps_mc} ${swap_fraction} ${temperature_mc} ${deltamu} &
randseed 324234 &
variance ${kappa} ${target_concentration}
# set up output
thermo 100
thermo_style custom step temp atoms pe press &
lx ly lz f_mc[1] f_mc[2] f_mc[3] f_mc[4]
dump 1 all custom 100 mc.dump id type x y z
run 10000
---------- End -----------
报名一对一培训课程可领完整版《lammps中文教程》,配套学习更轻松!
扫码领取粉丝专属优惠券↓↓↓