A professional hybrid pipeline for analyzing and classifying coordination environments in inorganic crystals. Coord-ML bridges the gap between traditional crystallography and modern AI by integrating softBV physics-based extraction with Neural Network 3D geometry classification.
Unlike "black-box" AI models, Coord-ML uses a domain-specific three-stage process:
- Physics-Based Extraction: Utilizes
softBV(Bond Valence Sum theory) to accurately identify bonded neighbors and coordination numbers (CN) from CIF files. - Geometric Feature Engineering: Transforms raw 3D coordinates into a unique symmetry fingerprint using Plane Normal Dot Products. This captures the underlying symmetry while remaining robust to bond-length distortions.
- Neural Network Classification: Employs a trained Multi-layer Perceptron (MLP) to recognize 3D geometries (e.g., T-4, SP-4, SS-4) from the geometric fingerprints.
- Automated softBV Wrapper: Seamlessly extract coordination data from bulk crystallographic datasets.
- Symmetry Fingerprinting: High-dimensional geometric descriptors that outperform simple bond-angle metrics.
- Pre-trained Classifiers: Specialized models for 4-coordinate environments, with infrastructure to extend to higher coordination numbers.
- Benchmarking Integration: Built on the foundational logic of the
MaterialsCoordbenchmarking suite.
This toolkit is built upon several foundational works in the field:
- softBV: Physics-based neighbor extraction utilizes the
softBVsoftware suite. http://www.softbv.com/ - MaterialsCoord: Core benchmarking infrastructure is based on the MaterialsCoord project (Waroquiers et al., Inorganic Chemistry, 2021).
- Prof. Stefan Adams: Special thanks for guidance and support in the development of these methodologies.
- Python 3.8+
- softBV executables (required for the extraction stage)
-
Clone the repository:
git clone https://github.com/Roy027/Coord-ML.git cd Coord-ML -
Install dependencies:
pip install -r requirements.txt
-
Install the package:
pip install -e .
from coord_ml.extraction.softbv import SoftBVExtractor
from coord_ml.geometry import coordinates_to_planes, planes_to_dot_products
from coord_ml.ml import CoordinationClassifier
# 1. Extract coordination using softBV
extractor = SoftBVExtractor(bin_dir="data/bin")
site_data = extractor.extract_site_dic("my_crystal.cif", sites={"Li1": {"type": "Li", "os": "1"}})
# 2. Generate Geometric Fingerprint
coords = site_data["Li1"]["coordinates"]
planes = coordinates_to_planes(coords)
fingerprint = planes_to_dot_products(planes)
# 3. Classify 3D Geometry
clf = CoordinationClassifier()
# clf.train(X_train, y_labels) # Train or load a model
prediction, confidence = clf.predict([fingerprint])
print(f"Detected Geometry: {prediction[0]}")If you use this toolkit in your research, please link to this GitHub repository.
Developed by Roy Dai,CH Oh, and Prof. Stefan Adams. This project is intended for research and educational purposes in the field of computational materials science.