private static EntityInfo findNonPolyEntityWithDescription(String description, List<EntityInfo> nonPolyEntities) { for (EntityInfo e:nonPolyEntities) { if (e.getDescription().equals(description)) return e; } return null; }
/** String representation. * @return String representation of the Chain */ @Override public String toString(){ String newline = System.getProperty("line.separator"); StringBuilder str = new StringBuilder(); str.append("Chain asymId:").append(getChainID()).append(" authId:").append(getName()).append(newline); if ( entity != null ){ if ( entity.getDescription() != null){ str.append(entity.getDescription()).append(newline); } } str.append("total SEQRES length: ").append(getSeqResGroups().size()).append(" total ATOM length:") .append(getAtomLength()).append(" residues ").append(newline); return str.toString() ; }
String description = entityInfo.getDescription(); String type; if (entityInfo.getType()==null){
String molName = comp.getDescription(); if ( molName != null){ str.append(molName);
if (e.getChains().isEmpty()) { logger.info("Entity {} '{}' has no chains associated to it", e.getMolId()<0?"with no entity id":e.getMolId(), e.getDescription());
private void addEntities(StructAsym asym) { int eId = 0; try { eId = Integer.parseInt(asym.getEntity_id()); } catch (NumberFormatException e) { logger.warn("Could not parse mol_id from string {}. Will use 0 for creating Entity",asym.getEntity_id()); } Entity e = getEntity(eId); // for some mmCIF files like 1yrm all 3 of _entity_src_gen, _entity_src_nat and _pdbx_entity_src_syn are missing // we need to fill the Compounds in some other way: EntityInfo entityInfo = structure.getEntityById(eId); if (entityInfo==null) { //logger.info("Creating new EntityInfo " + eId + " " + e.getId() + " " + e.getPdbx_description()); entityInfo = new EntityInfo(); entityInfo.setMolId(eId); // we only add the compound if a polymeric one (to match what the PDB parser does) if (e!=null) { entityInfo.setDescription(e.getPdbx_description()); EntityType eType = EntityType.entityTypeFromString(e.getType()); if (eType!=null) { entityInfo.setType(eType); } else { logger.warn("Type '{}' is not recognised as a valid entity type for entity {}", e.getType(), eId); } addAncilliaryEntityData(asym, eId, e, entityInfo); structure.addEntityInfo(entityInfo); logger.debug("Adding Entity with entity id {} from _entity, with name: {}",eId, entityInfo.getDescription()); } } }
!c.getEntityInfo().getDescription().contains("SUGAR") ) {
+ " " + comp.getDescription());