Source code for schrodinger.trajectory.prody.test_arrow
import schrodinger.structure as structure
from schrodinger.graphics3d import arrow
ARROW_OPACITY = 0.8
COLOR_PINK = (1.0, 0.7, 0.7)
[docs]def setup_arrow(head, tail):
    return arrow.MaestroArrow(head[0],
                              head[1],
                              head[2],
                              tail[0],
                              tail[1],
                              tail[2],
                              color=COLOR_PINK,
                              opacity=ARROW_OPACITY) 
[docs]def load_arrows():
    from schrodinger.graphics3d import arrow
    arrow_group = arrow.Group()
    #arrow_group.clear()
    st = structure.Structure.read('test.mae')
    for atom in st.atom:
        if atom.pdbname == ' CA ':
            xyz = atom.xyz
            arrow_x = xyz[0] + atom.property['r_m_eig_vector_1_x'] * 10
            arrow_y = xyz[1] + atom.property['r_m_eig_vector_1_y'] * 10
            arrow_z = xyz[2] + atom.property['r_m_eig_vector_1_z'] * 10
            arrow = [arrow_x, arrow_y, arrow_z]
            print(atom.index, xyz, arrow)
            arrow_group.add(setup_arrow(arrow, xyz))
    arrow_group.show() 
# once in maestro
# pyrun test_arrow.load_arrows()
#   to reread the script:
#     pyimp test_arrow