Get the angle between the three pharmacophore groups that make up the constraint.

@return The angle in degrees between the two groups
2425
public double getBondLength() {
        double epsilon = 1e-3;
        PharmacophoreAtom atom1 = (PharmacophoreAtom) getAtom(0);
        PharmacophoreAtom atom2 = (PharmacophoreAtom) getAtom(1);
        PharmacophoreAtom atom3 = (PharmacophoreAtom) getAtom(2);

        double a2 = atom3.getPoint3d().distanceSquared(atom1.getPoint3d());
        double b2 = atom3.getPoint3d().distanceSquared(atom2.getPoint3d());
        double c2 = atom2.getPoint3d().distanceSquared(atom1.getPoint3d());

        double cosangle = (b2 + c2 - a2) / (2 * Math.sqrt(b2) * Math.sqrt(c2));
        if (-1.0 - epsilon < cosangle && -1.0 + epsilon > cosangle) return 180.0;
        if (1.0 - epsilon < cosangle && 1.0 + epsilon > cosangle) return 0.0;

        return Math.acos(cosangle) * 180.0 / Math.PI;
    }
591573
def angle(self, vector):
        """"""
        return math.degrees(
            math.acos(
                self.dot(vector) /
                (self.magnitude() * vector.magnitude())
            )
        )
1260623
def pmt_angles(self):
        """"""
        if self._pmt_angles == []:
            mask = (self.pmts.du == 1) & (self.pmts.floor == 1)
            self._pmt_angles = self.pmts.dir[mask]
        return self._pmt_angles
256925
def angles( self ):
        
        ( a, b, c ) = [ row for row in self.matrix ]
        return [ angle( b, c ), angle( a, c ), angle( a, b ) ]
602634
public static int getNumBondsInGroup(List<Atom> atomsInGroup) {
		int bondCounter = 0;
		for(Atom atom : atomsInGroup) {
			if(atom.getBonds()==null){
				continue;
			}
			for(Bond bond : atom.getBonds()) {
				// Now set the bonding information.
				Atom other = bond.getOther(atom);
				// If both atoms are in the group
				if (atomsInGroup.indexOf(other)!=-1){
					Integer firstBondIndex = atomsInGroup.indexOf(atom);
					Integer secondBondIndex = atomsInGroup.indexOf(other);
					// Don't add the same bond twice
					if (firstBondIndex<secondBondIndex){
						bondCounter++;
					}
				}
			}
		}
		return bondCounter;
	}
151394
def get_full_angles(self):
        
        if (self.sun_azi is not None and self.sun_zen is not None and
                self.sat_azi is not None and self.sat_zen is not None):
            return self.sun_azi, self.sun_zen, self.sat_azi, self.sat_zen

        self.sun_azi, self.sun_zen, self.sat_azi, self.sat_zen = self._get_full_angles()
        self.sun_azi = da.from_delayed(self.sun_azi, dtype=self["ANGULAR_RELATIONS"].dtype,
                                       shape=(self.scanlines, self.pixels))
        self.sun_zen = da.from_delayed(self.sun_zen, dtype=self["ANGULAR_RELATIONS"].dtype,
                                       shape=(self.scanlines, self.pixels))
        self.sat_azi = da.from_delayed(self.sat_azi, dtype=self["ANGULAR_RELATIONS"].dtype,
                                       shape=(self.scanlines, self.pixels))
        self.sat_zen = da.from_delayed(self.sat_zen, dtype=self["ANGULAR_RELATIONS"].dtype,
                                       shape=(self.scanlines, self.pixels))
        return self.sun_azi, self.sun_zen, self.sat_azi, self.sat_zen
931882
@Pure
	public final Vector3f getAxis() {
		double mag = this.x*this.x + this.y*this.y + this.z*this.z;  

		if ( mag > EPS ) {
			mag = Math.sqrt(mag);
			double invMag = 1f/mag;

			return new Vector3f(
					this.x*invMag,
					this.y*invMag,
					this.z*invMag);
		}
		return new Vector3f(0f, 0f, 1f);
	}
868944
public double getAngleValue(String id1, String id2, String id3) {
        String akey = "";
        if (pSet.containsKey(("angle" + id1 + ";" + id2 + ";" + id3))) {
            akey = "angle" + id1 + ";" + id2 + ";" + id3;
        } else if (pSet.containsKey(("angle" + id3 + ";" + id2 + ";" + id1))) {
            akey = "angle" + id3 + ";" + id2 + ";" + id1;
        } else if (pSet.containsKey(("angle" + id2 + ";" + id1 + ";" + id3))) {
            akey = "angle" + id2 + ";" + id1 + ";" + id3;
        } else if (pSet.containsKey(("angle" + id1 + ";" + id3 + ";" + id2))) {
            akey = "angle" + id1 + ";" + id3 + ";" + id2;
        } else if (pSet.containsKey(("angle" + id3 + ";" + id1 + ";" + id2))) {
            akey = "angle" + id3 + ";" + id1 + ";" + id2;
        } else if (pSet.containsKey(("angle" + id2 + ";" + id3 + ";" + id1))) {
            akey = "angle" + id2 + ";" + id3 + ";" + id1;
        } else {
            System.out.println("AngleKEYError:Unknown angle " + id1 + " " + id2 + " " + id3 + " take default angle:"
                    + TETRAHEDRAL_ANGLE);
            return TETRAHEDRAL_ANGLE;
        }
        return ((Double) (((List) pSet.get(akey)).get(0))).doubleValue();
    }
