/** Convert a List of chain objects to another List of chains, containing Representative atoms only. * * @param chains list of chains * @return a list of chains * @since Biojava 4.1.0 */ public static List<Chain> getRepresentativeAtomsOnly(List<Chain> chains){ List<Chain> newChains = new ArrayList<Chain>(); for (Chain chain : chains){ Chain newChain = getRepresentativeAtomsOnly(chain); newChains.add(newChain); } return newChains; }
private void switchCAOnly(){ parseCAonly = true; currentModel = CAConverter.getRepresentativeAtomsOnly(currentModel); for ( int i =0; i< structure.nrModels() ; i++){ // iterate over all known models ... List<Chain> model = structure.getModel(i); model = CAConverter.getRepresentativeAtomsOnly(model); structure.setModel(i,model); } currentChain = CAConverter.getRepresentativeAtomsOnly(currentChain); }