Connect with us

Bioinformatics Programming

How to get secondary structure of multiple PDB files using DSSP in Python?

Published

on

How to get secondary structure of multiple PDB files using DSSP in Python?

In this article, we will obtain the secondary structure of multiple PDB files present in a directory using DSSP [1]. You need to have DSSP installed on your system.

If not, then you can install it using the following command:

$ sudo apt-get install dssp

Now, let’s obtain dssp files from PDBs.

Keep all your PDB files in a directory, here named pdb_files, and make a directory for your output dssp files, here named dssp_files.

Save the following Python script and run it in the terminal as

$ python3 dssp-to-pdb.py

#!/usr/bin/env python3

import os
import os.path
import pathlib
import sys

pdb_path = os.getcwd()+"/pdb_files"

pdb_files = os.listdir(pdb_path)

dssp_path = os.getcwd()+"/dssp_files"

for pdb in pdb_files:

    dssp_filename = pdb.split('.')[0]

    cmd = os.system("dssp -i "+" "+pdb_path+"/"+pdb+" "+"-o "+" "+dssp_path+"/"+dssp_filename+".dssp")

    print(cmd)

References

  1. Frishman, D., & Argos, P. (1995). Knowledge-based protein secondary structure assignment. Proteins: Structure, Function, and Bioinformatics , 23 (4), 566-579.

Dr. Muniba is a Bioinformatician based in New Delhi, India. She has completed her PhD in Bioinformatics from South China University of Technology, Guangzhou, China. She has cutting edge knowledge of bioinformatics tools, algorithms, and drug designing. When she is not reading she is found enjoying with the family. Know more about Muniba

Advertisement
Click to comment

You must be logged in to post a comment Login

Leave a Reply

Bioinformatics Programming

How to obtain ligand structures in PDB format from PDB ligand IDs?

Published

on

How to obtain ligand structures in PDB format from PDB ligand IDs?

Previously, we provided a similar script to download ligand SMILES from PDB ligand IDs. In this article, we are downloading PDB ligand structures from their corresponding IDs. (more…)

Continue Reading

Bioinformatics Programming

How to obtain SMILES of ligands using PDB ligand IDs?

Published

on

How to obtain SMILES of ligands using PDB ligand IDs?

Fetching SMILE strings for a given number of SDF files of chemical compounds is not such a trivial task. We can quickly obtain them using RDKit or OpenBabel. But what if you don’t have SDF files of ligands in the first place? All you have is Ligand IDs from PDB. If they are a few then you can think of downloading SDF files manually but still, it seems time-consuming, especially when you have multiple compounds to work with. Therefore, we provide a Python script that will read all Ligand IDs and fetch their SDF files, and will finally convert them into SMILE strings. (more…)

Continue Reading

Bioinformatics Programming

vs_analysis_compound.py: Python script to search for binding affinities based on compound names.

Published

on

vs_analysis_compound.py: Python script to search for binding affinities based on compound names.

Previously, we have provided the vs_analysis.py script to analyze virtual screening (VS) results obtained from Autodock Vina. In this article, we have provided another script to search for binding affinity associated with a compound. (more…)

Continue Reading

LATEST ISSUE

ADVERT