code: private String printPDBConnections(){
  
  		StringBuilder str = new StringBuilder();
  
  		for (Chain c:structure.getChains()) {
  			for (Group g:c.getAtomGroups()) {
  				for (Atom a:g.getAtoms()) {
  					if (a.getBonds()!=null) {
  						for (Bond b:a.getBonds()) {				//7890123456789012345678901234567890123456789012345678901234567890
  							str.append(String.format("CONECT%5d%5d                                                                "+newline, b.getAtomA().getPDBserial(), b.getAtomB().getPDBserial()));
  						}
  					}
  				}
  			}
  		}
  
  		return str.toString();
  	}
docs: Prints the connections in PDB style
  
  Rewritten since 5.0 to use {@link Bond}s
  Will produce strictly one CONECT record per bond (won't group several bonds in one line)