EncoderUtils { public static String getTypeFromChainId(StructureDataInterface structureDataInterface, int chainInd) { for(int i=0; i<structureDataInterface.getNumEntities(); i++){ for(int chainIndex : structureDataInterface.getEntityChainIndexList(i)){ if(chainInd==chainIndex){ return structureDataInterface.getEntityType(i); } } } System.err.println("ERROR FINDING ENTITY FOR CHAIN: "+chainInd); return "NULL"; }  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 testGetEntityType() throws IOException, ParseException { StructureDataInterface structureDataInterface = getDefaultFullData(); assertEquals(EncoderUtils.getTypeFromChainId(structureDataInterface, 0), "polymer"); assertEquals(EncoderUtils.getTypeFromChainId(structureDataInterface, 1), "non-polymer"); assertEquals(EncoderUtils.getTypeFromChainId(structureDataInterface, 2), "non-polymer"); assertEquals(EncoderUtils.getTypeFromChainId(structureDataInterface, 3), "non-polymer"); assertEquals(EncoderUtils.getTypeFromChainId(structureDataInterface, 4), "non-polymer"); assertEquals(EncoderUtils.getTypeFromChainId(structureDataInterface, 5), "water"); }