private void InitBlock(SmilesGenerator enclosingInstance)
 {
     this.enclosingInstance = enclosingInstance;
 }
 /// <summary>  Construct a BrokenBond between <code>a1</code> and <code>a2</code> with
 /// the marker <code>marker</code>.
 /// 
 /// </summary>
 /// <param name="marker"> the ring closure marker. (Great comment!)
 /// </param>
 /// <param name="a1">     Description of Parameter
 /// </param>
 /// <param name="a2">     Description of Parameter
 /// </param>
 internal BrokenBond(SmilesGenerator enclosingInstance, IAtom a1, IAtom a2, int marker)
 {
     InitBlock(enclosingInstance);
     this.a1 = a1;
     this.a2 = a2;
     this.marker = marker;
 }
 public AnonymousClassComparator(SmilesGenerator enclosingInstance)
 {
     InitBlock(enclosingInstance);
 }
Example #4
0
 /// <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);
     }
 }