10 2021 档案

python 画能级图
摘要:核结构经常要画能级图,所以记一下这个代码吧。 # plt 绘制 energy 中的能级,按照 0+,2+,4+,6+,8+,... 的顺序,画在 xleft 处, # 如果 flaglabel == True, 则把 0+, 2+, ..., 画在 xlabel 处。 def EnergyLevel 阅读全文

posted @ 2021-10-31 11:25 luyi07 阅读(791) 评论(0) 推荐(0)

python 调用 shell 命令,制作用户界面
摘要:1. python调用shell指令: os.system 格式为 os.system('command') import os os.system('make') flag0 = flag[0]; flag1 = flag[1]; flag2 = flag[2]; flag3 = flag[3]; 阅读全文

posted @ 2021-10-29 10:02 luyi07 阅读(439) 评论(0) 推荐(0)

打包 python 程序,变成一个可执行文件
摘要:1. 安装 pyinstaller pip3 install pyinstaller 2. 改装 matplotlib 3.1.1 现在的 matplotlib 版本都高于 3.2,而打包工具 pyinstaller需要低于 3.2 的版本,所以需要卸载 matplotlib,然后再安装低版本 pi 阅读全文

posted @ 2021-10-29 09:23 luyi07 阅读(344) 评论(0) 推荐(0)

宇称投影
摘要:1. 宇称投影算符 宇称投影算符$\hat{P}$作用在任意函数$f(x)$得到 $$ \hat{P} f(x) = f(-x),$$ 三维空间中则为 $$ \hat{P} f(\vec{r}) = f(-\vec{r}).$$ 如果有 $\hat{P} f(\vec{r}) = f(-\vec{r 阅读全文

posted @ 2021-10-26 12:06 luyi07 阅读(440) 评论(0) 推荐(0)

Bruno Zumino, "Normal Forms of Complex Matrices", Journal of Mathematical Physics 3, 1055 (1962)
摘要:有了 Gantmacher 的书(前两篇随笔摘录的内容),Bruno Zumino 的这篇文章很容易 follow,矩阵部分的数学可能个把两个小时就跟着推完了。还有一点关于量子场论的内容,我看不懂,暂时也不需要。 网上查了一下,Bruno Zumino 是超弦理论的提出者之一!没想到和这么重要的人面 阅读全文

posted @ 2021-10-23 13:06 luyi07 阅读(172) 评论(0) 推荐(0)

复数矩阵的指数表示
摘要:参考书:F. R. Gantmacher 《The Theory of matrices》Vol. 2 1. 厄米、正交矩阵 \(G = I e^{iK}\),\(I\) 为实对称对合矩阵,$K$为实反对称矩阵,$I,K$对易。 设实矩阵 \(S,T\) 满足 \(G = S + iT\),因为 \ 阅读全文

posted @ 2021-10-22 16:35 luyi07 阅读(648) 评论(0) 推荐(0)

正规算子的谱
摘要:参考书:F. R. Gantmacher 《The Theory of Matrices》Vol. 1 1. 伴随算子(adjoint operator) 我把伴随算子记作 \(A^\dagger\),因为它对应着量子力学书里的厄米算子: \[ (A \vec{x}, \vec{y} ) = ( \ 阅读全文

posted @ 2021-10-21 18:17 luyi07 阅读(1564) 评论(3) 推荐(0)

原子核壳模型程序 BigStick 脚本:sd壳能谱+B(E2)
摘要:以下脚本使用可执行程序: bigstick.x, tropic1b.x, genstrength.x 使用 sd 壳相关文件: sd.sps, usdb.int 结果文件: pxnx.res, pxnx.e2.str 使用了 awk 语句:awk 'BEGIN{print "'$A'"^0.1666 阅读全文

posted @ 2021-10-14 20:28 luyi07 阅读(121) 评论(0) 推荐(0)

PVPC运行脚本
摘要:PAVPC,就是 projection after variation of pair condensate,是最近我和师兄写的代码,托管在:https://gitee.com/luyi07/pvpc.git 1. run.sh 现在给这个代码写一个脚本 run.sh,可以用来计算 \(sd\) 壳 阅读全文

posted @ 2021-10-14 08:51 luyi07 阅读(133) 评论(0) 推荐(0)

Metropolis-Hastings算法
摘要:参考文献:Morten Hjorth-jensen 计算物理讲义 1. Metropolis-Hastings算法 1.1 随机行走:行走概率 $T(i \rightarrow j)$和接受概率 \(A(i \rightarrow j)\) 随机行者的跃迁概率为 \[ W( i \rightarro 阅读全文

posted @ 2021-10-11 13:32 luyi07 阅读(1104) 评论(0) 推荐(0)

导航