test_class.file: tool/hash/src/test/java/org/openscience/cdk/hash/stereo/GeometricDoubleBondEncoderFactoryTest.java
test_class.identifier: GeometricDoubleBondEncoderFactoryTest
test_case.body: @Test
      public void testGeometric_2D() throws Exception {
          IAtom l = mock(IAtom.class); // 0
          IAtom r = mock(IAtom.class); // 1
          IAtom l1 = mock(IAtom.class); // 2
          IAtom l2 = mock(IAtom.class); // 3
          IAtom r1 = mock(IAtom.class); // 4
          IAtom r2 = mock(IAtom.class); // 5
  
          IAtomContainer m = mock(IAtomContainer.class);
  
          when(m.getAtom(0)).thenReturn(l);
          when(m.getAtom(1)).thenReturn(r);
          when(m.getAtom(2)).thenReturn(l1);
          when(m.getAtom(3)).thenReturn(l2);
          when(m.getAtom(4)).thenReturn(r1);
          when(m.getAtom(5)).thenReturn(r2);
  
          when(l.getPoint2d()).thenReturn(new Point2d());
          when(r.getPoint2d()).thenReturn(new Point2d());
          when(l1.getPoint2d()).thenReturn(new Point2d());
          when(l2.getPoint2d()).thenReturn(new Point2d());
          when(r1.getPoint2d()).thenReturn(new Point2d());
          when(r2.getPoint2d()).thenReturn(new Point2d());
  
          GeometricParity p = geometric(m, 0, 1, 2, 3, 4, 5);
          assertTrue(p instanceof DoubleBond2DParity);
      }
test_case.class_method_signature: GeometricDoubleBondEncoderFactoryTest.testGeometric_2D()
test_case.full_signature: @Test public void testGeometric_2D()
test_case.identifier: testGeometric_2D
test_case.invocations: mock mock mock mock mock mock mock thenReturn when getAtom thenReturn when getAtom thenReturn when getAtom thenReturn when getAtom thenReturn when getAtom thenReturn when getAtom thenReturn when getPoint2d thenReturn when getPoint2d thenReturn when getPoint2d thenReturn when getPoint2d thenReturn when getPoint2d thenReturn when getPoint2d geometric assertTrue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testGeometric_2D()
focal_class.file: tool/hash/src/main/java/org/openscience/cdk/hash/stereo/GeometricDoubleBondEncoderFactory.java
focal_class.identifier: GeometricDoubleBondEncoderFactory
focal_class.interfaces: implements StereoEncoderFactory
focal_class.class_method_signature: GeometricDoubleBondEncoderFactory.create(IAtomContainer container, int[][] graph)
focal_class.full_signature: @Override public StereoEncoder create(IAtomContainer container, int[][] graph)
focal_class.identifier: create
focal_class.modifiers: @Override public
focal_class.parameters: (IAtomContainer container, int[][] graph)
focal_class.return: StereoEncoder
focal_class.signature: StereoEncoder create(IAtomContainer container, int[][] graph)
focal_class.class_method_signature: GeometricDoubleBondEncoderFactory.newEncoder(IAtomContainer container, IAtom left, IAtom leftParent, IAtom right,
              IAtom rightParent, int[][] graph)
focal_class.full_signature: static StereoEncoder newEncoder(IAtomContainer container, IAtom left, IAtom leftParent, IAtom right,
              IAtom rightParent, int[][] graph)
focal_class.identifier: newEncoder
focal_class.modifiers: static
focal_class.parameters: (IAtomContainer container, IAtom left, IAtom leftParent, IAtom right,
              IAtom rightParent, int[][] graph)
focal_class.return: StereoEncoder
focal_class.signature: StereoEncoder newEncoder(IAtomContainer container, IAtom left, IAtom leftParent, IAtom right,
              IAtom rightParent, int[][] graph)
