AminoAcids { public static int[][] aaBondInfo() { if (aminoAcids == null) { createAAs(); } int[][] info = new int[153][4]; int counter = 0; int total = 0; for (int aa = 0; aa < aminoAcids.length; aa++) { AminoAcid acid = aminoAcids[aa]; LOGGER.debug("#bonds for ", acid.getProperty(RESIDUE_NAME).toString(), " = " + acid.getBondCount()); total += acid.getBondCount(); LOGGER.debug("total #bonds: ", total); Iterator<IBond> bonds = acid.bonds().iterator(); while (bonds.hasNext()) { IBond bond = (IBond) bonds.next(); info[counter][0] = counter; info[counter][1] = acid.indexOf(bond.getBegin()); info[counter][2] = acid.indexOf(bond.getEnd()); info[counter][3] = bond.getOrder().numeric(); counter++; } } if (counter > 153) { LOGGER.error("Error while creating AA info! Bond count is too large: ", counter); return null; } return info; }  static int[][] aaBondInfo(); synchronized static AminoAcid[] createAAs(); static Map<String, IAminoAcid> getHashMapBySingleCharCode(); static Map<String, IAminoAcid> getHashMapByThreeLetterCode(); static String convertThreeLetterCodeToOneLetterCode(String threeLetterCode); static String convertOneLetterCodeToThreeLetterCode(String oneLetterCode); final static String RESIDUE_NAME; final static String RESIDUE_NAME_SHORT; final static String NO_ATOMS; final static String NO_BONDS; final static String ID; }
@Test public void testCreateBondMatrix() { int[][] bonds = AminoAcids.aaBondInfo(); Assert.assertNotNull(bonds); }