public void formLinkRecordBond ( LinkRecord linkRecord ) { // only work with atoms that aren't alternate locations if ( linkRecord . getAltLoc1 ( ) . equals ( " " ) || linkRecord . getAltLoc2 ( ) . equals ( " " ) ) return ; try { 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 ( ) , linkRecord . getiCode2 ( ) ) ; 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 ) ) ) { new BondImpl ( a . get ( i ) , b . get ( i ) , 1 ) ; } } } } catch ( StructureException e ) { // Note, in Calpha only mode the link atoms may not be present. if ( ! params . isParseCAOnly ( ) ) { logger . warn ( "Could not find atoms specified in LINK record: {}" , linkRecord . toString ( ) ) ; } else { logger . debug ( "Could not find atoms specified in LINK record while parsing in parseCAonly mode." ) ; } } }
Creates bond objects from a LinkRecord as parsed from a PDB file