test_class.file: tool/builder3d/src/test/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3DTest.java
test_class.identifier: AtomTetrahedralLigandPlacer3DTest
test_class.superclass: extends CDKTestCase
test_case.body: @Test
      public void rescaleBondLength_IAtom_IAtom_Point3d() {
          IAtom atom1 = new Atom("C");
          atom1.setPoint3d(new Point3d(1, 1, 1));
          atom1.setCovalentRadius(0.2);
          IAtom atom2 = new Atom("C");
          atom2.setPoint3d(new Point3d(2, 2, 2));
          atom2.setCovalentRadius(0.2);
          Point3d newpoint = new AtomTetrahedralLigandPlacer3D().rescaleBondLength(atom1, atom2, atom2.getPoint3d());
          Assert.assertEquals(0.4, newpoint.distance(atom1.getPoint3d()), 0.001);
      }
test_case.class_method_signature: AtomTetrahedralLigandPlacer3DTest.rescaleBondLength_IAtom_IAtom_Point3d()
test_case.full_signature: @Test public void rescaleBondLength_IAtom_IAtom_Point3d()
test_case.identifier: rescaleBondLength_IAtom_IAtom_Point3d
test_case.invocations: setPoint3d setCovalentRadius setPoint3d setCovalentRadius rescaleBondLength getPoint3d assertEquals distance getPoint3d
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void rescaleBondLength_IAtom_IAtom_Point3d()
focal_class.declarator: pSet                  = null
focal_class.modifier: private
focal_class.original_string: private Map                 pSet                  = null;
focal_class.type: Map
focal_class.var_name: pSet
focal_class.declarator: DEFAULT_BOND_LENGTH_H = 1.0
focal_class.modifier: public final static
focal_class.original_string: public final static double  DEFAULT_BOND_LENGTH_H = 1.0;
focal_class.type: double
focal_class.var_name: DEFAULT_BOND_LENGTH_H
focal_class.declarator: TETRAHEDRAL_ANGLE     = 2.0 * Math.acos(1.0 / Math.sqrt(3.0))
focal_class.modifier: public final static
focal_class.original_string: public final static double  TETRAHEDRAL_ANGLE     = 2.0 * Math.acos(1.0 / Math.sqrt(3.0));
focal_class.type: double
focal_class.var_name: TETRAHEDRAL_ANGLE
focal_class.declarator: SP2_ANGLE             = 120 * Math.PI / 180
focal_class.modifier: private final static
focal_class.original_string: private final static double SP2_ANGLE             = 120 * Math.PI / 180;
focal_class.type: double
focal_class.var_name: SP2_ANGLE
focal_class.declarator: SP_ANGLE              = Math.PI
focal_class.modifier: private final static
focal_class.original_string: private final static double SP_ANGLE              = Math.PI;
focal_class.type: double
focal_class.var_name: SP_ANGLE
focal_class.declarator: XV                    = new Vector3d(1.0, 0.0, 0.0)
focal_class.modifier: final static
focal_class.original_string: final static Vector3d       XV                    = new Vector3d(1.0, 0.0, 0.0);
focal_class.type: Vector3d
focal_class.var_name: XV
focal_class.declarator: YV                    = new Vector3d(0.0, 1.0, 0.0)
focal_class.modifier: final static
focal_class.original_string: final static Vector3d       YV                    = new Vector3d(0.0, 1.0, 0.0);
focal_class.type: Vector3d
focal_class.var_name: YV
focal_class.file: tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
focal_class.identifier: AtomTetrahedralLigandPlacer3D
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.AtomTetrahedralLigandPlacer3D()
focal_class.full_signature:   AtomTetrahedralLigandPlacer3D()
focal_class.identifier: AtomTetrahedralLigandPlacer3D
focal_class.parameters: ()
focal_class.signature:  AtomTetrahedralLigandPlacer3D()
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.setParameterSet(Map moleculeParameter)
focal_class.full_signature: public void setParameterSet(Map moleculeParameter)
focal_class.identifier: setParameterSet
focal_class.modifiers: public
focal_class.parameters: (Map moleculeParameter)
focal_class.return: void
focal_class.signature: void setParameterSet(Map moleculeParameter)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.add3DCoordinatesForSinglyBondedLigands(IAtomContainer atomContainer)
focal_class.full_signature: public void add3DCoordinatesForSinglyBondedLigands(IAtomContainer atomContainer)
focal_class.identifier: add3DCoordinatesForSinglyBondedLigands
focal_class.modifiers: public
focal_class.parameters: (IAtomContainer atomContainer)
focal_class.return: void
focal_class.signature: void add3DCoordinatesForSinglyBondedLigands(IAtomContainer atomContainer)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2)
focal_class.full_signature: public Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2)
focal_class.identifier: rescaleBondLength
focal_class.modifiers: public
focal_class.parameters: (IAtom atom1, IAtom atom2, Point3d point2)
focal_class.return: Point3d
focal_class.signature: Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.get3DCoordinatesForLigands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, int nwanted, double length, double angle)
focal_class.full_signature: public Point3d[] get3DCoordinatesForLigands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, int nwanted, double length, double angle)
focal_class.identifier: get3DCoordinatesForLigands
focal_class.modifiers: public
focal_class.parameters: (IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, int nwanted, double length, double angle)
focal_class.return: Point3d[]
focal_class.signature: Point3d[] get3DCoordinatesForLigands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, int nwanted, double length, double angle)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.get3DCoordinatesForSPLigands(IAtom refAtom, IAtomContainer withCoords, double length, double angle)
focal_class.full_signature: public Point3d get3DCoordinatesForSPLigands(IAtom refAtom, IAtomContainer withCoords, double length, double angle)
focal_class.identifier: get3DCoordinatesForSPLigands
focal_class.modifiers: public
focal_class.parameters: (IAtom refAtom, IAtomContainer withCoords, double length, double angle)
focal_class.return: Point3d
focal_class.signature: Point3d get3DCoordinatesForSPLigands(IAtom refAtom, IAtomContainer withCoords, double length, double angle)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.get3DCoordinatesForSP2Ligands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, double length, double angle)
focal_class.full_signature: public Point3d[] get3DCoordinatesForSP2Ligands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, double length, double angle)
focal_class.identifier: get3DCoordinatesForSP2Ligands
focal_class.modifiers: public
focal_class.parameters: (IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, double length, double angle)
focal_class.return: Point3d[]
focal_class.signature: Point3d[] get3DCoordinatesForSP2Ligands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, double length, double angle)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.get3DCoordinatesForSP3Ligands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, int nwanted, double length, double angle)
focal_class.full_signature: public Point3d[] get3DCoordinatesForSP3Ligands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, int nwanted, double length, double angle)
focal_class.identifier: get3DCoordinatesForSP3Ligands
focal_class.modifiers: public
focal_class.parameters: (IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, int nwanted, double length, double angle)
focal_class.return: Point3d[]
focal_class.signature: Point3d[] get3DCoordinatesForSP3Ligands(IAtom refAtom, IAtomContainer noCoords, IAtomContainer withCoords,
              IAtom atomC, int nwanted, double length, double angle)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.calculate3DCoordinates0(Point3d aPoint, int nwanted, double length)
