test_class.declarator: OPPOSITE = +1
test_class.modifier: private static final
test_class.original_string: private static final int OPPOSITE = +1;
test_class.type: int
test_class.var_name: OPPOSITE
test_class.declarator: TOGETHER = -1
test_class.modifier: private static final
test_class.original_string: private static final int TOGETHER = -1;
test_class.type: int
test_class.var_name: TOGETHER
test_class.file: tool/hash/src/test/java/org/openscience/cdk/hash/stereo/DoubleBond3DParityTest.java
test_class.identifier: DoubleBond3DParityTest
test_case.body: @Test
      public void together_endOn() throws Exception {
          GeometricParity geometric = new DoubleBond3DParity(new Point3d(-4.3262, 0.3192, 0.6495), new Point3d(-4.3206,
                  0.3724, -0.8896), new Point3d(-4.3214, 1.6255, 1.4651), new Point3d(-4.3101, 1.7319, -1.6131));
          assertEquals(TOGETHER, geometric.parity());
      }
test_case.class_method_signature: DoubleBond3DParityTest.together_endOn()
test_case.full_signature: @Test public void together_endOn()
test_case.identifier: together_endOn
test_case.invocations: assertEquals parity
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void together_endOn()
focal_class.declarator: u
focal_class.modifier: private
focal_class.original_string: private Point3d u, v, x, w;
focal_class.type: Point3d
focal_class.var_name: u
focal_class.file: tool/hash/src/main/java/org/openscience/cdk/hash/stereo/DoubleBond3DParity.java
focal_class.identifier: DoubleBond3DParity
focal_class.class_method_signature: DoubleBond3DParity.DoubleBond3DParity(Point3d left, Point3d right, Point3d leftSubstituent, Point3d rightSubstituent)
focal_class.full_signature: public  DoubleBond3DParity(Point3d left, Point3d right, Point3d leftSubstituent, Point3d rightSubstituent)
focal_class.identifier: DoubleBond3DParity
focal_class.modifiers: public
focal_class.parameters: (Point3d left, Point3d right, Point3d leftSubstituent, Point3d rightSubstituent)
focal_class.signature:  DoubleBond3DParity(Point3d left, Point3d right, Point3d leftSubstituent, Point3d rightSubstituent)
focal_class.class_method_signature: DoubleBond3DParity.parity()
focal_class.full_signature: @Override public int parity()
focal_class.identifier: parity
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int parity()
focal_class.class_method_signature: DoubleBond3DParity.toVector(Point3d src, Point3d dest)
focal_class.full_signature: private static double[] toVector(Point3d src, Point3d dest)
focal_class.identifier: toVector
focal_class.modifiers: private static
focal_class.parameters: (Point3d src, Point3d dest)
focal_class.return: double[]
focal_class.signature: double[] toVector(Point3d src, Point3d dest)
focal_class.class_method_signature: DoubleBond3DParity.dot(double[] u, double[] v)
focal_class.full_signature: private static double dot(double[] u, double[] v)
focal_class.identifier: dot
focal_class.modifiers: private static
focal_class.parameters: (double[] u, double[] v)
focal_class.return: double
focal_class.signature: double dot(double[] u, double[] v)
focal_class.class_method_signature: DoubleBond3DParity.crossProduct(double[] u, double[] v)
focal_class.full_signature: private static double[] crossProduct(double[] u, double[] v)
focal_class.identifier: crossProduct
focal_class.modifiers: private static
focal_class.parameters: (double[] u, double[] v)
focal_class.return: double[]
focal_class.signature: double[] crossProduct(double[] u, double[] v)
focal_class.superclass: extends GeometricParity
focal_method.body: @Override
      public int parity() {
  
          // create three vectors, v->u, v->w and u->x
          double[] vu = toVector(v, u);
          double[] vw = toVector(v, w);
          double[] ux = toVector(u, x);
  
          // normal vector (to compare against), the normal vector (n) looks like:
          // x     n w
          //  \    |/
          //   u = v
          double[] normal = crossProduct(vu, crossProduct(vu, vw));
  
          // compare the dot products of v->w and u->x, if the signs are the same
          // they are both pointing the same direction. if a value is close to 0
          // then it is at pi/2 radians (i.e. unspecified) however 3D coordinates
          // are generally discrete and do not normally represent on unspecified
          // stereo configurations so we don't check this
          int parity = (int) Math.signum(dot(normal, vw)) * (int) Math.signum(dot(normal, ux));
  
          // invert sign, this then matches with Sp2 double bond parity
          return parity * -1;
      }
focal_method.class_method_signature: DoubleBond3DParity.parity()
focal_method.full_signature: @Override public int parity()
focal_method.identifier: parity
focal_method.invocations: toVector toVector toVector crossProduct crossProduct signum dot signum dot
focal_method.modifiers: @Override public
focal_method.parameters: ()
focal_method.return: int
focal_method.signature: int parity()