1061954
public double alignOrientation(double baseOrientation, double orientation) {
        double resultOrientation;
        if (baseOrientation >= 0) {
            if (orientation < -Math.PI + baseOrientation)
                resultOrientation = orientation + 2 * Math.PI;
            else
                resultOrientation = orientation;

        } else if (orientation > +Math.PI + baseOrientation)
            resultOrientation = orientation - 2 * Math.PI;
        else
            resultOrientation = orientation;
        return resultOrientation;
    }
843068
public int getArgmaxConfigId() {
        int argmax = -1;
        double max = s.minValue();
        for (int c = 0; c < this.values.length; c++) {
            if (s.gte(values[c], max)) {
                max = values[c];
                argmax = c;
            }
        }
        return argmax;
    }
1174622
public static double getAngle(AFPChain afpChain, Atom[] ca1, Atom[] ca2) {
		Matrix rotation = afpChain.getBlockRotationMatrix()[0];
		return Math.acos(rotation.trace() - 1) * 180 / Math.PI;
	}
247627
public Coordinate[] getPositions() {
		ArrayList<Coordinate> ret = new ArrayList<Coordinate>();
		for (PoseSteering ps : psa) {
			ret.add(ps.getPose().getPosition());
		}
		return ret.toArray(new Coordinate[ret.size()]);
	}
1036557
public float[] getRotation() {
        float[] _rotation = {this.rotation.angle, this.rotation.x, this.rotation.y, this.rotation.z};
        return _rotation;
    }
333700
private void calculateHBonds() {
		/**
		 * More efficient method for calculating C-Alpha pairs
		 */
		if (groups.length < 5) return;
		Iterator<AtomContact> otu = contactSet.iterator();
		while(otu.hasNext()){
			AtomContact ac = otu.next();
			Pair<Atom> pair = ac.getPair();
			Group g1 = pair.getFirst().getGroup();
			Group g2 = pair.getSecond().getGroup();
			// Now I need to get the index of the Group in the list groups
			int i = indResMap.get(g1.getResidueNumber());
			int j = indResMap.get(g2.getResidueNumber());
			// Now check this
			checkAddHBond(i,j);
			//"backwards" hbonds are not allowed
			if (j!=(i+1)) checkAddHBond(j,i);
		}
	}
1085387
public double getTorsionAngle(Point3d a, Point3d b, Point3d c, Point3d d) {
        Vector3d ab = new Vector3d(a.x - b.x, a.y - b.y, a.z - b.z);
        Vector3d cb = new Vector3d(c.x - b.x, c.y - b.y, c.z - b.z);
        Vector3d dc = new Vector3d(d.x - c.x, d.y - c.y, d.z - c.z);
        Vector3d bc = new Vector3d(b.x - c.x, b.y - c.y, b.z - c.z);
        Vector3d n1 = new Vector3d();
        Vector3d n2 = new Vector3d();

        n1.cross(ab, cb);
        if (getSpatproduct(ab, cb, n1) > 0) {
            n1.cross(cb, ab);
        }
        n1.normalize();
        n2.cross(dc, bc);
        if (getSpatproduct(dc, bc, n2) < 0) {
            n2.cross(bc, dc);
        }
        n2.normalize();
        return n1.dot(n2);
    }
330208
def packing_angle(self):
        
        try:
            knob_vector = self.knob_residue['CB'] - self.knob_residue['CA']
        # exception for GLY residues (with no CB atom).
        except KeyError:
            return None
        hole_vector = self.hole_residues[2]['CA'] - self.hole_residues[1]['CA']
        return angle_between_vectors(knob_vector, hole_vector)
741758
@Override
	public  Point3d[] getVertices() {
		double x = getSideLengthFromCircumscribedRadius(circumscribedRadius)/2;
		double z = x/Math.sqrt(2);
		Point3d[] tetrahedron = new Point3d[4];
		tetrahedron[0] = new Point3d(-x,  0, -z);
		tetrahedron[1] = new Point3d( x,  0, -z);
		tetrahedron[2] = new Point3d( 0, -x,  z);
		tetrahedron[3] = new Point3d( 0,  x,  z);
		Point3d centroid = CalcPoint.centroid(tetrahedron);

		// rotate tetrahedron to align one vertex with the +z axis
		Matrix3d m = new Matrix3d();
		m.rotX(0.5 * TETRAHEDRAL_ANGLE);
		for (Point3d p: tetrahedron) {
			p.sub(centroid);
			m.transform(p);
		}
		return tetrahedron;
	}