• RE: Programmatic access to data

    Joshua,

     

    The simple answer is that there is no way to access the chemistry directly from the 2D diagram in our public API.  This is, however, an existing feature request that we will consider implementing in a future release.

     

    In the case of this specific entry, we have looked at the 3D structure and agree that this representation is misleading. This entry will be updated in the CSD. On the ABEDAM page, if you show disorder and packing, you can see where the confusion originates from.

     

    Regards,

    Stewart.

  • RE: Programmatic access to data

     Hi Joshua,

     

    The reason that we can't present a SMILES representation directly through the API for ABEDAM is that the structure has some unspecified bond types.  It is possible to extract the individual components, and to access the bond information within those which corresponds to the underlying graph representation.

    If bond types are assigned, SMILES will then become available.  To demonstrate:

    import ccdc
    import ccdc.io

    r = ccdc.io.MoleculeReader('CSD')
    abedam = r.molecule('ABEDAM')

    # in the CSD, the bond types are not fully specified for ABEDAM. SMILES are unavailable
    for component in abedam.components:
    print(component.bonds)
    print(component.smiles)

    # we can assign plausible bonds based on standard CSD conventions. SMILES can now be generated.
    abedam.assign_bond_types()

    for component in abedam.components:
    print(component.bonds)
    print(component.smiles)

     

    I hope this answers your question,

    Stewart.

  • RE: Conda installation issue 1.5.1

    Hi Jacob,

    If you report the errors here, we can see whether there is a solution.

    Stewart.

  • RE: Installing rdkit fails due to csd python api installation

    Hi Puck,

    I would like to understand what the underlying problem is, but I am currently unable to reproduce it.  Please would you email support@ccdc.cam.ac.uk with details of the various software versions you are using - e.g., your operating system version your ipython/jupyter version. Please also let us know what steps you are using for the installation, and whether you are trying the miniconda environment shipped with the CSD system, or you own miniconda/anaconda.

    Thanks in advance,

    Stewart.

  • RE: Installing rdkit fails due to csd python api installation

    Hi Puck,

     

    That is curious.  That error is what I'd expect to see if the rdkit python module wasn't installed.  If you use "conda list" is the appropriate environment, do you see rdkit in the table?

     

    Stewart.

  • RE: Installing rdkit fails due to csd python api installation

    Hi Puck,

     

    We have seen various problems when rdkit and the CSD Python API are used together due to mutually incompatible dependencies. Have you tried following the instructions from our API troubleshooting instructions?  These require that you have already downloaded the desired API conda package as it is not present on any public package repository.

     

    I hope that helps,

    Stewart.

  • RE: OS X Conda issue

     Hi Alex,

    That looks like a problem with miniconda that has been reported.  The solution is to modify a file in the miniconda distribution and try again.

    Inside your CSD Python API 2018 installation there will be a file named miniconda/pkgs/urls.txt that must be edited to contain the line:

    file:///csd-python-api-1.3.0-mac-64-py2.7-conda.tar.bz2

    Does this resolve the issue?

    Stewart.

  • RE: SQLite breaks when running similarity search

    Hi,

    Yes, I think you would need to do this. If your names are the CSD refcodes and they are stored in list_of_refcodes, it can be achieved with:

    reader = MoleculeReader()
    molecules = [reader.molecule(refcode) for refcode in list_of_refcodes]

    I hope that helps,

    Stewart.

  • RE: SQLite breaks when running similarity search

     Hi Bagnall,

    Depending on your operating system, there is a limit to how many open connections can be held on the database file.  It looks like you are hitting this limit.

    If I understand your goal correctly, use of the search_molecule() method might be a better approach. Assuming that your molecules are stored in a list named molecules:

    for i in molecules:
    ss = SimilaritySearch(i)
    for j in molecules:
    hit = ss.search_molecule(j)

    I don't believe this will cause the problem you see as it never access the database.

    Does that resolve your issue?

    Stewart.

  • RE: Tests failing due to missing files.

    Hi Chris,

     

    The test aren't bundled within the conda packages at all.  You will need to look in any of the pip archives.

     

    Stewart.