focal_class.full_signature: public Point3d[] calculate3DCoordinates0(Point3d aPoint, int nwanted, double length)
focal_class.identifier: calculate3DCoordinates0
focal_class.modifiers: public
focal_class.parameters: (Point3d aPoint, int nwanted, double length)
focal_class.return: Point3d[]
focal_class.signature: Point3d[] calculate3DCoordinates0(Point3d aPoint, int nwanted, double length)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.calculate3DCoordinates1(Point3d aPoint, Point3d bPoint, Point3d cPoint, int nwanted,
              double length, double angle)
focal_class.full_signature: public Point3d[] calculate3DCoordinates1(Point3d aPoint, Point3d bPoint, Point3d cPoint, int nwanted,
              double length, double angle)
focal_class.identifier: calculate3DCoordinates1
focal_class.modifiers: public
focal_class.parameters: (Point3d aPoint, Point3d bPoint, Point3d cPoint, int nwanted,
              double length, double angle)
focal_class.return: Point3d[]
focal_class.signature: Point3d[] calculate3DCoordinates1(Point3d aPoint, Point3d bPoint, Point3d cPoint, int nwanted,
              double length, double angle)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.calculate3DCoordinates2(Point3d aPoint, Point3d bPoint, Point3d cPoint, int nwanted,
              double length, double angle)
focal_class.full_signature: public Point3d[] calculate3DCoordinates2(Point3d aPoint, Point3d bPoint, Point3d cPoint, int nwanted,
              double length, double angle)
focal_class.identifier: calculate3DCoordinates2
focal_class.modifiers: public
focal_class.parameters: (Point3d aPoint, Point3d bPoint, Point3d cPoint, int nwanted,
              double length, double angle)
