Skip to content
fragbuilder is a tool to create, setup and analyze QM calculations on peptides.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


FragBuilder is a tool to create, setup and analyze QM calculations on peptides.

BREAKING NEWS: The Official FragBuilder paper is out:

alt text


  • Python 2.x
  • Openbabel 2.x.x (with Python bindings installed)
  • Numpy (pretty much any version should be fine)


FragBuilder will run with most versions of Open Babel, however there was bug in Open Babel which prevented some dihedral angles to be set accurately. If you experience this while using fragbuilder you will have to update your Open Babel.

I have compiled a short guide to install the latest Open Babel here:

If you're interested in FragBuilder, you might also be interested in PeptideBuilder (very similar to FragBuilder):

How to use

1) Clone fragbuilder from this repository
git clone
2) Export the frabuilder directory to your PYTHONPATH eg:
export PYTHONPATH=/home/andersx/dev/fragbuilder:$PYTHONPATH
3) In your Python:
import fragbuilder


First off, the paper on PeerJ is probably the first place to go in order to get familiar with Fragbuilder. Second, I recommend looking in the examples folder. This should cover most use-cases and functionality. I have also writte a couple of blog-posts (more to come!).

Below is list of all classes currently in the fragbuilder Python library. The manual for each class is accessed though the built-in help function. A short description of each class and the code to access the corresponding help page is as follows:

fragbuilder.Peptide class:

This class makes peptides, defines the geometry, optimizes geometries, writes files, etc.

fragbuilder.Peptide documentation

fragbuilder.G09_opt class:
fragbuilder.G09_NMR class:
fragbuilder.G09_energy class:

These classes will write an Gaussian 09 input file for either geometry optimization, NMR shielding calculations or single point energies.

fragbuilder.G09_opt documentation
fragbuilder.G09_NMR documentation
fragbuilder.G09_energy documentation

fragbuilder.Basilisk_DBN class:

This class wraps the dbn class from the original BASILISK library. The only real difference is that it returns angles in degrees in order to be compatible with the rest of FragBuilder. For most practical purposes, this wrapper is not needed. Most likely you want to use the Peptide.sample_bb_angles(args) or Peptide.sample_chi_angles(args) functionality in order to invoke BASILISK library.

fragbuilder.Basilisk_DBN documentation

fragbuilder.PDB class:

This class is a PDB-filereader which can read backbone and side chain torsion angles from a PDB file.

fragbuilder.PDB documentation

Get help, report bugs, feature requests, etc:

You can use all the tools available here at GitHub or you can also contact me directly at this address: andersx [å]

I have the following functionality in the making (may be in the development branch):

  • Handling of protonation states.
  • Module that uses TorusDBN to sample backbone angles.
  • Module to write Gaussian spin-spin coupling input files.

Contact me if you have more ideas!

How to cite:


The use of FragBuilder should cite our PeerJ publication:

  • Anders S. Christensen, Thomas Hamelryck, Jan H. Jensen (2013) FragBuilder: An efficient Python library to setup quantum chemistry calculations on peptides models. PeerJ 2:e277


The use of the functions from the BASILISK library (e.g. Peptide.sample_bb_angles(), Peptide.sample_chi_angles(), etc.) should cite:

  • Tim Harder, Wouter Boomsma, Martin Paluszewski, Jes Frellesen, Kristoffer E. Johansson, and Thomas Hamelryck (2010). Beyond rotamers: a generative, probabilistic model of side chains in proteins. BMC Bioinformatics, 11:306–318.

Open Babel:

Additional use of Open Babel should cite:

  • Noel M. O'Boyle, Michael Banck, Craig A James, Chris Morley, Tim Vandermeersch and Geoffrey R Hutchison (2011) Open Babel: An open chemical toolbox. Journal of Cheminformatics, 3:33-46.


FragBuilder is licensed under the two-clause BSD license which mean you can pretty much do whatever you want as long as you cite properly and/or mentions the name of the authors.

The BASILISK library which is included is licensed under the terms of the Gnu General Public License. Is also available from SourceForge:

You can’t perform that action at this time.