8 import matplotlib.pyplot as plt
19 with open(sys.argv[1]) as f:
21 if line[0:4]=='ATOM' and line[13:15]=='CA':
28 sx[iatom]=sx.get(iatom,0)+x
29 sy[iatom]=sy.get(iatom,0)+y
30 sz[iatom]=sz.get(iatom,0)+z
31 s2x[iatom]=s2x.get(iatom,0)+x*x
32 s2y[iatom]=s2y.get(iatom,0)+y*y
33 s2z[iatom]=s2z.get(iatom,0)+z*z
36 if line[0:6]=='ENDMDL':
43 for i in range(1,natom+1):
44 fluct=math.sqrt((s2x.get(i)-sx.get(i)*sx.get(i)/nmol\
45 +s2y.get(i)-sy.get(i)*sy.get(i)/nmol\
46 +s2z.get(i)-sz.get(i)*sz.get(i)/nmol )/nmol)
52 plt.ylabel('fluctuations')
55 plt.savefig('fluct_plot.png')