Metadata-Version: 2.1
Name: galumph
Version: 0.3.0
Summary: Calculate ALM using GPU acceleration
Home-page: https://git.embl.de/grp-svergun/galumph
Author: Christopher Kerr
Author-email: chris.kerr@mykolab.ch
License: UNKNOWN
Description: # GALUMPH #
        
        <!---
        SPDX-FileCopyrightText: 2016-2017 European Molecular Biology Laboratory (EMBL)
        SPDX-FileCopyrightText: 2018 Christopher Kerr
        
        SPDX-License-Identifier: LGPL-3.0-or-later
        -->
        
        [![pipeline status](https://git.embl.de/grp-svergun/galumph/badges/master/pipeline.svg)](https://git.embl.de/grp-svergun/galumph/commits/master)
        
        Calculate ALM (scattering amplitude decomposed into spherical harmonics) at Hyperspeed using GPU acceleration.
        
        This is a preliminary implementation using PyOpenCL.
        
        Example code:
        ```python
        import numpy as np
        import Bio.PDB
        import periodictable
        import pyopencl
        import galumph
        
        
        ctx = pyopencl.create_some_context()
        
        NS = 4096   # Number of S values at which to calculate the scattering
        smax = 1.0  # Maximum S value
        LMAX = 63   # Maximum harmonic order to use for the calculations
        
        ## Initialise the S array and allocate the ALM storage on the GPU
        s = np.linspace(0, smax, NS)
        kernel = galumph.AtomicScattering(LMAX, s, ctx=ctx)
        
        ## Use Bio.PDB to read the structure and periodictable to calculate the atomic form factors
        pdb = Bio.PDB.PDBParser().get_structure("6lyz", "6lyz.pdb")
        xyz = np.array([aa.get_vector().get_array() for aa in pdb.get_atoms()])
        ff = np.array([periodictable.elements.symbol(aa.element).xray.f0(s) for aa in pdb.get_atoms()])
        
        ## Run the GPU calculation
        alm = kernel.zeros()
        kernel.add_many_atoms(alm, xyz, ff)
        Icalc = kernel.sum_intensity(alm)
        ```
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires: pyopencl
Requires-Python: >=3.5
Description-Content-Type: text/markdown
