Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Now all tests pass
  • Loading branch information
josemduarte committed Nov 12, 2019
commit 7c7caa274420e3399d4c969b0feb795979e6d71d
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,14 @@ private void formIntraResidueBonds() {
Atom b = getAtom(chemCompBond.getAtom_id_2(), group);
if ( a != null && b != null){

// if they are different altlocs there must be no bond
if (a.getAltLoc() != b.getAltLoc())
// if they are different altlocs (when different from the '.' case) there must be no bond
if (a.getAltLoc() != null && b.getAltLoc()!=null &&
a.getAltLoc()!=' ' && b.getAltLoc()!=' ' &&
a.getAltLoc() != b.getAltLoc()) {
logger.debug("Skipping bond between atoms with differently named alt locs {} (altLoc '{}') -- {} (altLoc '{}')",
a.toString(), a.getAltLoc(), b.toString(), b.getAltLoc());
continue;
}

int bondOrder = chemCompBond.getNumericalBondOrder();
logger.debug("Forming bond between atoms {}-{} and {}-{} with bond order {}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,8 @@ public void testBondsBetweenAltlocs() throws IOException {
for (Bond b : a.getBonds()) {
// if (b.getAtomA().getAltLoc() != b.getAtomB().getAltLoc()) {
// System.out.println(
// b.getAtomA().toString() + ":" + b.getAtomA().getAltLoc() + " --- " +
// b.getAtomB().toString() + ":" + b.getAtomB().getAltLoc());
// b.getAtomA().toString() + ": '" + b.getAtomA().getAltLoc() + "' --- " +
// b.getAtomB().toString() + ": '" + b.getAtomB().getAltLoc() + "'");
// }
// no bonds between atoms with different alt locs
assertEquals(b.getAtomA().toString() + " --- " + b.getAtomB().toString(),
Expand Down