current_compound = new EntityInfo(); } else { current_compound = entities.get(0);
@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); }
current_compound = new EntityInfo();
nonPolyEntity = new EntityInfo(); nonPolyEntity.setDescription(molecPdbName); nonPolyEntity.setType(EntityType.NONPOLYMER); EntityInfo waterEntity = new EntityInfo(); waterEntity.setType(EntityType.WATER); waterEntity.setDescription("water");
entityInfo = new EntityInfo(); entityInfo.setMolId(eId); entityInfo.addChain(chain);
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()); } } }
logger.debug("Creating Compound with chains {},{}",c1.getId(),c2.getId()); EntityInfo ent = new EntityInfo(); ent.addChain(c1); ent.addChain(c2); logger.debug("Creating a 1-member Compound for chain {}",c.getId()); EntityInfo ent = new EntityInfo(); ent.addChain(c); ent.setMolId(molId++);
EntityInfo newEntityInfo = new EntityInfo(entityInfo); // this sets everything but the chains for (String asymId:entityInfo.getChainIds()) {
newEntityInfo = new EntityInfo(); s.addEntityInfo(newEntityInfo); } else { newEntityInfo = s.getEntityById(oldEntityInfo.getMolId()); if( newEntityInfo == null ) { newEntityInfo = new EntityInfo(oldEntityInfo); s.addEntityInfo(newEntityInfo);