24小时热门版块排行榜    

查看: 2736  |  回复: 1
【悬赏金币】回答本帖问题,作者周三啊将赠送您 10 个金币

周三啊

铁虫 (小有名气)

[求助] Mismatched compute in variable formula 已有1人参与

各位大佬好,我在使用ILP势计算两层原子之间的势能,官网上说势能计算可以分为排斥和吸引两部分,并且可以单独访问,语句如下

This pair style tallies a breakdown of the total interlayer potential energy into sub-categories, which can be accessed via the compute pair command as a vector of values of length 2. The 2 values correspond to the following sub-categories:
E_vdW = vdW (attractive) energy
E_Rep = Repulsive energy
To print these quantities to the log file (with descriptive column headings) the following commands could be included in an input script:

compute 0 all pair ilp/graphene/hbn
variable Evdw  equal c_0[1]
variable Erep  equal c_0[2]
thermo_style custom step temp epair v_Erep v_Evdw


但是我在计算时却出现ERROR: Variable ILP: Mismatched compute in variable formula (../variable.cpp:1580)的错误。希望大家可以解答一下,谢谢!!!!!!




我的脚本如下:
# Initialization
units           metal
boundary        p p p
atom_style      full
processors      * * 1     # domain decomposition over x and y

# System and atom definition
# we use 2 atom types so that inter- and intra-layer
# interactions can be specified separately
# read lammps data file
read_data       3.2_.data
mass            1 12.0107   # carbon mass (g/mole) | membrane
mass            2 12.0107   # carbon mass (g/mole) | adsorbate
# Separate atom groups
group membrane  type 1
group adsorbate type 2

######################## Potential defition ########################
pair_style  hybrid/overlay  rebo  ilp/graphene/hbn 16.0
####################################################################
pair_coeff  * * rebo               CH.airebo      NULL C  # chemical
pair_coeff  * * ilp/graphene/hbn   BNCH.ILP    C    C  # long range
####################################################################
# Neighbor update settings
neighbor        2.0 bin
neigh_modify    every 1
neigh_modify    delay 0
neigh_modify    check yes

# calculate the COM
variable        adsxcom equal xcm(adsorbate,x)
variable        adsycom equal xcm(adsorbate,y)
variable        adszcom equal xcm(adsorbate,z)
variable        adsvxcom equal vcm(adsorbate,x)
variable        adsvycom equal vcm(adsorbate,y)
variable        adsvzcom equal vcm(adsorbate,z)

#### Simulation settings ####
timestep  0.001
velocity  adsorbate create 300.0 12345
fix       subf membrane setforce 0.0 0.0 0.0
fix       thermostat all nve

compute   0 all pair rebo
compute   1 all pair ilp/graphene/hbn
variable  REBO     equal c_0
variable  ILP      equal c_1
variable Evdw  equal c_1[1]
variable Erep  equal c_1[2]


############################

# Output
thermo          100
thermo_style    custom step etotal pe ke v_REBO v_ILP v_Erep v_Evdw temp v_adsxcom v_adsycom v_adszcom v_adsvxcom v_adsvycom v_adsvzcom
thermo_modify   line one format float %.10f
thermo_modify   flush yes norm no lost warn

dump            1 all custom 100 traj.lammpstrj id mol type xu yu zu
dump_modify     1 format line "%7d %3d %3d %15.10g %15.10g %15.10g" flush yes

###### Run molecular dynamics ######
run 1000
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

zhizhuceyici

金虫 (初入文坛)

【答案】应助回帖

你好 我也遇到了一样的问题
我感觉应该是因为使用了新的ouyang的势 因此ilp/graphene/hbn的计算只是一个标量而非数组
早期的example里面的例子和manual一样,分成了两项
但是我目前下载的lammps里面的example的例子已经只计算一项
compute   2 all pair ilp/graphene/hbn
variable  EILP     equal c_2
我们不计较麦穗的饱满是在哪一天。
2楼2020-10-19 17:11:11
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 周三啊 的主题更新
不应助 确定回帖应助 (注意:应助才可能被奖励,但不允许灌水,必须填写15个字符以上)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[基金申请] 面上提前没消息,有中的吗 +9 archvillain 2026-08-02 11/550 2026-08-02 15:44 by alexon
[公派出国] 售SCI一区T0P文章,我:8O.55.1.O.5.4,科目齐全,可+急 +3 cBGhfJFuNMca 2026-08-02 8/400 2026-08-02 15:01 by jHcrHMhbKCFV
[考博] 售SCI一区T0P文章,我:8.O.55.1.O54,科目全,可伽急 +3 cBGhfJFuNMca 2026-08-02 14/700 2026-08-02 14:58 by jHcrHMhbKCFV
[博后之家] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 cBGhfJFuNMca 2026-08-02 18/900 2026-08-02 14:52 by jHcrHMhbKCFV
[找工作] 售SCI-T0P文章,我:8O.5.5.1.O.54,科目齐全,可+急 +3 cBGhfJFuNMca 2026-08-02 12/600 2026-08-02 13:43 by jHcrHMhbKCFV
[基金申请] 面上再次挂了,太难了,躺也躺不了,倦也卷不过,小学校之殇! +17 低垂的野花 2026-07-31 23/1150 2026-08-02 13:41 by RRRKKK
[找工作] 售SCI一区文章,我:8.O.55.1.O.54,科目齐全,可伽急 +3 cBGhfJFuNMca 2026-08-02 16/800 2026-08-02 13:34 by jHcrHMhbKCFV
[博后之家] 售SCI一区文章,我:8.O.551.O.5.4,科目全,可伽急 +3 cBGhfJFuNMca 2026-08-02 14/700 2026-08-02 13:34 by jHcrHMhbKCFV
[基金申请] 2026年国自然面上资助率 +15 布布和一二 2026-07-30 21/1050 2026-08-02 10:56 by iaeyuan
[教师之家] 基础研究怎么拉横向,学校到款任务越来越多,难以完成 拉横向,都有哪些途径啊 +8 锦衣卫寒战 2026-07-28 10/500 2026-08-02 10:00 by 锦衣卫寒战
[考博] 2027年申博 50+3 射雕英雄胜 2026-07-30 3/150 2026-08-02 09:36 by lfy8008
[有机交流] 一个有机合成实验室都需要哪些设备? 50+3 kf2781974 2026-07-31 7/350 2026-08-02 07:59 by 88817753
[基金申请] 微信指数没变化,科研之友没阅读 +14 wangze12014 2026-07-28 18/900 2026-07-31 18:35 by lzchaihuo
[高分子] HXDI做水性聚氨酯乳液,是不是特别容易出渣 15+3 yuyusuv 2026-07-29 3/150 2026-07-31 09:21 by huizingga
[基金申请] 系统今天又提示维护了,估计离放榜不远了 +11 winnerche 2026-07-29 15/750 2026-07-30 23:08 by jnhyjjm
[基金申请] 你们的时间戳变了吗 +3 archvillain 2026-07-30 4/200 2026-07-30 18:53 by levinzhwen
[有机交流] 产物和副产物价值比较 30+4 小汤02 2026-07-27 5/250 2026-07-30 12:44 by czyzsu
[基金申请] 这种情况还有戏吗 +5 drbart 2026-07-27 11/550 2026-07-29 05:50 by drbart
[基金申请] 同事接到电话了,我却没有 +4 1234567wang 2026-07-27 4/200 2026-07-28 10:11 by GOODLUCKER
[基金申请] 准备明年的基金了 +5 Tide man 2026-07-27 5/250 2026-07-28 09:25 by newfuzzy1
信息提示
请填处理意见