计算化学公社

标题: 求助关于deform变形盒子的角度问题 [打印本页]

作者
Author:
glzped    时间: 2020-9-27 16:22
标题: 求助关于deform变形盒子的角度问题
(, 下载次数 Times of downloads: 34)
[size=7.173pt]图中黄色部分,请问怎样操作/设置才能使角度小于45°时,将角度变为-45°。
[size=7.173pt]




作者
Author:
sobereva    时间: 2020-9-28 12:27
不改源代码的话应该没法实现
作者
Author:
DwyaneWan    时间: 2022-6-24 06:40
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);







欢迎光临 计算化学公社 (http://bbs.keinsci.com/) Powered by Discuz! X3.3