Install alignframes_lmbfgs on CentOS 7

This is a good example of an irrelevant post. I mean, if you are on the IT business, to install these little FORTRAN guys should be as easy as to mkdir. As easy that I’m thinking about deleting the post already. But let’s assume you arrive to the Rubinstein Lab page  and you don’t know what else to do. Step by step:

  1. Create a folder for your software. That will be /usr/local/l-bfgs-b/ for simplicity.
  2. Download everything on the page to that folder, plus the minimal libraries.
  3. Make a sub folder for the minimal libraries /usr/local/l-bfgs-b/lib/
  4. Move the minimal libraries tarball to /usr/local/l-bfgs-b/lib/, do tar -xvzf minimal_libraries.tar.gz. A lot of files will be uncompressed there.
  5. ./rebuild_libs_gfortran on that folder. It should give you some output like “rebuilding fsplit” or something like that.
  6. cd to the upper folder, edit the Makefile with your favorite editor. On this example, since we have the code on /usr/local/  and the libraries on /usr/local/lib/ we just need to replace /home/jlr/ with /usr/local/. The rest you can leave.
  7. Make the stuff. Basically
make alignframes_lmbfgs
make alignparts_lmbfgs
make alignparts_starfilehandler

The folder with the compiled stuff looks like:

/usr/local/l-bfgs-b ## > ls
alignframes_lmbfgs.csh 
alignparts_lmbfgs.csh 
alignparts_lmbfgs_relion.csh 
gnuplotframeshifts.csh lib/
alignframes_lmbfgs.exe* 
alignparts_lmbfgs.exe* alignparts_starfilehandler.exe* 
Lbfgsb.3.0/ Makefile
alignframes_lmbfgs.f90 alignparts_lmbfgs.f90 
alignparts_starfilehandler.f90  Makefile.original

Now I make a module for it. My module looks like this:

#%Module1.0##############################################
## modules alignparts_lmbfgs-3.0
## modulefiles/alignparts_lmbfgs-3.0 alignparts_lmbfgs-3.0

proc ModulesHelp { } {
 global version modroot
puts stderr "alignparts_lmbfgs-3.0 - alignparts_lmbfgs-3.0"
}
module-whatis "Sets  alignparts_lmbfgs-3.0"
# for Tcl script use only
set topdir /usr/local/l-bfgs-b/
set version 1.11
set sys linux86

prepend-path PATH $topdir
prepend-path LD_LIBRARY_PATH $topdir/lib

As you see, easy as a pie 🙂 …I’m ashamed I’m actually writing about. Please don’t unfollow me! 😀

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s