OESplitSurfaceByAtomsΒΆ

bool OESplitSurfaceByAtoms(OESurface &newsurf,
                           const OESurface &surf,
                           const OEChem::OEMolBase &mol,
                           double maxDist = 4.0)
bool OESplitSurfaceByAtoms(OESurface &surf,
                           const OEChem::OEMolBase &mol,
                           double maxDist = 4.0)

Given an OESurface (surf) and the molecule it was constructed from (mol), this function will create a new version of the surface with triangles cleanly partitioned by atom boundaries. The vertices, triangles, and atom associations in the surface are all adjusted from the original surface to create the partitioning. With the first form of this function, the split surface will be returned in the newsurf surface object. With the second form, the input surface is modified in-place. The maxDist parameter specifies an upper limit for the expected distance from any vertex in the surface to its assigned atom. The default value is adequate for normal molecular and solvent-accessible surfaces. Using too small of a value will result in decreased performance.