Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"title": "Q-Shape - Quantitative Shape Analyzer",
"version": "v1.4.0",
"description": "Q-Shape: Advanced coordination geometry analysis using Continuous Shape Measures (CShM). A web-based tool for analyzing molecular coordination geometries with 92 reference geometries (CN 2-12, 20, 24, 48, 60), real-time 3D visualization, and comprehensive quality metrics.",
"version": "v1.5.0",
"description": "Q-Shape: Advanced coordination geometry analysis using Continuous Shape Measures (CShM). A web-based tool for analyzing molecular coordination geometries with 92 reference geometries (CN 2-12, 20, 24, 48, 60), real-time 3D visualization, and comprehensive quality metrics. Supports XYZ and CIF file formats with multi-structure analysis.",
"creators": [
{
"name": "Castro Silva Junior, Henrique",
Expand All @@ -20,7 +20,10 @@
"computational chemistry",
"web application",
"Three.js",
"React"
"React",
"CIF",
"XYZ",
"crystallography"
],
"license": {
"id": "MIT"
Expand Down
47 changes: 44 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,41 @@ All notable changes to Q-Shape will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.5.0] - 2025-01-28
## [1.5.0] - 2026-01-09

### 🎯 Overview

**Piano Stool Complex Support** - This release adds comprehensive support for half-sandwich (piano stool) complexes, a major class of organometallic compounds that were previously not properly analyzed by the software.
**Multi-File Support & CIF Format** - This release adds support for multiple file formats, multi-geometry XYZ files, and simultaneous analysis of multiple structures. Additionally, comprehensive support for half-sandwich (piano stool) complexes has been added.

### ✨ New Features

#### Multi-Format File Support
- **CIF File Support** - Parse Crystallographic Information Files using the `crystcif-parse` library
- Automatic fractional-to-Cartesian coordinate conversion
- Multi-block CIF files supported (each data block becomes a separate structure)
- Cell parameters and space group metadata preserved
- File validation with informative error messages

- **Multi-Geometry XYZ Files** - Read XYZ files containing multiple concatenated structures
- Automatic frame detection and counting
- Structure names extracted from comment lines
- Perfect for analyzing conformational isomers or trajectory snapshots

- **Multiple File Upload** - Upload several XYZ/CIF files simultaneously
- All structures loaded and accessible via navigator
- Mix different file formats in a single session

#### Structure Navigator UI
- **Dropdown Selector** - Easy switching between loaded structures
- **Navigation Buttons** - First/Prev/Next/Last for quick browsing (shown for >5 structures)
- **Structure Counter Badge** - Shows loaded structure count and file formats
- **Per-Structure Analysis** - Each structure analyzed independently with proper naming

#### Enhanced Reports
- **Structure Names in PDF** - Reports now include structure name and source file
- **Structure Column in CSV** - CSV exports include structure identification
- **Multi-Structure Awareness** - Reports indicate which structure from which file

#### Piano Stool (Half-Sandwich) Complex Recognition
- **Problem:** Piano stool complexes like [CpMn(CO)₃] were analyzed as CN=8 (all atoms separately), giving poor CShM values (>15.0)
- **Solution:** Automatic pattern detection and geometry-aware analysis
Expand Down Expand Up @@ -57,10 +84,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### 🔧 Technical Details

**Modified Files:**
**New Files:**
- `src/utils/cifParser.js` - Complete CIF file parser with validation and metadata extraction
- `src/utils/fileParser.test.js` - Extended with 14 new tests for multi-frame XYZ functions

**Modified Files (Multi-File/CIF Support):**
- `src/utils/fileParser.js` - Added `parseXYZAuto()`, `parseMultiXYZ()`, `isMultiFrameXYZ()`, `countXYZFrames()`, `validateMultiXYZ()`
- `src/hooks/useFileUpload.js` - Rewritten for multi-file/multi-format support with structure state management
- `src/components/FileUploadSection.jsx` - Added structure selector UI with navigation buttons
- `src/services/reportGenerator.js` - Added structure name and format to PDF/CSV reports
- `src/App.js` - Updated to use new structure selection props

**Modified Files (Piano Stool Support):**
- `src/constants/algorithmConstants.js` - Added `PIANO_STOOL_GEOMETRIES` constant
- `src/services/coordination/patterns/geometryBuilder.js` - Implemented intelligent geometry filtering

**New Dependencies:**
- `crystcif-parse` (^0.2.9) - CIF file parsing library with fractional-to-Cartesian conversion

**Key Algorithm Changes:**
1. Piano stool patterns detected with 85% confidence
2. Centroid-based coordination number calculation
Expand Down
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ authors:
repository-code: "https://github.com/HenriqueCSJ/q-shape"
url: "https://henriquecsj.github.io/q-shape"
license: MIT
version: "v1.4.0"
date-released: "2025-11-25"
version: "v1.5.0"
date-released: "2026-01-09"
keywords:
- "coordination chemistry"
- "continuous shape measures"
Expand All @@ -26,7 +26,7 @@ identifiers:
preferred-citation:
type: software
title: "Q-Shape - Quantitative Shape Analyzer"
version: "v1.4.0"
version: "v1.5.0"
year: 2025
authors:
- given-names: Henrique
Expand Down
87 changes: 75 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

![Q-Shape Logo](https://img.shields.io/badge/Q--Shape-Molecular%20Geometry%20Analysis-blue?style=for-the-badge&logo=react&logoColor=white)

[![Version](https://img.shields.io/badge/version-1.4.0-blue.svg?style=flat-square)](https://github.com/HenriqueCSJ/q-shape/releases/tag/v1.4.0)
[![Version](https://img.shields.io/badge/version-1.5.0-blue.svg?style=flat-square)](https://github.com/HenriqueCSJ/q-shape/releases/tag/v1.5.0)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.17717110.svg)](https://doi.org/10.5281/zenodo.17717110)
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg?style=flat-square)](https://choosealicense.com/licenses/mit/)
[![Website](https://img.shields.io/website?down_color=red&down_message=offline&style=flat-square&up_color=green&up_message=online&url=https%3A%2F%2Fhenriquecsj.github.io%2Fq-shape)](https://henriquecsj.github.io/q-shape)
Expand Down Expand Up @@ -46,6 +46,14 @@
✅ **Comprehensive Metrics** - Bond statistics, angular distortion, quality scoring
✅ **PDF Reports** - Professional output suitable for publication

### File Format Support (v1.5.0)

✅ **XYZ Files** - Standard molecular geometry format
✅ **Multi-Geometry XYZ** - Multiple structures in a single file (trajectory-like format)
✅ **CIF Files** - Crystallographic Information Files with automatic coordinate conversion
✅ **Multi-File Upload** - Analyze multiple files simultaneously
✅ **Structure Navigator** - Easy switching between loaded structures

### Analysis Modes

**Standard Mode** (~5-10 seconds)
Expand All @@ -70,12 +78,13 @@ Visit **[https://henriquecsj.github.io/q-shape](https://henriquecsj.github.io/q-

### Basic Workflow

1. **Upload** your XYZ file (drag-and-drop or file picker)
2. **Select** metal center (auto-detected or manual selection)
3. **Adjust** coordination sphere radius if needed
4. **Run** analysis (standard or intensive mode)
5. **Visualize** results in 3D and review shape measures
6. **Export** PDF report for your records
1. **Upload** your structure file(s) - XYZ or CIF format (drag-and-drop or file picker)
2. **Select** structure if multiple were loaded (use dropdown or navigation buttons)
3. **Select** metal center (auto-detected or manual selection)
4. **Adjust** coordination sphere radius if needed
5. **Run** analysis (standard or intensive mode)
6. **Visualize** results in 3D and review shape measures
7. **Export** PDF report or CSV data for your records

---

Expand Down Expand Up @@ -203,16 +212,18 @@ Q-Shape has been validated against SHAPE 2.1 (Fortran reference implementation):

## Input Format

Q-Shape accepts standard XYZ molecular structure files:
Q-Shape accepts multiple molecular structure formats:

### XYZ Format (Single Structure)

```xyz
<number of atoms>
<comment line (optional)>
<comment line (structure name extracted from here)>
<element> <x-coordinate> <y-coordinate> <z-coordinate>
...
```

### Example: Octahedral Iron Complex
**Example: Octahedral Iron Complex**

```xyz
7
Expand All @@ -226,6 +237,58 @@ O 0.000 0.000 2.100
O 0.000 0.000 -2.100
```

### Multi-Geometry XYZ Format (v1.5.0)

Multiple structures concatenated in a single file:

```xyz
7
Structure_A - First geometry
Fe 0.000 0.000 0.000
O 2.100 0.000 0.000
...
7
Structure_B - Second geometry
Fe 0.000 0.000 0.000
O 2.050 0.000 0.000
...
```

Each structure is automatically detected and can be analyzed separately using the structure navigator.

### CIF Format (v1.5.0)

Q-Shape supports Crystallographic Information Files (CIF):

```cif
data_example_structure
_cell_length_a 10.0
_cell_length_b 10.0
_cell_length_c 10.0
_cell_angle_alpha 90.0
_cell_angle_beta 90.0
_cell_angle_gamma 90.0

loop_
_atom_site_label
_atom_site_type_symbol
_atom_site_fract_x
_atom_site_fract_y
_atom_site_fract_z
Fe1 Fe 0.5 0.5 0.5
O1 O 0.71 0.5 0.5
...
```

**CIF Features:**
- Automatic fractional-to-Cartesian coordinate conversion
- Multi-block CIF files supported (each data block becomes a structure)
- Space group and cell parameter metadata preserved

### Multiple File Upload (v1.5.0)

Upload multiple XYZ and/or CIF files at once. All structures are loaded and accessible via the structure navigator dropdown.

**Expected Result**: CShM(Octahedron) ≈ 0.00-0.10 (perfect geometry)

---
Expand Down Expand Up @@ -339,7 +402,7 @@ If you use Q-Shape in your research, please cite:

**APA:**
```
Castro Silva Junior, H. (2025). Q-Shape - Quantitative Shape Analyzer (v1.4.0).
Castro Silva Junior, H. (2025). Q-Shape - Quantitative Shape Analyzer (v1.5.0).
Zenodo. https://doi.org/10.5281/zenodo.17717110
```

Expand All @@ -348,7 +411,7 @@ Zenodo. https://doi.org/10.5281/zenodo.17717110
@software{qshape2025,
author = {Castro Silva Junior, Henrique},
title = {Q-Shape - Quantitative Shape Analyzer},
version = {1.4.0},
version = {1.5.0},
year = {2025},
doi = {10.5281/zenodo.17717110},
url = {https://doi.org/10.5281/zenodo.17717110},
Expand Down
Loading
Loading