Posts

Using gdb with gromacs

Download and compile gromacs 5.x cd gromacs; mkdir build ; cd build  cmake .. -DCMAKE_BUILD_TYPE=Debug Then, go to the methanol example cd share/gromacs/tutor/methanol/ grompp  Then enter gdb console and issue some commands $ gdb # that's where the gmx command lives exec ../../build/bin/gmx # read in the symbol table file ../../build/bin/gmx  # break on errors break _gmx_error # break on do_force function break do_force run mdrun -debug 1 -v -s This is not very practical - you can put the gdb commands into a file, gdb_cmds, and execute $ gdb -x gdb_cmds Note gdb has a ton of useful commands, google around References: - add pretty command to gdb http://stackoverflow.com/questions/23578312/gdb-pretty-printing-with-python-a-recursive-structure - gdb tutorial handout http://www.cs.umd.edu/~srhuang/teaching/cmsc212/gdb-tutorial-handout.pdf

Gromacs games

Additional energy terms in custom Hamiltonians, exchanges The standard energy function in looks something like this: E = E_bonds + E_angles + E_dihedrals + E_LJ + E_Culombic This energy term, at some temperature T then becomes: U = exp(-E/kb*T) Let's say one has a n such Hamiltonians, U1...Un. These can then exchange, if the energies overlap. The details of the exchange scheme are skipped here, for gromacs implementation if the exchange see src/kernel/repl_ex.c In temperature replica exchange one uses a ladder of T values, hoping that U1...Un overlap. In solute tampering replica exchange, one modifies the energy function E, keeping the T constant, hoping again to see exchange. In deciding if a pair of replicas on a ladder will exchange, one compares their potential energy (Epot). When including extra energy terms into the hamiltonian (custom biases, for example) one has to make sure they will be included in the Epot. For instance, let's see if the gromacs pul...

React.js – edit and delete comments in CommentBox

It appears customary for high-intelligence, high-skills groups of engineers to "roll their own" whenever they have a chance to. Counter-intuitively to most managerial/MBA types out there, re-inventing the wheel can give you... a better wheel. Success is not guaranteed though – but these people may leave sooner rather than later if you don't let them... Having looked at number of JS frameworks (ember, backbone, angular) there was no clear winner. They were all a mess, at least to me. So I approached React.js with no hopes – how much better could it possible be? It turns out, a lot! This post will be an extension of the official React.js tutorial . The tutorial stops at the stage where you can add comments to a dynamic lists, that will grow as you add comments. This falls short of the functionality displayed on facebook: once you add a comment you can edit or delete it, so that's what're going to do. Full disclosure, I only started using React this weekendo so m...

complie plumed 2 with gromacs 4.6 on ubuntu 14.04

Should be simple right? Just you wait... Because I do it for the 5th time now, this will deserve a blog entry, if anything for my own sanity.  sudo apt-get install libblas-dev liblapack-dev tar xvf plumed-2.1.1.tgz cd plumed-2.1.1 export PLUMED_PREFIX=~/Programs/plumed/2.1.1/ ./configure.sh  << EOF 1 EOF make make install   [ Edit ]For OpenMPI plumed installation do the following sudo apt-get install libcr-dev mpich2 mpich2-doc ./configure.sh  << EOF 3 EOF sed -i s#'-lblas'#'-lblas -L/usr/lib/openmpi/lib'#g Makefile.conf sed -i s#'PLUMED_INCLUDE)'#'PLUMED_INCLUDE) -I/usr/lib/openmpi/include'#g Makefile.conf The default ./configure command doesn't do the job for me. So let's ignore that for now. cmake .. -DCMAKE_INSTALL_PREFIX=/path/ -DGMX_MPI=OFF -DGMX_GPU=OFF make  make install  And then if all goes well source /path/ mdrun -h 2>&1 >/dev/null | grep plumed -plumed  plumed.dat  Input, Opt....

gromacs 5.0 - first look

Image
Oh, gromacs, old friend let's see what you have to offer in your new release wget ftp://ftp.gromacs.org/pub/gromacs/gromacs-5.0.4.tar.gz tar xvf gromacs-5.0.4.tar.gz cd gromacs-5.0.4 mkdir build cd build cmake ..  Problem #1 -- Could NOT find LibXml2 (missing:  LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) CMake Warning at CMakeLists.txt:601 (message):   libxml2 not found.  Will build GROMACS without unit-tests.  This is not   recommended, because the unit-tests help to verify that GROMACS functions   correctly.  Most likely you are missing the libxml2-dev(el) package.  After   you installed it, set GMX_BUILD_UNITTESTS=ON. Problem #2 CMake Warning at cmake/gmxManageFFTLibraries.cmake:94 (message):   The FFTW library was compiled with --enable-avx to enable AVX SIMD   instructions.  That might sound like a good idea for your processor, but   for FFTW versions up to 3.3.3, these are slower than the SSE/SSE2 SIM...

Performance of a popular docking code

Image
This post is a quick note on a performance of a commercial docking code, as measured across the entire DUDE dataset. For around a 100 protein targets, the code is supposed to rank active compounds higher than decoys compounds – separate poppy seeds from sand if you like. Let me start by saying that I'm pretty impressed with what I've seen. Starting this side-project, I assumed that any docking code can be expected to have an AUC of around 0.6-0.7 measured on a standard benchmarking set (such as DUDE). I think that's largely true of free codes such as Autodock vina or rdock. But here we're looking at a piece of code from a major commercial vendor and it performs beyond my expectation. I'm not disclosing the name of the code, since there may have been something in the academic license that prevents such benchmarking studies from being published (a "gag order" effectively, in case somebody is measuring the code "incorrectly"). AUC is estima...

SDF to Excel file, in an automated fashion

Image
Sharing SDF files between chemists is often a pain. It's supposed to be vanilla and super-standard but sometimes still gives everyone involved a headache. Especially when moving SDF between two chemistry codes, especially if hydrogens are involved... For this reason, and because some people ONLY work with excel files, it's good to have an ability to automatically convert an SDF file to a Excel file (especially xlsx). With pandas and rdkit, its possible to easily make such moves. Example below. Pandas uses xlsxwriter module to support the Excel format. There is no easy way to pass image objects, embedded in the pandasa.DataFrame, down to xlsxwriter. The writer itself supports the insert_image functionality that takes a filename as argument example ). The easiest way is to make pandas detect that a cell contains a string ending with a .png and take use 'insert_image', see the hack below: And here you go: molecule_data.xlsx has a beautiful col...