(* file geomanal/ramachandran.math -- Make a Ramachandran plot *) Off[General::spell1]; $DefaultFont={"Times-Roman",13}; (* Change the name of the input file. *) (*===>*) data=ReadList["ramachandran.list",{Number,Number,Number}]; column1 = Transpose[data][[1]]; column2 = Transpose[data][[2]]; column3 = Transpose[data][[3]]; number=Dimensions[column1][[1]]; (* If it is a GLY residue, X-PLOR wrote a 0 and we make a "o"; *) (* otherwise we make an "x". *) Data=Table[ Which[ column1[[i]]==1, Text[FontForm[x, {"Plain", 6}], { column2[[i]], column3[[i]] } ] , column1[[i]]==0, Text[FontForm[o, {"Plain", 6}], { column2[[i]], column3[[i]] } ] ], { i, number }]; (* Make the "allowed" regions of the Ramachandran plot. *) Data=Join[Data,{ Line[{{-156.5,91.3},{-70.4,91.3},{-54.7,112.8},{-54.7,173.2}, {-136.95,173.2},{-136.9,155.8},{-156.5,135.6},{-156.5,91.3}}], Line[{{-180.,42.9},{-140.8,16.1},{-86.0,16.1},{-74.3,45.6}, {-74.3,72.5},{-44.3,102.0},{-44.3,161.1},{-46.9,179.9}}], Line[{{-180.,-34.9},{-164.3,-42.9},{-133.0,-42.9},{-109.5,-32.2}, {-106.9,-21.4},{-44.3,-21.4},{-44.3,-71.1},{-180.,-71.1}}], Line[{{-156.5,-60.4},{-54.7,-60.4},{-54.7,-40.2},{-100.4,-40.2}, {-123.9,-51.0},{-156.5,-51.0},{-156.5,-60.4}}], Line[{{-180.,-163.8},{-75.6,-163.8},{-46.9,-180.}}], Line[{{62.6,14.7},{62.6,96.7},{45.6,79.2},{45.6,26.8},{62.6,14.7}}] }] ; Show[Graphics[ Data, Ticks->{Range[-180.,180.,60.],Range[-180.,180.,60.]}, AxesOrigin->{-180.,-180.}, PlotRange->{{-180., +180.}, {-180., +180.}}, AspectRatio->1, Frame->True, Axes->True, AxesLabel->{"phi","psi"},PlotLabel->"Ramachandran Plot" ]];