Exemplo n.º 1
0
def get_origin_translation(asu_prmtop_file_name, asu_rst7_file_name):
    rst7 = raf.rst7(asu_rst7_file_name)
    coords = rst7.Get_Coords()
    UCbox = rst7.Get_Box()
    u, invu = raf.CompXfrm(UCbox)
    masses = raf.prmtop(asu_prmtop_file_name).Get_Masses()
    com = raf.COM(coords, masses)
    frac_com = dot(u, com)
    origin_translation = array([0.5, 0.5, 0.5]) - frac_com
    return u, origin_translation
Exemplo n.º 2
0
op = 0
for line in symops.splitlines():
    line = line.split('\'')[-1].split()
    for i in range(3):
        for j in range(3):
            Rf[op][i][j] = line[i * 3 + j + 1]
        try:
            Tf[op][i] = float(line[((i * 2) - 1 + 11)]) / float(line[(
                (i * 2) + 11)])
        except ZeroDivisionError:
            Tf[op][i] = 0.0
    op += 1

pdbf = raf.pdb(pdbfile)
box = pdbf.Get_Box()
u, invu = raf.CompXfrm(box)

print "================================"
Tc = zeros(shape(Tf))
for i in range(numops):
    Tc[i] = dot(invu, Tf[i]).astype(float32)
#~ print Tc
print "================================"

Rc = zeros(shape(Rf))
for i in range(numops):
    Rc[i] = dot(dot(invu, Rf[i]), u)
#~ print Rc
print "================================"

for op in range(numops):
Exemplo n.º 3
0
def get_U_invU(asu_rst7_file_name):
    rst7 = Rst7.open(asu_rst7_file_name)
    UCbox = rst7.box
    U, invU = raf.CompXfrm(UCbox)
    return U, invU, UCbox