/** * Get NIPROT IDs from PDB structure */ Map<String, String> chainUniprotIds(Structure pdbStruct) { Map<String, String> chain2uniproId = new HashMap<String, String>(); for (DBRef dbref : pdbStruct.getDBRefs()) { if (debug) Gpr.debug("PDB_DBREF\tchain:" + dbref.getChainName() + "\tdb: " + dbref.getDatabase() + "\tID: " + dbref.getDbAccession()); if (dbref.getDatabase().equals(UNIPROT_DATABASE)) chain2uniproId.put(dbref.getChainName(), dbref.getDbAccession()); } return chain2uniproId; }
for (DBRef dbref : structure.getDBRefs()){ dbref.toPDB(str); str.append(newline);
r.setIdbnsEnd(db_end_in_code); List<DBRef> dbrefs = structure.getDBRefs(); if ( dbrefs == null) dbrefs = new ArrayList<DBRef>();
newS.setName(s.getName()); newS.setSSBonds(s.getSSBonds()); newS.setDBRefs(s.getDBRefs()); newS.setSites(s.getSites()); newS.setBiologicalAssembly(s.isBiologicalAssembly());
/** * Remove all models from a Structure and keep only the first * * @param s * original Structure * @return a structure that contains only the first model * @since 3.0.5 */ public static Structure removeModels(Structure s) { if (s.nrModels() == 1) return s; Structure n = new StructureImpl(); // go through whole substructure and clone ... // copy structure data n.setPDBCode(s.getPDBCode()); n.setName(s.getName()); // TODO: do deep copying of data! n.setPDBHeader(s.getPDBHeader()); n.setDBRefs(s.getDBRefs()); n.setSites(s.getSites()); n.setChains(s.getModel(0)); return n; }
newS.setPDBHeader(s.getPDBHeader()); newS.setName(this.toString()); newS.setDBRefs(s.getDBRefs()); newS.setBiologicalAssembly(s.isBiologicalAssembly()); newS.getPDBHeader().setDescription(