Package org.jmol.adapter.readers.xml
Class CDXMLParser
java.lang.Object
org.jmol.adapter.readers.xml.CDXMLParser
A reader for CambridgeSoft CDXML files.
For the full specification of CDX/CDXML, see
https://iupac.github.io/IUPAC-FAIRSpec
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@stolaf.edu
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.jmol.adapter.readers.xml.CDXMLParser.CDBondgetBond(org.jmol.adapter.readers.xml.CDXMLParser.CDNode a, org.jmol.adapter.readers.xml.CDXMLParser.CDNode b) static StringgetBondKey(int atomIndex1, int atomIndex2) nextID()voidprocessStartElement(String localName, Map<String, String> atts) voidSet the 2D or pseudo-3D coordinates of the atoms.
-
Field Details
-
bsAtoms
-
bsBonds
-
rdr
-
mapCloned
-
-
Constructor Details
-
CDXMLParser
-
-
Method Details
-
processStartElement
-
nextID
-
getBondKey
-
getBond
public org.jmol.adapter.readers.xml.CDXMLParser.CDBond getBond(org.jmol.adapter.readers.xml.CDXMLParser.CDNode a, org.jmol.adapter.readers.xml.CDXMLParser.CDNode b) -
setAtom
Set the 2D or pseudo-3D coordinates of the atoms. ChemDraw pseudo-3D is just a z-layering of chunks of the molecule. Nothing really useful. These coordinates are ignored if there are any atoms also with 2D coordinates or for FILTER "NO3D". So, pretty much, the z coordinates are never used.- Parameters:
key-atts-
-
finalizeParsing
public void finalizeParsing()
-