A python full-field electrodynamical solver, based on the Green dyadic method (volume integral technique in frequency domain).
Project description
***********************************
Overview / Installation
***********************************
pyGDM2 is available on `pypi <https://pypi.python.org/pypi/pygdm2/>`_ and `gitlab <https://gitlab.com/wiechapeter/pyGDM2>`_.
Detailed documentation with many examples is avaiable at the `pyGDM2 documentation website <https://wiechapeter.gitlab.io/pyGDM2-doc/>`_. See also the `documentation paper on arXiv (1802.04071) <https://arxiv.org/abs/1802.04071>`_
Requirements
================================
Python
------------------
- **python** (2.7 or 3.5+, `python <https://www.python.org/>`_)
- **numpy** (`numpy <http://www.numpy.org/>`_)
- **python headers** (under ubuntu, install the package *python-dev* or *python-devel*)
Fortran
------------------
- *fortran* compiler (tested with **gfortran**. `gcc <https://gcc.gnu.org/fortran/>`_)
- **openmp** (usually comes with fortran. `openmp <http://www.openmp.org/>`_)
- **f2py** (comes with **numpy**. `link <http://www.numpy.org/>`_)
Optional Python packages
-------------------------------------
- **scipy** >= v0.17.0, lower versions supported with restrictions (*Strongly recommended*. Used for standard solver LU decomposition and several tools. `scipy <https://www.scipy.org/>`_)
- **matplotlib** (*Strongly recommended*. For all 2D visualization tools. `matplotlib <https://matplotlib.org/>`_)
- **mpi4py** (for MPI parallelized calculation of spectra. `mpi4py <http://mpi4py.readthedocs.io/en/stable/>`_)
- **mayavi** (for all 3D visualization. `mayavi <http://docs.enthought.com/mayavi/mayavi/mlab.html>`_)
- **PIL** (image processing. `PIL <https://pypi.python.org/pypi/PIL>`_)
- **pathos** (for multi-threaded generalized propagator operations. `pathos <https://pypi.org/project/pathos/>`_)
- **pytables** (v3.x recommended. For hdf5 saving/loading of simulations. `pytables <https://www.pytables.org/>`_)
- **PaGMO / PyGMO** (version 2.4+. *Required* for the **EO** submodule. `pagmo <https://esa.github.io/pagmo2/>`_)
- **pycuda** (tested with version 2018.1, for GPU-based matrix inversion. `pyCUDA <https://documen.tician.de/pycuda/>`_)
- **scikit-cuda** (tested with version 0.5, for GPU-based matrix inversion. `scikit-cuda <https://scikit-cuda.readthedocs.io/en/latest/>`_)
(all available via `pip <https://pypi.python.org/pypi/pip>`_)
Installation under linux
=============================================
Via pip
-------------------------------
Install from pypi repository via
.. code-block:: bash
$ pip install pygdm2
Via setup script
-------------------------------
The easiest possibility to compile (and install) pyGDM is via the
setup-script, which uses the extended *distutils* from *numpy*.
To install pyGDM, run in the source directory:
.. code-block:: bash
$ python setup.py install
To install to a user-defined location, use the *prefix* option:
.. code-block:: bash
$ python setup.py install --prefix=/some/specific/location
To only compile without installation, use
.. code-block:: bash
$ python setup.py build
Manual compilation
-------------------------------------------------------------
1. clone git:
.. code-block:: bash
$ git clone https://gitlab.com/wiechapeter/pyGDM2.git
2. compile fortran parts:
.. code-block:: bash
$ cd fortranBase
$ make
3. *optional, for system-wide usage* add to **path** and **pythonpath**,
e.g. add following lines to file "/home/USER/.profile", where
"path_of_pyGDM_folder" is the pyGDM installation directory:
.. code-block:: bash
PATH="path_of_pyGDM_folder:$PATH"
export PATH
PYTHONPATH="path_of_pyGDM_folder:$PYTHONPATH"
export PYTHONPATH
Installation under windows
=============================================
For windows, we also recommend `Anaconda <https://www.anaconda.com/download/#windows>`_ in which pyGDM can be installed easily via pip. See also the MacOS X instructions, but you can skip all steps for installing the gcc compilers, since the windows version of pyGDM comes as pre-compiled binary package.
Via pip
-------------------------------
We provide a 64bit windows binary on the pypi repository (tested on Win7 and Win10). Install via
.. code-block:: bash
$ pip install pygdm2
Compile using the Anaconda distribution (tested with anaconda3)
------------------------------------------------------------------------------------------
1. get the repo (e.g. download from gitlab)
2. install gcc compiler:
.. code-block:: bash
$ conda install m2w64-toolchain libpython
3. compile fortran parts:
.. code-block:: bash
$ python setupy.py build
4. install:
.. code-block:: bash
$ python setupy.py install
Installation under Mac OS X
=============================================
Using the Anaconda distribution
-------------------------------------------------------------
The default compiler on OSX uses a clang which does not support OpenMP. Hence compilation might fail. We therefore suggest using `Anaconda <https://www.anaconda.com/download/#macos>`_ and install gcc from the conda repository in a virtualenv (Here the example of python2. python3 was not tested on OSX so far):
.. code-block:: bash
$ conda create -n python2 python=2.7 anaconda
"anaconda" at the end will copy the whole anaconda distribution to the virtial env. You can omit this option and create a "blank" virtual environment to install only selected packages.
Next activate the virtualenv and install the required software:
.. code-block:: bash
$ source activate python2
$ xcode-select --install
$ conda install pip
$ conda install gcc
$ pip install pygdm2
Also make sure you have the latest versions of numpy and scipy:
.. code-block:: bash
$ pip install numpy scipy --upgrade
Without Anaconda
-------------------------------------------------------------
Alternatively, you can download the latest version and compile it manually without OpenMP support, which should work with the default OSX compiler:
.. code-block:: bash
$ python setup.py install --no-openmp
Authors
=========================
Python code
------------------------
- P\. R. Wiecha
Fortran code
-------------------------
- C\. Girard
- A\. Arbouet
- R\. Marty
- P\. R. Wiecha
Overview / Installation
***********************************
pyGDM2 is available on `pypi <https://pypi.python.org/pypi/pygdm2/>`_ and `gitlab <https://gitlab.com/wiechapeter/pyGDM2>`_.
Detailed documentation with many examples is avaiable at the `pyGDM2 documentation website <https://wiechapeter.gitlab.io/pyGDM2-doc/>`_. See also the `documentation paper on arXiv (1802.04071) <https://arxiv.org/abs/1802.04071>`_
Requirements
================================
Python
------------------
- **python** (2.7 or 3.5+, `python <https://www.python.org/>`_)
- **numpy** (`numpy <http://www.numpy.org/>`_)
- **python headers** (under ubuntu, install the package *python-dev* or *python-devel*)
Fortran
------------------
- *fortran* compiler (tested with **gfortran**. `gcc <https://gcc.gnu.org/fortran/>`_)
- **openmp** (usually comes with fortran. `openmp <http://www.openmp.org/>`_)
- **f2py** (comes with **numpy**. `link <http://www.numpy.org/>`_)
Optional Python packages
-------------------------------------
- **scipy** >= v0.17.0, lower versions supported with restrictions (*Strongly recommended*. Used for standard solver LU decomposition and several tools. `scipy <https://www.scipy.org/>`_)
- **matplotlib** (*Strongly recommended*. For all 2D visualization tools. `matplotlib <https://matplotlib.org/>`_)
- **mpi4py** (for MPI parallelized calculation of spectra. `mpi4py <http://mpi4py.readthedocs.io/en/stable/>`_)
- **mayavi** (for all 3D visualization. `mayavi <http://docs.enthought.com/mayavi/mayavi/mlab.html>`_)
- **PIL** (image processing. `PIL <https://pypi.python.org/pypi/PIL>`_)
- **pathos** (for multi-threaded generalized propagator operations. `pathos <https://pypi.org/project/pathos/>`_)
- **pytables** (v3.x recommended. For hdf5 saving/loading of simulations. `pytables <https://www.pytables.org/>`_)
- **PaGMO / PyGMO** (version 2.4+. *Required* for the **EO** submodule. `pagmo <https://esa.github.io/pagmo2/>`_)
- **pycuda** (tested with version 2018.1, for GPU-based matrix inversion. `pyCUDA <https://documen.tician.de/pycuda/>`_)
- **scikit-cuda** (tested with version 0.5, for GPU-based matrix inversion. `scikit-cuda <https://scikit-cuda.readthedocs.io/en/latest/>`_)
(all available via `pip <https://pypi.python.org/pypi/pip>`_)
Installation under linux
=============================================
Via pip
-------------------------------
Install from pypi repository via
.. code-block:: bash
$ pip install pygdm2
Via setup script
-------------------------------
The easiest possibility to compile (and install) pyGDM is via the
setup-script, which uses the extended *distutils* from *numpy*.
To install pyGDM, run in the source directory:
.. code-block:: bash
$ python setup.py install
To install to a user-defined location, use the *prefix* option:
.. code-block:: bash
$ python setup.py install --prefix=/some/specific/location
To only compile without installation, use
.. code-block:: bash
$ python setup.py build
Manual compilation
-------------------------------------------------------------
1. clone git:
.. code-block:: bash
$ git clone https://gitlab.com/wiechapeter/pyGDM2.git
2. compile fortran parts:
.. code-block:: bash
$ cd fortranBase
$ make
3. *optional, for system-wide usage* add to **path** and **pythonpath**,
e.g. add following lines to file "/home/USER/.profile", where
"path_of_pyGDM_folder" is the pyGDM installation directory:
.. code-block:: bash
PATH="path_of_pyGDM_folder:$PATH"
export PATH
PYTHONPATH="path_of_pyGDM_folder:$PYTHONPATH"
export PYTHONPATH
Installation under windows
=============================================
For windows, we also recommend `Anaconda <https://www.anaconda.com/download/#windows>`_ in which pyGDM can be installed easily via pip. See also the MacOS X instructions, but you can skip all steps for installing the gcc compilers, since the windows version of pyGDM comes as pre-compiled binary package.
Via pip
-------------------------------
We provide a 64bit windows binary on the pypi repository (tested on Win7 and Win10). Install via
.. code-block:: bash
$ pip install pygdm2
Compile using the Anaconda distribution (tested with anaconda3)
------------------------------------------------------------------------------------------
1. get the repo (e.g. download from gitlab)
2. install gcc compiler:
.. code-block:: bash
$ conda install m2w64-toolchain libpython
3. compile fortran parts:
.. code-block:: bash
$ python setupy.py build
4. install:
.. code-block:: bash
$ python setupy.py install
Installation under Mac OS X
=============================================
Using the Anaconda distribution
-------------------------------------------------------------
The default compiler on OSX uses a clang which does not support OpenMP. Hence compilation might fail. We therefore suggest using `Anaconda <https://www.anaconda.com/download/#macos>`_ and install gcc from the conda repository in a virtualenv (Here the example of python2. python3 was not tested on OSX so far):
.. code-block:: bash
$ conda create -n python2 python=2.7 anaconda
"anaconda" at the end will copy the whole anaconda distribution to the virtial env. You can omit this option and create a "blank" virtual environment to install only selected packages.
Next activate the virtualenv and install the required software:
.. code-block:: bash
$ source activate python2
$ xcode-select --install
$ conda install pip
$ conda install gcc
$ pip install pygdm2
Also make sure you have the latest versions of numpy and scipy:
.. code-block:: bash
$ pip install numpy scipy --upgrade
Without Anaconda
-------------------------------------------------------------
Alternatively, you can download the latest version and compile it manually without OpenMP support, which should work with the default OSX compiler:
.. code-block:: bash
$ python setup.py install --no-openmp
Authors
=========================
Python code
------------------------
- P\. R. Wiecha
Fortran code
-------------------------
- C\. Girard
- A\. Arbouet
- R\. Marty
- P\. R. Wiecha
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyGDM2-1.0.7.linux-x86_64.tar.gz
(416.7 kB
view hashes)
Built Distributions
pyGDM2-1.0.7-py2.7-linux-x86_64.egg
(445.7 kB
view hashes)
pyGDM2-1.0.7-cp36-cp36m-win_amd64.whl
(369.0 kB
view hashes)
pyGDM2-1.0.7-cp35-cp35m-win_amd64.whl
(358.0 kB
view hashes)
pyGDM2-1.0.7-cp27-cp27m-win_amd64.whl
(475.0 kB
view hashes)
Close
Hashes for pyGDM2-1.0.7.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8dded9ed6cab506528429fae7a25a912dce36ffa47d22249b3336b738f2c845d |
|
MD5 | d0790431c3464813fa255c46c0f8c0dd |
|
BLAKE2b-256 | 5b45edfaf56dd19876604f9c5ecd46bbf2971e5e1e92160e33dd39535afb9d3f |
Close
Hashes for pyGDM2-1.0.7-py2.7-linux-x86_64.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 327987aea09b255d23a35241feffc1edcb1f83b54d12e0ca90410eb9cef65632 |
|
MD5 | 9fe16ecc431b19d30f299e7af1cf2823 |
|
BLAKE2b-256 | 315d992a0028204cb53beb2a3eb23a272184cee8a476778b977c93a05b7f8a30 |
Close
Hashes for pyGDM2-1.0.7-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f96edcab8f3b97402c14e0bd4333e43e9b9d0df99d4928fb0af31bc13c5f1eee |
|
MD5 | bb21a48a1eccb51395839a4366948166 |
|
BLAKE2b-256 | d3a65d23522a3bc575ccd89929388aac7b53ce81593033dbd15840fd24f42073 |
Close
Hashes for pyGDM2-1.0.7-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d08ee782da14d1c661bda7d46718289a0ee8f6dec8379e71edbb4d3babbfeab |
|
MD5 | cf47f248251b7a5af7f55c2eef481a7b |
|
BLAKE2b-256 | a086a68dca4ce31ee87d4adf23f3b7c968f6728cf99075b7ac6735c334791e70 |
Close
Hashes for pyGDM2-1.0.7-cp27-cp27m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fb650ed8f67c477e71495f9066002feea7c06d6e0be8139cfd32f8675eb9da2 |
|
MD5 | 142fb7f26d4104830e947025d854be23 |
|
BLAKE2b-256 | 2190ed6c1ad19e1c067eba4897c9bd745c2341c12196d441eed6e9ecbd0c7e2e |