Before you attempt to install ptm you should have a relatively recent version of R installed and working on your system. Detailed instructions for obtaining and installing R on various platforms can be found on the R home page. We also encourage you to install RStudio, a useful integrated development environment for R.

Obtaining ptm

To install this package, start R (version “4.0”) and enter:

if (!requireNamespace("BiocManager", quietly = TRUE))


Alternatively, you can get ptm from its bitbucket repository using the R function install_bitbucket() from the devtools package.

install_bitbucket("jcaledo/ptm", subdir = "versions/ptm_v0.2.2") 

After installing ptm from Bitbucket you may wish to restart R before using it.


Some functions from ptm require computations that are carry out by external programs such as MUSCLE, DSSP and FoldX. Whenever possible, we have implemented code to carry out these computations online, behind the scene. In this way, you have to worry about nothing. Although handy, sometimes this strategy may come at the price of a less efficient computation (longer times to accomplish the requested task) depending on how busy are the servers, and in any event it requires you to be connected to internet. To avoid these drawbacks, these ptm functions offer you the possibility to carry out all the computation in-house, if you have previously installed the external programs on your system and have them in the search path for executables.

Let’s illustrate this point with a concrete example. Suppose we are interested in assessing the accessibility of the methionine residues of the alpha-1-antitrypsin inhibitor (UniProt ID: P01009). That’s a work for acc.dssp():

If we have not installed DSSP, we will have to carry out the computations online (this is the default option):

t0 <- Sys.time()
online <- suppressWarnings(
            acc.dssp(pdb = uniprot2pdb('P01009')[[1]][1], 
                     aa = "M")

t1 <- Sys.time()

## Time difference of 8.714301 secs

Now, we repete the same computations, but this time using an in-house version of DSSP. Thus, we have to indicate we want this option by passing the argument dssp = ‘mkdssp’:

t0 <- Sys.time()
offline <- suppressWarnings(
            acc.dssp(pdb = uniprot2pdb('P01009')[[1]][1], 
                     dssp = 'mkdssp',
                     aa = "M")

t1 <- Sys.time()

## Time difference of 2.903248 secs

As you can see, we gain almost 6 seconds. Thus, for full and optimal functionality you may wish to have MUSCLE, DSSP and FoldX installed on your system and in the search path for executables. Background details and install instructions for each of these programs on different operating systems is provided further below. Nevertheless, remember that most of the functionality of ptm will still be operative even if you don’t install them.


Muscle is a fast multiple sequence alignment program available from the muscle home page.

For quick install on MacOS we recommend using homebrew.

In a MacOS terminal prompt, paste:

/usr/bin/ruby -e "$(curl -fsSL"

Then, type:

brew install brewsci/science/muscle

On a Linux/UNIX system you should use your appropiate package manager (e.g. apt-get for Debian/Ubuntu and nf for Red Hat/Fedora systems). If you experience problems with any of these steps, please read on for alternative installation methods.


DSSP is a popular secondary structure analysis program which should be installed on your system as an executable called “dssp” or “mkdssp” and be in the search path for executables. The latter version is available on GitHub and it is also distributed by CCP4 (Collaborative Computational Project No. 4) and Anaconda, a popular Python/R data science plataform. Using this last plataform:

conda install -c salilab dssp


FoldX is a protein design algorithm that uses an empirical force field. It can determine the energetic effect of point mutations as well as the interaction energy of protein complexes. You can easily download the software (which requires free registration) here. After you have installed FoldX and added the binary location to PATH environment variable, you’re done! Nevertheless, if you are interested in the FoldX suite, you may wish to consult its manual.

Where next

A brief user guide for newbies in R may be your next stop if you have no previous experience with R.

Documentation, where a number of worked examples are available.

Vignettes is the place to go for more elaborated tutorials.