Skip to main content

A high performance drop-in replacement for Biotite's PDBFile.

Project description

Copyright (c) 2021, Patrick Kunzmann

All rights reserved.

Redistribution and use in source and binary forms, with or without

modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this

    list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice,

    this list of conditions and the following disclaimer in the documentation

    and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its

    contributors may be used to endorse or promote products derived from

    this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”

AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE

IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE

DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE

FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL

DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR

SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER

CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,

OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE

OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Requires-Python: >=3.7 Description-Content-Type: text/x-rst; charset=UTF-8 Project-URL: repository, https://github.com/biotite-dev/fastpdb Project-URL: homepage, https://github.com/biotite-dev/fastpdb

fastpdb


A high performance drop-in replacement for Biotite’s PDBFile written in Rust.

Installation

fastpdb can be installed via

$ pip install fastpdb

Usage

You can simply replace biotite.structure.io.pdb.PDBFile by fastpdb.PDBFile. The methods and their parameters are the same.

import fastpdb

in_file = fastpdb.PDBFile.read("path/to/file.pdb")
atom_array = in_file.get_structure(model=1)

out_file = fastpdb.PDBFile()
out_file.set_structure(atom_array)
out_file.write("path/to/another_file.pdb")

Note that fastpdb does not yet support the hybrid-36 PDB format.

Performance

fastpdb is multiple times faster than biotite.

https://raw.githubusercontent.com/biotite-dev/fastpdb/main/benchmark.svg

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

fastpdb-1.0.0.tar.gz (2.9 MB view hashes)

Uploaded Source

Built Distributions

fastpdb-1.0.0-cp39-none-win_amd64.whl (209.3 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

fastpdb-1.0.0-cp39-cp39-manylinux_2_24_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.24+ x86-64

fastpdb-1.0.0-cp39-cp39-macosx_10_7_x86_64.whl (319.7 kB view hashes)

Uploaded CPython 3.9 macOS 10.7+ x86-64

fastpdb-1.0.0-cp38-none-win_amd64.whl (209.4 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

fastpdb-1.0.0-cp38-cp38-manylinux_2_24_x86_64.whl (1.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.24+ x86-64

fastpdb-1.0.0-cp38-cp38-macosx_10_7_x86_64.whl (319.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.7+ x86-64

fastpdb-1.0.0-cp37-none-win_amd64.whl (209.2 kB view hashes)

Uploaded CPython 3.7 Windows x86-64

fastpdb-1.0.0-cp37-cp37m-manylinux_2_24_x86_64.whl (1.1 MB view hashes)

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

fastpdb-1.0.0-cp37-cp37m-macosx_10_7_x86_64.whl (319.7 kB view hashes)

Uploaded CPython 3.7m macOS 10.7+ x86-64

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