{ "info": { "author": "Janne Solanp\u00e4\u00e4", "author_email": "janne+fiend@solanpaa.fi", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3 :: Only", "Topic :: Scientific/Engineering :: Physics" ], "description": "Overview\n========\n\nFIEND is a software package for simulating time-dependent single-particle quantum\nmechanics in cylindrically symmetric systems. This includes systems such as atoms and linear\nmolecules in linearly polarized laser field, metal nanotapers, and\nnanoclusters.\n\nFIEND employs the `FEniCS`_ FEM-suite for meshing and assembling the system\nmatrices, and `PETSc`_ and `SLEPc`_ for high-performance linear algebra.\n\n.. _FEniCS: https://www.fenicsproject.org\n.. _PETSc: https://bitbucket.org/petsc/petsc\n.. _SLEPc: https://bitbucket.org/slepc/slepc\n\nPackage structure\n-----------------\n\nThe package structure is as follows::\n\n .\n \u251c\u2500\u2500 docker\n \u2502 Files for building Docker containers\u00a0\n \u2502\u00a0 for easy installation of Fiend\n \u2502\u00a0\u00a0\u00a0 \n \u251c\u2500\u2500 fiend\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 analysis\n \u2502 \u2502 \u2502 Analysis scripts\n \u2502 \u2502 \u2502\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 animate_density.py\n \u2502 \u2502 \u2502 Animation of electron density in time\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 custom.mplparams\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 draw_acceleration.py\n \u2502 \u2502 \u2502 Visualization of dipole acceleration\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 draw_dipole.py\n \u2502 \u2502 \u2502 Visualization of dipole moment\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 draw_final_state.py\n \u2502 \u2502 \u2502 Visualization of the final state of the propagation\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 draw_laser.py\n \u2502 \u2502 \u2502 Visualization of the laser electric field\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 draw_mesh.py\n \u2502 \u2502 \u2502 Visualization of meshes\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 draw_norm.py\n \u2502 \u2502 \u2502 Visualization of wavefunction norm in time\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 draw_pes.py\n \u2502 \u2502 \u2502 Computation of photoelectron spectrum (experimental)\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 draw_snapshot.py\n \u2502 \u2502 \u2502 Visualization of electron density at single instant of time\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 draw_stationary_states.py\n \u2502 \u2502 \u2502 Visualization of stationary states\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 draw_velocity.py\n \u2502 \u2502 \u2502 Visualization of dipole velocity\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 _pes_tsurff.py\n \u2502 \u2502 \u2502 Implementation of tsurff\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 tests\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 Tests of the analysis scripts\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 _unit_conversions.py\n \u2502 \u2502 \u2502 Unit conversion tools\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 _visualization_utils.py\n \u2502 \u2502 Visualization tools\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 lin_pol\n \u2502 \u2502 \u2502 Tools for propagation with linearly polarized pulses \n \u2502 \u2502 \u2502\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 prepare_tdse.py\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 propagate.py\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 solve_tise.py\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 propagation\n \u2502 \u2502 \u2502 Implementation of propagation-related stuff \n \u2502 \u2502 \u2502\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 observables.py\n \u2502 \u2502 \u2502 Implementation of all observables\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 propagation_utils.py\n \u2502 \u2502 \u2502 Helpful tools for loading system matrices\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 propagators.py\n \u2502 \u2502 \u2502 All propagators are implemented here\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 tests\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 Tests for the propagators\n \u2502 \u2502\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 pulseconfig_parser\n \u2502 \u2502 \u2502 Parser for laser pulse configuration files\n \u2502 \u2502 \u2502\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 laser.py\n \u2502 \u2502 \u2502 Implementation of Laser\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 parameter.py\n \u2502 \u2502 \u2502 Implementation of const/non-const parameter\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 parser.py\n \u2502 \u2502 \u2502 Implementation of Laser configurtion parser\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 singlecolorlaserpulse.py\n \u2502 \u2502 Implementation of a single channel laser pulse\n \u2502 \u2502\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 tdse\n \u2502 \u2502 \u2502 Tools for preparing the system matrices etc. for propagation\n \u2502 \u2502 \u2502\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 absorbing_boundaries.py\n \u2502 \u2502 \u2502 Complex absorbing boundary\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 tdse.py\n \u2502 \u2502 \u2502 Preparation of system matrices for propagation\n \u2502 \u2502 \u2502 and related IO tools\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 tests\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 Tests related to preparation of \n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 system matrices\n \u2502 \u2502\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 tests\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 Global tests (mypy)\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \n \u2502\u00a0\u00a0 \u251c\u2500\u2500 tise\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u251c\u2500\u2500 tests\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 Tests for TISE solver\n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \n \u2502\u00a0\u00a0 \u2502\u00a0\u00a0 \u2514\u2500\u2500 tise.py\n \u2502 \u2502 TISE solver and related IO tools\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 utils\n \u2502 \u2502 Helper tools that are used all over the code\n \u2502 \u2502\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 custom_matrices.py\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 dolfin.py\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 __init__.py\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 mesh.py\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 misc.py\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 mpi.py\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 petsc_utils.py\n \u2502\u00a0\u00a0 \u251c\u2500\u2500 predefined_potentials.py\n \u2502\u00a0\u00a0 \u2514\u2500\u2500 tests\n \u2502\u00a0\u00a0 Tests for the utilities\n \u2502 \n \u251c\u2500\u2500 license.txt\n \u251c\u2500\u2500 README.md\n \u2502 Readme for Gitlab\n \u251c\u2500\u2500 README.rst\n \u2502 Readme for PYPI\n \u251c\u2500\u2500 requirements.txt\n \u2502 Dependencies of Fiend\n \u2514\u2500\u2500 setup.py\n Python setuptools script\n\n\nSolving the Schr\u00f6dinger equation\n--------------------------------\n\nThe time dependent Schr\u00f6dinger equation (TDSE) (in `Hartree\natomic units`_) is\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\mathrm{i}\\\\partial_t\\\\vert{\\\\psi(t)}\\\\rangle=\\\\hat{H}(t)\\\\vert{\\\\psi(t)}\\\\rangle,\\~\\\\vert{\\\\psi(t=0)}\\\\rangle=\\\\vert\\\\psi_0\\\\rangle\n\nwhere |ket_psi_td| is the time-evolving state, |ket_psi_0| the initial state,\n|Ht| the time-dependent Hamiltonian operator whose time-independent part\nis given by |H0| with the stationary potential |V|.\n\nThe stationary states of the time-independent Hamiltonian can be solved\nfrom the time-independent Schr\u00f6dinger equation (TISE)\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\hat{H_0}\\\\vert\\\\psi_k\\\\rangle=E_k\\\\vert\\\\psi_k\\\\rangle,\n\nwhere |Ek| and |psik| are the ith eigenenergy and eigenstate.\n\nIn a typical setup, the initial state for the time propagation, |ket_psi_0|, is one\nof the stationary states. \n\n.. |ket_psi_td| image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\vert{\\\\psi(t)}\\\\rangle \n.. |ket_psi_0| image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\vert{\\\\psi_0}\\\\rangle \n.. |Ht| image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\hat{H}(t)=\\\\hat{H}_0+\\\\hat{W}(t)\n.. |H0| image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\hat{H}_0=\\\\hat{T}+\\\\hat{V}\n.. |V| image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\hat{V}\n.. |Ek| image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;E_k\n.. |psik| image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\vert\\\\psi_k\\\\rangle\n.. _Hartree atomic units: https://en.wikipedia.org/wiki/Atomic_units\n\nTheoretical background\n----------------------\n\nFor description on how TISE and TDSE have been discretized, please see \n`MyArticle`_.\n\n.. _MyArticle: https://notpublished.yet\n\nIn short, we describe our system in cylindrical coordinates assuming zero\nmagnetic quantum number |m=0|. This allows us to describe the system in a 2D\nslice of the cylindrical coordiante system. We select simulation domains \n|omegati| and |omegatd| for TISE and TDSE and mesh them with unstructured \ntriangular meshes. Note that the simulation domains can be different so you\ncan, e.g., increase the simulation domain for TDSE calculations if need be.\n\nAfter meshing, one selects the basis functions. They are Lagrange polynomials\nup to some degree n with compact support on the mesh cells. Meshing and\nchoosing the basis allows us to discretize the Schr\u00f6dinger equations to\n\n.. image:: https://latex.codecogs.com/svg.latex?(\\\\mathbf{T}+\\\\mathbf{V})\\\\boldsymbol\\\\psi_k=\\\\mathbf{S}E_k\\\\boldsymbol\\\\psi_k\n\nand\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\mathrm{i}\\\\mathbf{S}\\\\boldsymbol{\\\\psi}(t)=\\\\left(\\\\mathbf{T}+\\\\mathbf{V}+\\\\mathbf{W}\\\\right)\\\\boldsymbol\\\\psi(t),\n\nwhere |psiti| are vectors of the real-valued expansion coefficients of the\nstationary states, |psitd| is a vector of the complex-valued expansion\ncoefficients of the time-dependent state, and the system matrices in the\nLagrange polynomial basis |basis| are given by\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\mathbf{S}_{ij}=\\\\langle\\\\psi_i\\\\vert\\\\psi_j\\\\rangle,\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\mathbf{T}_{ij}=-\\\\frac{1}{2}\\\\sum\\\\limits_{\\\\alpha=\\\\rho,z}\\\\langle\\\\partial_\\\\alpha\\\\phi_i\\\\vert\\\\partial_\\\\alpha\\\\phi_j\\\\rangle,\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\mathbf{V}_{ij}=\\\\langle\\\\psi_i\\\\vert{V(\\\\rho,z)}\\\\psi_j\\\\rangle,\n\nand\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\mathbf{W}_{ij}=\\\\langle\\\\psi_i\\\\vert{W(\\\\rho,z,\\\\partial_\\\\rho,\\\\partial_z)}\\\\psi_j\\\\rangle.\n\nHere the natural inner product is\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;\\\\langle\\\\chi\\\\vert\\\\psi\\\\rangle=\\\\int\\\\limits_{\\\\Omega_{\\\\mathrm{TI}/\\\\mathrm{TD}}}\\\\chi^*(\\\\rho,z)\\\\psi(\\\\rho,z)\\,\\\\rho\\,\\\\mathrm{d}\\\\rho\\,\\\\mathrm{d}z.\n\n\nNote that we have emposed continuity boundary condition at |rho0| and either\nzero Dirichlet or zero Neumann boundary conditions elsewhere on the boundary.\n\n.. |rho0| image:: https://latex.codecogs.com/svg.latex?\\\\rho=0\n\n.. |basis| image:: https://latex.codecogs.com/svg.latex?\\\\{\\\\phi_i\\\\}_{i=0}^{N-1}\n\n.. |psiti| image:: https://latex.codecogs.com/svg.latex?\\\\boldsymbol{\\\\psi}_k\n\n.. |psitd| image:: https://latex.codecogs.com/svg.latex?\\\\boldsymbol{\\\\psi}(t)\n\n.. |m=0| image:: https://latex.codecogs.com/svg.latex?m=0\n\n.. |omegati| image:: https://latex.codecogs.com/svg.latex?\\\\Omega_{\\\\mathrm{TI}}\n\n.. |omegatd| image:: https://latex.codecogs.com/svg.latex?\\\\Omega_{\\\\mathrm{TD}}\n\n\nInteractions\n++++++++++++\n\nBy default we implement three types of laser-matter interactions |Wint|:\n\nthe dipole approximation in the length gauge for linearly polarized vector\npotentials |Alin|\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;W=z\\\\partial_t{f(t)}\n\nthe dipole approximation in the length gauge for linearly polarized vector\npotentials |Alin|,\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;W=-\\\\mathrm{i}f(t)\\\\partial_z\n\nand nonhomogeneous vector potentials |Anh|\n\n.. image:: https://latex.codecogs.com/svg.latex?\\\\Large&space;W=f(t)\\\\mathbf{A}_s\\\\cdot\\\\mathbf{\\\\hat{p}}+\\\\frac{1}{2}f(t)^2\\\\Vert\\\\mathbf{A}_s\\\\Vert^2.\n\n.. |Wint| image:: https://latex.codecogs.com/svg.latex?W(\\\\rho,z,\\\\partial_\\\\rho,\\\\partial_z)\n\n.. |Alin| image:: https://latex.codecogs.com/svg.latex?\\\\mathbf{A}(\\\\rho,z,t)=f(t)\\\\boldsymbol{\\\\mathrm{e}}_z\n\n.. |Anh| image:: https://latex.codecogs.com/svg.latex?\\\\mathbf{A}(\\\\rho,z,t)=\\\\mathbf{A}_s(\\\\rho,z)f(t)\n\n\nUsing FIEND\n===========\n\nA single time-dependent simulation consists of 4 steps:\n\n1. **Solving the time-independent system to obtain an initial state**\n2. **Preparing the system matrices for time evolution**\n3. **Time evolution**\n4. **Post-processing/analysis**\n\nThese steps are described in detail in the following when simulating atomic\nsystems under linearly polarized laser fields. For more complex cases, please\nsee the examples in ``demos/nanotip``.\n\nStep 1. Solving TISE\n--------------------\n\nTime-independent system should always be solved first. Make sure that you have\nloaded environment with a FEniCS installation supporting HDF5, PETSc, and\nSLEPc. In the pre-installed Docker image, you can use the command \n``ml petsc/real``.\n\nTISE can be solved with the script ``fiend_linpol_tise``. It solves an atomic system\nwithin the single active electron approximation, and the atomic potential can\nbe selected with the command line option ``--atom_type``.\n\nFor a full list of options run ``fiend_linpol_tise --help``. Examples can be found in\n``demos/hhg/step1.sh`` and ``demos/hhg/step2.sh``.\n\nNew static potentials can be implemented in\n``fiend.utils.predefined_potentials``, please see the module source for further\ndetails.\n\n``solve_tise`` saves the following files:\n\n- ``data/tise_mesh.h5`` which includes the mesh used for\n solving TISE.\n- ``data/tise_eigenvalues`` which is a list of eigenenergies\n- ``data/tise_states.h5`` which contains the expansion coefficients for all the\n stationary states\n- ``data/config`` which includes the simulation parameters used for solving\n the TISE\n\nStep 2. Preparing system matrices for TDSE\n------------------------------------------\n\nAfter solving TISE, you should set up matrices for time dependent simulations.\nFor atomic systems in linearly polarized fields this can be accomplished with\nthe script ``fiend_linpol_prepare_tdse``, but for more complex setups see\n``demos/nanotip/``. Make sure that you have loaded a FEniCS installation with \nhdf5, petsc, and slepc enabled. In the Docker image this can be achieved with\n``ml petsc/real``.\n\nThe main feature of this step is that it can change the mesh from the TISE\nsimulation. This allows you to solve TISE in a small simulation domain\nand use a larger simulation domain for time-dependent simulation.\nA full list of options can be obtained with ``fiend_linpol_prepare_tdse --help``.\nIf some of the options are not given, the values used in solving the TISE are\nused. So, e.g., if you only want to increase the radius of the meshed domain,\nsupply only ``--radius X`` where X is the new radius.\n\nComplex absorbing potentials (CAP) can be included in the time propagation\nsimulations with options\n\n- ``--cap_width`` which sets the width of the absorber from the domain\n boundary\n- ``--cap_height`` which sets the strength of the absorber\n\nAlso other absorbers such as the smooth exterior complex scaling could easily be\nimplemented.\n\n``prepare_tdse`` saves the following files using PETSc binary format\n\n- ``data/tdse_CAP*`` containing the imaginary part of the CAP matrix\n- ``data/tdse_H0*`` containing the time-independent part of the Hamiltonian matrix\n- ``data/tdse_S*`` containing the overlap matrix\n- ``data/tdse_rho*`` containing the |rho|-component of the dipole matrix\n- ``data/tdse_Z*`` containing the z-component of the dipole matrix\n- ``data/tdse_partialRho*`` containing matrix elements of |partialrho|\n- ``data/tdse_partialZ*`` containing matrix elements of |partialz|\n- ``data/tdse_state_N*`` containing the vector representation of the stationary\n states in the TDSE mesh\n\nIn addition, ``fiend_linpol_prepare_tdse`` saves the new mesh in\n``data/tdse_mesh.h5`` and *appends* the new configuration parameters in ``data/config``.\n\n\n**NOTE:** There are three versions of the overlap matrix, ``S``, ``S0``, and\n``S1``. ``S`` is the pure overlap matrix, ``S0`` has the rows corresponding to\nthe Dirichlet boundaries zeroed, and ``S1`` is like ``S0`` but it has 1s on the\ndiagonals of the zeroed rows. For all other matrices, the rows corresponding to\nthe Dirichlet boundaries are always zeroed.\n\n.. |rho| image:: https://latex.codecogs.com/svg.latex?\\\\rho\n\n.. |partialrho| image:: https://latex.codecogs.com/svg.latex?\\\\partial_\\\\rho\n\n.. |partialz| image:: https://latex.codecogs.com/svg.latex?\\\\partial_z\n\nStep 3. Propagation\n-------------------\n\nNow you must load Python packages petsc4py, slepc4py, and mpi4py with support\nfor *complex numbers*. In the docker\nimage this can be done with ``ml petsc/complex``.\nUnfortunately, currently (as of version 2018.1.0)\nFEniCS doesn't support PETSc with complex numbers so we must resort to\ntwo different versions of the python\npackages, but hopefully in the near future we can remedy this.\n\nTime propagation can be achieved with the command ``fiend_linpol_propagate``. It reads\nthe matrices prepared in step 2 and uses those for time propagation. A complete\nlist of options can be printed out with ``fiend_linpol_propagate --help``.\n\nNote that you can request saving frequency with ``--save_interval``. E.g.,\n``--save_interval 10`` saves every 10th time-step.\nTime-propagation saves data to\n\n- ``data/tdse_observables.npz`` which includes an array for each observable (except\n the density)\n- ``data/tdse_wavefunction/realpart_iteration_N_real`` which is a PETSc vector of the expansion\n coefficients for the real part of the wavefunction at saveslot ``N``\n- ``data/tdse_wavefunction/imagpart_iteration_N_real`` which is a PETSc vector of the expansion coefficients\n for the imaginary part of the wavefunction at saveslot ``N``\n- ``data/config`` where it appends new configuration options\n\nSetting laser field\n+++++++++++++++++++\n\nThe laser-field can be set with option ``--vecpot path``. The file should be\n\n1. a two-column file where the first column is time and second the\n time-dependent part of the vector potential, or\n2. a multi-pulse configuration defining the time-dependent part of the vector\n potential with each wavelength channel defined as::\n\n [Pulse1]\n A = 0.1\n w = 0.0569\n k = 0\n tcenter = 0\n cep = 0.05\n fwhm = 150\n\n Here ``A`` is the electric field peak amplitude, ``w`` the carrier\n frequency, ``k`` the chirp, ``tcenter`` the time of envelope maximum,\n ``cep`` the carrier envelope phase, and ``fwhm`` the full with at half\n maximum for the envelope.\n\n\nStep 4. Post-processing\n-----------------------\n\n``--save`` option for the post-processing scripts saves the figures to\n``data/figures`` and data to ``data/postprocessing``.\n\n``animate_density``\n+++++++++++++++++++\n\nThis script reads data from ``data/tdse_wavefunction/`` and animates \nthe electron density. This script needs FEniCS (``ml petsc/real`` \nwhen using Docker). \n\n``draw_norm``\n+++++++++++++\n\nFor drawing the norm as a function of time. \n\n``draw_dipole`` / ``draw_velocity`` / ``draw_acceleration``\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\nDraws the dipole moment/dipole velocity/dipole acceleration\nas a function of time, the corresponding spectrum,\nand stft of the spectrum. \n\n``draw_pes``\n++++++++++++\n\nDraws the angle-integrated and angle-resolved photoelectron spectra. Can use\nMPI to speed up computation of the spectra.\n\nPETSc and SLEPc options\n-----------------------\n\nPETSc and SLEPc have numerous options to fine-tune their operation. All\narguments passed to scripts after ``PETSC_ARGS`` are used to initialize the\nPETSc options database and the arguments before that remain in sys.argv and are\nused by the argumentparser of FIEND.\n\nInstallation\n============\n\nUsing Docker\n------------\n\nWe recommend using Docker images for running simulations on your personal\ncomputer. For supercomputers and clusters, we recommend either installing \nthe entire package from source or with ``pip``.\n\nTo use the prepared Docker image, first install `Docker\n_` to your PC. The docker image for\n`fiend _` can fetched with the\ncommand ``docker pull solanpaa/fiend``. Please note that the image is a few GB in size.\n\nBy default, running the docker image for interactive process,\n\n ``docker run -it fiend``\n\ndrops you in a Unix shell. All the scripts are pre-installed,\nand you can switch between the complex and\nreal PETSc installations with commands ``ml petsc/real`` and\n``ml petsc/complex``.\n\nTo enable GUIs for the scripts, you should launch the docker container with\nthe commands executed on the HOST machine (works on Linux)\n\n``$ xhost +local:docker``\n\n``$ docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro -it fiend``\n\nAs you probably wish to save the datafiles computed within the container, you\nshould create a directory ``data`` on your HOST and mount it to the container\nwith\n\n``$ docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v\n`pwd`/data:/home/fiend/data:Z -it fiend``\n\nThis also allows you to provide the laser parameters by saving it to a file\nwithin ``data`` on the HOST and passing the argument ``--vecpot data/filename``\nto ``docker run fiend fiend_linpol_propagate``.\n\nFor non-interactive use, you can pass the above command arguments corresponding\nto the script you would like to execute together with its arguments, e.g.,\n\n``$ docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v\n`pwd`/data:/home/fiend/data:Z fiend fiend_linpol_tise --radius 10 --how_many 3``\n\nParallelization of the linear algebra backend can be achieved with the flag\n``-e OPENBLAS_NUM_THREADS N`` of ``docker run``. MPI-parallelized simulations\ncan be achieved with the environment variable ``NMPIPROC``, e.g.,\n\n``$ docker run -e NMPIPROC=3 -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v\n`pwd`/data:/home/fiend/data:Z fiend fiend_linpol_tise --radius 10 --how_many 3``\n\n\nInstallation with pip\n---------------------\n\n``pip3 install fiend`` should do the trick. Note that you have to manually install\nreal and complex PETSc, SLEPc, petsc4py, slepc4py, and FEniCS suite.\n\nInstallation from sources\n-------------------------\n\nThe ``fiend`` package is hosted at `GitLab _`.\n\n``python3 setup.py install`` should install the package. Note that you have to \nmanually install real and complex PETSc, SLEPc, petsc4py, slepc4py, and FEniCS \nsuite.\n\nAuthors\n=======\n\nJanne Solanp\u00e4\u00e4\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://fiend.solanpaa.fi", "keywords": "numerics,FEM,finite-element method,quantum mechanics,Schr\u00f6dinger equation,physics", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "fiend", "package_url": "https://pypi.org/project/fiend/", "platform": "", "project_url": "https://pypi.org/project/fiend/", "project_urls": { "Homepage": "https://fiend.solanpaa.fi" }, "release_url": "https://pypi.org/project/fiend/1.0.3/", "requires_dist": [ "numpy", "scipy", "matplotlib", "h5py", "mpi4py", "petsc4py", "slepc4py", "fenics-dolfin", "mshr", "psutil", "progressbar2", "mypy" ], "requires_python": ">=3.6", "summary": "Finite element nanoscale dynamics", "version": "1.0.3" }, "last_serial": 4608129, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "146bbf7dfbf183dc69d63f753df45e7e", "sha256": "eabf05e480a36e9cdb713aff6bac42fd9bf1eb1802398be2838690fd1455d6d6" }, "downloads": -1, "filename": "fiend-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "146bbf7dfbf183dc69d63f753df45e7e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 97386, "upload_time": "2018-12-14T13:30:23", "url": "https://files.pythonhosted.org/packages/91/34/ec552cf9a3287f2c29ccc95388aaf1bf85f4f2c82edfc40c673c77282cb4/fiend-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c310f62aaed564d6f8ccb7b1c73a7de3", "sha256": "8d8059ed7be81c1d7a012e70120ea07225081cfefa60518bdd7bbe97d82e7138" }, "downloads": -1, "filename": "fiend-1.0.1.tar.gz", "has_sig": false, "md5_digest": "c310f62aaed564d6f8ccb7b1c73a7de3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 72221, "upload_time": "2018-12-14T13:30:25", "url": "https://files.pythonhosted.org/packages/c5/a8/a6592b9c42e1d2cc536829a9b8f288c46b734150a726bd570be04a620578/fiend-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "e5234ae4744bda880183e0a7539e2f5b", "sha256": "f2c21ca8d3a18c364f9a7ba9f8ce2c720616a386346351b820f4c438b83c9b22" }, "downloads": -1, "filename": "fiend-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "e5234ae4744bda880183e0a7539e2f5b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 97379, "upload_time": "2018-12-14T13:54:50", "url": "https://files.pythonhosted.org/packages/49/77/4d721633aa223e7b78edba8c4182b14a902daee5378107ec723b7ddc9feb/fiend-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac21c47fec6f5e489b259880b73dc1e8", "sha256": "36f66af6ac6fec7d45851ae470bcd56b97fa70ab5345eb56a9866a3458d91621" }, "downloads": -1, "filename": "fiend-1.0.2.tar.gz", "has_sig": false, "md5_digest": "ac21c47fec6f5e489b259880b73dc1e8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 72192, "upload_time": "2018-12-14T13:54:53", "url": "https://files.pythonhosted.org/packages/a1/67/d3e20509179225ef2dd2ac34521bb8b210e5d417526af4b38eb1f19dfbc8/fiend-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "3759f787ecdd46cb5fde3b8f15226088", "sha256": "7dbeb2ae59e32afa1a82d59f0eab1c49a1ec96f230d1cc8e38e878ecd4641fc1" }, "downloads": -1, "filename": "fiend-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "3759f787ecdd46cb5fde3b8f15226088", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 98372, "upload_time": "2018-12-17T13:55:43", "url": "https://files.pythonhosted.org/packages/a4/dd/16b112ee216dfd335262bf3fbe70649635265ad27263489ff9f7f57b072e/fiend-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "423ab55518815b3442e366ba29893498", "sha256": "aac475200793398a0c04d01467f368f986004e806a65f1751657a5df6d35c1e9" }, "downloads": -1, "filename": "fiend-1.0.3.tar.gz", "has_sig": false, "md5_digest": "423ab55518815b3442e366ba29893498", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 74532, "upload_time": "2018-12-17T13:55:45", "url": "https://files.pythonhosted.org/packages/3f/65/0849829a0095b94df5e1fa0d5f32bf2d02b269929a9e9ddcd2e71f455f6c/fiend-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3759f787ecdd46cb5fde3b8f15226088", "sha256": "7dbeb2ae59e32afa1a82d59f0eab1c49a1ec96f230d1cc8e38e878ecd4641fc1" }, "downloads": -1, "filename": "fiend-1.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "3759f787ecdd46cb5fde3b8f15226088", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 98372, "upload_time": "2018-12-17T13:55:43", "url": "https://files.pythonhosted.org/packages/a4/dd/16b112ee216dfd335262bf3fbe70649635265ad27263489ff9f7f57b072e/fiend-1.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "423ab55518815b3442e366ba29893498", "sha256": "aac475200793398a0c04d01467f368f986004e806a65f1751657a5df6d35c1e9" }, "downloads": -1, "filename": "fiend-1.0.3.tar.gz", "has_sig": false, "md5_digest": "423ab55518815b3442e366ba29893498", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 74532, "upload_time": "2018-12-17T13:55:45", "url": "https://files.pythonhosted.org/packages/3f/65/0849829a0095b94df5e1fa0d5f32bf2d02b269929a9e9ddcd2e71f455f6c/fiend-1.0.3.tar.gz" } ] }