added my_pdbtools containing pdbtools cloned from a git repo

This commit is contained in:
Tanushree Tunstall 2020-11-17 13:56:23 +00:00
parent 2911678177
commit 50744f046f
4 changed files with 106 additions and 0 deletions

View file

@ -0,0 +1,28 @@
#!/usr/bin/python3
#=======================================================================
# TASK: extract chain from pdb and save each chain as a separate file
# link for saving each chain as a separate file
#=======================================================================
__description__ = \
"""
pdb_chain_splitter.py
extracts chains and saves them as separate pdb files.
"""
__author__ = "Tanushree Tunstall"
__date__ = ""
from Bio.PDB import Select, PDBIO
from Bio.PDB.PDBParser import PDBParser
class ChainSelect(Select):
def __init__(self, chain):
self.chain = chain
def accept_chain(self, chain):
if chain.get_id() == self.chain:
return 1
else:
return 0