Skip to main content

TFSI Crystallography Analysis using PyCIFTer

This repository contains Python code for PyCIFTer, a program I made to analyze X-ray crystallographic data of bis(trifluoromethanesulfonyl)imide (TFSI) compounds. View at:

Published Article

Graphs Dashboard Here

Overview

Chemical data science is an emerging field within the broader field of chemistry that has numerous applications of high relevance to a variety of academic and industrial pursuits. With quantum computing and artificial intelligence becoming more mainstream, it is of great interest for not only the data scientist, but the chemist as well, to take advantage of these technologies to streamline data processing, analyze large data sets, and reveal new chemical insights that would be otherwise hidden by the sheer amount and depth/complexity of available data. In this project, modern computing and fundamental chemical analysis have been combined in order to pursue new insights into the structural behavior of the weakly coordinating anion bis(trifluoromethylsulfonyl)imide, otherwise known as TFSI. Taking a data science approach, published solid-state crystal structures available in the Cambridge Structural Database (CSD) including one or more TFSI species of interest were categorized and statistically analyzed using software built for this purpose. The goal of this project from a chemical perspective was to determine the structural characteristics displayed by TFSI as inferred from the structural data. The goal of this project from a data-science perspective was to develop a new software program using Python to parse Crystallographic Information Files (CIF) obtained from the CSD into statistically relevant information that could be compared across the individual structural data sets. This research endeavor aims to highlight the applications of data science to an otherwise foreign area of research (structural chemistry) and outline the capabilities of data processing for future structural and chemical investigations.

Features

  • Import and parse CIF (Crystallographic Information File) data
  • Analyze TFSI bond lengths and angles
  • Visualize TFSI molecular structure
  • Perform statistical analysis on crystallographic parameters

Requirements

The tool uses python. The latest version of the program was run using python 3.14 but anything above 3.10 will suffice. The requirements.txt file has all the packages required for running the tool.

Install the required packages using pip:

pip install pycifter

Components of PyCIFTer

  • index.py : Main script used in research to demonstrate effectiveness of pycifter. Executes the main analysis pipeline
  • cifFileParser.py: TFSI structural analysis functions
  • render.py: Plotting and visualization functions
  • heatmap.py: Interactive rendering

cifFileParser.py - Utility functions

  • getElementAtoms(self, symbol) : Returns a list of atoms with a particular symbol after linearly searching through self.Atoms[].
  • containsAtom(self, symbol) : Checks whether the current molecule contains an atom of given symbol.
  • getAtomsInARadius(self, targetAtom, radius) : returns a list of atoms after performing a wave emanating search of size ‘radius’. The function looks for all atoms with a Euclidean distance of less than radius and returns a list.
  • getParticularAtom(self, identifier) : Returns a particular atom object based on its identifier (ex. C57).

Atom.py - Utility functions

  • getDistance(self,other) : Returns the Euclidean distance between the position vectors of the current atom and the “other” atom.
  • __eq__(self,other) : Operator overload for the “==” operator. Makes it so that if two atoms and compared using the “==” operator, the output depends on whether the two atoms have the exact same position vector, whereas otherwise the “==” would compare the two objects’ memory addresses.
  • __hash__(self) : Defines what should the hashing input be when generating the hash of an atom. The position vector is unique to each atom and thus, is used as a hashing input.

The current version of the software is a pre-alpha version built for research purposes. I will continue working on this project adding more robust features to the CIFParser class. See my project on Crown Ethers for another example of molecular analysis with PyCIFTer.

License

MIT License

Metadata

Release files for pycifter 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycifter 0.1.2
File Size Uploaded
pycifter-0.1.2.tar.gz 11.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycifter 0.1.2
File Interpreter ABI Platform
pycifter-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 22.3 kB

Release files / pycifter-0.1.2.tar.gz

Download URL pycifter-0.1.2.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6bc5c8886e4db573844f87cb82598d333a713657a5c615f6ad8d4c29dac88a5e
BLAKE2b-256 checksum
How to use checksums
54a90d01c0614e2c5ead21fea98c95d3aaf27d5d906700cc71341c29b96c84ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / pycifter-0.1.2-py3-none-any.whl

Download URL pycifter-0.1.2-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b916b3002e03bec89ce636f4a7f151e6192c09f36e2dd01dd2210bbe0107a3cb
BLAKE2b-256 checksum
How to use checksums
eb34af151117ae969b11627ede380fa17ba80236ae0a9fbc27a38eb2b896b8c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page