Skip to content
naulon

No retraction, correction or concern found when last checked on Oct 27, 2026.

FreeContact: fast and free software for protein contact prediction from residue co-evolution

László Kaján, Thomas A Hopf, Matúš Kalaš and 2 more

BMC Bioinformatics · 2014

doi:10.1186/1471-2105-15-85

Abstract

Background. 20 years of improved technology and growing sequences now renders residue-residue contact constraints in large protein families through correlated mutations accurate enough to drive de novo predictions of protein three-dimensional structure. The method EVfold broke new ground using mean-field Direct Coupling Analysis (EVfold-mfDCA); the method PSICOV applied a related concept by estimating a sparse inverse covariance matrix. Both methods (EVfold-mfDCA and PSICOV) are publicly available, but both require too much CPU time for interactive applications. On top, EVfold-mfDCA depends on proprietary software.

Results. Here, we present FreeContact, a fast, open source implementation of EVfold-mfDCA and PSICOV. On a test set of 140 proteins, FreeContact was almost eight times faster than PSICOV without decreasing prediction performance. The EVfold-mfDCA implementation of FreeContact was over 220 times faster than PSICOV with negligible performance decrease. EVfold-mfDCA was unavailable for testing due to its dependency on proprietary software. FreeContact is implemented as the free C++ library “libfreecontact”, complete with command line tool “freecontact”, as well as Perl and Python modules. All components are available as Debian packages. FreeContact supports the BioXSD format for interoperability.

Conclusions. FreeContact provides the opportunity to compute reliable contact predictions in any environment (desktop or cloud).

Full text

From PubMed Central, U.S. National Library of Medicine, as current on Oct 27, 2026. Paragraph numbers are ours, so an answer can point at one.

Background

Experimental high-resolution three-dimensional (3D) structures are available for fewer than one percent of all known proteins of known sequence (March, 2014: 100 k protein structures in the PDB vs. 52 M sequences in UniProt), and this sequence-structure gap continues to increase. Homology modeling or comparative modeling is the only bridge that allows reliable modeling of 3D structure for about 20-40% of the residues in all known proteins. This boost of experimental information constitutes an immense achievement of computational biology (with about $50 billion dollars investment for experimentally unraveling 0.1 M known structures, computational biology generates structural knowledge for another ~20 M for just a few million).

Over the last two years, methods have been introduced that for the first time enable reliable de novo prediction of 3D structure for large proteins, i.e. intrudes into realms unreachable by comparative modeling. EVfold has been succeeding in sustained and reliable predictions of two-dimensional (2D) inter-residue contacts, i.e. the prediction of which residue pairs are near each other in the native protein structure. The success and elegance of the contact prediction through mean-field direct-coupling analysis of EVfold (EVfold-mfDCA) has revived the field (e.g. PSICOV, plmDCA, PconsC and PhyCMAP, and EVfold_membrane). Wider application of this new generation of contact prediction tools is enticing, but currently hampered by two problems.

The first problem relates to the amount of sequence information needed, e.g. EVfold tends to perform better with 50 k sequences in a family than with 10 k. To put this into perspective: a decade ago, only the 10% largest families had over 100 homologues, now we have a method for which 100 times this may no longer suffice. This is why, e.g. EVfold_membrane can predict structures for only tens of families. However, these families are so gigantic that they cover some 3-6% of all known sequences.

The second problem pertains to the speed of the new methods and their ease of availability. EVfold-mfDCA is publicly available, but its implementation requires proprietary interpreter software. PSICOV has recently been released under the GPLv2 (version 1.09 and later), but is not optimized for speed (as of version 1.10). Runtimes often exceed tens of minutes (using the optimal parameters published). This might be restrictive for large-scale data analysis and for public web service operations such as PredictProtein. Neither EVfold-mfDCA nor PSICOV are packaged for convenient installation and usage.

Here, we report the release of FreeContact, a freely available software that considerably reduces the runtime for EVfold-mfDCA and PSICOV and provides convenient Debian packages freely, open-source available to all users.

Implementation

FreeContact is an open-source EVfold-mfDCA implementation optimized for speed. FreeContact can also be parameterized to produce results according to the PSICOV algorithm, because these two methods share many computational steps. For optimization, we identified the following program components that contribute significantly to runtime: BLOSUM-style weighting of protein sequences in the input alignment (shared by EVfold-mfDCA and PSICOV), counting pairwise residue frequencies (also shared), shrinking the covariance matrix (PSICOV), sparse inverse covariance estimation (PSICOV), and covariance matrix inversion (EVfold-mfDCA).

Speed-up

