Skip to main content

Read and write computational chemistry files

Project description

Python binding for the chemfiles library

Build Status 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 other examples.

from chemfiles import Trajectory, Frame

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

print("There are {} atoms in the frame".format(frame.natoms()))
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.0.tar.gz (4.4 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

chemfiles-0.10.0-py2.py3-none-win_amd64.whl (2.6 MB view details)

Uploaded Python 2Python 3Windows x86-64

chemfiles-0.10.0-py2.py3-none-win32.whl (2.4 MB view details)

Uploaded Python 2Python 3Windows x86

chemfiles-0.10.0-py2.py3-none-manylinux1_x86_64.whl (3.5 MB view details)

Uploaded Python 2Python 3

chemfiles-0.10.0-py2.py3-none-manylinux1_i686.whl (3.4 MB view details)

Uploaded Python 2Python 3

chemfiles-0.10.0-py2.py3-none-macosx_10_9_x86_64.whl (3.5 MB view details)

Uploaded Python 2Python 3macOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: chemfiles-0.10.0.tar.gz
  • Upload date:
  • Size: 4.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for chemfiles-0.10.0.tar.gz
Algorithm Hash digest
SHA256 b52bc19ac7967935a2acc896b1b9738bd904444a1fc09589ed6ada7658a02bf4
MD5 53fca5dd25d914e803ab068578ab22b3
BLAKE2b-256 5ba42a5eb0da89fc0d0b25c021182239dc528145de474273c1a9e15cc96ca301

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chemfiles-0.10.0-py2.py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: Python 2, Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for chemfiles-0.10.0-py2.py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 54bb292aab500a248ed02a23863382b9ec51cb6b8ed8d6057b187d610f02dfdc
MD5 7def85837d38fce87cc713615f364838
BLAKE2b-256 e7fc79b3ae2516ac2f760af29301fe0f893adc5a17c16acc95ffb0bb493cbaec

See more details on using hashes here.

File details

Details for the file chemfiles-0.10.0-py2.py3-none-win32.whl.

File metadata

  • Download URL: chemfiles-0.10.0-py2.py3-none-win32.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: Python 2, Python 3, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for chemfiles-0.10.0-py2.py3-none-win32.whl
Algorithm Hash digest
SHA256 c2b488c61bece351667db3ddf8179c9fcbad237c4fa6256bb20f97d120752715
MD5 39716c6098e30cc223eb3fa7ef1fb984
BLAKE2b-256 ecdd1b335ef5b3a8983045016b5e23f41df23b170a7a16ea84e7eb3cfffae354

See more details on using hashes here.

File details

Details for the file chemfiles-0.10.0-py2.py3-none-manylinux1_x86_64.whl.

File metadata

  • Download URL: chemfiles-0.10.0-py2.py3-none-manylinux1_x86_64.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for chemfiles-0.10.0-py2.py3-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c52bb10f89512ff0d1068f4f281d7b1bf58848c6fc4e29159073a7ca8672cc5c
MD5 561f6add00065de881c2b499d26554c9
BLAKE2b-256 8c745564f6222f328a3e7fd27d08c87542ac76cbf1a8619ea29e828309b61a0c

See more details on using hashes here.

File details

Details for the file chemfiles-0.10.0-py2.py3-none-manylinux1_i686.whl.

File metadata

  • Download URL: chemfiles-0.10.0-py2.py3-none-manylinux1_i686.whl
  • Upload date:
  • Size: 3.4 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for chemfiles-0.10.0-py2.py3-none-manylinux1_i686.whl
Algorithm Hash digest
SHA256 2e359fb0dd9f35925c472bf584319beadf2b60de83576de32e8e7086708910c5
MD5 48e4e0f5175b4b02cd580d992acf0765
BLAKE2b-256 9f42b454e9fa56cedfd8b35b0f0a67de09df7bc5502c49205a80ac45cb7f4b35

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chemfiles-0.10.0-py2.py3-none-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 3.5 MB
  • Tags: Python 2, Python 3, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/49.6.0.post20210108 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

File hashes

Hashes for chemfiles-0.10.0-py2.py3-none-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d0bbe5a630f62544c19396fb5d222ea61385dc25808ee027a2309a7de0eb84e2
MD5 478e4999e669e190ea4d6ae1e6ced0fb
BLAKE2b-256 1c00c407ab8f71a9235f914e78172d53b3183a21db1b7b906bfa4db1bab925d8

See more details on using hashes here.

Supported by

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