Repository navigation
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
===========================================
+ Coverage 11.84% 41.97% +30.13%
===========================================
Files 5 6 +1
Lines 211 374 +163
Branches 97 171 +74
===========================================
+ Hits 25 157 +132
- Misses 176 180 +4
- Partials 10 37 +27 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved CIF validation errors can reject valid structures or return invalid geometry.
4 open findings
What changed in this PR
Adds CIF support to mctc-lib’s geometry I/O, including symmetry expansion and chirality-preserving output.
Changes:
- Implements and registers CIF reading and writing.
- Consolidates shared periodic-cell conversions.
- Adds CIF tests, cross-format chirality checks, and documentation.
| File | Description |
|---|---|
| test/testsuite_structure.f90 | Adds a chiral periodic fixture. |
| test/test_write.f90 | Tests CIF writer dispatch. |
| test/test_write_xyz.f90 | Checks chirality preservation. |
| test/test_write_vasp.f90 | Checks chirality preservation. |
| test/test_write_turbomole.f90 | Checks chirality preservation. |
| test/test_write_qcschema.f90 | Checks chirality preservation. |
| test/test_write_pymatgen.f90 | Checks chirality preservation. |
| test/test_write_genformat.f90 | Checks chirality preservation. |
| test/test_write_cjson.f90 | Checks chirality preservation. |
| test/test_write_cif.f90 | Tests CIF round trips and validation. |
| test/test_write_aims.f90 | Checks chirality preservation. |
| test/test_read.f90 | Tests CIF reader dispatch. |
| test/test_read_cif.f90 | Tests CIF parsing and symmetry expansion. |
| test/meson.build | Registers CIF test suites. |
| test/main.f90 | Connects CIF test collectors. |
| test/CMakeLists.txt | Registers CIF test suites. |
| src/mctc/io/write/pymatgen.f90 | Uses shared cell conversion. |
| src/mctc/io/write/meson.build | Includes the CIF writer. |
| src/mctc/io/write/CMakeLists.txt | Includes the CIF writer. |
| src/mctc/io/write/cjson.f90 | Uses shared cell conversion. |
| src/mctc/io/write/cif.f90 | Implements P1 CIF output. |
| src/mctc/io/write.f90 | Registers CIF writer dispatch. |
| src/mctc/io/read/turbomole.f90 | Uses shared lattice conversion. |
| src/mctc/io/read/meson.build | Includes the CIF reader. |
| src/mctc/io/read/CMakeLists.txt | Includes the CIF reader. |
| src/mctc/io/read/cjson.F90 | Uses shared lattice conversion. |
| src/mctc/io/read/cif.f90 | Implements CIF parsing and symmetry expansion. |
| src/mctc/io/read.f90 | Registers CIF reader dispatch. |
| src/mctc/io/periodic.f90 | Centralizes cell/lattice conversions. |
| src/mctc/io/meson.build | Includes periodic helpers. |
| src/mctc/io/filetype.f90 | Adds CIF identification. |
| src/mctc/io/CMakeLists.txt | Includes periodic helpers. |
| README.md | Lists CIF support. |
| man/mctc-convert.1.adoc | Adds CIF to the format table. |
| doc/index.md | Links CIF documentation. |
| doc/format-cif.md | Documents CIF behavior and limitations. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Does it support mCIF (CIF with magnetic moments)? |
|
it now supports reading mcif files but ignores magnetic information. mctc-convert raises a warning about this (information is lost on conversion). |

src/mctc/io/periodic.f90