コード例 #1
0
ファイル: protein_plotter.py プロジェクト: 0rin/ProteinPower
 def _add_bonds_to_plot(axes, acids):
     """Add certain bonds in a folding to the plot."""
     bonds = Algorithms.find_bonds(acids)
     linestyle = 'dotted'
     for bond_type in bonds:
         for bond in bond_type:
             x = []
             y = []
             z = []
             for acid in bond:
                 x.append(acid['x'])
                 y.append(acid['y'])
                 z.append(acid['z'])
                 axes.plot3D(x, y, z, color='black', linestyle=linestyle)
         linestyle = 'dashed'
     return axes
コード例 #2
0
ファイル: algorithms_test.py プロジェクト: 0rin/ProteinPower
def test_find_bonds(protein):
    weak_bonds, _ = Algorithms.find_bonds(protein.acids)
    assert len(weak_bonds) == 1