xplor.parseArguments() # check for typos on the command-line filename = "tor_cross_all_one_1_0_0.sa" xplor.command("structure @gb3.psf end") #xplor.command("delete select (resid 68 and name he2) end") displaySel = AtomSel("resid 1:56") from pdbTool import PDBTool PDBTool(filename,displaySel).read() outPDB = PDBTool(filename+".beta",displaySel) valDic = {} valDic[ 1 ] = 20.0 valDic[ 2 ] = 19.54 valDic[ 3 ] = 17.16 valDic[ 4 ] = 7.74 valDic[ 5 ] = 4.75 valDic[ 6 ] = 20.56 valDic[ 7 ] = 11.62 valDic[ 8 ] = 16.12 valDic[ 9 ] = 6.52 valDic[ 10 ] = 19.07 valDic[ 11 ] = 32.00 valDic[ 12 ] = 47.90 valDic[ 13 ] = 25.18 valDic[ 14 ] = 30.31 valDic[ 15 ] = 28.06 valDic[ 16 ] = 19.50 valDic[ 17 ] = 16.87 valDic[ 18 ] = 6.16 valDic[ 19 ] = 30.39 valDic[ 20 ] = 22.40 valDic[ 21 ] = 14.67 valDic[ 22 ] = 18.68 valDic[ 23 ] = 2.85 valDic[ 24 ] = 24.20 valDic[ 25 ] = 15.77 valDic[ 26 ] = 12.25 valDic[ 27 ] = 28.49 valDic[ 28 ] = 10.56 valDic[ 29 ] = 7.61 valDic[ 30 ] = 4.93 valDic[ 31 ] = 11.46 valDic[ 32 ] = 8.41 valDic[ 33 ] = 4.74 valDic[ 34 ] = 16.78 valDic[ 35 ] = 16.74 valDic[ 36 ] = 5.92 valDic[ 37 ] = 8.33 valDic[ 38 ] = 24.60 valDic[ 39 ] = 15.92 valDic[ 40 ] = 26.89 valDic[ 41 ] = 54.20 valDic[ 42 ] = 13.77 valDic[ 43 ] = 17.46 valDic[ 44 ] = 6.55 valDic[ 45 ] = 6.98 valDic[ 46 ] = 16.92 valDic[ 47 ] = 7.65 valDic[ 48 ] = 26.00 valDic[ 49 ] = 24.18 valDic[ 50 ] = 24.19 valDic[ 51 ] = 9.82 valDic[ 52 ] = 4.89 valDic[ 53 ] = 18.92 valDic[ 54 ] = 8.79 valDic[ 55 ] = 11.84 valDic[ 56 ] = 11.49 from math import cos, pi for atom in displaySel: val = 0. try: val = valDic[atom.residueNum()] except KeyError: pass # calc order parameter val = (1. + 3.*cos(val*pi/180.)**2)/4. val = (1 - val)*5 val = 5*10**val outPDB.setAux2(atom,val) pass outPDB.write()