24小时热门版块排行榜    

查看: 2197  |  回复: 2
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

奈落之夜

木虫 (正式写手)

[求助] 关于lammps 质心速度vcm()如何输出问题

新手刚学,要输出质心速度 想用vcm这个函数  根据说明书 我先定义了变量 variable  v_m  equal  vcm(motion,v_m)  motion是一个group 然后输出  dump     v_data motion cfg 10 dump.snap.*.cfg $v_m   可能很多语法错误   manual里面vcm(group,dim)前面应该是定义的组,后面的自变量不知道是什么定了,也不知道该怎么输出
回复此楼

» 猜你喜欢

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

奈落之夜

木虫 (正式写手)

引用回帖:
2楼: Originally posted by bluewhale at 2013-10-31 20:45:20
参照下面的例子:

heated Brownian particle

# typical input script used to investigate the Brownian motion of a heated nanoparticle. The diffusion coefficient is computed as the plateau value of ...

是compute输出数据吧  我纠结在dump上了
3楼2013-11-01 09:11:14
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 3 个回答

bluewhale

铁杆木虫 (正式写手)

【答案】应助回帖

★ ★ ★ ★
感谢参与,应助指数 +1
月只蓝: 金币+2, 感谢指导! 2013-11-01 08:35:56
奈落之夜: 金币+2, 有帮助 2013-11-01 09:10:33
参照下面的例子:

heated Brownian particle

# typical input script used to investigate the Brownian motion of a heated nanoparticle. The diffusion coefficient is computed as the plateau value of the integral of the velocity autocorrelation function. Details in:
# L. Joly, S. Merabia and J.-L. Barrat, EPL 94, 50007 (2011)
# http://iopscience.iop.org/0295-5075/94/5/50007/

# the data file is generated by the perl script 'data.pl'.
# fix ave/sph is similar to fix ave/spatial but using spherical bins (enclosed sources might be broken with latest lammps versions).

# to apply a rescaling thermostat only to liquid atoms lying beyond 15 sigma from the center of the particle (see article for details), fix recenter is used to constrain the center-of-mass of the particle to remain at the origin, with keyword 'shift all' so that it does not alter the dynamics of the system.

atom_style bond
read_data data.brown

group liq type 1
group sol type 2
region far sphere 0.0 0.0 0.0 15.9 side out units box
region int1 sphere 0.0 0.0 0.0 14.4 side out units box
region int2 sphere 0.0 0.0 0.0 15.9 units box
region int intersect 2 int1 int2 units box
region ins sphere 0.0 0.0 0.0 14.4 units box
compute Tsol sol temp/com
compute Tfar liq temp/region far
compute Tint liq temp/region int
group far region far
group int region int
group ins region ins
group insliq intersect ins liq

neigh_modify delay 0 every 1 check yes
pair_style lj/cut 2.5
pair_modify shift yes
bond_style fene
special_bonds fene
mass * 1.0
pair_coeff * * 1.0 1.0
bond_coeff * 30.0 1.5 1.0 1.0

variable ts equal step
variable vx equal vcm(sol,x)-vcm(liq,x)
variable vy equal vcm(sol,y)-vcm(liq,y)
variable vz equal vcm(sol,z)-vcm(liq,z)
fix 3 all print 5 "${ts} ${vx} ${vy} ${vz}" file print.brown screen no title "# ts vx vy vz"
fix 4vx all ave/correlate 5 2401 1200000 v_vx type full ave running start 200000 file cvx.brown
fix 4vy all ave/correlate 5 2401 1200000 v_vy type full ave running start 200000 file cvy.brown
fix 4vz all ave/correlate 5 2401 1200000 v_vz type full ave running start 200000 file cvz.brown

thermo_style custom step cpu c_Tsol c_Tint c_Tfar press vol
thermo 1000
compute KEatom all ke/atom
variable Tatom atom (2.0/3.0)*c_KEatom
fix 5 all ave/sph 100 2000 200000 x origin 0.1 density/number v_Tatom units box file sph.brown

fix 1 liq nph aniso 0.015 0.015 5.0 dilate partial
fix 1far liq temp/rescale 1 0.75 0.75 0.0 1.0
fix_modify 1far temp Tfar
fix 1int liq temp/rescale 1 0.75 0.75 0.0 1.0
fix_modify 1int temp Tint
fix 1sol sol nvt temp 3.5 3.5 0.5
fix_modify 1sol temp Tsol

