Skip to main content

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


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.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distributions

flour-1.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (625.4 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

flour-1.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (625.2 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

flour-1.0.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (627.7 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64

flour-1.0.1-cp311-none-win_amd64.whl (181.1 kB view details)

Uploaded CPython 3.11 Windows x86-64

flour-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (625.1 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

flour-1.0.1-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (571.4 kB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

flour-1.0.1-cp310-none-win_amd64.whl (181.1 kB view details)

Uploaded CPython 3.10 Windows x86-64

flour-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (625.1 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

flour-1.0.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (571.4 kB view details)

Uploaded CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

flour-1.0.1-cp39-none-win_amd64.whl (181.4 kB view details)

Uploaded CPython 3.9 Windows x86-64

flour-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (625.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

flour-1.0.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (572.3 kB view details)

Uploaded CPython 3.9 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

flour-1.0.1-cp38-none-win_amd64.whl (181.4 kB view details)

Uploaded CPython 3.8 Windows x86-64

flour-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (625.7 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

flour-1.0.1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (572.7 kB view details)

Uploaded CPython 3.8 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

flour-1.0.1-cp37-none-win_amd64.whl (181.4 kB view details)

Uploaded CPython 3.7 Windows x86-64

flour-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (625.7 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

flour-1.0.1-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (572.9 kB view details)

Uploaded CPython 3.7m macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

File details

Details for the file flour-1.0.1.tar.gz.

File metadata

  • Download URL: flour-1.0.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.7

File hashes

Hashes for flour-1.0.1.tar.gz
Algorithm Hash digest
SHA256 2b67f955141f6f6a4efae0271b7f09f0114852619f802d1e75857a84029aafb5
MD5 d8e1b683bc70b2f49265b697fdd913a5
BLAKE2b-256 2aed57ffcb62c136309eb41992e05527fd80349946d127acdf5be69fff64621c

See more details on using hashes here.

File details

Details for the file flour-1.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flour-1.0.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a3af00d40849a9c3e1a17a0f5d244d40eefbcaa27fe203144eba61b32e28c4ca
MD5 a5134ee266f2ae9cfdb69be2479e521b
BLAKE2b-256 a09f61c71bda1f7daf8371f0ea67040b81ff40d54d268e7b11cfe01ca193bb83

See more details on using hashes here.

File details

Details for the file flour-1.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flour-1.0.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 49b23d1d9b698086b593677bc584314b98e20ec4b58bfb27f36fe9c5fcdd27a6
MD5 5c33d9188d655b506bf6311208b57093
BLAKE2b-256 24cc6e84dfeae70f95311a312c5211b960588d38bd85a880b2960253cb916b57

See more details on using hashes here.

File details

Details for the file flour-1.0.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flour-1.0.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4db25a83908d2f10a9a96de97fe51c28e64f41c7e738b7789a2abcd5e90cf17
MD5 2b99f51913a31d8985de4a4d090ea35c
BLAKE2b-256 514a8a71cb646138a75c407be0dd3bfbc6f4ab4d5721f26fc9df183cc86295dc

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp311-none-win_amd64.whl.

File metadata

  • Download URL: flour-1.0.1-cp311-none-win_amd64.whl
  • Upload date:
  • Size: 181.1 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.7

File hashes

Hashes for flour-1.0.1-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 6df8a6e2f696c6305502f3ffa70feef8acd98b816758cf83c839054199673b02
MD5 bd40d072474473f372a5a5dc15822d39
BLAKE2b-256 85ea5c754e684ef0a32a523a1c231a9c122399e00b3b66774693200ecad490d1

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flour-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cf04152b694257423b06d58782c707489ccb15dcbcb554bcbccb92ab18d00222
MD5 33b5afbcc6ef13027a0c4ae61b945fd1
BLAKE2b-256 b10713526e4f45c578818506ec38056c6355fbc1983322c4d963cdcbac90553f

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for flour-1.0.1-cp311-cp311-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7cde4aed1874bf3389a178ba5bb35712d9e2844db0a16d9f1cb3e5cde642e5ea
MD5 40aa4b6f3c0ee4f1fdbc32ba0e750a4f
BLAKE2b-256 81b42922d638f8816d07b1fcc307eb6ca8c2b2539ba8bc98911dd39ce65cdf1b

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp310-none-win_amd64.whl.

File metadata

  • Download URL: flour-1.0.1-cp310-none-win_amd64.whl
  • Upload date:
  • Size: 181.1 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.7

File hashes

Hashes for flour-1.0.1-cp310-none-win_amd64.whl
Algorithm Hash digest
SHA256 6cdfa35d0f1aab6733ca1d440bab5d1ba5ce84bc0cf94a99f20498f4097d6cab
MD5 d063e2756d38a9a114c8dcd48cf1ec4a
BLAKE2b-256 bfcc051eff5f9fd87110b0a2575de3ed7741ffe2c3509e105600f9666e4a44a7

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flour-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 207a540670bbf81fb25c5bd3099cceba0c3c1a3f3154918bde1c8374682aa4cc
MD5 38dff0ca0b81b1eb4c5c1d4a99f194b0
BLAKE2b-256 dc5ff67b49f1fcb3e68c99ba2447cd48e407869df6c1dcc42cfe870e7a93f7c5

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for flour-1.0.1-cp310-cp310-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 b525a2c14d68fd54ee930af4a1c13edd8b2cd3c65e65a6ae7b1208df842f9927
MD5 665e7673579abe685886ab043f213021
BLAKE2b-256 e0a9737f5a8989e6441bfec9f15a96960be0fbc582ec4c1fcaf474b56fdd06b9

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp39-none-win_amd64.whl.

File metadata

  • Download URL: flour-1.0.1-cp39-none-win_amd64.whl
  • Upload date:
  • Size: 181.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.7

File hashes

Hashes for flour-1.0.1-cp39-none-win_amd64.whl
Algorithm Hash digest
SHA256 4a3ea6c0113cc16a592409ca1df2e42103d35faa6cbc327f7ffc4932904f41a8
MD5 4bd63b5f4342db6f19880d29a8619440
BLAKE2b-256 5493501fc3c17301248850004c0c9c1355c304800a503237c735e698cf191c6c

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flour-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 362b0e6360b0534fb1f018446225c6b2d946a72e566ad46250cb379e63ffab7b
MD5 84af962343f40851ea23213623ff9eee
BLAKE2b-256 187a0ca6bb8c552ae52862f88d5a2205eb176f245a4d4a6d6c5544e1195e94c6

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for flour-1.0.1-cp39-cp39-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0e2bf946c0b84e6d157620697dba50dd923fc697dbbe38db5af780e8e6c26471
MD5 8b66165a05bf86d9790f6ef8f7c097be
BLAKE2b-256 03146ed10e56d7ee36ee2c94a5a0b8889364a271f173bd4ff4c8160d538256b2

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp38-none-win_amd64.whl.

File metadata

  • Download URL: flour-1.0.1-cp38-none-win_amd64.whl
  • Upload date:
  • Size: 181.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.7

File hashes

Hashes for flour-1.0.1-cp38-none-win_amd64.whl
Algorithm Hash digest
SHA256 83cea9958128cacf2a5efad992cf4f0865534dc1bc576075196b1d8a02729e48
MD5 5e90a0700b681ad7347bf8e051211c29
BLAKE2b-256 9a6c7a85539293af0743feedfce22bb5cd6e3d70341c2d7aa0dfc06cd63b3394

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flour-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e101927f2fbda528c6ebee92fdfcfab3f24871804adcb66b7676a00c39ec67e5
MD5 3bb4279d64b8cd27f0a725806ccfcd27
BLAKE2b-256 a3d4c2a0101f6ce7970917659ad0ffbb04aea909b9073dce8598d67019bf4fdc

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for flour-1.0.1-cp38-cp38-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 0087b5638f1a3cf164bdae076b6aa9e124ac4130b69bef46380b5a40524a7f8f
MD5 7b8725e8d4c76b0e724716e5511b1428
BLAKE2b-256 1aae139d1d3b8b6d81944f961744e28f4ceab8203b2f33363e010d385ff5abc6

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp37-none-win_amd64.whl.

File metadata

  • Download URL: flour-1.0.1-cp37-none-win_amd64.whl
  • Upload date:
  • Size: 181.4 kB
  • Tags: CPython 3.7, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.7

File hashes

Hashes for flour-1.0.1-cp37-none-win_amd64.whl
Algorithm Hash digest
SHA256 fa024c56068a77fa8f7601ffc00758276e128b955ebd55ed12325aeb69a3e2bc
MD5 8db79159ae2006e11e9cc3f9cca1966c
BLAKE2b-256 3d39a5a8bcacca38373fe9be21b4817d0d05fa45b32885812b6e3e324e7b6c1a

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for flour-1.0.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5acc7006d5e91525b45f8d207cef92b794af87d475a34877125473a3eaeb348a
MD5 abc27824b0cdf2bf8792ab6538708319
BLAKE2b-256 b762c96481085258648b14a5a68d119212ba0f68400f4e06a1a21226d19a5853

See more details on using hashes here.

File details

Details for the file flour-1.0.1-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for flour-1.0.1-cp37-cp37m-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 06f657bc90cffd6fbd85cd86ad70a38928eebb88d5b28523a4af413338a62542
MD5 c76ca3ff51919b6cf08117f0aa92c101
BLAKE2b-256 38b80ab3129a0a9d6ea3796e6fec50a392303928874ba8e68fbd63a6492d136d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page