focal_class.return: Point3d[]
focal_class.signature: Point3d[] calculate3DCoordinates2(Point3d aPoint, Point3d bPoint, Point3d cPoint, int nwanted,
              double length, double angle)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.calculate3DCoordinates3(Point3d aPoint, Point3d bPoint, Point3d cPoint, Point3d dPoint, double length)
focal_class.full_signature: public Point3d calculate3DCoordinates3(Point3d aPoint, Point3d bPoint, Point3d cPoint, Point3d dPoint, double length)
focal_class.identifier: calculate3DCoordinates3
focal_class.modifiers: public
focal_class.parameters: (Point3d aPoint, Point3d bPoint, Point3d cPoint, Point3d dPoint, double length)
focal_class.return: Point3d
focal_class.signature: Point3d calculate3DCoordinates3(Point3d aPoint, Point3d bPoint, Point3d cPoint, Point3d dPoint, double length)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.calculate3DCoordinatesSP2_1(Point3d aPoint, Point3d bPoint, Point3d cPoint, double length,
              double angle)
focal_class.full_signature: public Point3d calculate3DCoordinatesSP2_1(Point3d aPoint, Point3d bPoint, Point3d cPoint, double length,
              double angle)
focal_class.identifier: calculate3DCoordinatesSP2_1
focal_class.modifiers: public
focal_class.parameters: (Point3d aPoint, Point3d bPoint, Point3d cPoint, double length,
              double angle)
focal_class.return: Point3d
focal_class.signature: Point3d calculate3DCoordinatesSP2_1(Point3d aPoint, Point3d bPoint, Point3d cPoint, double length,
              double angle)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.calculate3DCoordinatesSP2_2(Point3d aPoint, Point3d bPoint, Point3d cPoint, double length,
              double angle)
focal_class.full_signature: public Point3d[] calculate3DCoordinatesSP2_2(Point3d aPoint, Point3d bPoint, Point3d cPoint, double length,
              double angle)
focal_class.identifier: calculate3DCoordinatesSP2_2
focal_class.modifiers: public
focal_class.parameters: (Point3d aPoint, Point3d bPoint, Point3d cPoint, double length,
              double angle)
focal_class.return: Point3d[]
focal_class.signature: Point3d[] calculate3DCoordinatesSP2_2(Point3d aPoint, Point3d bPoint, Point3d cPoint, double length,
              double angle)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.getNonColinearVector(Vector3d ab)
