Beispiel #1
0
def main():
    res = VibTools.SNFResults(outname='Ala10/snf.out',
                              restartname='Ala10/restart',
                              coordfile='Ala10/coord')
    res.read()

    plots = []

    # numbers of the amide I modes
    ml = range(241, 250)

    modes = res.modes.get_subset(ml)

    lv = VibTools.LocVib(modes, 'PM')
    lv.localize()
    lv.sort_by_residue()
    lv.adjust_signs()

    # vibrational coupling constants
    cmat = lv.get_couplingmat()

    print
    print "Vibrational coupling matrix [in cm-1]"
    print_mat(cmat)

    # intensity coupling constants
    lma = VibTools.LocModeAnalysis(res, 'ROA', lv.locmodes)
    intcmat = lma.get_intensity_coupling_matrix()

    print
    print "Intensity coupling matrix for ROA backscattering"
    print_mat(1000.0 * intcmat)
def localize_subset(modes, subset):
    # method that takes normal modes
    # and a range of modes, returns them
    # localized + the cmat
    tmpmodes = modes.get_subset(subset)
    tmploc = VibTools.LocVib(tmpmodes, 'PM')
    tmploc.localize()
    tmploc.sort_by_residue()
    tmploc.adjust_signs()
    tmpcmat = tmploc.get_couplingmat(hessian=True)

    return tmploc.locmodes.modes_mw, tmploc.locmodes.freqs, tmpcmat
Beispiel #3
0
def main():
    res = VibTools.SNFResults(outname='Ala10/snf.out',
                              restartname='Ala10/restart',
                              coordfile='Ala10/coord')
    res.read()

    # numbers of amide I normal modes (found with composition.py)
    ml = range(241, 250)

    modes = res.modes.get_subset(ml)

    backint = res.get_backscattering_int(modes=modes)

    lv = VibTools.LocVib(modes, 'PM')
    lv.localize()
    lv.sort_by_residue()
    lv.adjust_signs()

    print
    print "Composition of localized modes: "
    lv.locmodes.print_attype2_composition()
    lv.locmodes.print_residue_composition()

    # write localized modes to g98-style file
    lv.locmodes.write_g98out(filename="locmodes-amide1.out")

    backint_loc = res.get_backscattering_int(modes=lv.locmodes)

    print
    print "ROA backscattering intensities of normal modes and localized modes"

    print
    print "  normal modes        |  localized modes "
    print "     freq       int   |    freq       int"

    n = 0
    for i, f, bi, f_loc, bi_loc in zip(ml, modes.freqs, backint * 1e3,
                                       lv.locmodes.freqs, backint_loc * 1e3):
        n = n + 1
        print r"%i  %6.1f  %8.2f | %2i %6.1f %8.2f" % (i, f, bi, n, f_loc,
                                                       bi_loc)

    print
    print "Total ROA Int    : ", backint.sum() * 1e3