code: public static AtomContactSet getAtomsInContact(Chain chain1, Chain chain2,
  			String[] atomNames, double cutoff, boolean hetAtoms) {
  		Grid grid = new Grid(cutoff);
  		Atom[] atoms1 = null;
  		Atom[] atoms2 = null;
  		if (atomNames == null) {
  			atoms1 = getAllNonHAtomArray(chain1, hetAtoms);
  			atoms2 = getAllNonHAtomArray(chain2, hetAtoms);
  		} else {
  			atoms1 = getAtomArray(chain1, atomNames);
  			atoms2 = getAtomArray(chain2, atomNames);
  		}
  		grid.addAtoms(atoms1, atoms2);
  
  		return grid.getAtomContacts();
  	}
docs: Returns the set of inter-chain contacts between the two given chains for
  the given atom names. Uses a geometric hashing algorithm that speeds up
  the calculation without need of full distance matrix. The parsing mode
  {@link FileParsingParameters#setAlignSeqRes(boolean)} needs to be set to
  true for this to work.
  
  @param chain1
  @param chain2
  @param atomNames
  the array with atom names to be used. For Calphas use {"CA"},
  if null all non-H atoms will be used. Note HET atoms are
  ignored unless this parameter is null.
  @param cutoff
  @param hetAtoms
  if true HET atoms are included, if false they are not
  @return