Sequence weights result from computing the percentage sequence identity between each protein pair in a family. Our implementation uses standard ×86-64 architecture streaming SIMD instructions (single instruction, multiple data) extensions 2 (SSE2). These instructions operate on 128-bit registers, allowing the simultaneous comparison of 16 residues (each represented in a byte). A generic implementation is provided for architectures without SSE2 instructions. Both implementations benefit from multiple cores using OpenMP to parallelize loops. Parallelization of loops through OpenMP also accelerated the computation of pairwise amino acid frequencies. The usage of single-precision LAPACK routines accelerated the shrinking of the covariance matrix. We used GLASSOFAST, a new, fast implementation of the GLASSO algorithm for sparse inverse covariance matrix estimation, developed in part for its usefulness in protein contact prediction. GLASSOFAST was used with single-precision numbers and GNU Compiler Collection (GCC) auto-vectorization (“-ftree-vectorize”, implied by “–O3”). LAPACK routines (single precision) inverted the covariance matrix.

Parameters

FreeContact is controlled by the following parameters (Table 1). Command-line usage of FreeContact is facilitated by Bash auto-completion for its parameters and their arguments.

We provide the choice of parameter profiles through the “--parprof” command-line option to conveniently set FreeContact options to recommended parameterizations of EVfold-mfDCA and PSICOV: the “evfold” argument sets EVfold-mfDCA compatibility mode, while “psicov” sets PSICOV “improved results” compatibility mode, and “psicov-sd” sets PSICOV “sensible default” compatibility mode (as defined in the README file distributed with PSICOV). This allows FreeContact to function as an accelerated replacement for both EVfold-mfDCA and PSICOV.

Differences

One of the differences between the FreeContact and the original implementation of PSICOV is the interpretation of the BLOSUM-style clustering percentage for sequence weighting. The original implementation groups sequences with a similarity larger than (>) the given threshold, while FreeContact groups at larger-or-equal (≥) the threshold. This technical detail matters as it allows FreeContact to share this program component between its implementations of PSICOV and EVfold-mfDCA. The performance of PSICOV is affected minimally by this detail [see Additional file 1].

A novel addition is the optional time limit that FreeContact can impose on inverse covariance estimation. The rationale was the observation that this estimation can take exceedingly long. If the time limit is exceeded, the prediction aborts with a dedicated error code.

An important difference between the original EVfold-mfDCA and its FreeContact implementation is the way in which contact scores are computed. FreeContact returns improved “corrected norm” scores instead of the original “direct information”. The reason for this is that “corrected norm” scores have been reported to be superior.

Build

FreeContact was compiled with the GNU Compiler Collection (GCC, version 4.7.2, with the “–O3 -ffast-math -funroll-loops” flag), and it was linked with the threaded version of the linear algebra software ATLAS (version 3.8.4, built on the host architecture). ATLAS provides a highly efficient machine-specific implementation of BLAS and LAPACK; it automatically adapts itself during the build process to the host architecture in order to optimize performance. FreeContact can be linked with other BLAS and LAPACK implementations. PSICOV was compiled with the recommended “-m64 –O3 -mfpmath = sse -msse3 -funroll-loops -ffast-math” options.

Availability

FreeContact is available under the GNU General Public License version 3 or later (GPLv3+, granting freedom to use the software, guaranteeing included source code, allowing modifications, and allowing free redistribution). It is available as a C++ library (called “libfreecontact”), along with a command-line executable (called “freecontact”), and modules in Perl (“FreeContact”, packaged as “libfreecontact-perl”) and Python (“freecontact”, packaged as “python-freecontact”). The library, executable, modules, and documentation are available as official Debian packages for Debian and derivative operating systems - such as Ubuntu, Bio-Linux and CloudBioLinux - from Debian Med. All packages can be easily installed with the common package management tools. TAR GZ downloads are available from the Rostlab FTP site.

Results and discussion

PSICOV has two notable run modes: “improved results” and “sensible default”. The first (improved results) has been reported to be slightly more accurate and 2–3 times slower than the second. We have tested the runtime of the FreeContact implementation (FC) of these modes (FC.psicov and FC.psicov-fast), and of EVfold-mfDCA (FC.evfold) on 140 proteins of the published test set of PSICOV [see Additional files 2 and 3]. We compared runtimes to PSICOV version 1.10. The original implementation of EVfold-mfDCA was unavailable for testing due to its dependency on proprietary software. Ten proteins of the complete PSICOV test set of 150 were excluded from the evaluation, because at least one of the methods failed to return results, due to either excessive run time, or insufficient total alignment weight. PSICOV was allowed to run for at least three hours. FreeContact was run with the default 30-minute time limit on the inverse covariance estimation step. All tests of FreeContact were carried out using the “FreeContact” Perl module, on a computer with 32 GB RAM and two 6-core AMD Opteron 2431 processors running at 2.4 GHz. FreeContact was run on a single thread unless indicated otherwise.

