|
本帖最后由 乐平 于 2022-5-14 14:30 编辑
本来想用正则表达式来重写一个脚本,结果发现 CP2K 的作者为了图省事,居然对不同参数在不收敛时的用了一样的表达式
- -------- Informations at step = 1 ------------
- Optimization Method = BFGS
- Total Energy = -38.1902526812
- Internal Pressure [bar] = 130282.9515280122
- Real energy change = -0.0038006776
- Predicted change in energy = -0.0021074907
- Scaling factor = 0.0000000000
- Step size = 0.0374832738
- Trust radius = 0.3779452266
- Decrease in energy = YES
- Used time = 2.985
- Convergence check :
- Max. step size = 0.0374832738
- Conv. limit for step size = 0.0030000000
- Convergence in step size = NO
- RMS step size = 0.0118532434
- Conv. limit for RMS step = 0.0015000000
- Convergence in RMS step = NO
- Max. gradient = 0.0301687411
- Conv. limit for gradients = 0.0004500000
- Conv. for gradients = NO <---------
- RMS gradient = 0.0095401865
- Conv. limit for RMS grad. = 0.0003000000
- Conv. for gradients = NO <---------
- Pressure Deviation [bar] = 130281.9382780122
- Pressure Tolerance [bar] = 100.0000000000
- Conv. for PRESSURE = NO
- ---------------------------------------------------
复制代码
例如上面箭头所指的最大受力(Max. gradient)和均方根受力(RMS gradient)的判断收敛结果都用同样的 Conv. for gradients = NO 来表示不收敛
而当上述两个量都收敛后,才用不同的文字标注
- -------- Informations at step = 4 ------------
- Optimization Method = BFGS
- Total Energy = -38.1977587610
- Internal Pressure [bar] = 7.6735903854
- Real energy change = -0.0000004195
- Predicted change in energy = -0.0000003919
- Scaling factor = 0.0000000000
- Step size = 0.0012617425
- Trust radius = 0.3779452266
- Decrease in energy = YES
- Used time = 3.140
- Convergence check :
- Max. step size = 0.0012617425
- Conv. limit for step size = 0.0030000000
- Convergence in step size = YES
- RMS step size = 0.0003989840
- Conv. limit for RMS step = 0.0015000000
- Convergence in RMS step = YES
- Max. gradient = 0.0000016300
- Conv. limit for gradients = 0.0004500000
- Conv. in gradients = YES <---------------
- RMS gradient = 0.0000005138
- Conv. limit for RMS grad. = 0.0003000000
- Conv. in RMS gradients = YES <---------------
- Pressure Deviation [bar] = 6.6603403854
- Pressure Tolerance [bar] = 100.0000000000
- Conv. for PRESSURE = YES
- ---------------------------------------------------
复制代码
这样就没法用正则表达式来正确匹配了,总会在一开始漏掉均方根受力的收敛情况……
得想更好的办法来做。有意思。
|
|