public double imposeForces() {
		double[] forces = new double[DIMENSIONS];
		sumError = 0.0;
		for (int j = 0; j < numberOfTerms; j++) {
			Term term = terms.get(identifiers[j]);
			Arrays.fill(forces, 0);                 //initialize result
			double[] coord = term.getPosition();    //get coords for distance
			int arrayIndex = term.getArray();       //get array index
			double theta[] = new double[DIMENSIONS];
			double cosTheta;
			double sinTheta;
			double sumRate = 0;
			for (int i = 0; i < numberOfTerms; i++) {   //loop through terms
				if (i != arrayIndex && field.getDataPresent(arrayIndex, i)) {
					Term otherTerm = terms.get(identifiers[i]);
					double[] otherCoord = otherTerm.getPosition();
					double[] delta = new double[DIMENSIONS];
					double distance = 0;
					for (int k = 0; k < DIMENSIONS; k++) {
						delta[k] = otherCoord[k] - coord[k];
						distance += Math.pow(delta[k], 2);
					}
					distance = Math.sqrt(distance);
					for (int k = 0; k < DIMENSIONS; k++) {
						if (Math.abs(distance) < 0.0005) {
							theta[k] = 1 / Math.sqrt(2); //default if coincident
						} else {
							theta[k] = delta[k] / distance;
						}
					}
					double difference = (Math.abs(distance) - field.getIdealDist(
					arrayIndex, i)) / 2;
					sumError += Math.abs(difference);   //accumulator of error
					double forceRate = field.getForceRate(arrayIndex, i);
					sumRate += Math.log10(forceRate);
					double[] dif = new double[DIMENSIONS];
					for (int k = 0; k < DIMENSIONS; k++) {
						dif[k] = difference * theta[k];
						forces[k] += dif[k] / forceRate;    //spring constant
					}
				}
			}
			sumRate = sumRate / (numberOfTerms - 1);
			sumRate = Math.pow(10, sumRate);
			double friction = Math.sqrt(numberOfTerms / sumRate);
			term.imposeForce(forces, friction);
		}
		//System.out.println(sumError);
		return sumError;
	}