Esempio n. 1
0
        private static double getAngle(IAtom atom1, IAtom atom2, IAtom atom3)
        {

            Vector3d centerAtom = new Vector3d();
            centerAtom.x = atom1.X3d;
            centerAtom.y = atom1.Y3d;
            centerAtom.z = atom1.Z3d;
            Vector3d firstAtom = new Vector3d();
            Vector3d secondAtom = new Vector3d();

            firstAtom.x = atom2.X3d;
            firstAtom.y = atom2.Y3d;
            firstAtom.z = atom2.Z3d;

            secondAtom.x = atom3.X3d;
            secondAtom.y = atom3.Y3d;
            secondAtom.z = atom3.Z3d;

            firstAtom.sub(centerAtom);
            secondAtom.sub(centerAtom);

            return firstAtom.angle(secondAtom);
        }
 /// <cdk.dictref>   blue-obelisk:convertCartesianIntoNotionalCoordinates </cdk.dictref>
 public static double[] cartesianToNotional(Vector3d aAxis, Vector3d bAxis, Vector3d cAxis)
 {
     double[] notionalCoords = new double[6];
     notionalCoords[0] = aAxis.length();
     notionalCoords[1] = bAxis.length();
     notionalCoords[2] = cAxis.length();
     notionalCoords[3] = bAxis.angle(cAxis) * 180.0 / System.Math.PI;
     notionalCoords[4] = aAxis.angle(cAxis) * 180.0 / System.Math.PI;
     notionalCoords[5] = aAxis.angle(bAxis) * 180.0 / System.Math.PI;
     return notionalCoords;
 }