Prerequisites
You should have a working Python installation and ideally also git. The kdotpy package is installed using PIP, which takes care of downloading and installing the necessary Python libraries automatically.
Download and installation
You may choose any of the following methods:
-
Using PIP, from the Python Package Index (PyPI):
python3 -m pip install kdotpy
-
Using PIP, directly from our repository:
python3 -m pip install git+https://git@git.physik.uni-wuerzburg.de/kdotpy/kdotpy.git
-
Alternatively, you can download the source with
git clone
and install it from your local copy:git clone https://git.physik.uni-wuerzburg.de/kdotpy/kdotpy.git python3 -m pip install ./kdotpy
-
If you cannot use git, then you can download a
.zip
or.tar.gz
file from the Gitlab repository. Download the preferred file format from the dropdown menu under the “Code” button. Unpack the files into an empty directory. Then use:python3 -m pip install ./directoryname
to install kdotpy, replacing
./directoryname
by the appropriate directory name where you unpacked the files.
Note:
It is recommended that you can install and use kdotpy in a virtual environment. Activate the virtual environment before you install kdotpy. See the Python docs about
venv
for more information.
Note:
For an editable install for active coding and debugging, add the
-e
option topip install
, like so:python3 -m pip install -e ./kdotpy
Testing the installation
If the install was successful, then typing
kdotpy version
on the command line should return the version number. If it doesn’t, then something went wrong during the installation.
For testing the functionality of kdotpy
, you can use
kdotpy test
for running the standardized tests. Note: The tests take a few minutes to
complete. They will generate output in the subdirectory test
relative to where
you start kdotpy test
.
Upgrading to a newer version
To upgrade using PIP from the Python Package Index (PyPI), you can
use the --upgrade
option with pip install
:
python3 -m pip install --upgrade kdotpy
The other installation methods given above can be used in a similar way.
General usage
kdotpy is designed as a standalone application. If you have followed the
installation instructions above, you can simply run kdotpy
from the command
line, followed by the ‘sub-programme’ label and further arguments. You can do
this from any folder.
The first argument is always the sub-programme. The calculation scripts are
kdotpy 1d
, kdotpy 2d
, kdotpy bulk
, kdotpy ll
, and kdotpy bulk-ll
.
There are two re-plot scripts, kdotpy merge
and kdotpy compare
. Batch
calculations can be done with kdotpy batch
. The scripts kdotpy config
,
kdotpy help
, and kdotpy doc
give access to configuration and information.
Finally, kdotpy test
runs pre-defined tests for checking that kdotpy works
correctly.
You can also use python3 -m kdotpy
followed by the sub-programme and further
arguments.
Examples
Example command line:
kdotpy 2d 8o noax msubst CdZnTe 4% mlayer HgCdTe 68% HgTe HgCdTe 68% llayer 10 7 10 zres 0.25 k -0.6 0.6 / 60 kphi 45 erange -80 0 split 0.01 obs orbitalrgb legend char out -7nm outdir data-qw localminmax
This and more examples can be found in the Tutorials section of the Wiki.
Hint: kdotpy test showcmd
gives you a list of the command lines used for
kdotpy test
.