@@ -0,0 +1,1354 @@
+package org.biojava.nbio.structure.geometry;%0A%0Aimport javax.vecmath.Matrix4d;%0Aimport javax.vecmath.Point3d;%0A%0A/**%0A * The SuperPositionAbstract contains common code shared by all SuperPosition%0A * algorithm implementations.%0A * %0A * @author Aleix Lafita%0A * @since 5.0.0%0A *%0A */%0Apublic abstract class SuperPositionAbstract implements SuperPosition %7B%0A%0A%09protected boolean centered;%0A%0A%09public SuperPositionAbstract(boolean centered) %7B%0A%09%09this.centered = centered;%0A%09%7D%0A%0A%09@Override%0A%09public Matrix4d superposeAndTransform(Point3d%5B%5D fixed, Point3d%5B%5D moved) %7B%0A%09%09Matrix4d rotTrans = superpose(fixed, moved);%0A%09%09CalcPoint.transform(rotTrans, moved);%0A%09%09return rotTrans;%0A%09%7D%0A%0A%09/**%0A%09 * Check that the input to the superposition algorithms is valid.%0A%09 * %0A%09 * @param fixed%0A%09 * @param moved%0A%09 */%0A%09protected void checkInput(Point3d%5B%5D fixed, Point3d%5B%5D moved) %7B%0A%09%09if (fixed.length != moved.length)%0A%09%09%09throw new IllegalArgumentException(%0A%09%09%09%09%09%22Point arrays to superpose are of different lengths.%22);%0A%09%7D%0A%0A%09/**%0A%09 * @return true if the point arrays are centered at the origin (faster),%0A%09 *         false otherwise%0A%09 */%0A%09public boolean getCentered() %7B%0A%09%09return centered;%0A%09%7D%0A%0A%09/**%0A%09 * @param centered%0A%09 *            true if the point arrays are centered at the origin (faster),%0A%09 *            false otherwise%0A%09 */%0A%09public void setCentered(boolean centered) %7B%0A%09%09this.centered = centered;%0A%09%7D%0A%0A%7D%0A

Create the SuperPosition interface and abstract class #558