pdb <- read.pdb('3dnd')
# Binding site residues
rec.inds <- atom.select(pdb, string='//A/1:350////')
lig.inds <- atom.select(pdb, string='//A/351////')
bs <- binding.site(pdb, a.inds=rec.inds, b.inds=lig.inds)
# Interaction between peptide and protein
rec.inds <- atom.select(pdb, string='//A/1:350////')
lig.inds <- atom.select(pdb, string='//I/5:24////')
bs <- binding.site(pdb, a.inds=rec.inds, b.inds=lig.inds)
# Interaction between two PDB entities
# rec <- read.pdb("receptor.pdb")
# lig <- read.pdb("ligand.pdb")
rec <- trim.pdb(pdb, inds=rec.inds)
lig <- trim.pdb(pdb, inds=lig.inds)
bs <- binding.site(rec, lig, hydrogens=FALSE)
Run the code above in your browser using DataLab