.. _oe_license:

*************************************************************************
Licenses for OpenEye Software
*************************************************************************

A license file from OpenEye, Cadence Molecular Sciences is required to run any OpenEye
application. A license file can be requested/obtained for any specific
applications by contacting OpenEye: https://www.eyesopen.com/contact.

At startup, the application looks for a valid license in the following default
locations:

* In a file specified by the environment variable :envvar:`OE_LICENSE`.  Example commands to set
  the environment variable:

  * Linux/UNIX and MacOS:

    ``export OE_LICENSE=/home/USERNAME/oe_license.txt``

    This can be executed in a shell prompt, or added to the user's ``~/.bash_profile``.
    If running `zsh`,  add to the user's ``.bash_profile`` and then include ``.bash_profile``
    in the user's ``.zshrc``.

  * Microsoft Windows:

    ``setx OE_LICENSE C:\Users\USERNAME\oe_license.txt`` to set the environment variable permanently using Command Prompt, or
    ``SET OE_LICENSE=C:\Users\USERNAME\oe_license.txt`` to set for the duration of the session using Command Prompt.
    ``$env:OE_LICENSE="C:\Users\USERNAME\oe_license.txt"`` to set the environment variable using PowerShell.

* In a file named ``oe_license.txt`` in the directory specified by the
  environment variable :envvar:`OE_DIR`.

* In a file named ``oe_license.txt`` in the user's platform-specific local
  OpenEye application data directory. The location of this directory is
  detailed below:

  * Linux/UNIX:

    ``~USERNAME/.OpenEye``

  * MacOS:

    ``/Users/USERNAME/Library/OpenEye`` or ``~USERNAME``

  * Microsoft Windows (User may need to create this directory the first time):

    ``C:\Users\USERNAME\AppData\Local\OpenEye``

* In a file named ``oe_license.txt`` in the current working directory


