Message de Rajarshi Guha <rajarshi.g...@gmail.com>: > Aah, this will depend on 3D coordinates. Granted benzene should still > work since it is flat in 3D - but likely the problem is that is trying > to call getPoint3d() and that is NULL, since you only have 2D coords.
The molecule is perceived as 2D because all z coordinates are zero. Therefore getPoint3d() fails because there are no 3D coordinates to handle. Is this summary correct? So, what is the solution? I came to this surface problem because I got NaN values in the calculation of CPSA descriptors. I guess I should work with molecules with 3D coordinates for all atoms, H included in order to have correct CPSA values. Is this correct? Best regards, Jean-Marc Nuzillard > (This surface area is analytic, as opposed say to the MOE VSA > descriptors which do lookups so don't need 3D coords) > > On Tue, May 18, 2010 at 2:29 PM, JEAN MARC NUZILLARD > <jm.nuzill...@univ-reims.fr> wrote: >> Dear Rajarshi, >> >> Exception in thread "main" java.lang.NullPointerException >> at >> org.openscience.cdk.geometry.surface.NumericalSurface.calculateSurface(NumericalSurface.java:113) >> at testSurface.main(testSurface.java:68) >> >> lines 67 and 68 of testSurface.java: >> >> surface = new NumericalSurface(container); >> surface.calculateSurface(); >> >> About the molecule being flat or not: >> The SD File I would like to deal with contains 2D structures >> without hydrogen atoms. >> The benzene.sdf file I provided in my first mail is the simplest >> example I had that causes the problem. >> Does the surface calculation depend on atom coordinates >> or does it only depend on atom connectivity? >> >> Best regards, >> >> Jean-Marc Nuzillard >> >> >> Message de Rajarshi Guha <rajarshi.g...@gmail.com>: >> >>> The whole stack trace would be useful. Is this a flat molecule? >>> >>> On Tue, May 18, 2010 at 10:46 AM, JEAN MARC NUZILLARD >>> <jm.nuzill...@univ-reims.fr> wrote: >>>> >>>> Dear Egon, >>>> >>>> Message de Egon Willighagen <egon.willigha...@gmail.com>: >>>> >>>>> Dear Jean-Marc, >>>>> >>>>> On Mon, May 17, 2010 at 11:02 PM, JEAN MARC NUZILLARD >>>>> <jm.nuzill...@univ-reims.fr> wrote: >>>>>> >>>>>> The code generates an exception during the surface calculation >>>>>> and I would like to know for >>>>>> which reason and what could be done as a remedy. >>>>> >>>>> Can you give us the Exception too, please? >>>> >>>> Sure. The NullPointerException is thrown, >>>> and the "Error in surface area calculation" message is displayed. >>>> I have checked that the container is not empty and contains >>>> the expected number of atoms. >>>> >>>> Jean-Marc Nuzillard >>>> >>>> >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> >>>> _______________________________________________ >>>> Cdk-user mailing list >>>> Cdk-user@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/cdk-user >>>> >>> >>> >>> >>> -- >>> Rajarshi Guha >>> NIH Chemical Genomics Center >>> >>> >> >> >> >> > > > > -- > Rajarshi Guha > NIH Chemical Genomics Center > > ------------------------------------------------------------------------------ _______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user