示例#1
0
 def test_empty_selection(multi_molecules):
     """
     Make sure :func:`edge_tuning.pairs_under_threshold` is not failing on
     empty selections.
     """
     assert not list(
         edge_tuning.pairs_under_threshold(
             multi_molecules, 2.0, [], [], attribute='coords'))
示例#2
0
 def pair_selected(multi_molecules):
     """
     Call :func:`edge_tuning.pairs_under_threshold` with twice the same
     selection.
     """
     selection = [
         [0, 1],
         [0, 2],
         [1, 4],
         [2, 5],
         [3, 1],
         [5, 4],
     ]
     return edge_tuning.pairs_under_threshold(multi_molecules,
                                              2.0,
                                              selection,
                                              selection,
                                              attribute='coords')
示例#3
0
 def assymetric_pair_selected(multi_molecules):
     """
     Call :func:`edge_tuning.pairs_under_threshold` with two different
     selections.
     """
     selection_a = [
         [0, 1],
         [1, 4],
         [3, 1],
     ]
     selection_b = [
         [0, 2],
         [2, 5],
         [5, 4],
     ]
     return edge_tuning.pairs_under_threshold(multi_molecules,
                                              2.0,
                                              selection_a,
                                              selection_b,
                                              attribute='coords')