private static Atom[] getCarbonAlpha(Structure structure) { List list = new ArrayList<>(); for (Chain chain : structure.getChains()) { for (Group group : chain.getAtomGroups()) { try { Atom atom = group.getAtom("CA"); list.add(atom); } catch (StructureException e) { System.err.println(e.getMessage()); } } } return list.toArray(new Atom[list.size()]); }