GALUMPH
Calculate ALM (scattering amplitude decomposed into spherical harmonics) at Hyperspeed using GPU acceleration.
This is a preliminary implementation using PyOpenCL.
Example code:
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)
Metadata
Release files for galumph 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| galumph-0.3.0.tar.gz | 37.2 kB | Without provenance | Details for galumph-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| galumph-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for galumph-0.3.0-py3-none-any.whl |
Total release size: 71.2 kB
Release files / galumph-0.3.0.tar.gz
| Download URL | galumph-0.3.0.tar.gz |
|---|---|
| Size | 37.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7a132b529f378e2ce56e0abbea3b1c923fdd556d22a95c72de1ff73eeb62b715
|
|
BLAKE2b-256 checksum How to use checksums |
417362f45c396b0f9cee79e0e9aeabc07d7df91962db06efc221edfec688dd1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3
|
Release files / galumph-0.3.0-py3-none-any.whl
| Download URL | galumph-0.3.0-py3-none-any.whl |
|---|---|
| Size | 34.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fe83340cd14a5ae06e161074a064afbd1b0ca8928c1162dc34b8a65c2dc5e94
|
|
BLAKE2b-256 checksum How to use checksums |
ab54ac897f7fecfabae2e069599639721a075e7dc09c494ab76776c2c0cfd3f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.3.1 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3
|
Security for galumph 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.