aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md111
-rw-r--r--pyproject.toml3
-rw-r--r--schroedinger/schrodinger_solve.py2
3 files changed, 113 insertions, 3 deletions
diff --git a/README.md b/README.md
index ce01362..cc6f08f 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,110 @@
-hello
+# Installation
+## Dependencies
+Schroedinger was build and tested using the following dependency list. Any
+deviation may result in Schroedinger not working properly
+
+- python 3.12+
+- matplotlib 3.8.2
+- numpy 2.0.0
+- scipy 1.12.0
+- build (optional, wheel creation)
+- sphinx 5.1.1 (optional, documentation)
+- sphix book theme (optional, documentation)
+
+## Compile
+To compile schroedinger and generate a wheel package in the `dist` folder run
+
+ python -m build -w
+
+## Documentation
+Documentation is stored in the `docs` folder and can be generated by running
+
+ cd docs
+ make html
+
+# schrodinger\_solve
+Solves the one-dimensional, time independent Schroedinger's equation for a given
+system and generates files with the energies, potential, wave functions and
+expectation value of the position of the particles. schrodinger\_solve takes a
+file describing the parameters to use and the potential (see below for file
+format).
+
+## Usage
+ schrodinger_solve [-h] [-o OUTPUT_DIR] filename
+
+## Options
+ positional arguments:
+ filename File describing the system to solve
+
+ options:
+ -h, --help show this help message and exit
+ -o OUTPUT_DIR, --output-dir OUTPUT_DIR
+ Output directory for the results
+
+## Input file format
+The input file format consist of a five line header followed by a csv style, two
+column table describing the potential. Lines in the header that specify multiple
+parameters are separated by whitespace characters (tab or space). Parameters
+must be given in a fixed order. Comments discard the rest of the line and
+may be added with a `#` character. An empty line is discarded and the next
+non-empty line specifies the next parameter. A concrete example is given below.
+
+ <mass>
+ <x-min> <x-max> <n-points>
+ <first-eigenvalue> <last-eigenvalue>
+ <interpolation-type>
+ <n>
+ <x1> <y1>
+ <x2> <y2>
+ ...
+ <xn> <yn>
+
+- mass: (real) Mass of the particle
+- x-min, x-max: (real) Solution interval
+- n-points: (integer) Number of points in the discretization of the solution
+ interval
+- first-eigenvalue, last-eigenvalue: (integer) Interval of energy eigenvalues to
+ generate
+
+Further examples can be found in the subfolders inside `test`
+
+# schrodinger\_plot
+
+Plots the solutions of schrodinger\_solve. Visualises the given potential
+together with the eigenstates and the probability density. Also plots the
+standard deviation of each energy level.
+
+Solutions of schrodinger_solve must be in a directory together for
+schrodinger\_plot to visualise them. Solution files must keep names given by
+schrodinger\_solve.
+
+The plot generated by schrodinger_plot can be altered with different scale and
+axis limits to better visualize the solution. If no custom scale or limits are
+given schrodinger\_solve will limit the plot by the limits of the potential as
+well as the energies of the solution for a better initial result.
+
+## Usage
+ schrodinger_plot.py [-h] [-s SOLUTION_DIR] [-o OUTPUT_DIR] [--show SHOW] [-e EXPORT] [--scale SCALE] [-x XLIM] [-y1 ENERGY_LIM] [-y2 UNCERTAINTY_LIM]
+## Options
+ -h, --help show a help message
+ -s SOLUTION_DIR --solution_dir
+ the path of the solution directory (default: None)
+ -o OUTPUT_DIR --output_dir
+ the path where the pdf should be saved (default: None)
+ --show SHOW Boolean, if True the plot is shown directly (default:
+ True)
+ -e EXPORT --export
+ Boolean, if True the plot is exported as a pdf
+ (default: True)
+ --scale SCALE Float, scales the wave functions (default: 1.0)
+ -x XLIM --xlim Limit of the x-axis of the left plot. None or
+ tuple[float, float] of shape (x_min, x_max)(default:
+ None)
+ -y1 ENERGY_LIM --energy_lim
+ Limit of the y-axis of the left plot. None or
+ tuple[float, float] of shape (y_min, y_max)(default:
+ None)
+ -y2 UNCERTAINTY_LIM --uncertainty_lim
+ Limit of the y-axis of the right plot. None or
+ tuple[float, float] of shape (y_min, y_max)(default:
+ None)
diff --git a/pyproject.toml b/pyproject.toml
index 27d328b..83ca092 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -9,7 +9,8 @@ requires-python = ">= 3.12"
dependencies = ["matplotlib", "numpy", "scipy"]
maintainers = [{name = "Thomas Albers Raviola", email = "thomasgu@uni-bremen.de"},
{name = "Tim Suhling", email = "timsuh@uni-bremen.de"}]
-description = ""
+description = "Numerical solver and plotter of solutions to the one-dimensional Schoedinger
+ equation"
readme = "README.md"
license = {file = "COPYING"}
diff --git a/schroedinger/schrodinger_solve.py b/schroedinger/schrodinger_solve.py
index aec63e1..47dce70 100644
--- a/schroedinger/schrodinger_solve.py
+++ b/schroedinger/schrodinger_solve.py
@@ -14,7 +14,7 @@ from schroedinger import (
Config, build_potential, solve_schroedinger
)
-DESCRIPTION='Solve time independent Schrödinger\'s equation for a given system.'
+DESCRIPTION='Solve time independent Schroedinger\'s equation for a given system.'
def save_wavefuncs(
filename: Path,