No project description provided
Project description
flour is a Python library for really fast chemical file reading and writing.
Installation
pip install flour
.cube files
import numpy as np
import flour
# Write the cube file.
flour.write_cube(
path="molecule.cube",
title1="The first line of the cube file",
title2="The second line of the cube file",
# The atomic number of each atom.
atoms=np.array([1, 35], dtype=np.uint8),
# The charge on each atom.
charges=np.array([0., 0.]),
# The position matrix of the molecule.
positions=np.array([
[-0.5, 0., 0.],
[1., 0., 0.],
]),
# The origin of the voxel grid.
voxel_origin=np.array([-4.5, -4.5, -4.5]),
# The a, b, c vectors of a single voxel.
voxel_size=np.array(
[
[0.5, 0., 0.],
[0., 0.5, 0.],
[0., 0., 0.5],
],
),
# A 20 x 20 x 20 voxel grid.
voxels=np.random.rand(20, 20, 20),
)
# Read the cube file.
cube_data = flour.read_cube("molecule.cube")
cube_data.atoms # The atomic number of each atom.
cube_data.charges # The charge of each atom.
cube_data.positions # The position matrix of the molecule.
cube_data.grid.origin # The origin of the voxel grid.
cube_data.grid.voxel_size # The a, b, c vectors of a single voxel.
cube_data.grid.voxels # The voxel grid.
Developer guide
If you want to develop FLOUR there’s a couple of handy things you should know. FLOUR is built using the excellent maturin library. This means that to build the library you run
maturin develop --extras=dev --profile=release
and that’s more or less all there is to it. The only other thing to note is that we do have a justfile, which contains commands you might find helpful for formatting and linting your code. To use the justfile you should grab just.
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
flour-1.0.0.tar.gz
(10.6 kB
view hashes)
Built Distributions
flour-1.0.0-cp311-none-win_amd64.whl
(181.3 kB
view hashes)
flour-1.0.0-cp310-none-win_amd64.whl
(181.3 kB
view hashes)
flour-1.0.0-cp39-none-win_amd64.whl
(181.6 kB
view hashes)
flour-1.0.0-cp38-none-win_amd64.whl
(181.6 kB
view hashes)
flour-1.0.0-cp37-none-win_amd64.whl
(181.5 kB
view hashes)
Close
Hashes for flour-1.0.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9e903c088c75aedd80203d986826bf9b394896fd0048e0d64d69a6a1a6a2a41 |
|
MD5 | fb4c1268968e82bbb8ec0f66c844f20c |
|
BLAKE2b-256 | 36eaca6bac1c37d2b1f653db5677155779b6fb6530771d81b700256c239510f6 |
Close
Hashes for flour-1.0.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eba7374a44e2fa187308608a6da59a434d982f2449c082bef5a2af813d0cc0d1 |
|
MD5 | 77db42416312c499ae12dd60db497973 |
|
BLAKE2b-256 | ddf5ca67e5fcc41a49e3c9e638f5f64600a712ed5228d23579fc1bd9d77ba749 |
Close
Hashes for flour-1.0.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e3c66b63ef2265e298cf62ec20686507e8f7374acd7c79f44594ecc232ec136 |
|
MD5 | 7a9b3b211ab9335e738951be9191d944 |
|
BLAKE2b-256 | 9bb7d00c9d71c6ba10a83bfb8a36a7f24a75fe92556087d548d7f6469147a35f |
Close
Hashes for flour-1.0.0-cp311-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5e0efc36e147331d8ca729aba295209f57c60201cb15561195562b0c4ed3763 |
|
MD5 | 6e93697e002264816f951deb76df0a02 |
|
BLAKE2b-256 | 4e9d043efaa731825e268e6cb12c72023c35bf3c07fa151c3aaa4cc3ef2ae963 |
Close
Hashes for flour-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5df78eba24d0e8487eb892a12d0cdd860c1c666907a3463e43cc25704404eea |
|
MD5 | f1e77c201d1f9413e456b9ed6e1561f4 |
|
BLAKE2b-256 | 61eeccc296301944b4c3768293767f1d694ed6214d0a3a4b77107a523f8ac4a3 |
Close
Hashes for flour-1.0.0-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50c3039844bd307c1b9e9e2ee6dfb1915d50aa451641d3a40a4c42a3b35f180c |
|
MD5 | 6652b6afe55858a7cf50616d018c0a8d |
|
BLAKE2b-256 | 4b49aaef73a53f6a69070d910911624ef332a4fd790e9db2bb0e00b893a240ad |
Close
Hashes for flour-1.0.0-cp310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a8a421dfe8d91715a479872bb5e62ed6366fd2f90e683f22f5e2f5b15c4e64f |
|
MD5 | a1cecd2364a56e68e8c87846f2f8843a |
|
BLAKE2b-256 | a40d02b7b2591724a5674863fcdf1a85534a3b7b805ddccbc3779a9e898afcfc |
Close
Hashes for flour-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d18828c7b847024013c46454815d611e8ab478bfa00bdfe832549dbb74e0903a |
|
MD5 | 4fab768071738635e1c7b1a38169a266 |
|
BLAKE2b-256 | cbc7049e4af14c455f955913e09dcb8e3662e272e9e49151f6b1f79a9601500d |
Close
Hashes for flour-1.0.0-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | de68a78b56ffbaf1927b71628da24d0b79c482dd75508dd0b9af1dbafc48c165 |
|
MD5 | ec1f35b698689697cfccd1e0c8eb54d9 |
|
BLAKE2b-256 | 4e1df7701adc08c2c201ffd69e09a7f6fc9bf2791687dddaa76d3facbc7a9b9e |
Close
Hashes for flour-1.0.0-cp39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4552dc6a64071b93053396f8fbb5a0c886d28fa57e96e08d083d865895cf0781 |
|
MD5 | 1e5a5cd30b6ec63ec3c184d060607797 |
|
BLAKE2b-256 | 69ab1e5a03a8814e408264140ae1552937d5b3ed5049cbb660cc6c12f01250bc |
Close
Hashes for flour-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7d6f94e7585dc5dcbd24d1a34fa9f687a0cd054532c8bb084076e7a6da00d0f |
|
MD5 | 24a8bed473a6b8e4c05a7cf5a57eb1ca |
|
BLAKE2b-256 | 350cfd82900bd6f4d55911f18d4b04af02747c2337998eb4bcef99eac6b8d5b4 |
Close
Hashes for flour-1.0.0-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 980a4f9391f39a48dc80d92aa89eddec0c28b4afcef92b4e0dcc96a40547bf10 |
|
MD5 | 543fcee60cda21d6a53ba9bd978f2d06 |
|
BLAKE2b-256 | bd2fffec8a6fa3e531fc6818cb865ce45c55e4b9640ed90500b2dbf0feb6f946 |
Close
Hashes for flour-1.0.0-cp38-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efa13b6de3514ae60e021c8f7c479cea4c7bf306ccf88744437cb6f6369c385d |
|
MD5 | cb1930cc0fab326e9d4cc79eab50bca8 |
|
BLAKE2b-256 | bbe3d32469f643c4fdb5077f43ebbb837fac127ac7dd999748f158238f9e578e |
Close
Hashes for flour-1.0.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af1b2d280df1e15d7b1952d678c63151b55c67561540dfa72b2f4e8187ece78f |
|
MD5 | a2d0555847c1aa5a15be96d8b8e4f66c |
|
BLAKE2b-256 | a6dc62a3475559ce563edd753a1ffcd784687b681b82fbecb70e7af17b59cff1 |
Close
Hashes for flour-1.0.0-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3688a1c06f5673cc8dfe4b70dc92f4be39697c7533845bd4d2b2f0bcd7ec388 |
|
MD5 | 57c0c275f2038c14703c8cd0af882926 |
|
BLAKE2b-256 | 95fa6784444f68b22cfb2b01f356b9c3927d2f63690f6f6cd3bebda84047d56d |
Close
Hashes for flour-1.0.0-cp37-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0a54158e39dae14dcea3d76fcaa0c0263ede6d70767c55b92e0da1f62a2ac01c |
|
MD5 | eb48b120b0a8496e8e44f8002845b445 |
|
BLAKE2b-256 | 7ce483b75f2dd5556e157cd989556f37c9ba55a769b6a8697a06978f1557fadc |
Close
Hashes for flour-1.0.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c20776a8330c265546305031b86169876e590dae4f78f9a45aa56b9d8eb61cd |
|
MD5 | e529abef9cedabd32665456ab79ace8c |
|
BLAKE2b-256 | 004fecc03f717729082608c57309ecbaf0a06ffb8a7e11f879bf2ab4c9723e3b |
Close
Hashes for flour-1.0.0-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bd5af12a93737a2e2096d7df174daa25ed045333409501a316435acec3f0825 |
|
MD5 | 7608efd098029f599f07a33c1df7fe08 |
|
BLAKE2b-256 | 6eef7d94c6e474b1e5247ef4d65569f952c3c28e1cdeeb27fb5ca4911619a714 |