From cc12437725741908eea5195bbb491f1a78996598 Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Thu, 31 Mar 2022 09:38:23 +0200 Subject: [PATCH] Shrodprob stuff --- .../__pycache__/phys_const.cpython-310.pyc | Bin 0 -> 762 bytes .../__pycache__/phys_func.cpython-310.pyc | Bin 0 -> 777 bytes mas/shrodequ_superpos/main.py | 21 ++++++++++++++ mas/shrodequ_superpos/phys/__init__.py | 4 +++ mas/shrodequ_superpos/phys/__main__.py | 0 .../phys/__pycache__/__init__.cpython-310.pyc | Bin 0 -> 294 bytes .../phys/__pycache__/box.cpython-310.pyc | Bin 0 -> 645 bytes .../phys/__pycache__/const.cpython-310.pyc | Bin 0 -> 771 bytes .../phys/__pycache__/func.cpython-310.pyc | Bin 0 -> 777 bytes .../phys/__pycache__/particle.cpython-310.pyc | Bin 0 -> 559 bytes mas/shrodequ_superpos/phys/box.py | 9 ++++++ mas/shrodequ_superpos/phys/const.py | 26 ++++++++++++++++++ mas/shrodequ_superpos/phys/func.py | 17 ++++++++++++ mas/shrodequ_superpos/phys/particle.py | 11 ++++++++ 14 files changed, 88 insertions(+) create mode 100644 mas/shrodequ_superpos/__pycache__/phys_const.cpython-310.pyc create mode 100644 mas/shrodequ_superpos/__pycache__/phys_func.cpython-310.pyc create mode 100755 mas/shrodequ_superpos/main.py create mode 100644 mas/shrodequ_superpos/phys/__init__.py create mode 100644 mas/shrodequ_superpos/phys/__main__.py create mode 100644 mas/shrodequ_superpos/phys/__pycache__/__init__.cpython-310.pyc create mode 100644 mas/shrodequ_superpos/phys/__pycache__/box.cpython-310.pyc create mode 100644 mas/shrodequ_superpos/phys/__pycache__/const.cpython-310.pyc create mode 100644 mas/shrodequ_superpos/phys/__pycache__/func.cpython-310.pyc create mode 100644 mas/shrodequ_superpos/phys/__pycache__/particle.cpython-310.pyc create mode 100644 mas/shrodequ_superpos/phys/box.py create mode 100644 mas/shrodequ_superpos/phys/const.py create mode 100644 mas/shrodequ_superpos/phys/func.py create mode 100644 mas/shrodequ_superpos/phys/particle.py diff --git a/mas/shrodequ_superpos/__pycache__/phys_const.cpython-310.pyc b/mas/shrodequ_superpos/__pycache__/phys_const.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c80850bcea25f803ea2c6c8f1ec439263c9d7d81 GIT binary patch literal 762 zcmZWnJ&zMH5cPPyo6W~2fuzfcI%#etIwS-qT~0J8IteOEC|cH5lFNQL_NEA2m#g>{ zx$+u*kUK<`h95u!<2{5TurzNxv*Vff>@B0HMR5IifAw)d3Hk1V)8%7ufo8rS2qGXO z9MIE@<{tNQ#u*UdabJ2okZ@=SCjAk)2Odhso5B~t9pNp}5Fz^Zg7A)v@O*Pmr{qJE zcV*|$lP%fZ!#x1mjIpBsPemUq+J7rv2zW;(tt0XwvkA4qb(R$A+D0;yX{F0zo+rjE zJ`caX`S$7V^$}H(6kPS6<@OBi63v_;ROFTnNd+U6H$Z8^tLTu7Fo%QKOuOQvJ9P{Z zCZ2_*g|`;+2e42)5Z%G_&uP3Ya~aDl$>M8W-XIwhn{-*0S*&!qcpf9K*erD^4pRMOVpwsA;QqYx{t0VHU|9^_s2HE zqtjCBDsw8me* E0pzBfQ~&?~ literal 0 HcmV?d00001 diff --git a/mas/shrodequ_superpos/__pycache__/phys_func.cpython-310.pyc b/mas/shrodequ_superpos/__pycache__/phys_func.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..178b31c2b4fa5d8fd46a94dbb1f3c393d23547cc GIT binary patch literal 777 zcma)4L2uJA6!x=|HZ5y`ZcO4QgaeT{BZM?|t&lb@IZ&l>O2(4d*p5V{-O3MP$NnW> zIql4i6Yn{dn6w>mO5RDILDxV-qBwVoc=ngxxWeOf%`H`tyZ@Q9G z?l5Q{<2=J@Pcb;=;3s$D26k}6PS`D+unV?_Wg2<-;CZLLuveXj>pl1I-9xu$<_HV_ zoMp9YtE_5@Ci`gA*Q#_jvt_MRlWC*Ayvf=E6SYyY`qr;(uPdXK&2+uBt4-gPul3do zZLdby?KcTK1vAIxe+9o}{{))|3)9HZ-3&D}V+?tW?N`@kLJ1N*gcYF}T z0|z)K;5+;v5}}RLV4S^gPSh&&`?PtPN2AtR8XVK4MAmd4ITffn+v8s>Df?uxBFgY{ zCwuf(TGu-H5b@2LDamAdL?=VU*RAv|1%1TMzRx<%!N!0|F11qYVH_r{H(`Gemma&> Q*(;##BnSi(a0+Me3+cm3wEzGB literal 0 HcmV?d00001 diff --git a/mas/shrodequ_superpos/phys/__pycache__/box.cpython-310.pyc b/mas/shrodequ_superpos/phys/__pycache__/box.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d287653feec182e6970fb25d1a89dc198c03405a GIT binary patch literal 645 zcmYjOu};G<5VaGh4W&h>AHYnOMq)+?fe>4T)CFa+(%5ZUIdy8M60O+aW9Tn=W#R)^ zn7DH(%1L**duP9U=jg$pN5HI9gB%v;@bJHveB?|=F_D^>Ss3aK`1TIq<&H_)zGA5Xepo&E2on;--1>)F+ zQ~lyPO0MQjSp+Rc%+c?`Ew1uPUkL}L6SAk{gc=4|5;$h1n)zZ+Oc$`9yR_7mOr^?I z`egJ{7L849QEIKy+UWUJTIB$gMhm&#aJ#9cskKe(a%)qNGpe^P=6tbQG@RoUi#mFA z*T?3u;aIJw%Ys7dXqcmW$#@aPng|jv3^d~&K0kyQO4rYY;Kz5x1^hThcjq{+-5e)f z6t>DM$+_!sUTLvWnD;qfZ*uk5iDpXYjXA+#DBYZ5Kw8|z@^KHI%%>J9TEZriH-t=lRyGlLea9elHBcwV{eMUb-9XP zkt?s^|KJW$Bli8P5CJLS zfS#r_^SGBW&VUGy`_khz3H!QW(jSl;;DKbkA$(E0CcG)?B0%3-5Z;y{o^R~vgnVf5 zj%@F{vMD<|xB(#RAu@XZFnY*n{bf87@P>?<2keK;M%32M(>PBqZ75Tjl)A|0S!~SW zbN}nv_fOYP52%VH;MjkLn=`Z*Xyz25Bv+(QN*JKL6O<;rlJ>~}*RT+qX-7V|Q-=Uy zRUJb#Z}RnaCu|qDUj9i^anT z8;s0S7ecN#bF)!WtHMNTxiwKzX((@8kT?LKxk%e!j`nR(CPtU6ZWTc3jDc^U`Q1M0*b0CElfXi7ZTxs=9PMl)2Q4 z?c9`cDUJ1YoG+wyMQklrO6J1)%B<#>N3FTb(p7)K!;Ng82d%w;SdNu;I!u$B$Lpvd{`mp zhrGd3 z%Iyd3W1Ocr?J)+&9NcmzZeR;H?1;;BL-1KI_EK=r>5sl&!4#_0GyeHY|Ap1#{2%T6FpQV4!!5rf9h=jxkk_B$)MFyHJ z3`FK7rc>@kv9dwslT-;&(T(UHfo=ij6;)31xNHko`?%{{y$SyKDZRrU& zz4eh0MO8FH;J6N9Ku7fT?62ooU*M2JR9UHn@FO8gBU_F4Qz15OrVo{HrA^lOpr{&) zpVsN^!4Px!4lbj6Fd`SU%PeB float: + return D * np.sin( k(n) * x ) + +def psi_opt(x, n) -> float: # optimized version + return D * np.sin( psi_k[n] * x ) + +# probability density function +def prob(x, n) -> float: + return (psi(x, n))**2 + +def prob_opt(x, n) -> float: # optimized version + return abs(psi_opt(x,n)) ** 2 diff --git a/mas/shrodequ_superpos/phys/particle.py b/mas/shrodequ_superpos/phys/particle.py new file mode 100644 index 0000000..72db7a5 --- /dev/null +++ b/mas/shrodequ_superpos/phys/particle.py @@ -0,0 +1,11 @@ +from phys.func import psi, prob, E + +class particle: + def __init__(self, mass: float, n_state: int): + self.mass = mass + self.n_state = n_state + + self.energy = + + +