@Override public void setEntityInfo(int[] chainIndices, String sequence, String description, String type) { // First get the chains EntityInfo entityInfo = new EntityInfo(); entityInfo.setDescription(description); entityInfo.setType(EntityType.entityTypeFromString(type)); List<Chain> chains = new ArrayList<>(); // Now loop through the chain ids and make a list of them for( int index : chainIndices) { chains.add(chainList.get(index)); chainList.get(index).setEntityInfo(entityInfo); chainSequenceMap.put(chainList.get(index).getId(), sequence); } entityInfo.setChains(chains); entityInfoList.add(entityInfo); }
for (Chain chain:matchingChains) { comp.addChain(chain); chain.setEntityInfo(comp);
c.setEntityInfo(nonPolyEntity); for (Chain waterChain:model) { waterEntity.addChain(waterChain); waterChain.setEntityInfo(waterEntity);
entityInfo.setType(EntityType.NONPOLYMER); chain.setEntityInfo(entityInfo); structure.addEntityInfo(entityInfo); } else { chain.getId(), chain.getName(), eId); entityInfo.addChain(chain); chain.setEntityInfo(entityInfo);
ent.setMolId(molId++); ent.setType(EntityType.POLYMER); c1.setEntityInfo(ent); c2.setEntityInfo(ent); chainIds2entities.put(c1.getId(), ent); chainIds2entities.put(c2.getId(), ent); ent = chainIds2entities.get(c2.getId()); ent.addChain(c1); c1.setEntityInfo(ent); chainIds2entities.put(c1.getId(), ent); logger.debug("Adding chain {} to entity {}",c2.getId(),c1.getId()); ent.addChain(c2); c2.setEntityInfo(ent); chainIds2entities.put(c2.getId(), ent); ent.setMolId(molId++); ent.setType(EntityType.POLYMER); c.setEntityInfo(ent); for (Chain chain : polyModels.get(i)) { EntityInfo e = chainIds2entities.get(chain.getId()); chain.setEntityInfo(e); e.addChain(chain);
continue; newChain.setEntityInfo(newEntityInfo); newEntityInfo.addChain(newChain);
newChain.setId(chain.getId()); newChain.setName(chain.getName()); newChain.setEntityInfo(chain.getEntityInfo()); structure.addChain(newChain); } else {
if (currentChain == null || !currentChain.getId().equals(chain.getId())) { structure.addChain(chain); chain.setEntityInfo(group.getChain().getEntityInfo()); chain.setStructure(structure); chain.setSwissprotId(group.getChain().getSwissprotId());
newChain.setId(chain.getId()); newChain.setName(chain.getName()); newChain.setEntityInfo(chain.getEntityInfo()); newChain.setSwissprotId(chain.getSwissprotId());
chain.setEntityInfo(newEntityInfo);
c1.setId(c.getId()); c1.setName(c.getName()); c1.setEntityInfo(c.getEntityInfo()); s.addChain(c1);