Пример #1
0
    file_r1 =  open('r1.%s.out' % vals[i], 'w')
    file_r2 =  open('r2.%s.out' % vals[i], 'w')
    file_noe = open('noe.%s.out' % vals[i], 'w')

    # Residue number.
    res_num = 1

    # Loop over rex.
    for rex_index in range(len(rex)):
        # Loop over tm.
        for tm_index in range(len(tm)):
            # The spectral density values.
            J = spectral_density_mf_orig(frq=frq, tm=tm[tm_index], heteronuc='13C')
            
            # The relaxation data.
            Ri = relaxation_data(J, frq=frq, heteronuc='13C', rex=rex[rex_index] / (2.0 * pi * frq[0])**2, r=1.20e-10, csa=200e-6)

            # The model info.
            info = "# tm9 = {local_tm=%s, rex=%s}" % (tm[tm_index], rex[rex_index])

            # Write out the values.
            file_r1.write('%-15s %-5s %-15s %-5s %-5s %-20s %-20s %s\n' %  ('Polycarbonate', res_num, 'Bisphenol_A', '1', 'C1', Ri[i, 0], Ri[i, 0] * 0.02, info))
            file_r2.write('%-15s %-5s %-15s %-5s %-5s %-20s %-20s %s\n' %  ('Polycarbonate', res_num, 'Bisphenol_A', '1', 'C1', Ri[i, 1], Ri[i, 1] * 0.02, info))
            file_noe.write('%-15s %-5s %-15s %-5s %-5s %-20s %-20s %s\n' % ('Polycarbonate', res_num, 'Bisphenol_A', '1', 'C1', Ri[i, 2], 0.05, info))

            # Increment the spin number.
            res_num += 1

    # Close the files.
    file_r1.close()
    file_r2.close()
Пример #2
0
    res_num = 1

    # Loop over s2.
    for s2_index in range(3):
        # Loop over tm.
        for tm_index in range(3):
            # The spectral density values.
            J = spectral_density_mf_orig(frq=frq,
                                         tm=tm[tm_index],
                                         S2=s2[s2_index],
                                         heteronuc='13C')

            # The relaxation data.
            Ri = relaxation_data(J,
                                 frq=frq,
                                 heteronuc='13C',
                                 r=1.20e-10,
                                 csa=200e-6)

            # The model info.
            info = "# tm2 = {local_tm=%s; s2=%s}" % (tm[tm_index],
                                                     s2[s2_index])

            # Write out the values.
            file_r1.write('%-15s %-5s %-15s %-5s %-5s %-20s %-20s %s\n' %
                          ('Polycarbonate', res_num, 'Bisphenol_A', '1', 'C1',
                           Ri[i, 0], Ri[i, 0] * 0.02, info))
            file_r2.write('%-15s %-5s %-15s %-5s %-5s %-20s %-20s %s\n' %
                          ('Polycarbonate', res_num, 'Bisphenol_A', '1', 'C1',
                           Ri[i, 1], Ri[i, 1] * 0.02, info))
            file_noe.write('%-15s %-5s %-15s %-5s %-5s %-20s %-20s %s\n' %
Пример #3
0
                for s2_index in range(len(s2)):
                    # Loop over tm.
                    for tm_index in range(len(tm)):
                        # The spectral density values.
                        J = spectral_density_mf_ext(frq=frq,
                                                    tm=tm[tm_index],
                                                    s2=s2[s2_index],
                                                    s2f=s2f[s2f_index],
                                                    ts=ts[ts_index],
                                                    heteronuc='13C')

                        # The relaxation data.
                        Ri = relaxation_data(J,
                                             frq=frq,
                                             heteronuc='13C',
                                             rex=rex[rex_index] /
                                             (2.0 * pi * frq[0])**2,
                                             r=1.20e-10,
                                             csa=200e-6)

                        # The model info.
                        info = "# tm7 = {local_tm=%s; s2=%s; s2f=%s; ts=%s; rex=%s}" % (
                            tm[tm_index], s2f[s2f_index], s2[s2_index],
                            ts[ts_index], rex[rex_index])

                        # Write out the values.
                        file_r1.write(
                            '%-15s %-5s %-15s %-5s %-5s %-20s %-20s %s\n' %
                            ('Polycarbonate', res_num, 'Bisphenol_A', '1',
                             'C1', Ri[i, 0], Ri[i, 0] * 0.02, info))
                        file_r2.write(
Пример #4
0
    file_noe = open('noe.%s.out' % vals[i], 'w')

    # Residue number.
    res_num = 1

    # Loop over te.
    for te_index in range(3):
        # Loop over s2.
        for s2_index in range(3):
            # Loop over tm.
            for tm_index in range(3):
                # The spectral density values.
                J = spectral_density_mf_orig(frq=frq, tm=tm[tm_index], S2=s2[s2_index], te=te[te_index], heteronuc='13C')
                
                # The relaxation data.
                Ri = relaxation_data(J, frq=frq, heteronuc='13C', r=1.20e-10, csa=200e-6)

                # The model info.
                info = "# tm2 = {local_tm=%s; s2=%s; te=%s}" % (tm[tm_index], s2[s2_index], te[te_index])

                # Write out the values.
                file_r1.write('%-15s %-5s %-15s %-5s %-5s %-20s %-20s %s\n' %  ('Polycarbonate', res_num, 'Bisphenol_A', '1', 'C1', Ri[i, 0], Ri[i, 0] * 0.02, info))
                file_r2.write('%-15s %-5s %-15s %-5s %-5s %-20s %-20s %s\n' %  ('Polycarbonate', res_num, 'Bisphenol_A', '1', 'C1', Ri[i, 1], Ri[i, 1] * 0.02, info))
                file_noe.write('%-15s %-5s %-15s %-5s %-5s %-20s %-20s %s\n' % ('Polycarbonate', res_num, 'Bisphenol_A', '1', 'C1', Ri[i, 2], 0.05, info))

                # Increment the spin number.
                res_num += 1

    # Close the files.
    file_r1.close()
    file_r2.close()
Пример #5
0
# The model-free parameters.
tm = 10e-9
S2 = 0.8
te = 40e-12

# The proton frequencies.
vals = [400, 500, 600, 700, 800, 900, 1000]
frq = array(vals, float64)
frq = frq * 1e6

# The spectral density values.
J = spectral_density_mf_orig(frq=frq, tm=tm, S2=S2, te=te, heteronuc='15N')

# The relaxation data.
Ri = relaxation_data(J, frq=frq, heteronuc='15N', r=1.02e-10, csa=-172e-6)
print("Ri:\n%s" % Ri)

# Write out the data.
for i in range(len(vals)):
    # The files.
    file_r1 =  open('r1.%s.out' % vals[i], 'w')
    file_r2 =  open('r2.%s.out' % vals[i], 'w')
    file_noe = open('noe.%s.out' % vals[i], 'w')

    # Write out the values.
    file_r1.write('%s %s %s %s\n' %  ('5', 'GLU', Ri[i, 0], Ri[i, 0] * 0.02))
    file_r2.write('%s %s %s %s\n' %  ('5', 'GLU', Ri[i, 1], Ri[i, 1] * 0.02))
    file_noe.write('%s %s %s %s\n' % ('5', 'GLU', Ri[i, 2], 0.05))