focal_class.class_method_signature: GeometricDoubleBondEncoderFactory.geometric(IAtomContainer mol, int l, int r, int l1, int l2, int r1, int r2)
focal_class.full_signature: static GeometricParity geometric(IAtomContainer mol, int l, int r, int l1, int l2, int r1, int r2)
focal_class.identifier: geometric
focal_class.modifiers: static
focal_class.parameters: (IAtomContainer mol, int l, int r, int l1, int l2, int r1, int r2)
focal_class.return: GeometricParity
focal_class.signature: GeometricParity geometric(IAtomContainer mol, int l, int r, int l1, int l2, int r1, int r2)
focal_class.class_method_signature: GeometricDoubleBondEncoderFactory.permutation(int[] neighbors)
focal_class.full_signature: static PermutationParity permutation(int[] neighbors)
focal_class.identifier: permutation
focal_class.modifiers: static
focal_class.parameters: (int[] neighbors)
focal_class.return: PermutationParity
focal_class.signature: PermutationParity permutation(int[] neighbors)
focal_class.class_method_signature: GeometricDoubleBondEncoderFactory.moveToBack(int[] neighbors, int v)
focal_class.full_signature: static int[] moveToBack(int[] neighbors, int v)
focal_class.identifier: moveToBack
focal_class.modifiers: static
focal_class.parameters: (int[] neighbors, int v)
focal_class.return: int[]
focal_class.signature: int[] moveToBack(int[] neighbors, int v)
focal_class.class_method_signature: GeometricDoubleBondEncoderFactory.accept(IAtom atom, List<IBond> bonds)
focal_class.full_signature: static boolean accept(IAtom atom, List<IBond> bonds)
focal_class.identifier: accept
focal_class.modifiers: static
focal_class.parameters: (IAtom atom, List<IBond> bonds)
focal_class.return: boolean
focal_class.signature: boolean accept(IAtom atom, List<IBond> bonds)
focal_method.body: static GeometricParity geometric(IAtomContainer mol, int l, int r, int l1, int l2, int r1, int r2) {
  
          // we need all points for 2D as they may be skewed, i.e.
          //
          // \
          //  C=C
          //    |\
          //    C H
          Point2d l2d = mol.getAtom(l).getPoint2d();
          Point2d r2d = mol.getAtom(r).getPoint2d();
          Point2d l12d = mol.getAtom(l1).getPoint2d();
          Point2d l22d = mol.getAtom(l2).getPoint2d();
          Point2d r12d = mol.getAtom(r1).getPoint2d();
          Point2d r22d = mol.getAtom(r2).getPoint2d();
  
          if (l2d != null && r2d != null && l12d != null && l22d != null && r12d != null && r22d != null) {
              return new DoubleBond2DParity(l2d, r2d, l12d, l22d, r12d, r22d);
          }
  
          // we only need the first point, we presume the 3D angles are all correct
          Point3d l3d = mol.getAtom(l).getPoint3d();
          Point3d r3d = mol.getAtom(r).getPoint3d();
          Point3d l13d = mol.getAtom(l1).getPoint3d();
          Point3d r13d = mol.getAtom(r1).getPoint3d();
          if (l3d != null && r3d != null && l13d != null && r13d != null)
              return new DoubleBond3DParity(l3d, r3d, l13d, r13d);
  
          return null;
  
      }
focal_method.class_method_signature: GeometricDoubleBondEncoderFactory.geometric(IAtomContainer mol, int l, int r, int l1, int l2, int r1, int r2)
focal_method.full_signature: static GeometricParity geometric(IAtomContainer mol, int l, int r, int l1, int l2, int r1, int r2)
focal_method.identifier: geometric
focal_method.invocations: getPoint2d getAtom getPoint2d getAtom getPoint2d getAtom getPoint2d getAtom getPoint2d getAtom getPoint2d getAtom getPoint3d getAtom getPoint3d getAtom getPoint3d getAtom getPoint3d getAtom
focal_method.modifiers: static
focal_method.parameters: (IAtomContainer mol, int l, int r, int l1, int l2, int r1, int r2)
focal_method.return: GeometricParity
focal_method.signature: GeometricParity geometric(IAtomContainer mol, int l, int r, int l1, int l2, int r1, int r2)