In [35]:
import prody as pd
import matplotlib.pyplot as plt
import numpy as np
In [24]:
xray = pd.parsePDB('7REF', chain='A')
nmr = pd.parsePDB('7S0N', chain='A')
@> PDB file is found in working directory (7ref.pdb.gz).
@> 1137 atoms and 1 coordinate set(s) were parsed in 0.05s.
@> PDB file is found in working directory (7s0n.pdb.gz).
@> 1952 atoms and 10 coordinate set(s) were parsed in 0.10s.
In [43]:
RMSFs = [np.mean(pd.calcRMSF(res)) for res in nmr.iterResidues()]
In [44]:
mean_betas = []
for res in xray.iterResidues():
    if 'CA' in res.getNames():
        mean_beta = np.mean(res.getBetas())
        mean_betas.append(mean_beta)
In [45]:
if len(mean_betas[:-1]) == len(RMSFs):
    print(True)
True
In [50]:
import matplotlib.pyplot as plt
fig,ax = plt.subplots()
ax.scatter(mean_betas[:-1], RMSFs, s=1)
ax.set_xlabel('Beta-factor')
ax.set_ylabel('RMSFs')
plt.plot()

fig.show()
plt.savefig('pr5_plot.png')
D:\Programs\Anaconda\lib\site-packages\ipykernel_launcher.py:8: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.