Package: pdb-tools
pdb-toolsA swiss army knife for manipulating and editing PDB files.Looking for theotherpdb-tools?The Harms lab maintains a set of tools also calledpdbtools, which perform a
slightly different set of functions. You can find themhere.AboutManipulating PDB files is often painful. Extracting a particular chain or set of
residues, renumbering residues, splitting or merging models and chains, or just
ensuring the file is conforming to the PDB specifications are examples of tasks
that can be done using any decent parsing library or graphical interface. These,
however, almost always require 1) scripting knowledge, 2) time, and 3) installing
one or more programs.pdb-toolswere designed to be a swiss-knife for the PDB format. They have no
external dependencies, besides obviously thePython programming language.
They are the descendant of a set of old FORTRAN77 programs that had the
particular advantage of working with streams, i.e. the output of one script
could be piped into another. Since FORTRAN77 is a pain too, I rewrote them in
Python and added a few more utilities.The philosophy of the scripts is simple: one script, one task. If you want to
do two things, pipe the scripts together. Requests for new scripts will be taken
into consideration - use the Issues button or write them yourself and create a
Pull Request.Installation Instructionspdb-toolsare available on PyPi and can be installed thoughpip. This is the
recommended way as it makes updating/uninstalling rather simple:pipinstallpdb-toolsBecause we use semantic versioning in the development ofpdb-tools, every bugfix
or new feature results in a new version of the software that is automatically published
on PyPI. As such, there is no difference between the code on github and the latest version
you can install withpip. To update your installation to the latest version of the code
run:pipinstall--upgradepdb-toolsWhat can I do with them?The names of the tools should be self-explanatory. Their command-line interface
is also pretty consistent. Therefore, here is a couple of examples to get you
started:Downloading a structurepdb_fetch1brs>1brs.pdb# 6 chainspdb_fetch-biounit1brs>1brs.pdb# 2 chainsRenumbering a structurepdb_reres-11ctf.pdb>1ctf_renumbered.pdbSelecting chain(s)pdb_selchain-A1brs.pdb>1brs_A.pdb
pdb_selchain-A,D1brs.pdb>1brs_AD.pdbDeleting hydrogenspdb_delelem-H1brs.pdb>1brs_noH.pdbSelecting backbone atomspdb_selatom-CA,C,N,O1brs.pdb>1brs_bb.pdbSelecting chains, removing HETATM, and producing a valid PDB filepdb_selchain-A,D1brs.pdb|pdb_delhetatm|pdb_tidy>1brs_AD_noHET.pdbNote: On Windows the tools will have the.exeextension.Whatcan'tI do with them?Operations that involve coordinates or numerical calculations are usually not in
the scope ofpdb-tools. Use a proper library for that, it will be much faster
and scalable. Also, although we provide mmCIF<->PDB converters, we do not support
large mmCIF files with more than 99999 atoms, or 9999 residues in a single chain.
Our tools will complain if you try using them on such a molecule.CitationWe finally decided to write up a small publication describing the tools. If you
used them in a project that is going to be published, please cite us:Rodrigues JPGLM, Teixeira JMC, Trellet M and Bonvin AMJJ.
pdb-tools: a swiss army knife for molecular structures. 
F1000Research 2018, 7:1961 (https://doi.org/10.12688/f1000research.17456.1)If you use a reference manager that supports BibTex, use this record:@Article{ 10.12688/f1000research.17456.1,
AUTHOR = { Rodrigues, JPGLM and Teixeira, JMC and Trellet, M and Bonvin, AMJJ},
TITLE = {pdb-tools: a swiss army knife for molecular structures [version 1; peer review: 2 approved]
},
JOURNAL = {F1000Research},
VOLUME = {7},
YEAR = {2018},
NUMBER = {1961},
DOI = {10.12688/f1000research.17456.1}
}Requirementspdb-toolsshould run on Python 2.7+ and Python 3.x. We test on Python 2.7, 3.6,
and 3.7. There are no dependencies.Installing from SourceDownload the zip archive or clone the repository with git. We recommend thegitapproach since it makes updating the tools extremely simple.# To downloadgitclonehttps://github.com/haddocking/pdb-toolscdpdb-tools# To updategitpulloriginmaster# To installpythonsetup.pyinstallContributingIf you want to contribute to the development ofpdb-tools, provide a bug fix,
or a new tools, read ourCONTRIBUTINGinstructionshere.Licensepdb-toolsare open-source and licensed under the Apache License, version 2.0.
For details, see the LICENSE file.