variable vol equal vol
fix avevol all ave/time 10 8000 160000 v_vol
variable l equal 0.5*((f_avevol)^(1./3.))

fix 2 sol recenter 0.0 0.0 0.0 shift all units box
velocity sol create 0.75 36582 dist gaussian mom yes rot yes
velocity int create 0.75 36582 dist gaussian mom yes rot yes
velocity far create 0.75 36582 dist gaussian mom yes rot yes
velocity insliq create 0.75 36582 dist gaussian mom yes rot yes
run 160000

unfix 1
fix 1 liq nve
fix dxyz liq deform 1 x final -$l $l y final -$l $l z final -$l $l units box
unfix 2
fix 2 sol recenter 0.0 0.0 0.0 shift all units box
run 10000
unfix dxyz
run 30000

#variable F equal 10.0
#variable Fs equal $F/count(sol)
#fix 9s sol addforce ${Fs} 0.0 0.0
#variable Fl equal -$F/count(liq)
#fix 9l liq addforce ${Fl} 0.0 0.0
#unfix 2
#fix 2 sol recenter 0.0 0.0 0.0 shift all units box

run 12000000
2楼2013-10-31 20:45:20
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 284求调剂 +4 Zhao anqi 2026-03-22 4/200 2026-03-22 16:14 by lature00
[考研] 305分求调剂(食品工程) +4 Sxy112 2026-03-21 6/300 2026-03-22 15:26 by 无懈可击111
[考研] 材料与化工085600,总分304,本科有两篇sci参与,求调剂 +3 幸运的酱酱 2026-03-22 4/200 2026-03-22 15:06 by allen-yin
[考研] 一志愿070300浙大化学358分,求调剂! +3 酥酥鱼.. 2026-03-21 3/150 2026-03-22 11:31 by 杨杨杨紫
[考研] 0856材料专硕353求调剂 +4 NIFFFfff 2026-03-20 4/200 2026-03-22 09:49 by 2026paper
[考研] 材料求调剂 +5 @taotao 2026-03-21 5/250 2026-03-21 20:55 by lbsjt
[考研] 【考研调剂】化学专业 281分,一志愿四川大学,诚心求调剂 +11 吃吃吃才有意义 2026-03-19 11/550 2026-03-21 18:23 by 学员8dgXkO
[基金申请] 学校已经提交到NSFC,还能修改吗? 40+4 babangida 2026-03-19 9/450 2026-03-21 16:12 by babangida
[考研] 279分求调剂 一志愿211 +14 chaojifeixia 2026-03-19 15/750 2026-03-21 13:24 by zhukairuo
[考研] 265求调剂 +3 Jack?k?y 2026-03-17 3/150 2026-03-21 03:17 by JourneyLucky
[考研] 一志愿华中科技大学,080502,354分求调剂 +5 守候夕阳CF 2026-03-18 5/250 2026-03-21 01:06 by JourneyLucky
[考研] 一志愿 南京航空航天大学大学 ,080500材料科学与工程学硕 +5 @taotao 2026-03-20 5/250 2026-03-20 20:16 by JourneyLucky
[考研] 求调剂 +3 @taotao 2026-03-20 3/150 2026-03-20 19:35 by JourneyLucky
[考研] 广西大学家禽遗传育种课题组2026年硕士招生(接收计算机专业调剂) +3 123阿标 2026-03-17 3/150 2026-03-20 15:58 by 飞行琦
[论文投稿] 申请回稿延期一个月,编辑同意了。但系统上的时间没变,给编辑又写邮件了,没回复 10+3 wangf9518 2026-03-17 4/200 2026-03-19 23:55 by babero
[考研] 一志愿中国海洋大学,生物学,301分,求调剂 +5 1孙悟空 2026-03-17 6/300 2026-03-19 23:46 by zcl123
[考研] 301求调剂 +4 A_JiXing 2026-03-16 4/200 2026-03-17 17:32 by ruiyingmiao
[硕博家园] 湖北工业大学 生命科学与健康学院-课题组招收2026级食品/生物方向硕士 +3 1喜春8 2026-03-17 5/250 2026-03-17 17:18 by ber川cool子
[考研] 考研调剂 +3 淇ya_~ 2026-03-17 5/250 2026-03-17 09:25 by Winj1e
[考研] 中科院材料273求调剂 +4 yzydy 2026-03-15 4/200 2026-03-16 15:59 by Gaodh_82
信息提示
请填处理意见