Skip to content

Commit 6ecc6da

Browse files
authored
Merge pull request #4 from Zsailer/package
Package pdbtools
2 parents 038d7d2 + b9618f0 commit 6ecc6da

File tree

127 files changed

+2877
-2229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+2877
-2229
lines changed

.gitignore

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
env/
12+
build/
13+
develop-eggs/
14+
dist/
15+
downloads/
16+
eggs/
17+
.eggs/
18+
lib/
19+
lib64/
20+
parts/
21+
sdist/
22+
var/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
27+
# PyInstaller
28+
# Usually these files are written by a python script from a template
29+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
30+
*.manifest
31+
*.spec
32+
33+
# Installer logs
34+
pip-log.txt
35+
pip-delete-this-directory.txt
36+
37+
# Unit test / coverage reports
38+
htmlcov/
39+
.tox/
40+
.coverage
41+
.coverage.*
42+
.cache
43+
nosetests.xml
44+
coverage.xml
45+
*,cover
46+
.hypothesis/
47+
48+
# Translations
49+
*.mo
50+
*.pot
51+
52+
# Django stuff:
53+
*.log
54+
local_settings.py
55+
56+
# Flask stuff:
57+
instance/
58+
.webassets-cache
59+
60+
# Scrapy stuff:
61+
.scrapy
62+
63+
# Sphinx documentation
64+
docs/_build/
65+
66+
# PyBuilder
67+
target/
68+
69+
# IPython Notebook
70+
.ipynb_checkpoints
71+
72+
# pyenv
73+
.python-version
74+
75+
# celery beat schedule file
76+
celerybeat-schedule
77+
78+
# dotenv
79+
.env
80+
81+
# virtualenv
82+
venv/
83+
ENV/
84+
85+
# Spyder project settings
86+
.spyderproject
87+
88+
# Rope project settings
89+
.ropeproject
90+
91+
#
92+
.egg-info/

README.md

+54-35
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
A set of tools for manipulating and doing calculations on wwPDB macromolecule structure files
44

