<jupyter_start><jupyter_text>Sequence-Structure Comparison with Evol The part shows how to compare sequence conservation properties with structural mobility obtained from Gaussian network model (GNM) calculations.  Setting up environment<jupyter_code>from prody import *
from pylab import *
%matplotlib inline<jupyter_output><empty_output><jupyter_text>Entropy Calculation First, we retrieve MSA for protein for protein family PF00074:<jupyter_code>fetchPfamMSA('PF00074')<jupyter_output><empty_output><jupyter_text>We parse the MSA file:<jupyter_code>msa = parseMSA('PF00074_full.sth')<jupyter_output><empty_output><jupyter_text>Then, we refine it using refineMSA() based on the sequence of RNAS1_BOVIN:<jupyter_code>msa_refine = refineMSA(msa, label='RNAS1_BOVIN', rowocc=0.8, seqid=0.98)<jupyter_output><empty_output><jupyter_text>We calculate entropy for refined MSA.<jupyter_code>entropy = calcShannonEntropy(msa_refine)<jupyter_output><empty_output><jupyter_text>Mobility calculation Next, we obtain residue fluctuations or mobility for protein member of the above family. We will use chain B of 2W5I.<jupyter_code>pdb = parsePDB('2W5I', chain='B')

chB_ca = pdb.select('protein and name CA and resid 1 to 119')<jupyter_output><empty_output><jupyter_text>We perform GNM as follows:<jupyter_code>gnm = GNM('2W5I')

gnm.buildKirchhoff(chB_ca)

gnm.calcModes(n_modes=None)  # calculate all modes
mobility_1 = calcSqFlucts(gnm[0])

mobility_1to8 = calcSqFlucts(gnm[:8])

mobility_all = calcSqFlucts(gnm[:])<jupyter_output><empty_output><jupyter_text>Plotting<jupyter_code>indices = range(1,120)

bar(indices, entropy, width=1.2, color='grey', hold='True');

xlim(min(indices)-1, max(indices)+1);

plot(indices, mobility_all*(max(entropy)/mean(mobility_all)), color='b',
linewidth=2);

xlabel('residue index')
ylabel('mobility/entropy')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11355115158007499, 'fraction_numerical': 0.024638457418318157, 'mean_word_length': 9.735632183908047, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '126672', 'license': 'MIT', 'n_tokens_mistral': 723, 'n_tokens_neox': 685, 'n_words': 135, 'path': '_static/ipynb/evol.ipynb', 'repo_name': 'SHZ66/ProDy-website', 'size': '1867'}