蛋白Ramachandran(拉氏图、拉曼图)的绘制
环境
- Win10
- Biopython = 1.79
- Python = 3.7.9
导入库
import math
import sys
import os
import matplotlib.pyplot as plt
import numpy as np
from Bio import PDB
from matplotlib import colors
定义Ramachandran plot函数
def plot_ramachandran(file):
__file__=file
"""
The preferences were calculated from the following artice:
Lovell et al. Structure validation by Calpha geometry: phi,psi and Cbeta deviation. 2003
DOI: 10.1002/prot.10286
"""
# General variable for the background preferences
rama_preferences = {
"General": {
"file": "rama500-general.data",
"cmap": colors.ListedColormap(['#FFFFFF', '