focal_class.full_signature: private Vector3d getNonColinearVector(Vector3d ab)
focal_class.identifier: getNonColinearVector
focal_class.modifiers: private
focal_class.parameters: (Vector3d ab)
focal_class.return: Vector3d
focal_class.signature: Vector3d getNonColinearVector(Vector3d ab)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.rotate(Vector3d vector, Vector3d axis, double angle)
focal_class.full_signature: public static Vector3d rotate(Vector3d vector, Vector3d axis, double angle)
focal_class.identifier: rotate
focal_class.modifiers: public static
focal_class.parameters: (Vector3d vector, Vector3d axis, double angle)
focal_class.return: Vector3d
focal_class.signature: Vector3d rotate(Vector3d vector, Vector3d axis, double angle)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.getDistanceValue(String id1, String id2)
focal_class.full_signature: private double getDistanceValue(String id1, String id2)
focal_class.identifier: getDistanceValue
focal_class.modifiers: private
focal_class.parameters: (String id1, String id2)
focal_class.return: double
focal_class.signature: double getDistanceValue(String id1, String id2)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.getAngleValue(String id1, String id2, String id3)
focal_class.full_signature: public double getAngleValue(String id1, String id2, String id3)
focal_class.identifier: getAngleValue
focal_class.modifiers: public
focal_class.parameters: (String id1, String id2, String id3)
focal_class.return: double
focal_class.signature: double getAngleValue(String id1, String id2, String id3)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.makeStereocenter(Point3d atomA, IBond ax, Point3d atomB, Point3d atomC, Point3d[] branchPoints)
focal_class.full_signature: public int makeStereocenter(Point3d atomA, IBond ax, Point3d atomB, Point3d atomC, Point3d[] branchPoints)
focal_class.identifier: makeStereocenter
focal_class.modifiers: public
focal_class.parameters: (Point3d atomA, IBond ax, Point3d atomB, Point3d atomC, Point3d[] branchPoints)
focal_class.return: int
focal_class.signature: int makeStereocenter(Point3d atomA, IBond ax, Point3d atomB, Point3d atomC, Point3d[] branchPoints)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.getSpatproduct(Vector3d a, Vector3d b, Vector3d c)
focal_class.full_signature: public double getSpatproduct(Vector3d a, Vector3d b, Vector3d c)
focal_class.identifier: getSpatproduct
focal_class.modifiers: public
focal_class.parameters: (Vector3d a, Vector3d b, Vector3d c)
focal_class.return: double
focal_class.signature: double getSpatproduct(Vector3d a, Vector3d b, Vector3d c)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.getTorsionAngle(Point3d a, Point3d b, Point3d c, Point3d d)
focal_class.full_signature: public double getTorsionAngle(Point3d a, Point3d b, Point3d c, Point3d d)
focal_class.identifier: getTorsionAngle
focal_class.modifiers: public
focal_class.parameters: (Point3d a, Point3d b, Point3d c, Point3d d)
focal_class.return: double
focal_class.signature: double getTorsionAngle(Point3d a, Point3d b, Point3d c, Point3d d)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.getPlacedAtomsInAtomContainer(IAtom atom, IAtomContainer ac)
focal_class.full_signature: public IAtomContainer getPlacedAtomsInAtomContainer(IAtom atom, IAtomContainer ac)
focal_class.identifier: getPlacedAtomsInAtomContainer
focal_class.modifiers: public
focal_class.parameters: (IAtom atom, IAtomContainer ac)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer getPlacedAtomsInAtomContainer(IAtom atom, IAtomContainer ac)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.getUnsetAtomsInAtomContainer(IAtom atom, IAtomContainer ac)
focal_class.full_signature: public IAtomContainer getUnsetAtomsInAtomContainer(IAtom atom, IAtomContainer ac)
focal_class.identifier: getUnsetAtomsInAtomContainer
focal_class.modifiers: public
focal_class.parameters: (IAtom atom, IAtomContainer ac)
focal_class.return: IAtomContainer
focal_class.signature: IAtomContainer getUnsetAtomsInAtomContainer(IAtom atom, IAtomContainer ac)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.hasUnsetNeighbour(IAtom atom, IAtomContainer ac)
focal_class.full_signature: public boolean hasUnsetNeighbour(IAtom atom, IAtomContainer ac)
focal_class.identifier: hasUnsetNeighbour
focal_class.modifiers: public
focal_class.parameters: (IAtom atom, IAtomContainer ac)
focal_class.return: boolean
focal_class.signature: boolean hasUnsetNeighbour(IAtom atom, IAtomContainer ac)
focal_class.class_method_signature: AtomTetrahedralLigandPlacer3D.getPlacedHeavyAtomInAtomContainer(IAtom atomA, IAtom atomB, IAtomContainer ac)
focal_class.full_signature: public IAtom getPlacedHeavyAtomInAtomContainer(IAtom atomA, IAtom atomB, IAtomContainer ac)
focal_class.identifier: getPlacedHeavyAtomInAtomContainer
focal_class.modifiers: public
focal_class.parameters: (IAtom atomA, IAtom atomB, IAtomContainer ac)
focal_class.return: IAtom
focal_class.signature: IAtom getPlacedHeavyAtomInAtomContainer(IAtom atomA, IAtom atomB, IAtomContainer ac)
focal_method.body: public Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2) {
          Point3d point1 = atom1.getPoint3d();
          Double d1 = atom1.getCovalentRadius();
          Double d2 = atom2.getCovalentRadius();
          // in case we have no covalent radii, set to 1.0
          double distance = (d1 == null || d2 == null) ? 1.0 : d1 + d2;
          if (pSet != null) {
              distance = getDistanceValue(atom1.getAtomTypeName(), atom2.getAtomTypeName());
          }
          Vector3d vect = new Vector3d(point2);
          vect.sub(point1);
          vect.normalize();
          vect.scale(distance);
          Point3d newPoint = new Point3d(point1);
          newPoint.add(vect);
          return newPoint;
      }
focal_method.class_method_signature: AtomTetrahedralLigandPlacer3D.rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2)
focal_method.full_signature: public Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2)
focal_method.identifier: rescaleBondLength
focal_method.invocations: getPoint3d getCovalentRadius getCovalentRadius getDistanceValue getAtomTypeName getAtomTypeName sub normalize scale add
focal_method.modifiers: public
focal_method.parameters: (IAtom atom1, IAtom atom2, Point3d point2)
focal_method.return: Point3d
focal_method.signature: Point3d rescaleBondLength(IAtom atom1, IAtom atom2, Point3d point2)