/// <summary> Writes the content from molecule to output. /// /// </summary> /// <param name="molecule"> Molecule of which the data is outputted. /// </param> public virtual void writeMolecule(IMolecule molecule) { SmilesGenerator sg = new SmilesGenerator(molecule.Builder); System.String smiles = ""; try { smiles = sg.createSMILES(molecule); //logger.debug("Generated SMILES: " + smiles); writer.Write(smiles); //UPGRADE_TODO: Method 'java.io.BufferedWriter.newLine' was converted to 'System.IO.TextWriter.WriteLine' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073'" writer.WriteLine(); writer.Flush(); //logger.debug("file flushed..."); } catch (System.Exception exc) { //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'" //logger.error("Error while writing Molecule: ", exc.Message); //logger.debug(exc); } }