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
def test_find_bonds(protein): weak_bonds, _ = Algorithms.find_bonds(protein.acids) assert len(weak_bonds) == 1