@Override public Group getAltLocGroup(Character altLoc) { Atom a = getAtom(0); if ( a == null) { return null; } // maybe the alt loc group in question is myself if (a.getAltLoc().equals(altLoc)) { return this; } if (altLocs == null || altLocs.isEmpty()) return null; for (Group group : altLocs) { if (group.getAtoms().isEmpty()) continue; // determine this group's alt-loc character code by looking // at its first atom's alt-loc character Atom b = group.getAtom(0); if ( b == null) continue; if (b.getAltLoc().equals(altLoc)) { return group; } } return null; }
String fullName = formatAtomName(a); Character altLoc = a.getAltLoc(); if ( altLoc == null) altLoc = ' ';
/** * {@inheritDoc} */ @Override public void addAtom(Atom atom){ atom.setGroup(this); atoms.add(atom); // TODO this check is useless, coords are always !=null since they are initialized to 0,0,0 in AtomImpl constructor. We need to review this - JD 2016-09-14 if (atom.getCoordsAsPoint3d() != null){ // we have got coordinates! setPDBFlag(true); } if (atomNameLookup != null){ Atom existingAtom = atomNameLookup.put(atom.getName(), atom); // if an atom with same name is added to the group that has to be some kind of problem, // we need to warn properly if (existingAtom != null) { String altLocStr = ""; char altLoc = atom.getAltLoc(); if (altLoc != ' ') altLocStr = "(alt loc '" + altLoc + "')"; logger.warn("An atom with name " + atom.getName() + " " + altLocStr + " is already present in group: " + this.toString() + ". The atom with serial " + atom.getPDBserial() + " will be ignored in look-ups."); } } };
if (a1.getAltLoc().equals(altLoc)) { return group; }
Character altLoc = a.getAltLoc() ; String altLocStr; if (altLoc==null || altLoc == ' ') {