Class XmlCdxReader

All Implemented Interfaces:
GenericLineReader
Direct Known Subclasses:
CDXReader

public class XmlCdxReader extends XmlReader
A reader for CambridgeSoft CDXML files. revvity site: https://support.revvitysignals.com/hc/en-us/articles/4408233129748-Where-is-the-ChemDraw-SDK-located Their link: https://web.archive.org/web/20221209095323/https://www.cambridgesoft.com/services/documentation/sdk/chemdraw/cdx/ WayBack machine Overview: https://web.archive.org/web/20240000000000* /https://www.cambridgesoft.com/services/documentation/sdk/chemdraw/cdx Partial archives: https://web.archive.org/web/20160911235313/http://www.cambridgesoft.com/services/documentation/sdk/chemdraw/cdx/index.htm https://web.archive.org/web/20160310081515/http://www.cambridgesoft.com/services/documentation/sdk/chemdraw/cdx/ https://web.archive.org/web/20100503174209/http://www.cambridgesoft.com/services/documentation/sdk/chemdraw/cdx/ Unfortunately, there appears to be no single archive that has all the images, and so some of those are missing. for the full, detailed specification. Here we are just looking for simple aspects that could be converted to valid 2D MOL files, SMILES, and InChI. Fragments (such as CH2CH2OH) and "Nickname"-type fragments such as Ac and Ph, are processed correctly. But their 2D representations are pretty nuts. ChemDraw does not make any attempt to place these in reasonable locations. That said, Jmol's 3D minimization does a pretty fair job, and the default is to do that minimization. If minimization and addition of H is not desired, use FILTER "NOH" or FILTER "NO3D" XmlChemDrawReader also serves as the reader for binary CDX files, as CDXReader subclasses this class. See that class for details.
Author:
hansonr
  • Field Details

    • isCDX

      public boolean isCDX
      true when this reader is being used after CDX conversion
  • Constructor Details

    • XmlCdxReader

      public XmlCdxReader()
  • Method Details

    • processXml

      protected void processXml(XmlReader parent, Object saxReader) throws Exception
      Overrides:
      processXml in class XmlReader
      Parameters:
      parent -
      saxReader -
      Throws:
      Exception
    • processStartElement

      public void processStartElement(String localName, String nodeName)
      Overrides:
      processStartElement in class XmlReader
      Parameters:
      localName -
      nodeName - TODO
    • finalizeSubclassReader

      protected void finalizeSubclassReader() throws Exception
      Fix connections to Fragments and Nicknames, adjust stereochemistry for wavy displays, flag invalid atoms, and adjust the scale to something more molecular. Finalize the 2D/3D business.
      Overrides:
      finalizeSubclassReader in class XmlReader
      Throws:
      Exception