Skip to main content

Read and write computational chemistry files

Project description

Python binding for the chemfiles library

Build Status Code coverage Documentation

Chemfiles is a library for reading and writing molecular trajectory files. These files are created by your favorite theoretical chemistry program, and contains information about atomic or residues names and positions. Chemfiles offers abstraction on top of these formats, and a consistent interface for loading and saving data to these files.

This repository contains the Python binding for the chemfiles library. This binding is created with the ctypes module, calling directly the C interface of chemfiles, and thus is compatible with Python 2 and 3, and with all versions of Numpy.

Installation

You can use your favorite package manager (conda or pip) to install pre-built versions of Chemfiles, that support Linux/Windows/macOS, and Python 2.7 and 3.

# Using pip
pip install chemfiles
# Using conda
conda install -c conda-forge chemfiles

Source compilation

You can install this python module from sources if you have all the dependencies of the C++ chemfiles library installed on your computer.

# To get the latest development version:
git clone https://github.com/chemfiles/chemfiles.py
cd chemfiles.py
git submodule update --init
# Install development dependencies
pip install -r dev-requirements.txt
# Install chemfiles
pip install .
# Optionally run the test suite
tox

Usage example

Here is a simple usage example for the chemfiles module. Please see the examples folder for more examples.

from chemfiles import Trajectory, Frame

trajectory = Trajectory("filename.xyz")
frame = trajectory.read()

print(f"There are {len(frame.atoms)} atoms in the frame")
positions = frame.positions()

# Do awesome things with the positions here !

Bug reports, feature requests

Please report any bug you find and any feature you may want as a github issue.

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

chemfiles-0.10.4.tar.gz (3.6 MB view details)

Uploaded Source

Built Distributions

chemfiles-0.10.4-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.6 MB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.17+ x86-64

chemfiles-0.10.4-py2.py3-none-manylinux_2_17_i686.manylinux2014_i686.whl (1.8 MB view details)

Uploaded Python 2 Python 3 manylinux: glibc 2.17+ i686

chemfiles-0.10.4-py2.py3-none-macosx_11_0_arm64.whl (1.4 MB view details)

Uploaded Python 2 Python 3 macOS 11.0+ ARM64

chemfiles-0.10.4-py2.py3-none-macosx_10_9_x86_64.whl (1.5 MB view details)

Uploaded Python 2 Python 3 macOS 10.9+ x86-64

chemfiles-0.10.4-1-py2.py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 2 Python 3 Windows x86-64

File details

Details for the file chemfiles-0.10.4.tar.gz.

File metadata

  • Download URL: chemfiles-0.10.4.tar.gz
  • Upload date:
  • Size: 3.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for chemfiles-0.10.4.tar.gz
Algorithm Hash digest
SHA256 f9e5ece3fcc8b63fdc2708d4ecc2ba5862ae2ab6790447bffc10c1b34ef2f445
MD5 b64ad2c752a34e8c38cdce7755312154
BLAKE2b-256 c25135538663b6384add778945735478da66b7c3095649654325d001922f30f8

See more details on using hashes here.

File details

Details for the file chemfiles-0.10.4-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for chemfiles-0.10.4-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ef8f2b9fa65885658088180bb33971d1337bc8542220c710d1f6f3c1a6d661d4
MD5 aff86540968ef311382b331ee3922445
BLAKE2b-256 504c380de5755146e27236cdecf02b7fe5da4c1f3786716baee5b3a245026acb

See more details on using hashes here.

File details

Details for the file chemfiles-0.10.4-py2.py3-none-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for chemfiles-0.10.4-py2.py3-none-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 4dbf6fa7ad5b2a1ad1415fbca905ce3a02c71cc2aa7fbce18a2b7d13c01a3664
MD5 d3db280449843996360e3501872ce6aa
BLAKE2b-256 3ad5beb71f372e650ba75e3eac246a17daa09a08aeed46580b62af35234d01f2

See more details on using hashes here.

File details

Details for the file chemfiles-0.10.4-py2.py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for chemfiles-0.10.4-py2.py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 626725b0ea907d995cbbba99df1d19c474f8ebecdea8d0d390b7f3eaf2c91039
MD5 d01ac4a9a766acd96c13fe87c891de16
BLAKE2b-256 785fd7d7347db0d1a92577aa27d9412adea002295263d52cca57ff14c92cde56

See more details on using hashes here.

File details

Details for the file chemfiles-0.10.4-py2.py3-none-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for chemfiles-0.10.4-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 10a4e641605db56321316310f620746db350691d7c9edc433fe2a65984e2278b
MD5 787dd9819f70a72f346449732b5d9982
BLAKE2b-256 840e409d1fe39dc24f3ac47dd384e78462fc4eb0435a169afe5b488cf6ded39b

See more details on using hashes here.

File details

Details for the file chemfiles-0.10.4-1-py2.py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for chemfiles-0.10.4-1-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 5c1b50a7fd56d014f930e38a838c92098bd047a3e989ba4b89ff657c6d16e38a
MD5 cca0a937d15c794c35158d16993e4046
BLAKE2b-256 8b0de5a214dddec845c425cda2cb2273a95b2c5f77be9404d02c4f48b4e6992b

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