Friday, December 27, 2013

FragBuilder: Installation

With the FragBuilder library out as a preprint from PeerJ and the library available at, I am going to make a couple of blog posts to get you started using FragBuilder. You can access the manual via the GitHub page linked above.

This post will guide you through the installation of the FragBuilder library.

Figure 1: Example of peptide model made using the Fragbuilder library

FragBuilder will run about every Linux distribution with a recent Python 2.x interpreter.

You need to havethree things installed before FragBuilder can run. Install of these can be found in the 2nd half of this post.
  1. NumPy
  2. Open Babel with Python bindings
  3. git (in order to get FragBuilder from GitHub)
To actually download FragBuilder you need to use git, as FragBuilder is stored and maintained through GitHub. To clone the latest version do this: 
$ git clone git://
This will download (clone) FragBuilder to a folder named "fragbuilder". There is nothing that needs to be compiled, so in principle, FragBuilder is now installed and works.

To actually be able to use FragBuilder from a Python script, you need to export the path to the FragBuilder library to your $PYTHONPATH. For instance, on my laptop, I do the export like this: 
\$ export PYTHONPATH=/home/andersx/dev/fragbuilder:\$PYTHONPATH 
Now you should be able to import FragBuilder from Python. You can copy this line into your ~/.bashrc file if you want don't want to export this every time you log in.

To test your installation fire up Python and import FragBuilder: 
$ python  

Python 2.7.3 (default, Sep 26 2013, 20:03:06)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

>>> import fragbuilder
>>> print fragbuilder.__version__

If you don't get any errors FragBuilder now works.

Installation of dependencies:

1) NumPy:

In most Linux distributions, NumPy is can be obtained through a package manager. The commands are usually.

For Ubuntu/Debian distributions:
sudo apt-get install python-numpy 
For Fedora/Red Hat distributions: 
yum install python-numpy
See this link, if you still have troubles installing NumPy:

2) Open Babel with Python bindings:

In most Linux distributions, Open Babel is can be obtained through a package manager. The commands are usually.

For Ubuntu/Debian distributions: 
sudo apt-get install python-openbabel 
For Fedora/Red Hat distributions: 
yum install python-openbabel 
Optionally, you can compile and install Open Babel yourself. This may be required if you get a certain problem with setting dihedral angles to 180 degrees.
In older versions of Open Babel you are only allowed to set the dihedral angle to 179.96 degrees. I recently submitted a patch to fix this, but I don't know when the changes will go "live" onto repositories, etc.

I made a short guide here:

There is some extra stuff here from the Open Babel manual:

 3) Git:

Git is pretty much the program you use to download FragBuilder from GitHub. You can also use Git to submit patches back to the repository. Git also does a million other things, but you don't need to know more at this point.

In most Linux distributions, git is can be obtained through a package manager. The commands are usually.

For Ubuntu/Debian distributions:
sudo apt-get install git 
For Fedora/Red Hat distributions: 
yum install git

 I think that is all. If not, feel free to leave a message!


  1. Very detailed oriented in information. I will try the product and buy peptides.

  2. There is more information resource of information. It should include about to buy peptides. Here are below some links which has concern information about the peptides.

  3. I have been checking out a few of your stories and i can state pretty good stuff. I will definitely bookmark your blog
    ccna training at pune

  4. Thanks for providing good information,Thanks for your sharing python Online Training

  5. Awesome post! A very good step-by-step guide. It’s overwhelming with information, thank you for making it easy and very detailed.
    Must Visit

  6. This is altimate information and thank you for this information

    ccna training center | ccna training center in pune | ccna training institute in pune | ccna training in pune | ccna training class in pune | ccna exam center in pune | ccna exam center | ccna certificati "> ccna certification institute | ccnp certification institute | ccnp training center | ccnp training center in pune | ccnp training in pune | ccnp training institute in pune | ccnp training class in pune

    Cisco Certified Network Professional (CCNP) is the Professional level of program which provides the Network Technician platform in the industry. Candidate should have CCNA knowledge. The CCNP certification is appropriate for those with at least one year of networking experience who are ready to advance their skills and work independently on complex network solutions. After completing CCNP candidates can go for higher level of certification like CCIE.