On Fri, Dec 19, 2014 at 11:42 PM, Zheng Shi <zs...@ualberta.ca> wrote: > When I look at these molecules which report exception, I find their z > coordinates are all 0. I just wonder whether this does effect on > calculating TPSA. If so, how can I calculate TPSA for these? Thanks.
Is your input perhaps from a MDL molfile? Those files do not explicitly say if the coordinates are 2D or 3D and the heuristics have the side effect that planar molecules in the XY plane are misinterpreted as 2D. However, you can force them to be read as 3D with this: InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename); MDLV2000Reader reader = new MDLV2000Reader(ins); Properties prop = new Properties(); prop.setProperty("ForceReadAs3DCoordinates", "true"); PropertiesListener listener = new PropertiesListener(prop); reader.addChemObjectIOListener(listener); reader.customizeJob(); IAtomContainer mol = reader.read(new AtomContainer()); Does that help? Egon -- E.L. Willighagen Department of Bioinformatics - BiGCaT Maastricht University (http://www.bigcat.unimaas.nl/) Homepage: http://egonw.github.com/ LinkedIn: http://se.linkedin.com/in/egonw Blog: http://chem-bla-ics.blogspot.com/ PubList: http://www.citeulike.org/user/egonw/tag/papers ORCID: 0000-0001-7542-0286 ImpactStory: https://impactstory.org/EgonWillighagen ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk _______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user