code: private void initContactSet() {
  
  		// Initialise an array of atoms
  		atoms = new Atom[groups.length];
  		// Remake this local var
  		indResMap = new HashMap<>();
  		for (int i=0 ; i < groups.length ; i++){
  			SecStrucGroup one = groups[i];
  			indResMap.put(one.getResidueNumber(), i);
  			atoms[i] = one.getCA();
  		}
  		Grid grid = new Grid(CA_MIN_DIST);
  		if(atoms.length==0){
  			contactSet = new AtomContactSet(CA_MIN_DIST);
  		}
  		else{
  			grid.addAtoms(atoms);
  			contactSet = grid.getAtomContacts();
  		}
  	}
docs: Function to generate the contact sets