rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
file.write('\n')
file.write('\n')
def writearray(filename,a): file = open(filename, 'w') if len(a.shape) == 1: a = a[:, Numeric.NewAxis] for line in a: for element in line: file.write('%le ' % element) file.write('\n') file.close()
8504f95eac9730f7cbb052e152f2de2bcd4c9e76 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/8504f95eac9730f7cbb052e152f2de2bcd4c9e76/lisautils.py
lambda x: ( str(2.0*math.pi - float(x)), 'Radian' ) )
lambda x: ( float(x) != 0 and str(2.0*math.pi - float(x)) or '0', 'Radian' ) )
def convertUnit(param,unitin,unitout,paramname=''): if unitout == unitin: return (param,unitin) if unitout == "Radian": if unitin == "Degree": return ((math.pi/180.0) * float(param),'Radian') elif unitin == "DMS": # space separated dms = map(float, param.split()) return ((math.pi/180.0) * (dms[0] + dms[1]/60.0 + dms[...
0183345b8461f49c3e04b900e8a00fbc6456395c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/0183345b8461f49c3e04b900e8a00fbc6456395c/convertunit.py
lambda x: ( str(2.0*math.pi - float(x)), 'Radian' ) )
lambda x: ( float(x) != 0 and str(2.0*math.pi - float(x)) or '0', 'Radian' ) ) conversionRules['Inclination'] = ( [('SLInclination','Radian')], lambda x: ( str(float(x) < math.pi and math.pi - float(x) or 3.0*math.pi - float(x)), 'Radian' ) ) conversionRules['SLInclination'] = ( [('Inclination','Radian')], lambda...
def convertUnit(param,unitin,unitout,paramname=''): if unitout == unitin: return (param,unitin) if unitout == "Radian": if unitin == "Degree": return ((math.pi/180.0) * float(param),'Radian') elif unitin == "DMS": # space separated dms = map(float, param.split()) return ((math.pi/180.0) * (dms[0] + dms[1]/60.0 + dms[...
0183345b8461f49c3e04b900e8a00fbc6456395c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/0183345b8461f49c3e04b900e8a00fbc6456395c/convertunit.py
conversionRules['InitialPosition'] = ( [('InitialEta','Radian'),('InitialXi','Radian'),('Armswitch','1')],
conversionRules['InitialPosition'] = ( [('InitialEta','Radian'),('InitialXi','Radian'),('ArmSwitch','1')],
def ex2ipr(e,x,s): eta = float(e) xi = float(x) sw = float(s) if sw > 0: raise NotImplementedError, "convertParameters(): LISA eta/xi configuration with sw > 0 not compatible with PseudoLISA" initpos = eta initrot = xi + initpos - 1.5*math.pi return ( (str(initpos),'Radian'), (str(initrot),'Radian') )
0183345b8461f49c3e04b900e8a00fbc6456395c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/0183345b8461f49c3e04b900e8a00fbc6456395c/convertunit.py
conversionRules['InitialRotation'] = ( [('InitialEta','Radian'),('InitialXi','Radian'),('Armswitch','1')],
conversionRules['InitialRotation'] = ( [('InitialEta','Radian'),('InitialXi','Radian'),('ArmSwitch','1')],
def ex2ipr(e,x,s): eta = float(e) xi = float(x) sw = float(s) if sw > 0: raise NotImplementedError, "convertParameters(): LISA eta/xi configuration with sw > 0 not compatible with PseudoLISA" initpos = eta initrot = xi + initpos - 1.5*math.pi return ( (str(initpos),'Radian'), (str(initrot),'Radian') )
0183345b8461f49c3e04b900e8a00fbc6456395c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/0183345b8461f49c3e04b900e8a00fbc6456395c/convertunit.py
XMLToObject['EMRI'] = ('EMRI',lisawp_emri.EMRI)
XMLToObject['ExtremeMassRatioInspiral'] = ('EMRI',lisawp_emri.EMRI)
def makeoptional(parlist): return map(lambda p: lambda s: p[0] in s or p,parlist)
01e037cebbac5678af7cf64fc66f55054bc432ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/01e037cebbac5678af7cf64fc66f55054bc432ab/lisaxml.py
self.coupletag('Param',{'Name': 'TimeOffset','Type': 's'},
self.coupletag('Param',{'Name': 'TimeOffset','Type': 'Second'},
def writeTimeSeries(self,TimeSeries): # write out the TimeSeries defined in TimeSeries self.opentag('XSIL',{'Type': 'TimeSeries', 'Name': TimeSeries.description})
01e037cebbac5678af7cf64fc66f55054bc432ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/01e037cebbac5678af7cf64fc66f55054bc432ab/lisaxml.py
self.coupletag('Param',{'Name': 'Cadence','Unit': 's'},
self.coupletag('Param',{'Name': 'Cadence','Unit': 'Second'},
def writeTimeSeries(self,TimeSeries): # write out the TimeSeries defined in TimeSeries self.opentag('XSIL',{'Type': 'TimeSeries', 'Name': TimeSeries.description})
01e037cebbac5678af7cf64fc66f55054bc432ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/01e037cebbac5678af7cf64fc66f55054bc432ab/lisaxml.py
self.coupletag('Param',{'Name': 'Duration','Unit': 's'},
self.coupletag('Param',{'Name': 'Duration','Unit': 'Second'},
def writeTimeSeries(self,TimeSeries): # write out the TimeSeries defined in TimeSeries self.opentag('XSIL',{'Type': 'TimeSeries', 'Name': TimeSeries.description})
01e037cebbac5678af7cf64fc66f55054bc432ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/01e037cebbac5678af7cf64fc66f55054bc432ab/lisaxml.py
tree = p(f.read())
lines = f.read()
def __init__(self,filename): p = pyRXP.Parser()
01e037cebbac5678af7cf64fc66f55054bc432ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/01e037cebbac5678af7cf64fc66f55054bc432ab/lisaxml.py
import numpy.dft as FFT
import numpy.fft as FFT
def sn(signal,noise,stime,npatches): """Compute the optimal S/N for signal, sampled at intervals of stime, and for the total duration represented in the array, against noise represented by the time series noise; npatches overlapping periods are used to estimate the PSD of the noise.""" # compute signal spectrum withou...
96faa2234a8d3bf3520570203e0f9f598d917af6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/96faa2234a8d3bf3520570203e0f9f598d917af6/lisautils.py
""" % (pythonpath, pythonpath)
SYNTHLISABASE="%s"; export SYNTHLISABASE """ % (pythonpath, pythonpath, installpath)
def runswig(source,cppfile,pyfile,deps): if not os.path.isfile(cppfile) or not os.path.isfile(pyfile) \ or newer_group(deps,cppfile) or newer_group(deps,pyfile): try: spawn([swig_bin,'-w402','-c++','-python','-o',cppfile,source]) except: print 'Sorry, I am unable to swig the modified ' + lisasim_isource sys.exit(cmd)
20be3f400916b09f4354dd8b44f7b7ba03381033 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/20be3f400916b09f4354dd8b44f7b7ba03381033/setup.py
""" % (pythonpath, pythonpath)
setenv SYNTHLISABASE %s """ % (pythonpath, pythonpath, installpath)
def runswig(source,cppfile,pyfile,deps): if not os.path.isfile(cppfile) or not os.path.isfile(pyfile) \ or newer_group(deps,cppfile) or newer_group(deps,pyfile): try: spawn([swig_bin,'-w402','-c++','-python','-o',cppfile,source]) except: print 'Sorry, I am unable to swig the modified ' + lisasim_isource sys.exit(cmd)
20be3f400916b09f4354dd8b44f7b7ba03381033 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/20be3f400916b09f4354dd8b44f7b7ba03381033/setup.py
version = '1.2.4',
version = '1.2.6',
def runswig(source,cppfile,pyfile,deps): if not os.path.isfile(cppfile) or not os.path.isfile(pyfile) \ or newer_group(deps,cppfile) or newer_group(deps,pyfile): try: spawn([swig_bin,'-w402','-c++','-python','-o',cppfile,source]) except: print 'Sorry, I am unable to swig the modified ' + lisasim_isource sys.exit(cmd)
20be3f400916b09f4354dd8b44f7b7ba03381033 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11274/20be3f400916b09f4354dd8b44f7b7ba03381033/setup.py
db = CountryByIP(db_file)
try: db = CountryByIP(db_file) except IOError, exc: import errno if exc.errno==errno.ENOENT: sys.exit('Database not found. Run update.py to create it.') else: sys.exit('Cannot open database: %s' % exc)
def __getitem__(self, ip): offset = 0 fp = self.fp for part in ip.split('.'): start = offset+int(part)*4 fp.seek(start) value = fp.read(4) assert len(value)==4 if value[:2]=='\xFF\xFF': if value[2:]=='\x00\x00': raise KeyError(ip) else: return value[2:] offset = struct.unpack('!I', value)[0] raise RuntimeError('ip2cc d...
18140e6a4947032385dc45bb7a75517d092918b1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8235/18140e6a4947032385dc45bb7a75517d092918b1/ip2cc.py
try: ln = pobj.stdout.readline() except IOError:
ln = pobj.stdout.readline() if alarm_triggered:
def run_tlsmd(webtlsmdd, jdict): job_id = jdict["job_id"] tlsmd = jdict["tlsmd"] ## write the tlsmd execution command out to a file open("tlsmdcmd.txt", "w").write(" ".join(tlsmd) + '\n') pobj = subprocess.Popen(tlsmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.STDOUT, close_fds = True, b...
4564248791c2c46ecb11d6918a77dded1c2e117d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/4564248791c2c46ecb11d6918a77dded1c2e117d/webtlsmdrund.py
if self.struct.title:
if self.struct.header:
def html_globals(self): """Output a HTML table displaying global TLSMD settings. """ if conf.globalconf.tls_model in ["ISOT", "NLISOT"]: tls_model = "Isotropic" elif conf.globalconf.tls_model in ["ANISO", "NLANISO"]: tls_model = "Anisotropic"
a0d47a7522045a3ce24a8c43b715b00567986cf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/a0d47a7522045a3ce24a8c43b715b00567986cf4/html.py
if numpy.allclose(L1, 0.0) or type(L1)==complex:
if numpy.allclose(L1, 0.0) or type(L1)==numpy.complex_:
def calc_itls_center_of_reaction(iT, iL, iS, origin): """iT is a single float; iL[3,3]; iS[3] """ ## construct TLS tensors from isotropic TLS description T0 = numpy.array([[iT, 0.0, 0.0], [0.0, iT, 0.0], [0.0, 0.0, iT]], float) L0 = iL.copy() S0 = numpy.array([ [ 0.0, 0.0, iS[1]], [iS[0], 0.0, 0.0], [ 0.0, ...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(L2, 0.0) or type(L2)==complex:
if numpy.allclose(L2, 0.0) or type(L2)==numpy.complex_:
def calc_itls_center_of_reaction(iT, iL, iS, origin): """iT is a single float; iL[3,3]; iS[3] """ ## construct TLS tensors from isotropic TLS description T0 = numpy.array([[iT, 0.0, 0.0], [0.0, iT, 0.0], [0.0, 0.0, iT]], float) L0 = iL.copy() S0 = numpy.array([ [ 0.0, 0.0, iS[1]], [iS[0], 0.0, 0.0], [ 0.0, ...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(L3, 0.0) or type(L3)==complex:
if numpy.allclose(L3, 0.0) or type(L3)==numpy.complex_:
def calc_itls_center_of_reaction(iT, iL, iS, origin): """iT is a single float; iL[3,3]; iS[3] """ ## construct TLS tensors from isotropic TLS description T0 = numpy.array([[iT, 0.0, 0.0], [0.0, iT, 0.0], [0.0, 0.0, iT]], float) L0 = iL.copy() S0 = numpy.array([ [ 0.0, 0.0, iS[1]], [iS[0], 0.0, 0.0], [ 0.0, ...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(Tr1, 0.0) or type(Tr1)==complex:
if numpy.allclose(Tr1, 0.0) or type(Tr1)==numpy.complex_:
def calc_itls_center_of_reaction(iT, iL, iS, origin): """iT is a single float; iL[3,3]; iS[3] """ ## construct TLS tensors from isotropic TLS description T0 = numpy.array([[iT, 0.0, 0.0], [0.0, iT, 0.0], [0.0, 0.0, iT]], float) L0 = iL.copy() S0 = numpy.array([ [ 0.0, 0.0, iS[1]], [iS[0], 0.0, 0.0], [ 0.0, ...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(Tr2, 0.0) or type(Tr2)==complex:
if numpy.allclose(Tr2, 0.0) or type(Tr2)==numpy.complex_:
def calc_itls_center_of_reaction(iT, iL, iS, origin): """iT is a single float; iL[3,3]; iS[3] """ ## construct TLS tensors from isotropic TLS description T0 = numpy.array([[iT, 0.0, 0.0], [0.0, iT, 0.0], [0.0, 0.0, iT]], float) L0 = iL.copy() S0 = numpy.array([ [ 0.0, 0.0, iS[1]], [iS[0], 0.0, 0.0], [ 0.0, ...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(Tr3, 0.0) or type(Tr3)==complex:
if numpy.allclose(Tr3, 0.0) or type(Tr3)==numpy.complex_:
def calc_itls_center_of_reaction(iT, iL, iS, origin): """iT is a single float; iL[3,3]; iS[3] """ ## construct TLS tensors from isotropic TLS description T0 = numpy.array([[iT, 0.0, 0.0], [0.0, iT, 0.0], [0.0, 0.0, iT]], float) L0 = iL.copy() S0 = numpy.array([ [ 0.0, 0.0, iS[1]], [iS[0], 0.0, 0.0], [ 0.0, ...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(L1, 0.0) or type(L1)==complex:
if numpy.allclose(L1, 0.0) or type(L1)==numpy.complex_:
def calc_TLS_center_of_reaction(T0, L0, S0, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center of Reaction...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(L2, 0.0) or type(L2)==complex:
if numpy.allclose(L2, 0.0) or type(L2)==numpy.complex_:
def calc_TLS_center_of_reaction(T0, L0, S0, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center of Reaction...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(L3, 0.0) or type(L3)==complex:
if numpy.allclose(L3, 0.0) or type(L3)==numpy.complex_:
def calc_TLS_center_of_reaction(T0, L0, S0, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center of Reaction...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(Tr1, 0.0) or type(Tr1)==complex:
if numpy.allclose(Tr1, 0.0) or type(Tr1)==numpy.complex_:
def calc_TLS_center_of_reaction(T0, L0, S0, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center of Reaction...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(Tr2, 0.0) or type(Tr2)==complex:
if numpy.allclose(Tr2, 0.0) or type(Tr2)==numpy.complex_:
def calc_TLS_center_of_reaction(T0, L0, S0, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center of Reaction...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
if numpy.allclose(Tr3, 0.0) or type(Tr3)==complex:
if numpy.allclose(Tr3, 0.0) or type(Tr3)==numpy.complex_:
def calc_TLS_center_of_reaction(T0, L0, S0, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center of Reaction...
56f30da138626c8c6f397e7d28b00e0126c279a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/56f30da138626c8c6f397e7d28b00e0126c279a7/TLS.py
tls_file = TLSFile() tls_file.set_file_format(TLSFileFormatTLSOUT()) tls_file.load(open(tlsin, "r")) for tls_desc in tls_file.tls_desc_list:
tls_desc_list = tls_file_format.load(open(tlsin, "r")) for tls_desc in tls_desc_list: tls_file.tls_desc_list.append(tls_desc)
def refmac5_prep(xyzin, tlsin_list, xyzout, tlsout): """Use TLS model + Uiso for each atom. Output xyzout with the residual Uiso only. """ os.umask(022) ## load structure struct = LoadStructure(fil = xyzin) ## load and construct TLS groups tls_group_list = [] for tlsin in tlsin_list: tls_file = TLSFile() tls_file.s...
4379681d356c5fb9927aca5146e2ef9bbeadf005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/4379681d356c5fb9927aca5146e2ef9bbeadf005/refineprep.py
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin):
def calc_TLS_center_of_reaction(T0, L0, S0, origin):
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
(eval_L, evec_L) = eigenvectors(L_orig)
(eval_L, RL) = eigenvectors(L0) if allclose(determinant(RL), -1.0): I = identity(3, Float) I[0,0] = -1.0 RL = matrixmultiply(I, RL) RLt = transpose(RL)
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
rdict["L1_eigen_vec"] = evec_L[0] rdict["L2_eigen_vec"] = evec_L[1] rdict["L3_eigen_vec"] = evec_L[2] evec_L = transpose(evec_L)
rdict["L1_eigen_vec"] = RL[0].copy() rdict["L2_eigen_vec"] = RL[1].copy() rdict["L3_eigen_vec"] = RL[2].copy()
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
cL = zeros([3,3], Float) cL[0,0] = eval_L[0] cL[1,1] = eval_L[1] cL[2,2] = eval_L[2]
cL = matrixmultiply(matrixmultiply(RL, L0), RLt)
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
cT = matrixmultiply( matrixmultiply(transpose(evec_L), T_orig), evec_L)
cT = matrixmultiply(matrixmultiply(RL, T0), RLt)
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
cS = matrixmultiply( matrixmultiply(transpose(evec_L), S_orig), evec_L) det = determinant(evec_L) if int(det) != 1: cS = -cS
cS = matrixmultiply(matrixmultiply(RL, S0), RLt)
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
rho = matrixmultiply(evec_L, crho)
rho = matrixmultiply(RLt, crho)
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
rdict["COR"] = origin + rho.copy()
rdict["COR"] = origin + rho
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
St = transpose(S_orig)
St = transpose(S0)
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
Sp = S_orig + matrixmultiply(L_orig, PRHOt)
Sp = S0 + matrixmultiply(L0, PRHOt)
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
Tp = T_orig + \ matrixmultiply(PRHO, S_orig) + \
Tp = T0 + \ matrixmultiply(PRHO, S0) + \
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
matrixmultiply(matrixmultiply(PRHO, L_orig), PRHOt)
matrixmultiply(matrixmultiply(PRHO, L0), PRHOt)
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
rdict["L'"] = L_orig.copy()
rdict["L'"] = L0.copy()
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
rdict["L1_rho"] = matrixmultiply(evec_L, cL1rho) rdict["L2_rho"] = matrixmultiply(evec_L, cL2rho) rdict["L3_rho"] = matrixmultiply(evec_L, cL3rho)
rdict["L1_rho"] = matrixmultiply(RLt, cL1rho) rdict["L2_rho"] = matrixmultiply(RLt, cL2rho) rdict["L3_rho"] = matrixmultiply(RLt, cL3rho)
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
rdict["rT'"] = matrixmultiply( transpose(evec_L), matrixmultiply(cTred, evec_L))
rdict["rT'"] = matrixmultiply(matrixmultiply(RLt, cTred), RL)
def calc_TLS_center_of_reaction(T_orig, L_orig, S_orig, origin): """Calculate new tensors based on the center for reaction. This method returns a dictionary of the calculations: T^: T tensor in the coordinate system of L L^: L tensor in the coordinate system of L S^: S tensor in the coordinate system of L COR: Center...
742140185bc8b6b74df991525abcac33bdc82b5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/742140185bc8b6b74df991525abcac33bdc82b5f/TLS.py
if not self.default_model:
if self.default_model==None:
def get_chain(self, chain_id): """Returns the Chain object matching the chain_id charactor. """ if not self.default_model: return None if self.default_model.chain_dict.has_key(chain_id): return self.default_model.chain_dict[chain_id] return None
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
if not atm1.get_bond(atm2):
if atm1.get_bond(atm2)==None:
def add_bonds_from_covalent_distance(self): """Builds a Structure's bonds by atomic distance distance using the covalent radii in element.cif. A bond is built if the the distance between them is less than or equal to the sum of their covalent radii + 0.54A. """ for model in self.iter_models(): xyzdict = XYZDict(2.0) ...
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
if self.chain_dict.has_key(chain.chain_id):
if self.chain_dict.has_key(chain.chain_id)==True:
def add_chain(self, chain, delay_sort=False): """Adds a Chain to the Model. """ assert isinstance(chain, Chain)
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
if not frag.is_standard_residue():
if frag.is_standard_residue()==False:
def iter_non_standard_residues(self): for frag in self.iter_fragments(): if not frag.is_standard_residue(): yield frag
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
self.structure.sort()
self.structure.model_list.sort()
def set_model_id(self, model_id): """Sets the model_id of all contained objects. """ assert type(model_id)==IntType
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
if not frag.is_standard_residue():
if frag.is_standard_residue()==False:
def has_non_standard_residues(self): for frag in self.fragment_list: if not frag.is_standard_residue(): return True return False
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
if not frag.is_standard_residue():
if frag.is_standard_residue()==False:
def count_non_standard_residues(self): n = 0 for frag in self.fragment_list: if not frag.is_standard_residue(): n += 1 return n
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
if not frag.is_standard_residue():
if frag.is_standard_residue()==False:
def iter_non_standard_residues(self): for frag in self.fragment_list: if not frag.is_standard_residue(): yield frag
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
if library_is_amino_acid(atom.res_name):
if library_is_amino_acid(atom.res_name)==True:
def add_atom(self, atom, delay_sort=False): """Adds a Atom. """ assert isinstance(atom, Atom) assert atom.model_id==self.model_id assert atom.chain_id==self.chain_id
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
elif library_is_nucleic_acid(atom.res_name):
elif library_is_nucleic_acid(atom.res_name)==True:
def add_atom(self, atom, delay_sort=False): """Adds a Atom. """ assert isinstance(atom, Atom) assert atom.model_id==self.model_id assert atom.chain_id==self.chain_id
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
def set_model_id(self, model_id): """Sets the model_id of all contained objects. """ assert type(model_id)==IntType self.model_id = model_id for frag in self.iter_fragments(): frag.set_model_id(model_id)
def remove_fragment(self, fragment): """Remove the Fragment from the Chain. """ Segment.remove_fragment(self, fragment) fragment.chain = None
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
self.model.structure.sort()
self.model.chain_list.sort()
def set_chain_id(self, chain_id): """Sets a new ID for the Chain, updating the chain_id for all objects in the Structure hierarchy. """ ## check for conflicting chain_id in the structure if self.model!=None: chk_chain = self.model.get_chain(chain_id) if chk_chain!=None or chk_chain!=self: raise ChainOverwrite()
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
name = copy.deepcopy(self.name), alt_loc = copy.deepcopy(self.alt_loc), res_name = copy.deepcopy(self.res_name), fragment_id = copy.deepcopy(self.fragment_id), chain_id = copy.deepcopy(self.chain_id), model_id = copy.deepcopy(self.model_id), element = copy.deepcopy(se...
name = self.name, alt_loc = self.alt_loc, res_name = self.res_name, fragment_id = self.fragment_id, chain_id = self.chain_id, model_id = copy.copy(self.model_id), element = self.element,
def __deepcopy__(self, memo): atom_cpy = Atom( name = copy.deepcopy(self.name), alt_loc = copy.deepcopy(self.alt_loc), res_name = copy.deepcopy(self.res_name), fragment_id = copy.deepcopy(self.fragment_id), chain_id = copy.deepcopy(self.chain_id), model_id = copy.deepcopy(sel...
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
temp_factor = copy.deepcopy(self.temp_factor), sig_temp_factor = copy.deepcopy(self.sig_temp_factor), occupancy = copy.deepcopy(self.occupancy), sig_occupancy = copy.deepcopy(self.sig_occupancy), charge = copy.deepcopy(self.charge), U = copy.deepcopy(self.U, memo), sig_U = c...
temp_factor = copy.copy(self.temp_factor), sig_temp_factor = copy.copy(self.sig_temp_factor), occupancy = copy.copy(self.occupancy), sig_occupancy = copy.copy(self.sig_occupancy), charge = copy.copy(self.charge), U = copy.deepcopy(self.U), sig_U = copy.deepcopy(self.sig_U))
def __deepcopy__(self, memo): atom_cpy = Atom( name = copy.deepcopy(self.name), alt_loc = copy.deepcopy(self.alt_loc), res_name = copy.deepcopy(self.res_name), fragment_id = copy.deepcopy(self.fragment_id), chain_id = copy.deepcopy(self.chain_id), model_id = copy.deepcopy(sel...
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
if not self.altloc:
if self.altloc==None:
def __iter__(self): """Iterates over all Altloc representations of this Atom. """ if not self.altloc: yield self
98cad825ba0fabe8950b29dee5164e5a7571a5e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/98cad825ba0fabe8950b29dee5164e5a7571a5e1/Structure.py
if self.default_model==None:
if not self.default_model:
def add_model(self, model, delay_sort=True): """Adds a Model to a Structure. Raises the ModelOverwrite exception if the model_id of the Model matches the model_id of a Model already in the Structure. If there are no Models in the Structure, the Model is used as the default Model. """ assert isinstance(model, Model)
84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43/Structure.py
return self.default_model.iter_alpha_helicies()
if self.default_model: return self.default_model.iter_alpha_helicies()
def iter_alpha_helicies(self): """Iterates over all child AlphaHelix objects in the default Model. """ return self.default_model.iter_alpha_helicies()
84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43/Structure.py
""" """
"""Adds a BetaSheet to the default Model object. """ assert self.default_model!=None
def add_beta_sheet(self, beta_sheet): """ """ self.default_model.add_beta_sheet(beta_sheet)
84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43/Structure.py
return self.default_model.iter_beta_sheets()
if self.default_model: return self.default_model.iter_beta_sheets()
def iter_beta_sheets(self): """Iterate over all beta sheets in the Structure. """ return self.default_model.iter_beta_sheets()
84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43/Structure.py
""" """
"""Adds a Site object to the default Model. """ assert self.default_model!=None
def add_site(self, site): """ """ self.default_model.add_site(site)
84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43/Structure.py
return self.default_model.iter_sites()
if self.default_model: return self.default_model.iter_sites()
def iter_sites(self): """Iterate over all active/important sites defined in the Structure. """ return self.default_model.iter_sites()
84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/84b0a6ed8a31fcf58d51b7ad2660eeb7ebbb9c43/Structure.py
self.glv.roty += 360.0 * ((evx - self.beginx) / float(width)) self.glv.rotx += 360.0 * ((evy - self.beginy) / float(height))
roty = 360.0 * ((evx - self.beginx) / float(width)) rotx += 360.0 * ((evy - self.beginy) / float(height))
def on_mouse_motion(self, event): if event.Dragging()==False: return
de61a32ba86556190e884def657cad76bf6b59d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/de61a32ba86556190e884def657cad76bf6b59d7/wxviewer.py
class AppFrame(wx.Frame):
class ViewerFrame(wx.Frame):
def glv_redraw(self): self.Refresh(False)
de61a32ba86556190e884def657cad76bf6b59d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/de61a32ba86556190e884def657cad76bf6b59d7/wxviewer.py
def __init__(self, parent=None, id=-1, title='Title', pos=wx.DefaultPosition, size=(400, 200)): """Create a Frame instance. """
def __init__( self, parent = None, id = -1, title = 'Title', pos = wx.DefaultPosition, size = (400, 200)):
def __init__(self, parent=None, id=-1, title='Title', pos=wx.DefaultPosition, size=(400, 200)): """Create a Frame instance. """ wx.Frame.__init__(self, parent, id, title, pos, size)
de61a32ba86556190e884def657cad76bf6b59d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/de61a32ba86556190e884def657cad76bf6b59d7/wxviewer.py
self.load_structure(sys.argv[1])
def __init__(self, parent=None, id=-1, title='Title', pos=wx.DefaultPosition, size=(400, 200)): """Create a Frame instance. """ wx.Frame.__init__(self, parent, id, title, pos, size)
de61a32ba86556190e884def657cad76bf6b59d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/de61a32ba86556190e884def657cad76bf6b59d7/wxviewer.py
class App(wx.App):
class ViewerApp(wx.App):
def add_struct(self, struct): """Adds a structure to this viewer, and returns the GLStructure object so it can be manipulated. """ gl_struct = self.glviewer.glv.glv_add_struct(struct)
de61a32ba86556190e884def657cad76bf6b59d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/de61a32ba86556190e884def657cad76bf6b59d7/wxviewer.py
self.frame = AppFrame()
self.frame = ViewerFrame()
def OnInit(self): self.frame = AppFrame() self.frame.Show() self.SetTopWindow(self.frame) return True
de61a32ba86556190e884def657cad76bf6b59d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/de61a32ba86556190e884def657cad76bf6b59d7/wxviewer.py
def main(): app = App()
def main(files): app = ViewerApp() for file in files: app.frame.load_structure(file)
def main(): app = App() app.MainLoop()
de61a32ba86556190e884def657cad76bf6b59d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/de61a32ba86556190e884def657cad76bf6b59d7/wxviewer.py
main()
main(sys.argv[1:])
def main(): app = App() app.MainLoop()
de61a32ba86556190e884def657cad76bf6b59d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/de61a32ba86556190e884def657cad76bf6b59d7/wxviewer.py
gl_delete_lists(self.name, 1)
self.gl_delete_list()
def gl_compile_list(self, execute = 0): if self.name != None: gl_delete_lists(self.name, 1) self.name = glGenLists(1)
4db0b38d0e489382932399280884aade18cbc4c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/4db0b38d0e489382932399280884aade18cbc4c0/GLViewer.py
gl_delete_lists(self.name, 1)
glDeleteLists(self.name, 1)
def gl_delete_list(self): if self.name != None: gl_delete_lists(self.name, 1) self.name = None
4db0b38d0e489382932399280884aade18cbc4c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/4db0b38d0e489382932399280884aade18cbc4c0/GLViewer.py
gl_call_list(self.name)
glCallList(self.name)
def gl_call_list(self): #print "gl_call_list = ",self.name
4db0b38d0e489382932399280884aade18cbc4c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/4db0b38d0e489382932399280884aade18cbc4c0/GLViewer.py
def set_origin(self, origin): """Reset the origin of the draw list. """ self.origin = origin
4db0b38d0e489382932399280884aade18cbc4c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/4db0b38d0e489382932399280884aade18cbc4c0/GLViewer.py
if pixel_width>pixel_height:
if pixel_width > pixel_height:
def glr_construct_header(self): """Creates the header for the render program. """ tsz_width = 16 tsz_height = 16 xtiles = int(round(self.width / float(tsz_width))) ytiles = int(round(self.height / float(tsz_height)))
333b2e69b52eae1911432cd9bd3889427c3a3d97 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/333b2e69b52eae1911432cd9bd3889427c3a3d97/R3DDriver.py
analysis_url = "http://veritas.yiqiang.net/~yi/pdb/%s/ANALYSIS" % (pdbid)
analysis_url = "http://skuld.bmsc.washington.edu/~tlsmd/pdb/%s/ANALYSIS" % (pdbid)
def redirect_page(self, pdbid): # check to see if this job is still running try: os.chdir(conf.WEBTLSMDD_PDB_DIR + '/' + pdbid) except OSError: title = "This structure is currently being analyzed, please check back later." page = [self.html_head(title), html_title(title), self.html_foot()] return "".join(page)
baa591abc91d0ad43d45719554da1e6ed072356b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/baa591abc91d0ad43d45719554da1e6ed072356b/webtlsmd.py
def refmac5_prep(pdbin, tlsins, pdbout, tlsout):
def refmac5_prep(xyzin, tlsin, xyzout, tlsout): """Use TLS model + Uiso for each atom. Output xyzout with the residual Uiso only. """
def refmac5_prep(pdbin, tlsins, pdbout, tlsout): os.umask(022) ## load input structure struct = LoadStructure(fil = pdbin) ## load input TLS description tls_file = TLSFile() tls_file.set_file_format(TLSFileFormatTLSOUT()) for tlsin in tlsins: fil = open(tlsin, "r") listx = tls_file.file_format.load(fil) tls_file.tls_...
0833e50284e4326c9e648fdbd4ff3ecf927e310b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/0833e50284e4326c9e648fdbd4ff3ecf927e310b/refineprep.py
struct = LoadStructure(fil = pdbin)
struct = LoadStructure(fil = xyzin) tls_group_list = []
def refmac5_prep(pdbin, tlsins, pdbout, tlsout): os.umask(022) ## load input structure struct = LoadStructure(fil = pdbin) ## load input TLS description tls_file = TLSFile() tls_file.set_file_format(TLSFileFormatTLSOUT()) for tlsin in tlsins: fil = open(tlsin, "r") listx = tls_file.file_format.load(fil) tls_file.tls_...
0833e50284e4326c9e648fdbd4ff3ecf927e310b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/0833e50284e4326c9e648fdbd4ff3ecf927e310b/refineprep.py
for tlsin in tlsins: fil = open(tlsin, "r") listx = tls_file.file_format.load(fil) tls_file.tls_desc_list += listx tls_group_list = []
tls_file.load(open(tlsin, "r"))
def refmac5_prep(pdbin, tlsins, pdbout, tlsout): os.umask(022) ## load input structure struct = LoadStructure(fil = pdbin) ## load input TLS description tls_file = TLSFile() tls_file.set_file_format(TLSFileFormatTLSOUT()) for tlsin in tlsins: fil = open(tlsin, "r") listx = tls_file.file_format.load(fil) tls_file.tls_...
0833e50284e4326c9e648fdbd4ff3ecf927e310b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/0833e50284e4326c9e648fdbd4ff3ecf927e310b/refineprep.py
def refmac5_prep(pdbin, tlsins, pdbout, tlsout): os.umask(022) ## load input structure struct = LoadStructure(fil = pdbin) ## load input TLS description tls_file = TLSFile() tls_file.set_file_format(TLSFileFormatTLSOUT()) for tlsin in tlsins: fil = open(tlsin, "r") listx = tls_file.file_format.load(fil) tls_file.tls_...
0833e50284e4326c9e648fdbd4ff3ecf927e310b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/0833e50284e4326c9e648fdbd4ff3ecf927e310b/refineprep.py
(tevals, R) = eigenvectors(tls_group.T) tmin = min(tevals) T = matrixmultiply(R, matrixmultiply(tls_group.T, transpose(R))) T = T - (tmin * identity(3, Float)) tls_group.T = matrixmultiply(transpose(R), matrixmultiply(T, R)) bmin = U2B * tmin for atm, U in tls_group.iter_atm_Utls(): btls = U2B * (trace(U)/3.0) bi...
min_Uiso = 0.0 max_Uiso = 0.0 n = 0 sum_diff2 = 0.0 for atm, Utls in tls_group.iter_atm_Utls(): for aatm in atm.iter_alt_loc(): tls_tf = trace(Utls)/3.0 ref_tf = trace(aatm.get_U())/3.0 n += 1 sum_diff2 += (tls_tf - ref_tf)**2 if ref_tf>tls_tf: max_Uiso = max(ref_tf - tls_tf, max_Uiso) else: min_Uiso = m...
def refmac5_prep(pdbin, tlsins, pdbout, tlsout): os.umask(022) ## load input structure struct = LoadStructure(fil = pdbin) ## load input TLS description tls_file = TLSFile() tls_file.set_file_format(TLSFileFormatTLSOUT()) for tlsin in tlsins: fil = open(tlsin, "r") listx = tls_file.file_format.load(fil) tls_file.tls_...
0833e50284e4326c9e648fdbd4ff3ecf927e310b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/0833e50284e4326c9e648fdbd4ff3ecf927e310b/refineprep.py
'<p style="font-size:xx-small; margin-top:%dpx; line-height:18px">' % (plot.border_width)]
'<p style="font-size:xx-small; margin-top:%dpx; line-height:12.5px">' % (plot.border_width)]
def html_chain_alignment_plot(self, chain): """generate a plot comparing all segmentations """ plot = sequence_plot.TLSSegmentAlignmentPlot() for ntls, cpartition in chain.partition_collection.iter_ntls_chain_partitions(): plot.add_tls_segmentation(cpartition)
cb5706ec3ac3b007f4d2780717fcb6c7e7ebeab6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/cb5706ec3ac3b007f4d2780717fcb6c7e7ebeab6/html.py
"""Returns the displacment matrix based on rotation about Euler
"""Returns the displacement matrix based on rotation about Euler
def dmatrix(alpha, beta, gamma): """Returns the displacment matrix based on rotation about Euler angles alpha, beta, and gamma. """ return rmatrix(alpha, beta, gamma) - identity(3, Float)
cac2639bc762b0d5b95beca937599b3632850311 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/cac2639bc762b0d5b95beca937599b3632850311/AtomMath.py
self.zplane = 500.0 self.term_alpha = 1.0
self.zplane = 5000.0 self.term_alpha = 0.75
def __init__(self): self.visible = True self.width = 0 self.height = 0 self.zplane = 500.0
878842438ad5dcf87f49337f7c582fe163496f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/878842438ad5dcf87f49337f7c582fe163496f4b/glutviewer.py
self.lines = ["
self.prompt = "> " self.lines = []
def __init__(self): self.visible = True self.width = 0 self.height = 0 self.zplane = 500.0
878842438ad5dcf87f49337f7c582fe163496f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/878842438ad5dcf87f49337f7c582fe163496f4b/glutviewer.py
if key=='\r': self.lines.insert(0, "
ascii = ord(key) if ascii==13: self.lines.insert(0, self.prompt) elif ascii==8 or ascii==127: ln = self.lines[0] if len(ln)>len(self.prompt): self.lines[0] = ln[:-1]
def keypress(self, key): if key=='\r': self.lines.insert(0, "# ") else: self.lines[0] += key
878842438ad5dcf87f49337f7c582fe163496f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/878842438ad5dcf87f49337f7c582fe163496f4b/glutviewer.py
def opengl_render(self): ## setup perspective matrix
878842438ad5dcf87f49337f7c582fe163496f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/878842438ad5dcf87f49337f7c582fe163496f4b/glutviewer.py
ambient_light = 0.5 diffuse_light = 1.0 specular_light = 1.0 ambient = (ambient_light, ambient_light, ambient_light, 1.0) diffuse = (diffuse_light, diffuse_light, diffuse_light, 1.0) specular = (specular_light, specular_light, specular_light, 1.0) glLightModelfv(GL_LIGHT_MODEL_AMBIENT, ambient)
glClear(GL_DEPTH_BUFFER_BIT)
def opengl_render(self): ## setup perspective matrix
878842438ad5dcf87f49337f7c582fe163496f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/878842438ad5dcf87f49337f7c582fe163496f4b/glutviewer.py
glLightfv(GL_LIGHT0, GL_DIFFUSE, diffuse) glLightfv(GL_LIGHT0, GL_SPECULAR, specular) glLightfv(GL_LIGHT0, GL_POSITION, (0.0, 0.0, -1.0, 0.0))
glLightfv(GL_LIGHT0, GL_AMBIENT, (0.0, 0.0, 0.0, 1.0)) glLightfv(GL_LIGHT0, GL_DIFFUSE, (1.0, 1.0, 1.0, 1.0)) glLightfv(GL_LIGHT0, GL_SPECULAR, (1.0, 1.0, 1.0, 1.0)) glLightfv(GL_LIGHT0, GL_POSITION, (0.0, 0.0, zplane + 10.0, 0.0)) glLightModelfv(GL_LIGHT_MODEL_AMBIENT, (0.2, 0.2, 0.2, 1.0))
def opengl_render(self): ## setup perspective matrix
878842438ad5dcf87f49337f7c582fe163496f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/878842438ad5dcf87f49337f7c582fe163496f4b/glutviewer.py
self.opengl_set_material_rgba(0.0, 1.0, 0.0, self.term_alpha)
glMaterialfv( GL_FRONT, GL_AMBIENT, (0.0, 0.0, 0.0, self.term_alpha)) glMaterialfv( GL_FRONT, GL_DIFFUSE, (0.1, 0.1, 0.1, self.term_alpha)) glMaterialfv( GL_FRONT, GL_SPECULAR, (0.0, 0.1, 0.0, self.term_alpha)) glMaterialfv( GL_FRONT, GL_EMISSION, (0.0, 0.1, 0.0, self.term_alpha)) glMaterialfv(GL_FRONT, GL_SHININE...
def opengl_render(self): ## setup perspective matrix
878842438ad5dcf87f49337f7c582fe163496f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/878842438ad5dcf87f49337f7c582fe163496f4b/glutviewer.py
def opengl_set_material_rgba(self, r, g, b, a): """Creates a stock rendering material colored according to the given RGB values. """ glColor3f(r, g, b) glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, (r, g, b, a)) glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, (1.0, 1.0, 1.0, 1.0)) glMaterialfv(GL_FRONT_AND_BACK...
def opengl_set_material_rgba(self, r, g, b, a): """Creates a stock rendering material colored according to the given RGB values. """ glColor3f(r, g, b)
878842438ad5dcf87f49337f7c582fe163496f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/878842438ad5dcf87f49337f7c582fe163496f4b/glutviewer.py
self.glv_add_struct(struct)
glstruct = self.glv_add_struct(struct) for glchain in glstruct.glo_iter_children(): glchain.properties.update( ball_stick = True, ellipse = True)
def load_struct(self, path): """Loads the requested structure. """ info("loading: %s" % (path)) try: struct = LoadStructure( fil = path, build_properties = ("library_bonds","distance_bonds")) except IOError: error("file not found: %s" % (path)) return
878842438ad5dcf87f49337f7c582fe163496f4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/878842438ad5dcf87f49337f7c582fe163496f4b/glutviewer.py
l11 = 20 + (segment.index(frag) * 6)
L11 = 20 + (segment.index(frag) * 6)
def calc_CA_pivot_TLS_least_squares_fit(segment, weight_dict=None): """Perform a LSQ-TLS fit on the given Segment object using the TLS model with amino acid side chains which can pivot about the CA atom. This model uses 20 TLS parameters and 6 libration parameters per side chain. """ ## calculate the number of paramet...
0779a1d6628e6acba115b7ba9004fcb5efdcc8b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/0779a1d6628e6acba115b7ba9004fcb5efdcc8b7/TLS.py
set_L_A(A, u11, l11, xs, ys, zs, w)
set_L_A(A, U11, L11, xs, ys, zs, w)
def calc_CA_pivot_TLS_least_squares_fit(segment, weight_dict=None): """Perform a LSQ-TLS fit on the given Segment object using the TLS model with amino acid side chains which can pivot about the CA atom. This model uses 20 TLS parameters and 6 libration parameters per side chain. """ ## calculate the number of paramet...
0779a1d6628e6acba115b7ba9004fcb5efdcc8b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/0779a1d6628e6acba115b7ba9004fcb5efdcc8b7/TLS.py
self.driver.glr_lighting_enable()
def draw_fan(self): """Draws a fan from the TLS group center of reaction to the TLS group backbone atoms. """ COR = self.properties["COR"] r, g, b = self.gldl_property_color_rgbf("tls_color") a = self.properties["fan_opacity"]
0779a1d6628e6acba115b7ba9004fcb5efdcc8b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10674/0779a1d6628e6acba115b7ba9004fcb5efdcc8b7/TLS.py