Connecting Bio3D to an external program to protonate the protein/ligand

Issue #406 resolved
Jonathan Gough created an issue

From what I can tell, Bio3D does not have a function to protonate or add Hydrogens to a pdb. If I am wrong, please let me know!

I was wondering, is there a way to call an external program to to protonate a pdb file?

For example, the application reduce will do a basic protonation of the protein and ligand. I would imagine that if bio3D had a group of pdbs it could just call reduce, yes? Do you have any suggestions on how one would do that?

At the moment, I am grabbing/downloading all the PDB's i am interested in, using Bio3D, running a basic loop over them with reduce, reloading them into bio3D and then aligning them only to write them out again.

Any insight would be appreciated. Thanks.

Comments (3)

  1. Barry Grant

    There is no current function for protonation in Bio3D - sorry!

    Reduce is a good choice - depending on application we will often use pdb2pqr. It can be automated easily and also nicely takes care of ASN/GLN flips (to optimize H-bond network etc). It can also read files from online so you will not need to store the raw unprotonated files locally if you do not want to. A downside is that it is not very tolerant of missing mainchain atoms so you might need to clean these up first in some structures.

    Something like this will hopefully get you started:

    library(bio3d)
    
    ## Structures to protonate
    ids <- c("5p21", "1bg2")
    
    ## PDB2PQR calls for each structure
    cmd_base <- "pdb2pqr --ff=AMBER --chain"
    outfiles <- paste0(ids,"_amber.pqr")
    cmds <- paste(cmd_base, ids, outfiles)
    
    ## Use a simple loop or an apply() call to run cmds
    for(i in 1:length(cmds)) {
        system(cmds[i])
        ## you will likely want to catch errors with 'try()'' etc.
    }
    
    ## Then read your 'outfiles' in to continue analysis...
    pdb <- read.pdb(outfiles[1])
    
  2. Log in to comment