QPMS
Electromagnetic multiple scattering library and toolkit.
|
Yes, it is possible. Basically all you need is a device capable of running Termux with enough memory to build everything.
The following instructions have been tested with Termux version 0.118.0 on e/OS/ R development build on a Samsung Galaxy S10e (e-1.0-r-20220526188878-dev-beyond0lte). Presumably, they should work also on stock Android as well, but who in their right mind would run all the spyware by Google & al.?
Physical keyboard or remote access is strongly recommended. :D
Just install the Termux app from F-Droid or Github as per instructions.
Open Termux; the following steps of these instructions are basically just commands you need to type in Termux.
The goal is to fix setup.py
so that it finds the correct libraries automatically, but in the meantime, you can use this workaround to get the Python part of QPMS installed:
(Successful build requires the MATHLIB
environmental variable set, otherwise linking will fail; see https://wiki.termux.com/wiki/Python.)
Hopefully, QPMS has installed successfully. At this point, you should be able to import and use QPMS with some exceptions. First, there is some legacy code in the qpms.qpms_p
module (which is no longer imported automatically with bare import qpms
). You shouldn't need this unless you are trying to run some historic Jupyter notebooks or other old custom scripts. It contains a scipy dependence, and scipy is hard to get working in Android environment (as it requires a Fortran compiler to build).
If you try to run just pip3 install matplotlib
in Termux, it might likely fail when installing the pillow
dependency. First, according to Termux wiki, pillow depends on libpng
and libjpeg-turbo
, which are fortunately available in Termux packages. Second, pillow instalation requires an additional environment variable LDFLAGS="-L/system/lib64"
to be set on 64-bit devices.
Hence:
After this step, you should be able to run the command-line scripts from misc/
directory and examples from examples/
directory.