code: public static Chain getRepresentativeAtomsOnly(Chain chain){
  
  		Chain newChain = new ChainImpl();
  		newChain.setId(chain.getId());
  		newChain.setName(chain.getName());
  		newChain.setEntityInfo(chain.getEntityInfo());
  		newChain.setSwissprotId(chain.getSwissprotId());
  
  		List<Group> groups = chain.getAtomGroups();
  
  		grouploop:
  			for (Group g: groups){
  				List<Atom> atoms = g.getAtoms();
  
  				if ( ! (g instanceof AminoAcid))
  					continue;
  
  				for (Atom a : atoms){
  
  					if ( a.getName().equals(StructureTools.CA_ATOM_NAME) && a.getElement()==Element.C){
  						// we got a CA atom in this group!
  						AminoAcid n = new AminoAcidImpl();
  						n.setPDBName(g.getPDBName());
  						n.setResidueNumber(g.getResidueNumber());
  						n.addAtom(a);
  						newChain.addGroup(n);
  						continue grouploop;
  
  					}
  				}
  
  			}
  		return newChain;
  	}
docs: Convert a Chain to a new Chain containing C-alpha atoms only.
  
  @param chain to convert
  @return a new chain containing Amino acids with C-alpha only.
  @since Biojava 4.1.0