WIP hexarray modes example
[qpms.git] / qpms / __init__.py
blobe7caea76844904dca4beba847db7ae18bf0b19ff
1 from pkg_resources import get_distribution
2 __version__ = get_distribution('qpms').version
4 import os as __os
5 from sys import platform as __platform
7 import warnings as __warnings
9 try:
10 from .qpms_c import PointGroup, FinitePointGroup, FinitePointGroupElement, Particle, scatsystem_set_nthreads, ScatteringSystem, ScatteringMatrix, pitau, set_gsl_pythonic_error_handling, pgsl_ignore_error, gamma_inc, lll_reduce
11 except ImportError as ex:
12 if __platform == "linux" or __platform == "linux2":
13 if 'LD_LIBRARY_PATH' not in __os.environ.keys():
14 __warnings.warn("Environment variable LD_LIBRARY_PATH has not been set. Make it point to a directory where you installed libqpms and run python again")
15 else:
16 __warnings.warn("Does your LD_LIBRARY_PATH include a directory where you installed libqpms? Check and run python again."
17 '\nCurrently, I see LD_LIBRARY_PATH="%s"' % __os.environ['LD_LIBRARY_PATH'])
18 raise ex
19 from .cyquaternions import CQuat, IRot3
20 from .cybspec import VSWFNorm, BaseSpec, default_bspec
21 from .cytmatrices import CTMatrix, TMatrixInterpolator, TMatrixGenerator
22 from .cytranslations import trans_calculator
23 from .cymaterials import MaterialInterpolator, EpsMu, LorentzDrudeModel, lorentz_drude, EpsMuGenerator
24 from .cycommon import dbgmsg_enable, dbgmsg_disable, dbgmsg_active, BesselType, VSWFType
25 from .cywaves import vswf_single
27 from .qpms_p import * # maybe don't import automatically in the future (adds around 0.5 s delay)
28 from .constants import *
30 # legacy code which brutally slows down the whole package init:
31 #from .lattices2d import *
32 #from .hexpoints import *
33 #from .tmatrices import *