-
Notifications
You must be signed in to change notification settings - Fork 1
/
infinite_well_3dA.py
executable file
·91 lines (86 loc) · 3.3 KB
/
infinite_well_3dA.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# This work is under the Copyright Christopher A. Greeley (2024) and it is distributed
# under the No Kill Do No Harm License, a legally non-binding sumemry is as follows:
#
# # No Kill Do No Harm Licence – Summary
#
# Based on version 0.3, July 2022 of the Do No Harm License
#
# https://github.com/raisely/NoHarm
#
# LEGALLY NON-BINDING SUMMARY OF THE TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
#
# ## Licence Grants
#
# You're allowed
#
# - to distribute the licensed work,
# - to create, publish, sublicense and patent derivative works and
# - to put your modifications or your derivative work under a seperate licence,
#
# free of charge. Though, filing patent litigation leads to the loss of the patent licence. Also, the licence grants don't include the right to use the licensor's trademarks.
#
# ## Unethical Behaviour
#
# You may not use the licensed work if you engage in:
#
# - human rights violations,
# - environmental destruction,
# - warfare,
# - addictive/destructive products or services or
# - actions that frustrate:
# * peace,
# * access to human rights,
# * peaceful assembly and association,
# * a sustainable environment or
# * democratic processes
# * abortion
# * euthanasia
# * human embryonic stem cell research (if human organisms are killed in the process)
# - except for actions that may be contrary to "human rights" (or interpretations thereof), do not kill and that frustrate
# * abortion
# * euthanasia
# * killing
# and; the software must never be used to kill, including: abortion, euthanasia, human stem cell research, in war, or law enforcement or as a part of any lethal weapon
#
# ## Contributions
#
# Contributions to the licensed work must be licensed under the exact same licence.
#
# ## Licence Notice
#
# When distributing the licensed work or your derivative work, you must
#
# - include a copy of this licence,
# - retain attribution notices,
# - state changes that you made and
# - not use the names of the author and the contributors to promote your derivative work.
#
# If the licensed work includes a "NOTICE" text file with attribution notices, you must copy those notices to:
#
# - a "NOTICE" file within your derivative work,
# - a place within the source code or the documentation or
# - a place within a display generated by your derivative work.
#
# ## No Warranty or Liability
#
# The licensed work is offered on an as-is basis without any warranty or liability. You may choose to offer warranty or liability for your derivative work, but only fully on your own responsibility.
#
from libschrodinger.numerov3d import *
from libschrodinger.plot3d import *
from libschrodinger.potentials3d import *
import matplotlib
import pyqtgraph as pg
def main():
with cp.cuda.Device(0):
pointCount : int = 25
grid = makeLinspaceGrid(pointCount, 1, 3)
potential = 0 * grid.x
print("Built potential, calculating wave functions")
waves = computeWaveFunction(potential, energyCount = 1, A= True)
print("Done computing wave functions, with corresponding energies, please wait for graphical output.")
currentEnergy = 0
application = pg.mkQApp()
plots = GPUAcclerated3DPlotApplication(application, potential, waves)
application.instance().exec()
if __name__ == "__main__":
main()