public static void  WriteCMLXML(System.IO.StreamWriter output, Molecule mol)
		{
			output.Write("<cml>\n");
			output.Write("  <molecule xmlns=\"http://www.xml-cml.org/schema/cml2/core\">\n");
			
			output.Write("    <atomArray>\n");
			for (int n = 1; n <= mol.NumAtoms(); n++)
			{
				output.Write("      <atom id=\"a" + n + "\" elementType=\"" + mol.AtomElement(n) + "\"" + " x2=\"" + mol.AtomX(n) + "\" y2=\"" + mol.AtomY(n) + "\" hydrogenCount=\"" + mol.AtomHydrogens(n) + "\"/>\n");
			}
			output.Write("    </atomArray>\n");
			
			output.Write("    <bondArray>\n");
			for (int n = 1; n <= mol.NumBonds(); n++)
			{
				output.Write("      <bond id=\"b" + n + "\" atomRefs2=\"a" + mol.BondFrom(n) + " a" + mol.BondTo(n) + "\" order=\"" + mol.BondOrder(n) + "\"/>\n");
			}
			output.Write("    </bondArray>\n");
			
			output.Write("  </molecule>\n");
			output.Write("</cml>\n");
			output.Flush();
		}
		public static void  WriteNative(System.IO.StreamWriter output, Molecule mol)
		{
			//UPGRADE_ISSUE: Class 'java.text.DecimalFormat' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javatextDecimalFormat'"
			//UPGRADE_ISSUE: Constructor 'java.text.DecimalFormat.DecimalFormat' was not converted. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1000_javatextDecimalFormat'"
			// DecimalFormat fmt = new DecimalFormat("0.0000");
            string fmtStr = "N4";
			
			output.Write("SketchEl!(" + mol.NumAtoms() + "," + mol.NumBonds() + ")\n");
			for (int n = 1; n <= mol.NumAtoms(); n++)
			{
				System.String hy = mol.AtomHExplicit(n) != Molecule.HEXPLICIT_UNKNOWN?("e" + mol.AtomHExplicit(n)):("i" + mol.AtomHydrogens(n));
                output.Write(mol.AtomElement(n) + "=" + mol.AtomX(n).ToString(fmtStr) + "," + mol.AtomY(n).ToString(fmtStr) + ";" + mol.AtomCharge(n) + "," + mol.AtomUnpaired(n) + "," + hy + "\n");
			}
			for (int n = 1; n <= mol.NumBonds(); n++)
			{
				output.Write(mol.BondFrom(n) + "-" + mol.BondTo(n) + "=" + mol.BondOrder(n) + "," + mol.BondType(n) + "\n");
			}
			output.Write("!End\n");
			
			output.Flush();
		}