Performance

The most time-consuming step of the original PSICOV implementation is the sparse inverse covariance matrix estimation. In fact, this step is responsible for a large fraction of the runtime. The next most CPU-intensive steps are shrinking the covariance matrix, sequence weighting, and pairwise residue frequency calculation (Figure 1).

Sequence weighting in FreeContact was accelerated over 12-fold on a single thread, compared to PSICOV (Figure 1, “seqw”). Parallelization yielded further speedup. On the 12-core test machine, 2.0, 3.8, and 7.9-fold average speedups were observed when using FreeContact with 2, 4, and 10 threads, respectively (Figure 2A). The FreeContact computation of pairwise residue frequencies was as fast as PSICOV on a single thread (Figure 1, “pairfreq”). Parallelization yielded 2.0, 3.7, and 6.8-fold speedup on 2, 4, and 10 threads, respectively (Figure 2B).

Our code, taking advantage of the optimized ATLAS implementation of single precision LAPACK routines, sped up the covariance matrix shrinking step over five-fold, compared to PSICOV (Figure 1, “shrink”). FC.psicov performed the inverse covariance matrix estimation step on average 8-times faster than PSICOV (Figure 1, “inv”), due to the optimized GLASSOFAST routine. Overall, FC.psicov, FC.psicov-fast, and FC.evfold were 7.9, 32, and 226-times faster than PSICOV on a single thread, respectively (Figure 1, “all”).

Precision

We measured the performance of FreeContact in the following way. Two residues were defined to be in contact when their Cβ-Cβ distance (Cα-Cα for glycine) was below 8 Å (0.8 nm). In this debatable threshold, we followed the procedure introduced by the Critical Assessment of protein Structure Prediction (CASP). It was also used for the original PSICOV publication. Similarly, we monitored a score that had also been introduced by CASP, namely the precision in contact predictions for pre-defined thresholds in the number of contacts predicted. The thresholds were chosen as the top L/n (L: length of target protein) contacts, with n = (1, 2, 5, 10). We distinguished different regions of sequence separation (residues j and i separated by at least [j - i] > sep, with sep = (4, 8, 11, 23)). All of those choices followed the CASP procedure. Many readers might argue for problems with those choices. However, for our purpose the CASP-like evaluation of contact prediction sufficed to establish that the FreeContact implementation of PSICOV and EVfold-mfDCA did not come at the cost of performance.

Our assessment showed that the re-implementation of PSICOV and the switching of some calculations to single precision did not significantly affect precision (Table 2: PSICOV vs. FC.psicov) [see Additional file 1]. The small differences observed were entirely caused by switching the relational operator in sequence weighting from larger (“>”) in the original PSICOV to larger-equal (“≥”) in FC.psicov (our implementation). Switching back to the original larger (“>”) resulted in identical precision [see Additional files 4 and 5].

We could not compare the performance of the original implementation of EVfold-mfDCA with ours (FC.evfold), due to the former’s dependency on proprietary software. We noted, however, that FC.evfold was the fastest of the four methods tested, and assessed on the PSICOV test set, the immense gain in speed appeared to come with good performance: FC.evfold outperformed the other three methods at certain top-L contact and sequence separation ranges (Table 2, italic values).

Interoperability

FreeContact is not limited to the command line or C/C++ programs. Its full speed and features are available to Perl and Python scripts as well, through extension modules distributed with the software. FreeContact supports BioXSD – the proposed XML data-exchange format for sequences, alignments, and features – as an option for output formats. This facilitates its integration into workflows and incorporation into Web services. We plan to support BioXSD input as well, and release a FreeContact Web service in the near future.

Conclusions

FreeContact is a fast replacement for EVfold-mfDCA and PSICOV, offering significant acceleration on common hardware. The implementation takes full advantage of standard ×86-64 features such as SSE2 instructions and multiple cores. The speed increase is important for large-scale protein contact or protein-protein interaction prediction projects, as it leads to significant savings through shorter runtimes. We anticipate providing updates to FreeContact as the algorithms are developed.

Availability and requirements

• Project name: FreeContact

• Project home page: http://rostlab.org/owiki/index.php/FreeContact

• Operating systems: UNIX-like (tested on Debian and Ubuntu)

• Programming language: C++, Fortran

• Other requirements: Autotools, Boost C++ Libraries, BLAS, LAPACK, Xerces C++, CodeSynthesis XSD (the latter two are required only for optional XML I/O)

