• RE: Coordinates of all the molecules in the unit cell

    Hi Andy,

    Thanks a lot for this. I am happy that finally could understand this concept.

    Best wishes,

    Tahereh

  • RE: Coordinates of all the molecules in the unit cell

    Hi Richard,

    Thanks a lot for the explanations. I have been discussing these points with a colleague but unfortunately it is still not so clear to us. For example, in which situation this component is a copy of the fundamental molecule and when it is not? How these components are chosen? I would appreciate if you can expand on it a bit more.

    Best Wishes,

    T.

     

  • RE: Coordinates of all the molecules in the unit cell

     Many thanks for this. I really appreciate your kind help.

    I have other question but don't know should I open a new topic or I can ask here. Anyway, I ask but if I have to do the other way around please let me know.

    The concepts of "the number of molecules in the unit cell" and "component of  a molecule" is a bit confusing to me. For example, in Pentacene (entry identifier: PENCEN03) there are two molecules in the unit cell and also two component for each molecule. Whereas for other structures there might be four molecules in the unit cell and only one component. I don't know how to distinguish these two concepts. What is the meaning of molecule having several molecules (component)?

    Best wishes,

    T.

  • Coordinates of all the molecules in the unit cell

    Hi,

    In CSD Python API, I am trying to extract the coordinates of all the molecules in the unit cell in a "mol2" format. The problem is with this command:

                (entry.crystal.molecule.to_string('mol2'))

    I am getting the coordinates of only one of the molecules. I would be appreciated if you could help me out.

     

    Many thanks,

    T.

  • RE: CSD Python API on Linux

    Hi,

    I am trying to use openbabel through CSD python API (from openbabel import *) but the code fails:

    ImportError: No module named openbabel

     

     I've installed openbabel through anaconda and can use that in python2 without any difficulty.

    I'd be appreciated if you can help me to sort out this error.

     

    Thanks a lot,

    Tahereh

  • RE: CSD Python API on Linux

     Many thanks. It seems the problem is fixed now.

  • RE: CSD Python API on Linux

     Thanks Richard. I followed the suggestions but again I got errors:

    The first command leads to:

    /..../Python_API_2018/miniconda/lib/python2.7/site-packages/ccdc/__init__.py:268: UserWarning:
    Could not find the CSD-System installation.

    For further help with installing and configuring data please visit
    the support page at https://www.ccdc.cam.ac.uk/csds_install_help

    Usage of the CSD Python API without the CSD Data installed is not supported.

      warnings.warn(CSDHOME_NOT_FOUND_MSG)
    Traceback (most recent call last):
      File "hydrates_filter.py", line 4, in <module>
        settings = search.Search.Settings()
      File "/..../Python_API_2018/miniconda/lib/python2.7/site-packages/ccdc/search.py", line 830, in __init__
        _settings = CSDSQLDatabaseLib.GenericCrystalStructureDatabaseSearchSettings()
      File "/......./Python_API_2018/miniconda/lib/python2.7/site-packages/ccdc/_lib/CSDSQLDatabaseLib.py", line 1117, in __init__
        this = _CSDSQLDatabaseLib.new_GenericCrystalStructureDatabaseSearchSettings(*args)
    RuntimeError: Welcome to the CSD Python API.
    No valid licence located. Access is available to all organisations and institutions.
    To find details for your company or university please contact admin@ccdc.cam.ac.uk.

     

    I don't understand this error as I have downloaded the Software through the valid Site No. and Confirmation Code  provided by my University. The installation has been made by this command: ./csds-linux-x64.run

     

    2- The second command gives rise to:

    Error: activate must be sourced. Run 'source activate envname'
    instead of 'activate envname'.

    Usage: source activate ENV

    Adds the 'bin' directory of the environment ENV to the front of PATH.
    ENV may either refer to just the name of the environment, or the full
    prefix path.

     

    and if I change activate to source activate it says no such a file or directory.

     

    Do you think there is problem in installation?

    Many thanks,

    Tahereh

  • CSD Python API on Linux

    I am using CSD software on Linux. After installation, I could use CSD python API through the icon shortcut appeared on the desktop. But if I want to launch the script by CSD Python API by addressing it (not through the icon) I face difficulties. To launch the script by Python API, first I go to the directory of the script and then address the directory in which the Python API folder is located:

    terminal:

    cd /Desktop (Script Location)

    In this directory I type:

     /...../Python API/miniconda/bin/python2 (press enter)

    script.py

    I see this error message:

    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    NameError: name 'script' is not defined

    If I copy the script lines to the Python API opened by its Icon, it works without any problem. Could you please help me out?

    P.S. I have both versions of Python 2.7 and 3.6.5  (the later through anaconda). I call python 2 with source activate command.