5+
PDBtools has recently changed. The original version was a set of python scripts to be downloaded and used locally on the command line. It has now been reorganized into a python packaged and scripts are now installed globally. Thus, you can run any of the old pdb_tools from the commandline from anywhere on your filesystem.
6+
7+
If you'd like to download the old version of pdbtools, download version [v0.1](https://github.com/harmslab/pdbtools/releases/tag/v0.1).
8+
59
##Introduction
610
pdbTools is a set of command line [python](http://www.python.org) scripts that manipulate [wwPDB](http://www.wwpdb.org/) protein and nucleic acid structure files. There are many programs, both open source and proprietary, that perform similar tasks; however, most of these tools are buried within programs of larger functionality. Thus, relatively simple calculations often involve learning a new program, compiling modules, and installing libraries. To fill a niche (and get the tasks done that I needed done), I started writing my own toolset. This has evolved into the pdbTools suite. The suite of programs is characterized by the following philosophy:
711

@@ -13,64 +17,80 @@ Most of the scripts will run "out of the box" using a python interpreter. The c
1317

1418
*Note:* These scripts are only compatible with Python version 2.4-2.7.
1519

20+
## Installation
21+
22+
Install the development version by cloning this repo and running `pip`:
23+
```
24+
pip install -e .
25+
```
26+
from inside the package.
27+
1628
##Current functions
1729

1830
###Miscellaneous
19-
* download pdb files from the RCSB database: [pdb_download.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_download.py)
31+
* download pdb files from the RCSB database: [download.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/download.py)
2032

2133
###Structure-based calculations
2234
####Geometry
23-
* calculate protein center of mass: [pdb_centermass.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_centermass.py)
24-
* calculate distance distributions: [pdb_dist-filter.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_dist-filter.py), [pdb_ion_dist.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_ion-dist.py)
25-
* calculate backbone torsion angles: [pdb_torsion.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_torsion.py)
26-
* calculate atom-by-atom solvent accessibility [pdb_sasa.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_sasa.py) [requires NACCESS](http://www.bioinf.manchester.ac.uk/naccess/ NACCESS)
27-
* find disulfide bonds based on distance: [pdb_disfulfide.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_disulfide.py)
28-
* find residues within some distance of each other: [pdb_contact.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_contact.py), [pdb_water-contact.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_water-contact.py), [pdb_close-contacts.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_close-contacts.py)
29-
* find number of atoms neighboring another: [pdb_neighbors.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_neighbors.py)
30-
* find ligands in structure file (ignoring boring ligands like water): [pdb_ligand.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_ligand.py)
31-
* figure out oligomerization state of macrmolecule: [pdb_oligomer.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_oligomer.py)
35+
* calculate protein center of mass: [centermass.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/centermass.py)
36+
* calculate distance distributions: [dist-filter.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/dist-filter.py), [ion_dist.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/ion-dist.py)
37+
* calculate backbone torsion angles: [torsion.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/torsion.py)
38+
* calculate atom-by-atom solvent accessibility [sasa.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/sasa.py) [requires NACCESS](http://www.bioinf.manchester.ac.uk/naccess/ NACCESS)
39+
* find disulfide bonds based on distance: [disfulfide.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/disulfide.py)
40+
* find residues within some distance of each other: [contact.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/contact.py), [water-contact.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/water-contact.py), [close-contacts.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/close-contacts.py)
41+
* find number of atoms neighboring another: [neighbors.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/neighbors.py)
42+
* find ligands in structure file (ignoring boring ligands like water): [ligand.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/ligand.py)
43+
* figure out oligomerization state of macrmolecule: [oligomer.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/oligomer.py)
3244

3345
####Energy calculation
34-
* calculate coulomb energy: [pdb_coulomb.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_coulomb.py)
35-
* calculate the dipole moment of the protein: [pdb_moment.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_moment.py)
36-
* calculate pKa of ionizable groups using the Solvent-Accessibility-modified Tanford-Kirkwood method [pdb_satk.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_satk.py) (requires fortran compiler)
46+
* calculate coulomb energy: [coulomb.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/coulomb.py)
47+
* calculate the dipole moment of the protein: [moment.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/moment.py)
48+
* calculate pKa of ionizable groups using the Solvent-Accessibility-modified Tanford-Kirkwood method [satk.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/satk.py) (requires fortran compiler)
3749
####Structure properties
38-
* extract structure experiment properties: [pdb_exper.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_exper.py)
39-
* extract protein sequence from structure: [pdb_seq.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_seq.py)
40-
* calculate theoretical pI, MW, fraction titratable residues, charge: [pdb_param.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_param.py)
50+
* extract structure experiment properties: [exper.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/exper.py)
51+
* extract protein sequence from structure: [seq.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/seq.py)
52+
* calculate theoretical pI, MW, fraction titratable residues, charge: [param.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/param.py)
4153

4254
###File/structure manipulation
43-
* add polar hydrogens: [pdb_addH.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_addH.py) [requires CHARMM](http://www.charmm.org/)
44-
* add missing heavy atoms, remove alternate conformations, etc.: [pdb_clean.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_clean.py) [requires CHARMM](http://www.charmm.org/)
45-
* mutate a residue: [pdb_mutator.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_mutator.py) [requires CHARMM](http://www.charmm.org/)
46-
* renumber atoms: [pdb_atom-renumber.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_atom_renumber.py)
47-
* renumber residues: [pdb_residue-renumber.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_residue-renumber.py)
48-
* offset all residues by a fixed amount: [pdb_offset.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_offset.py)
49-
* center protein in xyz space: [pdb_centermass.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_centermass.py)
50-
* places the asymmetric unit inside the unit cell: [pdb_centerasu.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_centerasu.py)
51-
* take subset of residues from file: [pdb_subset.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_subset.py)
52-
* split an NMR ensemble structure into individual files: [pdb_splitnmr.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_splitnmr.py)
53-
* take a set of pdb files and create an individual directory for each one: [pdb_pdb2dir.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_pdb2dir.py)
54-
* load data into the b-factor column: [pdb_bfactor.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb_bfactor.py)
55-
56-
Some of the programs are written as interfaces to other programs: [CHARMM](http://www.charmm.org/), [NACCESS](http://www.bioinf.manchester.ac.uk/naccess/ NACCESS), which must be downloaded and installed separately if their functions are desired. To use pdb_satk.py, a set of fortran packages must be compiled.
55+
* add polar hydrogens: [addH.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/addH.py) [requires CHARMM](http://www.charmm.org/)
56+
* add missing heavy atoms, remove alternate conformations, etc.: [clean.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/clean.py) [requires CHARMM](http://www.charmm.org/)
57+
* mutate a residue: [mutator.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/mutator.py) [requires CHARMM](http://www.charmm.org/)
58+
* renumber atoms: [atom-renumber.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/atom_renumber.py)
59+
* renumber residues: [residue-renumber.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/residue-renumber.py)
60+
* offset all residues by a fixed amount: [offset.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/offset.py)
61+
* center protein in xyz space: [centermass.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/centermass.py)
62+
* places the asymmetric unit inside the unit cell: [centerasu.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/centerasu.py)
63+
* take subset of residues from file: [subset.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/subset.py)
64+
* split an NMR ensemble structure into individual files: [splitnmr.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/splitnmr.py)
65+
* take a set of pdb files and create an individual directory for each one: [pdb2dir.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/pdb2dir.py)
66+
* load data into the b-factor column: [bfactor.py](https://github.com/harmslab/pdbtools/blob/master/pdbTools/bfactor.py)
67+
68+
Some of the programs are written as interfaces to other programs: [CHARMM](http://www.charmm.org/), [NACCESS](http://www.bioinf.manchester.ac.uk/naccess/ NACCESS), which must be downloaded and installed separately if their functions are desired. To use satk.py, a set of fortran packages must be compiled.
5769

5870

5971
##Usage
6072

61-
Almost all programs in the pdbTools suite have the same usage:
73+
### Commandline usage
74+
75+
Almost all programs in the pdbTools suite have the same command-line usage:
6276

63-
pdb_XXXX.py pdb_input optional_args > output
77+
pdb_XXXX pdb_input optional_args > output
6478

6579
**pdb_input** can be one of the following (in any arbitrary combination):
6680
* pdb files
6781
* directories of pdb files
6882
* four-character pdb ids
6983
* text files containing whitespace delimited (i.e. space, tab, carriage return) lists of any combination of the other allowed types of arguments. If the list of arguments contains pdb files or ids that do not exist locally, the parser will attempt to download the files from the RCSB database.
7084

71-
**optional_args**: Although the arguments to each program are identical, the options are quite different depending on the program requirements. The best way to learn how to use a particular program is to type pdb_XXXX.py --help. This will spit out a list of available options. In most cases, the options are actually optional: the program will use a sane default if none is specified. In some cases (notably pdb_mutator.py), options must be specified for the program to run.
85+
**optional_args**: Although the arguments to each program are identical, the options are quite different depending on the program requirements. The best way to learn how to use a particular program is to type `XXXX.py` --help. This will spit out a list of available options. In most cases, the options are actually optional: the program will use a sane default if none is specified. In some cases (notably `mutator.py`), options must be specified for the program to run.
7286

73-
**output**: Most scripts dump out a pdb file to standard out. This can be captured using the ">" redirect. Some write an output file that uses the name of the input pdb file as a suffix (e.g. pdb_close-contacts.py 1stn.pdb creates a file called 1stn.pdb.close_contacts).
87+
**output**: Most scripts dump out a pdb file to standard out. This can be captured using the ">" redirect. Some write an output file that uses the name of the input pdb file as a suffix (e.g. `close-contacts.py 1stn.pdb` creates a file called 1stn.pdb.close_contacts).
88+
89+
### API
90+
91+
Version 0.2 has moved all `pdbtools` into a set of modules. These can be used to develop new scripts easily.
92+
93+
Note: You can download the original pdbtools scripts (prior to packaging) [here](https://github.com/harmslab/pdbtools/releases/tag/v0.1).
7494

7595
##Third Party Software
7696
Some scripts require installation of third-party programs. These should be installed according to the instructions given by the third-party, then placed into the $PATH variable. To use the scripts that require CHARMM, the `$CHARMM` environment variable must be set to the directory containing the `charmm` binary and the `$CHARMM_LIB` environment variable to the directory containing the charmm parameter files.
@@ -81,4 +101,3 @@ If you find a bug or have an idea for a program you'd like in this package, feel
81101

82102
##Project Owner
83103
Mike Harms (https://github.com/harmsm, http://harmslab.uoregon.edu)
84-
File renamed without changes.

0 commit comments

Comments
 (0)