Skip to main content

Python package for analyzing Cucurbituril crystal structures automatically

Project description

ElliptiC - an automated command line tool for visualizing and measuring ellipticity of cucurbituril host/guest structures


How to install

This package is not yet pip installable, but once it is available, the command will be a simple

pip install ElliptiC

Until then, the installation of the package can be done by the following:

  • Clone this git repository to your local machine
  • In the cloned repository, install the cbn_analysis package through python -m pip install . vv
  • Next, install the required dependencies by running pip install -r requirements.txt

How to run the analysis

The ElliptiC package takes a single command line argument: an xyz file containing atom coordinates, or a folder of xyz files containing atom coordinates

To run the analysis package on a single file, navigate to the directory with the ElliptiC script and execute it: (NOTE: if there are spaces in your file name, you will need quotes around the file name)

The same convention can be used to execute the package on a folder of xyz files


How the package works

Below is a diagram of the analysis steps the software completes on any given file

1. In a given XYZ file, extract the coordinates of all carbon atoms (and oxygen atoms used later on in the analysis).

2. Identify strongly connected components to differentiate between host and guest structures.

3. Remove the guest structure since we only care about calculating ellipticity of the host.

4. Using proximity to oxygen atoms, remove the top and bottom rings of the hosts for accurate ellipticity calculation.

5 & 6. Using a Principal Components Analysis, calculate the variance along both major axes of the host ring. The ellipticity is thus (Vax1-Vax2)/Vax1 where Vax1 is the variance on the longest axis (length) and Vax2 is the variance on the second-longest axis (width).

7. Output graphs of both the single ring hosts and the full host-guest structures, as well as a spreadsheet with the calculated ellipticity for each structure.



How to interpret the output

Each xyz file analyzed with this package will produce at least 3 pieces of data:

  • 1 interactive 3D scatter plot with all carbons in the CBn structures visualized
  • 1 interactive 3D scatter plot with only the central carbon ring of the CBn structures visualized
  • 1 spreadsheet with all of the carbons, their positions, distance to the centroid of the structure, and the measured ellipticity

In the case of host CBn structures with an internally situated guest structure, an additional 3D graph will be produced with the guests visualized in the structures (see below)

To see the interactive version of this plot that gets generated from the script, Click Here

The user can visually see the ellipticity in the structues and compare them to the measured values in the spreadsheets:
CB7 structures from above with guests removed

Calculated ellipticity for each structure on a scale of circular (0) to linear (1)

CB10 wide structures with guests removed

Calculated ellipticity for each structure on a scale of circular (0) to linear (1)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ElliptiCBn-1.0.7.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

ElliptiCBn-1.0.7-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file ElliptiCBn-1.0.7.tar.gz.

File metadata

  • Download URL: ElliptiCBn-1.0.7.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for ElliptiCBn-1.0.7.tar.gz
Algorithm Hash digest
SHA256 9a6b7c4cdbb96886aeda14af0e256fb4a13be5d77f5c544426b5717dfa9e0174
MD5 24265a10c6b1fd84c1fdc0712c2b3a45
BLAKE2b-256 dc4fa0849fa2f4ee6b2a6d3424f9ce6e3685a22844c828bdd0b38c77e8efd4d4

See more details on using hashes here.

File details

Details for the file ElliptiCBn-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: ElliptiCBn-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for ElliptiCBn-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 6f11756fa62e3d89c932a21c9799ae4fdbbbdecc8d8caa1c8ba925312fd0d86c
MD5 524002ee8a10c31d8d52ce2a1ea5c71a
BLAKE2b-256 8c1108875f8058254ce0d0c5bc77b8a2bbd96a6012d29c2af80b7bf2c849de5b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page