首页 >> 仿真软件说明 >>lammps >>in文件 >> addforce链拉伸
详细内容

addforce链拉伸

#定义温度

variable temp equal 1.0

#设置最大力

variable maxforce equal 200

#模型基本参数

dimension 2

units       lj

atom_style  molecular

atom_modify     sort 1000 2.0

comm_modify     cutoff 2.0

boundary        p p p

#近邻列表

neighbor 2.0 bin

neigh_modify every 1 delay 0 check yes

#读取data文件

read_data poly.txt

#设置摩尔质量

mass   *        1

#对原子进行分组

group mobile type 1 3

group fixed  type 2

group force  type 3

#不计算非键连接原子之间的作用力

pair_style         none

#设置键的势函数为fene

bond_style fene

bond_coeff 1 50.0 1.5 0.0 0.0

special_bonds fene

#时间步长

variable tstep equal 0.01

timestep    ${tstep}

thermo    100

#输出原子坐标轨迹

dump            1 all atom 50000 dump.xyz

#设置系综+langevin控温

fix integrator mobile nve

fix dynamics   mobile langevin ${temp} ${temp} 10.0 252111

fix run2d      all enforce2d

#定义运行步数

variable eqrun      equal 50000

variable samplerun  equal 10000000

#驰豫50000步

run ${eqrun}

reset_timestep 0

#定义力的大小,该力随时间变化

variable extforce equal ${maxforce}*step/${samplerun}

#在最右侧的原子(force组)施加作用力

fix externforce force  addforce v_extforce 0 0

#计算x方向伸长量

variable dist equal (x[40]-x[1])

#力和x方向伸长量保存到文件中

fix avg all ave/time 1 500000 500000 v_dist v_extforce file dist_vs_force ave one

#输出运行结果

thermo 500000

thermo_style custom step f_avg[1] v_extforce

#启动运算

run ${samplerun}


技术支持: CLOUD | 管理登录
seo seo