Metadata-Version: 2.1
Name: fastpdb
Version: 1.0.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Dist: biotite >= 0.29
Summary: A high performance drop-in replacement for Biotite's PDBFile.
Keywords: pdb-files
Author: Patrick Kunzmann
Maintainer: Patrick Kunzmann
License: BSD 3-Clause License

	

	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

.. image:: https://raw.githubusercontent.com/biotite-dev/fastpdb/main/logo.svg
    :width: 300
    :align: center
    :alt: fastpdb


|
|

A high performance drop-in replacement for *Biotite*'s ``PDBFile``
written in *Rust*.

Installation
------------

``fastpdb`` can be installed via

.. code-block:: console

    $ pip install fastpdb

Usage
-----

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

.. code-block:: python

    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``.

.. image:: https://raw.githubusercontent.com/biotite-dev/fastpdb/main/benchmark.svg
    :width: 800
    :align: center

