计算化学公社

 找回密码 Forget password
 注册 Register

求助关于deform变形盒子的角度问题

查看数: 8871 | 评论数: 2 | 收藏 Add to favorites 0
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2020-9-27 16:22

正文摘要:

[size=7.173pt]图中黄色部分,请问怎样操作/设置才能使角度小于45°时,将角度变为-45°。 [size=7.173pt]

回复 Reply

DwyaneWan 发表于 Post on 2022-6-24 06:40:20
sobereva 发表于 2020-9-28 12:27
不改源代码的话应该没法实现

Sob老师,我在源码(src/gromacs/mdlib/boxdefroamtion.cpp)这里将0.5 都调整了,可是依然没有任何变化,甚至报错,应该如何做出修改呢?


   /* We correct the off-diagonal elements,
     * which can grow indefinitely during shearing,
     * so the shifts do not get messed up.
     */
    for (int i = 1; i < DIM; i++)
    {
        for (int j = i - 1; j >= 0; j--)
        {
            while (updatedBox[j] - box[j] > 0.5 * updatedBox[j][j])
            {
                rvec_dec(updatedBox, updatedBox[j]);
            }
            while (updatedBox[j] - box[j] < -0.5 * updatedBox[j][j])
            {
                rvec_inc(updatedBox, updatedBox[j]);
            }
        }
    }
    invertBoxMatrix(box, invbox);
    // Return the updated box
    copy_mat(updatedBox, box);
    mmul_ur0(box, invbox, mu);


sobereva 发表于 Post on 2020-9-28 12:27:15
不改源代码的话应该没法实现

手机版 Mobile version|北京科音自然科学研究中心 Beijing Kein Research Center for Natural Sciences|京公网安备 11010502035419号|计算化学公社 — 北京科音旗下高水平计算化学交流论坛 ( 京ICP备14038949号-1 )|网站地图

GMT+8, 2026-2-24 07:39 , Processed in 0.162407 second(s), 24 queries , Gzip On.

快速回复 返回顶部 返回列表 Return to list