| 3 | 1/1 | 返回列表 |
| 查看: 2201 | 回復(fù): 2 | |||
奈落之夜木蟲 (正式寫手)
|
[求助]
關(guān)于lammps 質(zhì)心速度vcm()如何輸出問題
|
| 新手剛學(xué),要輸出質(zhì)心速度 想用vcm這個函數(shù) 根據(jù)說明書 我先定義了變量 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)前面應(yīng)該是定義的組,后面的自變量不知道是什么定了,也不知道該怎么輸出 |
鐵桿木蟲 (正式寫手)
|
參照下面的例子: 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 |
木蟲 (正式寫手)
| 3 | 1/1 | 返回列表 |
| 最具人氣熱帖推薦 [查看全部] | 作者 | 回/看 | 最后發(fā)表 | |
|---|---|---|---|---|
|
[考研] 材料與化工085600,總分304,本科有兩篇sci參與,求調(diào)劑 +10 | 幸運(yùn)的醬醬 2026-03-22 | 12/600 |
|
|---|---|---|---|---|
|
[考研] 材料292調(diào)劑 +12 | 橘頌思美人 2026-03-23 | 12/600 |
|
|
[考研] 0856,材料與化工321分求調(diào)劑 +4 | 大饞小子 2026-03-27 | 4/200 |
|
|
[考研] 一志愿北京化工大學(xué)材料與化工 264分各科過A區(qū)國家線 +10 | 哈哈157349 2026-03-21 | 10/500 |
|
|
[考研] 085600材料與化工306 +10 | z1z2z3879 2026-03-21 | 11/550 |
|
|
[考研] 調(diào)劑推薦 +5 | 清酒714 2026-03-26 | 6/300 |
|
|
[論文投稿] Journal of Mechanical Science and Technology +3 | Russ_ss 2026-03-25 | 5/250 |
|
|
[考研] 341求調(diào)劑 +7 | 青檸檬1 2026-03-26 | 7/350 |
|
|
[考研] 0703化學(xué)求調(diào)劑 +3 | 丹青奶蓋 2026-03-26 | 5/250 |
|
|
[考研] 081200-11408-276學(xué)碩求調(diào)劑 +3 | 崔wj 2026-03-26 | 3/150 |
|
|
[考研] 環(huán)境專碩324分求調(diào)劑推薦 +5 | 軒小寧—— 2026-03-26 | 5/250 |
|
|
[考研] 各位老師您好:本人初試372分 +5 | jj涌77 2026-03-25 | 6/300 |
|
|
[考研] 282求調(diào)劑 +3 | wcq131415 2026-03-24 | 3/150 |
|
|
[考研] 0854電子信息求調(diào)劑 324 +4 | Promise-jyl 2026-03-23 | 4/200 |
|
|
[考研] 340求調(diào)劑 +5 | 話梅糖111 2026-03-24 | 5/250 |
|
|
[考研] 上海電力大學(xué)材料防護(hù)與新材料重點(diǎn)實(shí)驗室招收調(diào)劑研究生(材料、化學(xué)、電化學(xué),環(huán)境) +4 | 我愛學(xué)電池 2026-03-23 | 4/200 |
|
|
[考研] 調(diào)劑 +4 | 13853210211 2026-03-24 | 4/200 |
|
|
[考研] 求調(diào)劑 +6 | 研研,接電話 2026-03-24 | 7/350 |
|
|
[考研] 求調(diào)劑一志愿海大,0703化學(xué)學(xué)碩304分,有大創(chuàng)項目,四級已過 +6 | 幸運(yùn)哩哩 2026-03-22 | 10/500 |
|
|
[考研] 材料 271求調(diào)劑 +5 | 展信悅_ 2026-03-21 | 5/250 |
|