public void addChain(Chain c) { EntityInfo info = c.getEntityInfo(); if ( info == null || info.getType() == null) { logger.info("No entity info could be found while adding chain with asym id {} (author id {}). Will consider it a polymer chain.", c.getId(), c.getName()); polyChains.add(c); } else if ( info.getType() == EntityType.POLYMER) { polyChains.add(c); } else if (info.getType() == EntityType.NONPOLYMER) { nonPolyChains.add(c); } else if (info.getType() == EntityType.WATER) { waterChains.add(c); } else if (info.getType() == EntityType.MACROLIDE) { logger.warn("Chain with asym id {} (author id {}) has entity type 'macrolide', considering it non-polymeric", c.getId(), c.getName()); nonPolyChains.add(c); } else { logger.warn("Chain with asym id {} (author id {}) has unsupported entity type '{}'. Will not add it to the Structure.", c.getId(), c.getName(), info.getType().toString()); // ignore it } }
@Override public EntityType getEntityType() { if (getEntityInfo()==null) return null; return getEntityInfo().getType(); }
str.append(molName); String type = comp.getType().toString(); str.append(" (") .append(type)