/** * Handles creation of all bonds. Looks at LINK records, SSBOND (Disulfide * bonds), peptide bonds, and intra-residue bonds. * <p> * Note: the current implementation only looks at the first model of each * structure. This may need to be fixed in the future. */ private void formBonds() { BondMaker maker = new BondMaker(structure, params); // LINK records should be preserved, they are the way that // inter-residue bonds are created for ligands such as trisaccharides, unusual polymers. // The analogy in mmCIF is the _struct_conn record. for (LinkRecord linkRecord : linkRecords) { maker.formLinkRecordBond(linkRecord); } maker.formDisulfideBonds(ssbonds); maker.makeBonds(); }
private void addBonds() { BondMaker maker = new BondMaker(structure, params); maker.makeBonds(); maker.formBondsFromStructConn(structConn); }
/** * Creates disulfide bond objects and references in the corresponding Atoms objects, given * a list of {@link SSBondImpl}s parsed from a PDB/mmCIF file. * @param disulfideBonds */ public void formDisulfideBonds(List<SSBondImpl> disulfideBonds) { for (SSBondImpl disulfideBond : disulfideBonds) { formDisulfideBond(disulfideBond); } }
/** * Creates bond objects and corresponding references in Atom objects: * <li> * peptide bonds: inferred from sequence and distances * </li> * <li> * nucleotide bonds: inferred from sequence and distances * </li> * <li> * intra-group (residue) bonds: read from the chemical component dictionary, via {@link ChemCompProvider} * </li> */ public void makeBonds() { logger.debug("Going to start making bonds"); formPeptideBonds(); formNucleotideBonds(); formIntraResidueBonds(); trimBondLists(); }
private void formDisulfideBond(SSBondImpl disulfideBond) { try { Map<Integer, Atom> a = getAtomFromRecord("SG", "", "CYS", disulfideBond.getChainID1(), disulfideBond.getResnum1(), disulfideBond.getInsCode1()); Map<Integer, Atom> b = getAtomFromRecord("SG", "", "CYS", disulfideBond.getChainID2(), disulfideBond.getResnum2(), disulfideBond.getInsCode2()); for(int i=0; i<structure.nrModels(); i++){ if(a.containsKey(i) && b.containsKey(i)){ // TODO determine what the actual bond order of this bond is; for // now, we're assuming they're single bonds if(!a.get(i).equals(b.get(i))){ Bond ssbond = new BondImpl(a.get(i), b.get(i), 1); structure.addSSBond(ssbond); } } } } catch (StructureException e) { // Note, in Calpha only mode the CYS SG's are not present. if (! params.isParseCAOnly()) { logger.warn("Could not find atoms specified in SSBOND record: {}",disulfideBond.toString()); } else { logger.debug("Could not find atoms specified in SSBOND record while parsing in parseCAonly mode."); } } }
Map<Integer, Atom> a = getAtomFromRecord(linkRecord.getName1(), linkRecord.getAltLoc1(), linkRecord.getResName1(), linkRecord.getChainID1(), linkRecord.getResSeq1(), linkRecord.getiCode1()); Map<Integer, Atom> b = getAtomFromRecord(linkRecord.getName2(), linkRecord.getAltLoc2(), linkRecord.getResName2(), linkRecord.getChainID2(), linkRecord.getResSeq2(),
a1 = getAtomFromRecord(atomName1, altLoc1, resName1, chainId1, seqId1, insCode1); a2 = getAtomFromRecord(atomName2, altLoc2, resName2, chainId2, seqId2, insCode2); } catch (StructureException e) {