• License: GPLv3 or later

• Any restrictions to use by non-academics: none

Abbreviations

2D: Two-dimensional; 3D: Three-dimensional; BMBF: Bundesministerium fuer Bildung und Forschung; CASP: Critical assessment of protein structure prediction; EBI: European bioinformatics institute; FC: FreeContact; GCC: GNU compiler collection; GPLv3+: GNU general public license version 3 or later; PDB: Protein data bank; SIB: Swiss institute of bioinformatics; SIMD: Single instruction multiple data; SSE2: Streaming SIMD extensions 2; TUM: Technical university of Munich, Germany.

Competing interests

The authors declare that they have no competing interests.

Authors’ contributions

LK programmed FreeContact, created extension modules, packaged the software, coordinated the project and drafted the manuscript; TAH advised on EVfold-mfDCA implementation and reviewed the manuscript; MK contributed to the development of the FreeContact XML schema, advised on interoperability, reviewed and edited the manuscript; DSM reviewed and edited the manuscript; BR contributed to the concept, reviewed and edited the manuscript. All authors read and approved the final manuscript.

Authors’ information

LK is a Debian Developer and an active member of the Debian Med team.

References 36

  1. 1.

    Berman HM Westbrook J Feng Z Gilliland G Bhat TN Weissig H Shindyalov IN Bourne PE The protein data bankNucleic Acids Res2000 281235242

    Not in our library10.1093/nar/28.1.235

  2. 2.

    Magrane M Consortium U UniProt knowledgebase: a hub of integrated protein dataDatabase: the journal of biological databases and curation2011 2011bar009

    Not in our library10.1093/database/bar009

  3. 3.

    Rost B Sander C Bridging the protein sequence-structure gap by structure predictionsAnnual review of biophysics and biomolecular structure1996 25113136

    Not in our library10.1146/annurev.bb.25.060196.000553

  4. 4.

    Kiefer F Arnold K Kunzli M Bordoli L Schwede T The SWISS-MODEL repository and associated resourcesNucleic Acids Res2009 37Database issueD387392

    Not in our library10.1093/nar/gkn750

  5. 5.

    Pieper U Webb BM Barkan DT Schneidman-Duhovny D Schlessinger A Braberg H Yang Z Meng EC Pettersen EF Huang CC Datta RS Sampathkumar P Madhusudhan MS Sjölander K Ferrin TE Burley SK Sali A ModBase, a database of annotated comparative protein structure models, and associated resourcesNucleic Acids Res2011 39Database issueD465474

    Not in our library10.1093/nar/gkq1091

  6. 6.

    Liu J Hegyi H Acton TB Montelione GT Rost B Automatic target selection for structural genomics on eukaryotesProteins2004 562188200

    Not in our library10.1002/prot.20012

  7. 7.

    Hopf TA Colwell LJ Sheridan R Rost B Sander C Marks DS Three-dimensional structures of membrane proteins from genomic sequencingCell2012 149716071621

    Not in our library10.1016/j.cell.2012.04.012

  8. 8.
  9. 9.

    EVcouplings and EVfoldhttp://evfold.org/evfold-web/evfold.do

    Not in our library

  10. 10.

    Morcos F Pagnani A Lunt B Bertolino A Marks DS Sander C Zecchina R Onuchic JN Hwa T Weigt M Direct-coupling analysis of residue coevolution captures native contacts across many protein familiesProc Natl Acad Sci U S A2011 10849E12931301

    Not in our library10.1073/pnas.1111471108

  11. 11.

    Jones DT Buchan DW Cozzetto D Pontil M PSICOV: precise structural contact prediction using sparse inverse covariance estimation on large multiple sequence alignmentsBioinformatics2012 282184190

    Not in our library10.1093/bioinformatics/btr638

  12. 12.

    Ekeberg M Lovkvist C Lan Y Weigt M Aurell E Improved contact prediction in proteins: using pseudolikelihoods to infer potts modelsPhysical review E, Statistical, nonlinear, and soft matter physics2013 871–1012707

    Not in our library10.1103/physreve.87.012707

  13. 13.

    Skwark MJ Abdel-Rehim A Elofsson A PconsC: combination of direct information methods and alignments improves contact predictionBioinformatics2013 291418151816

    Not in our library10.1093/bioinformatics/btt259

  14. 14.

    Wang Z Xu J Predicting protein contact map using evolutionary and physical constraints by integer programmingBioinformatics2013 2913i266i273

    Not in our library10.1093/bioinformatics/btt211

  15. 15.

    Marks DS Hopf TA Sander C Protein structure prediction from sequence variationNature biotechnology2012 301110721080

    Not in our library10.1038/nbt.2419

  16. 16.

    de Juan D Pazos F Valencia A Emerging methods in protein co-evolutionNature reviews Genetics2013 144249261

    Not in our library10.1038/nrg3414

  17. 17.

    Przybylski D Rost B Alignments grow, secondary structure prediction improvesProteins2002 462197205

    Not in our library10.1002/prot.10029

  18. 18.

    Kaján L Yachdav G Vicedo E Steinegger M Mirdita M Angermüller C Böhm A Domke S Ertl J Mertes C Reisinger E Staniewski C Rost B Cloud prediction of protein structure and function with predict protein for debianBioMed Research International2013 20136

    Not in our library10.1155/2013/398968

  19. 19.

    Debian - the universal operating systemhttp://www.debian.org/

    Not in our library

  20. 20.

    Henikoff S Henikoff JG Amino acid substitution matrices from protein blocksProc Natl Acad Sci U S A1992 89221091510919

    Not in our library10.1073/pnas.89.22.10915

  21. 21.

    OpenMP ARBOpenMP Application Program Interface V3.02008 OpenMP Architecture Review Board

    Not in our library

  22. 22.

    Anderson E Bai Z Bischof C Blackford LS Demmel J Dongarra JJ Croz JD Hammarling S Greenbaum A McKenney A Sorensen D LAPACK Users’ guide1999 9Siam

    Not in our library

  23. 23.

    Mátyás A Sustik BC GLASSOFAST: an efficient GLASSO implementationThe University of Texas at Austin UTCS Technical Report2012 13TR-12-29

    Not in our library

  24. 24.

    Friedman J Hastie T Tibshirani R Sparse inverse covariance estimation with the graphical lassoBiostatistics2008 93432441

    Not in our library10.1093/biostatistics/kxm045

  25. 25.

    Bash reference manualhttp://www.gnu.org/software/bash/manual/bashref.html#Programmable-Completion

    Not in our library

  26. 26.

    Clint Whaley R Petitet A Dongarra JJ Automated empirical optimizations of software and the ATLAS projectParallel Comput2001 271335

    Not in our library

  27. 27.

    Blackford LS Demmel J Dongarra J Duff I Hammarling S Henry G Heroux M Kaufman L Lumsdaine A Petitet A Pozo R Remington K Whaley RC An updated set of basic linear algebra subprograms (BLAS)ACM Trans Math Softw2002 282135151

    Not in our library

  28. 28.

    GNU General Public Licensehttp://www.gnu.org/licenses/gpl-3.0.html

    Not in our library

  29. 29.

    Debian derivativeshttp://wiki.debian.org/Derivatives

    Not in our library

  30. 30.

    Field D Tiwari B Booth T Houten S Swan D Bertrand N Thurston M Open software for biologists: from famine to feastNature biotechnology2006 247801803

    Not in our library10.1038/nbt0706-801

  31. 31.

    Krampis K Booth T Chapman B Tiwari B Bicak M Field D Nelson KE Cloud BioLinux: pre-configured and on-demand bioinformatics computing for the genomics communityBMC Bioinforma2012 1342

    Not in our library10.1186/1471-2105-13-42

  32. 32.

    Moller S Krabbenhoft HN Tille A Paleino D Williams A Wolstencroft K Goble C Holland R Belhachemi D Plessy C Community-driven computational biology with Debian LinuxBMC Bioinforma2010 1112S5

    Not in our library10.1186/1471-2105-11-s12-s5

  33. 33.

    Debian Medhttp://www.debian.org/devel/debian-med/

    Not in our library

  34. 34.

    FreeContact FTP downloadftp://rostlab.org/free/

    Not in our library

  35. 35.

    Grana O Baker D MacCallum RM Meiler J Punta M Rost B Tress ML Valencia A CASP6 assessment of contact predictionProteins2005 61Suppl 7214224

    Not in our library10.1002/prot.20739

  36. 36.

    Kalaš M Puntervoll P Joseph A Bartaševičiūtė E Töpfer A Venkataraman P Pettifer S Bryne JC Ison J Blanchet C BioXSD: the common data-exchange format for everyday bioinformatics web servicesBioinformatics2010 2618i540i546

    Not in our library10.1093/bioinformatics/btq391

Cited by papers we hold 4

Reads

Read by people on this page

None yet.

Checked or read by AI through naulon

None yet.

A person counts once a day per paper. We keep no cookie and no address: a reader is a hash that changes every day. Any month under five reads shows no number.

Are you an author?

Is this your paper?

Claim it to add your note and be paid when agents cite it. Free.