• RE: Programmatic access to data

    Stewart:

    Thanks for your help.  Your answer makes sense, but perhaps there is a problem with the ABEDAM entry?

    When I run your code, component zero returns the SMILES string [N][C][C][N] (which is in agreement with the 3D structure shown on the ABEDAM page)

    However, this is missing a carbon atom compared to the systematic name and the chemical diagram shown on the ABEDAM page (which has a 1,3-diaminopropane molecule, NCCCN)

    Is there a programatic way to access the components in the chemical diagram directly, without using the 3D structure?

     

     

     

  • Programmatic access to data

    The Python API 2D structure diagram documentation describes how to generate pictures of 2D diagrams, as well as how to perform SMARTS queries against the elements in those diagrams to perform highlighting.  

     

    Question: Is there any programmatic way to extract the different components that are used in these 2D diagrams?  Presumably there is an underlying graph representation, but I can't find any documentation for this in the ccdc.diagram documentation

     

    As a motivating example: The  ABEDAM 2D diagram correctly shows the organic component, but the 0-th component of the molecules entry is disordered, and hence has a different total number of carbon atoms.  It would be useful to be able to extract a graph representation (e.g., SMILES string) for the organic component that is displayed in the 2D diagram, even though this is unclear in the atomic coordinate data.