public static void testgeometry(double n) { double[][] ap = p7(n); Matrix printer; printer = new Matrix(ap); printer.printdata(); Project01.get_distances(ap); }
public static double[][] p7(double L) { // start with the diamond, and then add an upside down tetrahedron attached to the top double A = Math.sqrt(3) / 3 * L; double B = Math.sqrt(6) / 3 * L; double[][] atom_positions = new double[][] { {-0.5 * A, 0.5 * L, 0}, // triangle 1 {0, 0, -B}, // bottom of diamond {-A, -0.5 * L, -B}, // lower outcrop {-0.5 * A, -0.5 * L, 0}, // triangle 3 {0, 0, B}, // top of diamond {A, 0, B}, // top outcrop {A, 0, 0} // triangle 2 }; atom_positions = new double[][] { {-1.6840236246, 1.0684294406, -0.7116624148}, {0.9085473330, -0.9868619425, -3.0525511272}, {-3.0480218864, -2.1601542407, -2.4227185692}, {-0.0788396616, -2.0510202515, 0.1632678720}, {-0.7874706794, 0.4530580514, 3.0710994550}, {2.7956298090, -1.6506873466, 2.8881018952}, {1.8641787099, 1.1562362891, 0.2244628890} }; Matrix apm = new Matrix(atom_positions); return apm.multiply(L).array; }
public static void testminimize(double n) { double[][] ap = p7(n); ap = minimize(ap); Matrix printer; printer = new Matrix(ap); printer.printdata(); Project01.get_distances(ap); System.out.println(get_potential(ap)); }