EncoderUtils { public static Group[] generateGroupList(StructureDataInterface structureDataInterface) { int[] groupTypeIndices = structureDataInterface.getGroupTypeIndices(); if(groupTypeIndices.length==0){ return new Group[0]; } int maxIndex = Arrays.stream(groupTypeIndices).max().getAsInt(); Group[] outGroupList = new Group[maxIndex+1]; for (int i=0; i<maxIndex+1; i++) { Group pdbGroup = new Group(); pdbGroup.setFormalChargeList(structureDataInterface.getGroupAtomCharges(i)); pdbGroup.setAtomNameList(structureDataInterface.getGroupAtomNames(i)); pdbGroup.setBondAtomList(structureDataInterface.getGroupBondIndices(i)); pdbGroup.setBondOrderList(structureDataInterface.getGroupBondOrders(i)); pdbGroup.setChemCompType(structureDataInterface.getGroupChemCompType(i)); pdbGroup.setElementList(structureDataInterface.getGroupElementNames(i)); pdbGroup.setGroupName(structureDataInterface.getGroupName(i)); pdbGroup.setSingleLetterCode(structureDataInterface.getGroupSingleLetterCode(i)); outGroupList[i] = pdbGroup; } return outGroupList; }  static Group[] generateGroupList(StructureDataInterface structureDataInterface); static List<BioAssemblyData> generateBioassemblies(StructureDataInterface structureDataInterface); static Entity[] generateEntityList(StructureDataInterface structureDataInterface); static String getTypeFromChainId(StructureDataInterface structureDataInterface, int chainInd); static byte[] encodeByteArr(FloatCodecs inputCodec, float[] inputData, int param); static byte[] encodeByteArr(IntCodecs inputCodec, int[] inputData, int param); static byte[] encodeByteArr(CharCodecs inputCodec, char[] inputData, int param); static byte[] encodeByteArr(StringCodecs inputCodec, String[] inputData, int param); static void transferBioassembly(StructureDataInterface structureDataInterface,
			AdapterToStructureData adapterToStructureData); static final int NULL_PARAM; }
@Test public void testGenerateGroupMap() throws IOException, ParseException { StructureDataInterface structureDataInterface = getDefaultFullData(); Group[] groupList = EncoderUtils.generateGroupList(structureDataInterface); assertEquals(groupList.length, 29); }