NumericalSurface { public Map<IAtom, List<Point3d>> getAtomSurfaceMap() { Map<IAtom,List<Point3d>> map = new HashMap<>(); for (int i = 0; i < this.surfPoints.length; i++) { if (!this.surfPoints[i].isEmpty()) map.put(this.atoms[i], Collections.unmodifiableList(this.surfPoints[i])); } return map; } NumericalSurface(IAtomContainer atomContainer);  NumericalSurface(IAtomContainer atomContainer, double solventRadius, int tesslevel); @Deprecated void calculateSurface(); Point3d[] getAllSurfacePoints(); Map<IAtom, List<Point3d>> getAtomSurfaceMap(); Point3d[] getSurfacePoints(int atomIdx); double getSurfaceArea(int atomIdx); double[] getAllSurfaceAreas(); double getTotalSurfaceArea();  }
@Test public void testCranbinSurface() throws Exception { IChemObjectBuilder bldr = SilentChemObjectBuilder.getInstance(); IChemFile chemFile; String path = "/data/pdb/1CRN.pdb"; try (InputStream in = getClass().getResourceAsStream(path); PDBReader pdbr = new PDBReader(in)) { chemFile = pdbr.read(bldr.newInstance(IChemFile.class)); } IAtomContainer mol = ChemFileManipulator.getAllAtomContainers(chemFile).get(0); NumericalSurface surface = new NumericalSurface(mol); Map<IAtom, List<Point3d>> map = surface.getAtomSurfaceMap(); assertThat(map.size(), CoreMatchers.is(222)); assertThat(mol.getAtomCount(), CoreMatchers.is(327)); }