libcasm-xtal 2.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- libcasm_xtal-2.0.0/CHANGELOG.md +185 -0
- libcasm_xtal-2.0.0/CMakeLists.txt +282 -0
- libcasm_xtal-2.0.0/CMakeLists.txt.in +191 -0
- libcasm_xtal-2.0.0/LICENSE +484 -0
- libcasm_xtal-2.0.0/MANIFEST.in +19 -0
- libcasm_xtal-2.0.0/PKG-INFO +53 -0
- libcasm_xtal-2.0.0/README.md +33 -0
- libcasm_xtal-2.0.0/build_requirements.txt +7 -0
- libcasm_xtal-2.0.0/cmake/CASMcode_crystallographyConfig.cmake.in +3 -0
- libcasm_xtal-2.0.0/dev_requirements.txt +4 -0
- libcasm_xtal-2.0.0/doc/customdoxygen.css +1441 -0
- libcasm_xtal-2.0.0/doc/doxygen_config +2306 -0
- libcasm_xtal-2.0.0/doc_requirements.txt +6 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/Adapter.hh +48 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/AnisoValTraits.hh +259 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/BasicStructure.hh +228 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/BasicStructureTools.hh +111 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/CanonicalForm.hh +93 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/Coordinate.hh +601 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/CoordinateSystems.hh +109 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/DoFDecl.hh +10 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/DoFSet.hh +235 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/HermiteCounter.hh +149 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/IntegralCoordinateWithin.hh +188 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/Lattice.hh +326 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/LatticeIsEquivalent.hh +88 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/LatticeMap.hh +182 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/LinearIndexConverter.hh +192 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/Molecule.hh +320 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/Niggli.hh +178 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/OccupantDoFIsEquivalent.hh +61 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/SimpleStrucMapCalculator.hh +92 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/SimpleStructure.hh +124 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/SimpleStructureTools.hh +118 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/Site.hh +148 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/SpeciesProperty.hh +78 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/Strain.hh +60 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/StrainConverter.hh +69 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/StrucMapCalculatorInterface.hh +261 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/StrucMapping.hh +808 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/Superlattice.hh +55 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/SuperlatticeEnumerator.hh +435 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/SymInfo.hh +65 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/SymRepBuilder.hh +378 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/SymTools.hh +204 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/SymType.hh +138 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/SymTypeComparator.hh +64 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/UnitCellCoord.hh +261 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/UnitCellCoordRep.hh +79 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/UnitCellCoordTraits.hh +31 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/io/BasicStructureIO.hh +140 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/io/DoFSetIO.hh +30 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/io/LatticeIO.hh +16 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/io/SimpleStructureIO.hh +25 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/io/SuperlatticeEnumeratorIO.hh +29 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/io/SymInfo_json_io.hh +36 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/io/SymInfo_stream_io.hh +64 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/io/UnitCellCoordIO.hh +17 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/io/VaspIO.hh +134 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/io/jsonStruc.hh +138 -0
- libcasm_xtal-2.0.0/include/casm/crystallography/version.hh +23 -0
- libcasm_xtal-2.0.0/make_CMakeLists.py +176 -0
- libcasm_xtal-2.0.0/pre-commit +22 -0
- libcasm_xtal-2.0.0/pyproject.toml +76 -0
- libcasm_xtal-2.0.0/python/doc/.gitignore +2 -0
- libcasm_xtal-2.0.0/python/doc/_static/apple-touch-icon.png +0 -0
- libcasm_xtal-2.0.0/python/doc/_static/css/custom.css +116 -0
- libcasm_xtal-2.0.0/python/doc/_static/favicon-16x16.png +0 -0
- libcasm_xtal-2.0.0/python/doc/_static/favicon-32x32.png +0 -0
- libcasm_xtal-2.0.0/python/doc/_static/logo.pdf +1477 -4
- libcasm_xtal-2.0.0/python/doc/_static/logo.svg +1 -0
- libcasm_xtal-2.0.0/python/doc/_static/logo_dark.svg +91 -0
- libcasm_xtal-2.0.0/python/doc/_static/logo_dark_outline.svg +283 -0
- libcasm_xtal-2.0.0/python/doc/_static/logo_outline.svg +275 -0
- libcasm_xtal-2.0.0/python/doc/_static/small_logo.pdf +1351 -4
- libcasm_xtal-2.0.0/python/doc/_static/small_logo.svg +48 -0
- libcasm_xtal-2.0.0/python/doc/_static/small_logo_dark.svg +49 -0
- libcasm_xtal-2.0.0/python/doc/_templates/base.rst +5 -0
- libcasm_xtal-2.0.0/python/doc/_templates/custom-attr-template.rst +5 -0
- libcasm_xtal-2.0.0/python/doc/_templates/custom-class-template.rst +36 -0
- libcasm_xtal-2.0.0/python/doc/_templates/custom-function-template.rst +5 -0
- libcasm_xtal-2.0.0/python/doc/_templates/custom-module-template.rst +71 -0
- libcasm_xtal-2.0.0/python/doc/bibliography.rst +4 -0
- libcasm_xtal-2.0.0/python/doc/conf.py +263 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/coupled.rst +72 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/disp.rst +56 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/index.rst +16 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/json/ZrO_prim.json +65 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/json/simple_cubic_Hstrain.json +95 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/json/simple_cubic_Hstrain_symadapted.json +95 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/json/simple_cubic_SOmagspin.json +59 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/json/simple_cubic_binary.json +34 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/json/simple_cubic_coupled.json +122 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/json/simple_cubic_disp.json +59 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/json/simple_cubic_ising.json +76 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/magspin.rst +57 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/occ.rst +158 -0
- libcasm_xtal-2.0.0/python/doc/examples/prim/strain.rst +124 -0
- libcasm_xtal-2.0.0/python/doc/index.rst +55 -0
- libcasm_xtal-2.0.0/python/doc/installation.rst +33 -0
- libcasm_xtal-2.0.0/python/doc/reference/libcasm/index.rst +12 -0
- libcasm_xtal-2.0.0/python/doc/refs.bib +13 -0
- libcasm_xtal-2.0.0/python/doc/usage/input_output.rst +106 -0
- libcasm_xtal-2.0.0/python/doc/usage/lattice.rst +246 -0
- libcasm_xtal-2.0.0/python/doc/usage/prim.rst +470 -0
- libcasm_xtal-2.0.0/python/doc/usage/structure.rst +303 -0
- libcasm_xtal-2.0.0/python/doc/usage/superlattice.rst +79 -0
- libcasm_xtal-2.0.0/python/doc/usage.rst +11 -0
- libcasm_xtal-2.0.0/python/examples/prim/ZrO_prim.py +49 -0
- libcasm_xtal-2.0.0/python/examples/prim/simple_cubic_Hstrain.py +51 -0
- libcasm_xtal-2.0.0/python/examples/prim/simple_cubic_Hstrain_symadapted.py +57 -0
- libcasm_xtal-2.0.0/python/examples/prim/simple_cubic_SOmagspin.py +54 -0
- libcasm_xtal-2.0.0/python/examples/prim/simple_cubic_binary.py +46 -0
- libcasm_xtal-2.0.0/python/examples/prim/simple_cubic_coupled.py +73 -0
- libcasm_xtal-2.0.0/python/examples/prim/simple_cubic_disp.py +53 -0
- libcasm_xtal-2.0.0/python/examples/prim/simple_cubic_ising.py +53 -0
- libcasm_xtal-2.0.0/python/libcasm/xtal/__init__.py +62 -0
- libcasm_xtal-2.0.0/python/libcasm/xtal/_methods.py +619 -0
- libcasm_xtal-2.0.0/python/libcasm/xtal/lattices.py +338 -0
- libcasm_xtal-2.0.0/python/libcasm/xtal/prims.py +243 -0
- libcasm_xtal-2.0.0/python/libcasm/xtal/structures.py +175 -0
- libcasm_xtal-2.0.0/python/libcasm_xtal.egg-info/PKG-INFO +53 -0
- libcasm_xtal-2.0.0/python/libcasm_xtal.egg-info/SOURCES.txt +230 -0
- libcasm_xtal-2.0.0/python/libcasm_xtal.egg-info/dependency_links.txt +1 -0
- libcasm_xtal-2.0.0/python/libcasm_xtal.egg-info/requires.txt +2 -0
- libcasm_xtal-2.0.0/python/libcasm_xtal.egg-info/top_level.txt +1 -0
- libcasm_xtal-2.0.0/python/pyproject.toml +9 -0
- libcasm_xtal-2.0.0/python/setup.py +77 -0
- libcasm_xtal-2.0.0/python/src/xtal.cpp +4496 -0
- libcasm_xtal-2.0.0/python/tests/conftest.py +456 -0
- libcasm_xtal-2.0.0/python/tests/data/lial.vasp +13 -0
- libcasm_xtal-2.0.0/python/tests/test_dofsetbasis.py +89 -0
- libcasm_xtal-2.0.0/python/tests/test_enumerate_superlattices.py +67 -0
- libcasm_xtal-2.0.0/python/tests/test_integral_site_coordinate.py +193 -0
- libcasm_xtal-2.0.0/python/tests/test_lattice.py +383 -0
- libcasm_xtal-2.0.0/python/tests/test_lattices.py +65 -0
- libcasm_xtal-2.0.0/python/tests/test_methods.py +13 -0
- libcasm_xtal-2.0.0/python/tests/test_prim.py +431 -0
- libcasm_xtal-2.0.0/python/tests/test_prims.py +15 -0
- libcasm_xtal-2.0.0/python/tests/test_siteindexconverter.py +90 -0
- libcasm_xtal-2.0.0/python/tests/test_strainconverter.py +132 -0
- libcasm_xtal-2.0.0/python/tests/test_structure.py +777 -0
- libcasm_xtal-2.0.0/python/tests/test_structures.py +50 -0
- libcasm_xtal-2.0.0/python/tests/test_syminfo.py +26 -0
- libcasm_xtal-2.0.0/python/tests/test_symop.py +273 -0
- libcasm_xtal-2.0.0/python/tests/test_unitcellindexconverter.py +74 -0
- libcasm_xtal-2.0.0/setup.cfg +4 -0
- libcasm_xtal-2.0.0/setup.py +10 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/AnisoValTraits.cc +574 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/BasicStructure.cc +647 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/BasicStructureTools.cc +745 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/CanonicalForm.cc +109 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/Coordinate.cc +351 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/CoordinateSystems.cc +8 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/DoFSet.cc +78 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/HermiteCounter.cc +433 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/IntegralCoordinateWithin.cc +122 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/Lattice.cc +1020 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/LatticeIsEquivalent.cc +106 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/LatticeMap.cc +387 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/LinearIndexConverter.cc +114 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/Molecule.cc +172 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/Niggli.cc +462 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/OccupantDoFIsEquivalent.cc +77 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/SimpleStrucMapCalculator.cc +504 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/SimpleStructure.cc +61 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/SimpleStructureTools.cc +614 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/Site.cc +492 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/SpeciesProperty.cc +36 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/Strain.cc +113 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/StrainConverter.cc +170 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/StrucMapping.cc +909 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/Superlattice.cc +42 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/SuperlatticeEnumerator.cc +300 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/SymInfo.cc +151 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/SymTools.cc +167 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/SymType.cc +34 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/SymTypeComparator.cc +50 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/UnitCellCoord.cc +138 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/UnitCellCoordRep.cc +56 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/UnitCellCoordTraits.cc +5 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/io/BasicStructureIO.cc +575 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/io/DoFSetIO.cc +78 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/io/LatticeIO.cc +28 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/io/SimpleStructureIO.cc +444 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/io/SuperlatticeEnumeratorIO.cc +61 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/io/SymInfo_json_io.cc +71 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/io/SymInfo_stream_io.cc +466 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/io/UnitCellCoordIO.cc +29 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/io/VaspIO.cc +180 -0
- libcasm_xtal-2.0.0/src/casm/crystallography/version.cc +13 -0
- libcasm_xtal-2.0.0/stylize.sh +18 -0
- libcasm_xtal-2.0.0/test_requirements.txt +2 -0
- libcasm_xtal-2.0.0/tests/CMakeLists.txt +157 -0
- libcasm_xtal-2.0.0/tests/CMakeLists.txt.in +132 -0
- libcasm_xtal-2.0.0/tests/unit/Common.cpp +99 -0
- libcasm_xtal-2.0.0/tests/unit/Common.hh +55 -0
- libcasm_xtal-2.0.0/tests/unit/TestStructures.hh +222 -0
- libcasm_xtal-2.0.0/tests/unit/autotools.cc +28 -0
- libcasm_xtal-2.0.0/tests/unit/autotools.hh +19 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/AnisoValTraits_test.cpp +17 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/BasicStructureIO_test.cpp +145 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/BasicStructureTools_test.cpp +47 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/BasicStructure_test.cpp +406 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/Coordinate_test.cpp +271 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/FactorGroupConsistency_test.cpp +132 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/HermiteCounter_test.cpp +391 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/IntegralCoordinateWithin_test.cpp +117 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/Lattice_test.cpp +134 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/LinearIndexConverter_test.cpp +151 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/Molecule_test.cpp +108 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/Niggli_test.cpp +239 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/SimpleStructureIO_test.cpp +39 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/SimpleStructure_test.cpp +217 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/Site_test.cpp +40 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/SuperlatticeEnumerator_test.cpp +138 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/SymInfo_test.cpp +57 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/SymRepBuilder_test.cpp +131 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/SymType_test.cpp +207 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/UnitCellCoord_test.cpp +128 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/data/POS1.txt +17 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/data/PRIM1.txt +8 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/data/PRIM2.txt +11 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/data/PRIM3.txt +9 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/data/PRIM4.txt +9 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/data/hcp_mg.vasp +11 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/data/hcp_stack3.vasp +15 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/data/structure_1.json +32 -0
- libcasm_xtal-2.0.0/tests/unit/crystallography/version_test.cpp +47 -0
- libcasm_xtal-2.0.0/tests/unit/gtest_main_run_all.cpp +6 -0
- libcasm_xtal-2.0.0/tests/unit/testdir.cc +48 -0
- libcasm_xtal-2.0.0/tests/unit/testdir.hh +46 -0
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `libcasm-xtal` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [2.0.0] - 2025-05-02
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Build for Python 3.13
|
|
13
|
+
- Restrict requires-python to ">=3.9,<3.14"
|
|
14
|
+
- Run CI tests using Python 3.13
|
|
15
|
+
- Build MacOS arm64 wheels using MacOS 15
|
|
16
|
+
- Build Linux wheels using Ubuntu 24.04
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## [2.0a12] - 2024-12-10
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- Fixed `xtal::Lattice::_generate_voronoi_table()`. The acute angle test resulted in the FCC lattice missing a row for the normal that lies along a conventional unit cell lattice vector, so voronoi number was 4 instead of 5 for the octahedral interstitial coordinate).
|
|
24
|
+
|
|
25
|
+
### Added
|
|
26
|
+
|
|
27
|
+
- Added `Lattice.voronoi_table`, `Lattice.voronoi_number`, and `Lattice.voronoi_inner_radius`.
|
|
28
|
+
|
|
29
|
+
### Changed
|
|
30
|
+
|
|
31
|
+
- Build macos x86_64 wheels with macos-13 Github Actions runner
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [2.0a11] - 2024-08-09
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- Added `Lattice.copy`, `Lattice.__copy__`, `Lattice.__deepcopy__`, `Lattice.__repr__`, `Lattice.to_dict`, and `Lattice.from_dict`
|
|
39
|
+
- Added `AtomComponent.copy`, `AtomComponent.__copy__`, `AtomComponent.__deepcopy__`, `AtomComponent.__repr__`, `AtomComponent.to_dict`, and `AtomComponent.from_dict`
|
|
40
|
+
- Added `Occupant.copy`, `Occupant.__copy__`, `Occupant.__deepcopy__`, `Occupant.__repr__`, `Occupant.to_dict`, and `Occupant.from_dict`
|
|
41
|
+
- Added `DoFSetBasis.copy`, `DoFSetBasis.__copy__`, `DoFSetBasis.__deepcopy__`, `DoFSetBasis.__repr__`, `DoFSetBasis.to_dict`, and `DoFSetBasis.from_dict`
|
|
42
|
+
- Added `Prim.copy`, `Prim.__copy__`, `Prim.__deepcopy__`, and `Prim.__repr__`
|
|
43
|
+
- Added `SymOp.copy`, `SymOp.__copy__`, `SymOp.__deepcopy__`, and `SymOp.__repr__`
|
|
44
|
+
- Added `Structure.copy` and `Structure.__repr__`
|
|
45
|
+
- Added `IntegralSiteCoordinate.copy`, `IntegralSiteCoordinate.__copy__`, and `IntegralSiteCoordinate.__deepcopy__`
|
|
46
|
+
- Added `IntegralSiteCoordinateRep.copy`, `IntegralSiteCoordinateRep.__copy__`, `IntegralSiteCoordinateRep.__deepcopy__`, and `IntegralSiteCoordinateRep.__repr__`
|
|
47
|
+
- Added usage documentation for Structure manipulation and input / output
|
|
48
|
+
|
|
49
|
+
### Changed
|
|
50
|
+
|
|
51
|
+
- Changed `IntegralSiteCoordinate.__str__` to `IntegralSiteCoordinate.__repr__` and changed the output from "b, i j k" to "[b, i, j, k]"
|
|
52
|
+
- Changed `xtal::make_point_group` to remove the `symmetrized_with_fractional` step.
|
|
53
|
+
- Changed construction of factor group translations to set components very close to zero (absolute value less than tol * 1e-5) to exactly zero.
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
|
|
57
|
+
- Make a user-defined CASM::xtal::SymInfo copy constructor so that member xtal::Coordinate have the correct "home" lattice
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
## [2.0a10] - 2024-07-12
|
|
61
|
+
|
|
62
|
+
### Changed
|
|
63
|
+
|
|
64
|
+
- Clarified documentation for `libcasm.xtal.Lattice.is_equivalent_to`
|
|
65
|
+
- Wheels compiled with numpy>=2.0.0
|
|
66
|
+
- Run github actions on push, pull_request, and weekly
|
|
67
|
+
- Use ruff NPY201
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
## [2.0a9] - 2024-03-13
|
|
71
|
+
|
|
72
|
+
### Fixed
|
|
73
|
+
|
|
74
|
+
- Fix CASM::xtal::make_primitive, which was not copying unique_names. This also fixes the output of libcasm.xtal.make_primitive which was losing the occ_dof list as a result.
|
|
75
|
+
- Fix JSON output of xtal::BasicStructure site label
|
|
76
|
+
- Changed pseudoinverse calculation for basis changes to `completeOrthogonalDecomposition().pseudoInverse()`
|
|
77
|
+
|
|
78
|
+
### Changed
|
|
79
|
+
|
|
80
|
+
- Changed make_primitive to act on either Prim or Structure.
|
|
81
|
+
- Changed default of `xtal.Structure.to_dict` to output in fractional coordinates
|
|
82
|
+
- Added `excluded_species` and `frac` parameters to xtal.Structure.to_dict
|
|
83
|
+
|
|
84
|
+
### Added
|
|
85
|
+
|
|
86
|
+
- Add to libcasm.xtal: make_primitive_prim (equivalent to current make_primitive), make_primitive_structure, and make_canonical_structure.
|
|
87
|
+
- Add options to the BCC and FCC structure factory functions in libcasm.xtal.structures to make the conventional cubic unit cells.
|
|
88
|
+
- Add to libcasm.xtal: StructureAtomInfo namedtuple, and methods sort_structure_by_atom_info, sort_structure_by_atom_type, sort_structure_by_atom_coordinate_frac, and sort_structure_by_atom_coordinate_cart
|
|
89
|
+
- Add to libcasm.xtal: substitute_structure_species
|
|
90
|
+
- Add to libcasm.xtal.Prim: method labels, constructor parameter `labels`
|
|
91
|
+
- Add to libcasm.xtal.Lattice: methods reciprocal, volume, lengths_and_angles, from_lengths_and_angles
|
|
92
|
+
- Added `unit_cell`, `diagonal_only`, and `fixed_shape` parameters to libcasm.xtal.enumerate_superlattices.
|
|
93
|
+
- Add to libcasm.xtal: combine_structures, filter_structure_by_atom_info, make_structure_atom_info, and make_structure_from_atom_info
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## [2.0a8] - 2023-11-15
|
|
97
|
+
|
|
98
|
+
### Changed
|
|
99
|
+
|
|
100
|
+
- Updated docs for PyData Sphinx Theme 0.14.3, particularly dark theme colors and logo
|
|
101
|
+
|
|
102
|
+
### Fixed
|
|
103
|
+
|
|
104
|
+
- Fixed broken docs links to xtal.SymOp
|
|
105
|
+
- Fixed return type docs
|
|
106
|
+
|
|
107
|
+
### Deprecated
|
|
108
|
+
|
|
109
|
+
- The to_json and from_json methods of xtal.Prim, xtal.Structure, and xtal.SymInfo are deprecated in favor of the to_dict / from_dict methods and the builtin json module
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
## [2.0a7] - 2023-11-14
|
|
113
|
+
|
|
114
|
+
### Changed
|
|
115
|
+
|
|
116
|
+
- Add py::is_operator() in the bindings of the `__mul__` operators xtal.SymOp and xtal.IntegralSiteCoordinateRep so it possible to add `__rmul__` operators to classes in other modules.
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
## [2.0a6] - 2023-11-07
|
|
120
|
+
|
|
121
|
+
### Changed
|
|
122
|
+
|
|
123
|
+
- Allow integer array parameters to be either C or F ordered numpy arrays.
|
|
124
|
+
- Added Lattice to CASM::xtal::SymInfo to avoid bad pointers in Coordinate members
|
|
125
|
+
- Changed Prim.lattice and Structure.lattice docs to specify that the lattice is returned as a copy.
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## [2.0a5] - 2023-10-25
|
|
129
|
+
|
|
130
|
+
### Added
|
|
131
|
+
|
|
132
|
+
- Added SymOp.matrix_rep to get matrix representations for transforming CASM-supported properties in the standard basis
|
|
133
|
+
|
|
134
|
+
### Changed
|
|
135
|
+
|
|
136
|
+
- Do not allow automatic conversion from floating point arrays to integer Eigen objects.
|
|
137
|
+
- Added a parameter, `mode`, to Structure.from_poscar and Structure.from_poscar_str to specify whether the POSCAR should be read as atoms, molecules, or both. The default was set to "atoms". Previous behavior was equivalent to using "both".
|
|
138
|
+
|
|
139
|
+
### Fixed
|
|
140
|
+
|
|
141
|
+
- Fixed the xtal::Site::dof error message thrown when the requested DoF type does not exist on the site
|
|
142
|
+
- Updated documentation for the `local_dofs` parameters in libcasm.xtal.prims
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
## [2.0a4] - 2023-09-29
|
|
146
|
+
|
|
147
|
+
### Fixed
|
|
148
|
+
|
|
149
|
+
- Fixed xtal::Site::has_dof to check for either occ or continuous DoF
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## [2.0a3] - 2023-08-11
|
|
153
|
+
|
|
154
|
+
This release separates out casm/crystallography from CASM v1, in particular removing remaining dependencies on casm/symmetry for constructing symmetry representations and getting basic symmetry operation info. It creates a Python package, libcasm.xtal, that enables using casm/crystallography and may be installed via pip install, using scikit-build, CMake, and pybind11. This release also includes usage and API documentation for using libcasm.xtal, built using Sphinx.
|
|
155
|
+
|
|
156
|
+
### Added
|
|
157
|
+
|
|
158
|
+
- Added xtal::SymOpSortKeyCompare for sorting xtal::SymOp
|
|
159
|
+
- Added xtal::make_crystal_point_group to make the crystal point group from a sorted_factor_group (std::vector<xtal::SymOp>)
|
|
160
|
+
- Added xtal::make_internal_translations to get translations from the factor group
|
|
161
|
+
- Added standalone methods xtal::fast_pbc_displacement_cart and xtal::robust_pbc_displacement_cart using Eigen::Vector3d for coordinates
|
|
162
|
+
- Added xtal::Molecule::identical overload for checking for identical Molecule up to a permutation
|
|
163
|
+
- Added OccupantDoFIsEquivalent::atom_position_perm to get Molecule atom position permuation
|
|
164
|
+
- Added xtal::make_simple_structure from a POSCAR stream
|
|
165
|
+
- Added xtal::apply and xtal::copy_apply methods for transforming xtal::SimpleStructure including properties
|
|
166
|
+
- Added xtal::make_inverse for xtal::SymOp
|
|
167
|
+
- Added xtal::is_equivalent for comparing xtal::SimpleStructure
|
|
168
|
+
- Added Python package libcasm.xtal to use CASM crystallography methods for building lattices, structures, and parent crystal structures and allowed degrees of freedom (prim); enumerating superlattices; creating superstructures; finding primitive and reduced cells; and determining symmetry operations.
|
|
169
|
+
- Added scikit-build, CMake, and pybind11 build process
|
|
170
|
+
- Added GitHub Actions for unit testing
|
|
171
|
+
- Added GitHub Action build_wheels.yml for Python x86_64 wheel building using cibuildwheel
|
|
172
|
+
- Added Cirrus-CI .cirrus.yml for Python aarch64 and arm64 wheel building using cibuildwheel
|
|
173
|
+
- Added Python documentation
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
### Changed
|
|
177
|
+
|
|
178
|
+
- Moved StrainConverter into crystallography, removing symmetry dependencies
|
|
179
|
+
- Moved SymInfo into crystallography from symmetry, using only xtal::SymOp
|
|
180
|
+
- Moved class SymBasisPermute from symmetry to struct UnitCellCoordRep
|
|
181
|
+
|
|
182
|
+
### Removed
|
|
183
|
+
|
|
184
|
+
- Removed autotools build process
|
|
185
|
+
- Removed boost dependencies
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.20)
|
|
2
|
+
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
|
|
3
|
+
|
|
4
|
+
project(CASMcode_crystallography VERSION 2.0.0 LANGUAGES CXX)
|
|
5
|
+
|
|
6
|
+
# set CMAKE_INSTALL_X variables
|
|
7
|
+
include(GNUInstallDirs)
|
|
8
|
+
|
|
9
|
+
# specify the C++ standard
|
|
10
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
11
|
+
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
12
|
+
|
|
13
|
+
# try to use ccache
|
|
14
|
+
find_program(CCACHE_PROGRAM ccache)
|
|
15
|
+
if(CCACHE_PROGRAM)
|
|
16
|
+
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
|
17
|
+
endif()
|
|
18
|
+
|
|
19
|
+
##############################################
|
|
20
|
+
## Find dependencies
|
|
21
|
+
|
|
22
|
+
# Should find ZLIB::ZLIB
|
|
23
|
+
find_package(ZLIB)
|
|
24
|
+
|
|
25
|
+
# Find CASM
|
|
26
|
+
if(NOT DEFINED CASM_PREFIX)
|
|
27
|
+
message(STATUS "CASM_PREFIX not defined")
|
|
28
|
+
# try to find Python
|
|
29
|
+
find_package (Python COMPONENTS Interpreter Development)
|
|
30
|
+
if(DEFINED Python_EXECUTABLE)
|
|
31
|
+
# if Python found, obtain CASM_PREFIX from the libcasm.casmglobal
|
|
32
|
+
message(STATUS "found Python_EXECUTABLE: ${Python_EXECUTABLE}")
|
|
33
|
+
message(STATUS "checking for libcasm-global")
|
|
34
|
+
execute_process(
|
|
35
|
+
COMMAND pip show libcasm-global
|
|
36
|
+
RESULT_VARIABLE EXIT_CODE
|
|
37
|
+
OUTPUT_QUIET
|
|
38
|
+
)
|
|
39
|
+
if (${EXIT_CODE} EQUAL 0)
|
|
40
|
+
message(STATUS "found libcasm-global")
|
|
41
|
+
execute_process(COMMAND ${Python_EXECUTABLE} -m libcasm.casmglobal --prefix
|
|
42
|
+
OUTPUT_VARIABLE CASM_PREFIX_RAW)
|
|
43
|
+
string(STRIP ${CASM_PREFIX_RAW} CASM_PREFIX)
|
|
44
|
+
message(STATUS "CASM_PREFIX: ${CASM_PREFIX}")
|
|
45
|
+
else()
|
|
46
|
+
message(STATUS "did not find libcasm-global")
|
|
47
|
+
endif()
|
|
48
|
+
endif()
|
|
49
|
+
endif()
|
|
50
|
+
if(DEFINED CASM_PREFIX)
|
|
51
|
+
set(CASMcode_global_ROOT ${CASM_PREFIX}/share/CASMcode_global/cmake)
|
|
52
|
+
endif()
|
|
53
|
+
find_package(CASMcode_global)
|
|
54
|
+
if(NOT CASMcode_global_FOUND)
|
|
55
|
+
message(FATAL_ERROR "CMake failed to find CASMcode_global")
|
|
56
|
+
endif()
|
|
57
|
+
# if successful, we have CASM::casm_global
|
|
58
|
+
|
|
59
|
+
# if no user CMAKE_INSTALL_PREFIX, use CASM_PREFIX if it exists
|
|
60
|
+
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
61
|
+
if(DEFINED CASM_PREFIX)
|
|
62
|
+
message(STATUS "CMAKE_INSTALL_PREFIX initialized to default, so updating CMAKE_INSTALL_PREFIX to CASM_PREFIX")
|
|
63
|
+
set(CMAKE_INSTALL_PREFIX ${CASM_PREFIX} CACHE PATH "set CMAKE_INSTALL_PREFIX to CASM_PREFIX" FORCE)
|
|
64
|
+
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
|
|
65
|
+
endif()
|
|
66
|
+
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
67
|
+
|
|
68
|
+
##############################################
|
|
69
|
+
## Build libcasm_crystallography
|
|
70
|
+
|
|
71
|
+
# create libcasm_crystallography
|
|
72
|
+
set(
|
|
73
|
+
libcasm_crystallography_HEADERS
|
|
74
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/OccupantDoFIsEquivalent.hh
|
|
75
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/BasicStructureTools.hh
|
|
76
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/Lattice.hh
|
|
77
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/StrucMapCalculatorInterface.hh
|
|
78
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/Site.hh
|
|
79
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/CanonicalForm.hh
|
|
80
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/SimpleStructure.hh
|
|
81
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/HermiteCounter.hh
|
|
82
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/SimpleStrucMapCalculator.hh
|
|
83
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/StrainConverter.hh
|
|
84
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/DoFSet.hh
|
|
85
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/DoFDecl.hh
|
|
86
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/SymInfo.hh
|
|
87
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/LinearIndexConverter.hh
|
|
88
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/AnisoValTraits.hh
|
|
89
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/Superlattice.hh
|
|
90
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/LatticeMap.hh
|
|
91
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/BasicStructure.hh
|
|
92
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/IntegralCoordinateWithin.hh
|
|
93
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/Strain.hh
|
|
94
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/UnitCellCoord.hh
|
|
95
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/LatticeIsEquivalent.hh
|
|
96
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/Molecule.hh
|
|
97
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/version.hh
|
|
98
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/UnitCellCoordRep.hh
|
|
99
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/SymTools.hh
|
|
100
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/SuperlatticeEnumerator.hh
|
|
101
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/StrucMapping.hh
|
|
102
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/Coordinate.hh
|
|
103
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/SimpleStructureTools.hh
|
|
104
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/UnitCellCoordTraits.hh
|
|
105
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/Niggli.hh
|
|
106
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/SymRepBuilder.hh
|
|
107
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/CoordinateSystems.hh
|
|
108
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/SymTypeComparator.hh
|
|
109
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/SpeciesProperty.hh
|
|
110
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/SymType.hh
|
|
111
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/Adapter.hh
|
|
112
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/io/SimpleStructureIO.hh
|
|
113
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/io/DoFSetIO.hh
|
|
114
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/io/SymInfo_stream_io.hh
|
|
115
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/io/LatticeIO.hh
|
|
116
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/io/SuperlatticeEnumeratorIO.hh
|
|
117
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/io/BasicStructureIO.hh
|
|
118
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/io/UnitCellCoordIO.hh
|
|
119
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/io/VaspIO.hh
|
|
120
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/io/SymInfo_json_io.hh
|
|
121
|
+
${PROJECT_SOURCE_DIR}/include/casm/crystallography/io/jsonStruc.hh
|
|
122
|
+
)
|
|
123
|
+
set(
|
|
124
|
+
libcasm_crystallography_SOURCES
|
|
125
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/Superlattice.cc
|
|
126
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/AnisoValTraits.cc
|
|
127
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/LatticeMap.cc
|
|
128
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/BasicStructure.cc
|
|
129
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/IntegralCoordinateWithin.cc
|
|
130
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/Strain.cc
|
|
131
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/UnitCellCoord.cc
|
|
132
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/DoFSet.cc
|
|
133
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/StrainConverter.cc
|
|
134
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/SymInfo.cc
|
|
135
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/LinearIndexConverter.cc
|
|
136
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/CanonicalForm.cc
|
|
137
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/Site.cc
|
|
138
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/SimpleStructure.cc
|
|
139
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/SimpleStrucMapCalculator.cc
|
|
140
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/HermiteCounter.cc
|
|
141
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/OccupantDoFIsEquivalent.cc
|
|
142
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/BasicStructureTools.cc
|
|
143
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/Lattice.cc
|
|
144
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/CoordinateSystems.cc
|
|
145
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/SymTypeComparator.cc
|
|
146
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/SpeciesProperty.cc
|
|
147
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/SymType.cc
|
|
148
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/SimpleStructureTools.cc
|
|
149
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/Coordinate.cc
|
|
150
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/UnitCellCoordTraits.cc
|
|
151
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/Niggli.cc
|
|
152
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/SuperlatticeEnumerator.cc
|
|
153
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/SymTools.cc
|
|
154
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/StrucMapping.cc
|
|
155
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/LatticeIsEquivalent.cc
|
|
156
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/Molecule.cc
|
|
157
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/version.cc
|
|
158
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/UnitCellCoordRep.cc
|
|
159
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/io/SuperlatticeEnumeratorIO.cc
|
|
160
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/io/LatticeIO.cc
|
|
161
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/io/BasicStructureIO.cc
|
|
162
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/io/SimpleStructureIO.cc
|
|
163
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/io/DoFSetIO.cc
|
|
164
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/io/SymInfo_stream_io.cc
|
|
165
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/io/SymInfo_json_io.cc
|
|
166
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/io/VaspIO.cc
|
|
167
|
+
${PROJECT_SOURCE_DIR}/src/casm/crystallography/io/UnitCellCoordIO.cc
|
|
168
|
+
)
|
|
169
|
+
add_library(casm_crystallography SHARED ${libcasm_crystallography_SOURCES})
|
|
170
|
+
target_include_directories(casm_crystallography
|
|
171
|
+
PUBLIC
|
|
172
|
+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
173
|
+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/casm/external>
|
|
174
|
+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/casm/external/gzstream>
|
|
175
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
176
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/casm/external>
|
|
177
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/casm/external/gzstream>
|
|
178
|
+
)
|
|
179
|
+
target_compile_options(casm_crystallography
|
|
180
|
+
PUBLIC
|
|
181
|
+
"-DCASM_XTAL_TXT_VERSION=\"${CMAKE_PROJECT_VERSION}\""
|
|
182
|
+
-DEIGEN_DEFAULT_DENSE_INDEX_TYPE=long
|
|
183
|
+
-DGZSTREAM_NAMESPACE=gz
|
|
184
|
+
)
|
|
185
|
+
target_link_libraries(casm_crystallography
|
|
186
|
+
ZLIB::ZLIB
|
|
187
|
+
${CMAKE_DL_LIBS}
|
|
188
|
+
CASM::casm_global
|
|
189
|
+
)
|
|
190
|
+
if(APPLE)
|
|
191
|
+
set_target_properties(
|
|
192
|
+
casm_crystallography PROPERTIES INSTALL_RPATH "@loader_path")
|
|
193
|
+
else()
|
|
194
|
+
set_target_properties(
|
|
195
|
+
casm_crystallography PROPERTIES INSTALL_RPATH "$ORIGIN")
|
|
196
|
+
endif()
|
|
197
|
+
|
|
198
|
+
##############################################
|
|
199
|
+
## Install libcasm_crystallography
|
|
200
|
+
|
|
201
|
+
# install header files in <prefix>/libcasm/include/,
|
|
202
|
+
# while preserving directory structure
|
|
203
|
+
foreach ( filevar ${libcasm_crystallography_HEADERS} )
|
|
204
|
+
file(RELATIVE_PATH relfile ${PROJECT_SOURCE_DIR}/include/ ${filevar})
|
|
205
|
+
get_filename_component( reldir ${relfile} DIRECTORY )
|
|
206
|
+
install( FILES ${filevar} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${reldir} )
|
|
207
|
+
endforeach()
|
|
208
|
+
|
|
209
|
+
# install libcasm_crystallography in <prefix>/libcasm/lib/
|
|
210
|
+
install(
|
|
211
|
+
TARGETS casm_crystallography
|
|
212
|
+
EXPORT CASMcode_crystallographyTargets
|
|
213
|
+
DESTINATION lib)
|
|
214
|
+
|
|
215
|
+
##############################################
|
|
216
|
+
## Python extensions
|
|
217
|
+
|
|
218
|
+
# The CMake package config and target files are installed under the Python
|
|
219
|
+
# package root. This is necessary to ensure that all the relative paths in the
|
|
220
|
+
# helloTargets.cmake resolve correctly. It also provides encapsulation.
|
|
221
|
+
#
|
|
222
|
+
# The actual path used must be selected so that consuming projects can locate it
|
|
223
|
+
# via `find_package`. To support finding CMake packages in the Python package
|
|
224
|
+
# prefix, using `find_package`s default search path of
|
|
225
|
+
# `<prefix>/<name>/share/<name>*/cmake/` is reasonable. Adding the Python
|
|
226
|
+
# package installation prefix to CMAKE_PREFIX_PATH in combination with this path
|
|
227
|
+
# will allow `find_package` to find this package and any other package installed
|
|
228
|
+
# via a Python package if the CMake and Python packages are named the same.
|
|
229
|
+
set(CASM_CRYSTALLOGRAPHY_CMAKE_PACKAGE_INSTALL_SUBDIR "share/CASMcode_crystallography/cmake")
|
|
230
|
+
|
|
231
|
+
install(
|
|
232
|
+
EXPORT CASMcode_crystallographyTargets
|
|
233
|
+
NAMESPACE CASM::
|
|
234
|
+
DESTINATION ${CASM_CRYSTALLOGRAPHY_CMAKE_PACKAGE_INSTALL_SUBDIR})
|
|
235
|
+
|
|
236
|
+
include(CMakePackageConfigHelpers)
|
|
237
|
+
|
|
238
|
+
write_basic_package_version_file(
|
|
239
|
+
CASMcode_crystallographyConfigVersion.cmake
|
|
240
|
+
VERSION ${PROJECT_VERSION}
|
|
241
|
+
COMPATIBILITY SameMinorVersion)
|
|
242
|
+
|
|
243
|
+
configure_package_config_file(
|
|
244
|
+
"${PROJECT_SOURCE_DIR}/cmake/CASMcode_crystallographyConfig.cmake.in" CASMcode_crystallographyConfig.cmake
|
|
245
|
+
INSTALL_DESTINATION ${CASM_CRYSTALLOGRAPHY_CMAKE_PACKAGE_INSTALL_SUBDIR})
|
|
246
|
+
|
|
247
|
+
install(FILES "${PROJECT_BINARY_DIR}/CASMcode_crystallographyConfig.cmake"
|
|
248
|
+
"${PROJECT_BINARY_DIR}/CASMcode_crystallographyConfigVersion.cmake"
|
|
249
|
+
DESTINATION ${CASM_CRYSTALLOGRAPHY_CMAKE_PACKAGE_INSTALL_SUBDIR})
|
|
250
|
+
|
|
251
|
+
# We are using the SKBUILD variable, which is defined when scikit-build is
|
|
252
|
+
# running the CMake build, to control building the Python wrapper. This allows
|
|
253
|
+
# the C++ project to be installed, standalone, when using the standard CMake
|
|
254
|
+
# build flow.
|
|
255
|
+
if(DEFINED SKBUILD)
|
|
256
|
+
|
|
257
|
+
# call pybind11-config to obtain the root of the cmake package
|
|
258
|
+
execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pybind11 --cmakedir
|
|
259
|
+
OUTPUT_VARIABLE pybind11_ROOT_RAW)
|
|
260
|
+
string(STRIP ${pybind11_ROOT_RAW} pybind11_ROOT)
|
|
261
|
+
find_package(pybind11)
|
|
262
|
+
|
|
263
|
+
# The extension modules must load:
|
|
264
|
+
# - the casm_global library
|
|
265
|
+
# - the casm_crystallography library
|
|
266
|
+
# They can be found by setting a relative rpath
|
|
267
|
+
|
|
268
|
+
### libcasm.xtal._xtal ###
|
|
269
|
+
pybind11_add_module(_xtal MODULE
|
|
270
|
+
"${PROJECT_SOURCE_DIR}/python/src/xtal.cpp")
|
|
271
|
+
target_link_libraries(_xtal PRIVATE CASM::casm_global)
|
|
272
|
+
target_link_libraries(_xtal PRIVATE casm_crystallography)
|
|
273
|
+
install(TARGETS _xtal DESTINATION xtal)
|
|
274
|
+
if(APPLE)
|
|
275
|
+
set_target_properties(
|
|
276
|
+
_xtal PROPERTIES INSTALL_RPATH "@loader_path/../lib")
|
|
277
|
+
else()
|
|
278
|
+
set_target_properties(
|
|
279
|
+
_xtal PROPERTIES INSTALL_RPATH "$ORIGIN/../lib")
|
|
280
|
+
endif()
|
|
281
|
+
|
|
282
|
+
endif()
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.20)
|
|
2
|
+
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version")
|
|
3
|
+
|
|
4
|
+
project(CASMcode_crystallography VERSION 2.0.0 LANGUAGES CXX)
|
|
5
|
+
|
|
6
|
+
# set CMAKE_INSTALL_X variables
|
|
7
|
+
include(GNUInstallDirs)
|
|
8
|
+
|
|
9
|
+
# specify the C++ standard
|
|
10
|
+
set(CMAKE_CXX_STANDARD 17)
|
|
11
|
+
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
12
|
+
|
|
13
|
+
# try to use ccache
|
|
14
|
+
find_program(CCACHE_PROGRAM ccache)
|
|
15
|
+
if(CCACHE_PROGRAM)
|
|
16
|
+
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
|
17
|
+
endif()
|
|
18
|
+
|
|
19
|
+
##############################################
|
|
20
|
+
## Find dependencies
|
|
21
|
+
|
|
22
|
+
# Should find ZLIB::ZLIB
|
|
23
|
+
find_package(ZLIB)
|
|
24
|
+
|
|
25
|
+
# Find CASM
|
|
26
|
+
if(NOT DEFINED CASM_PREFIX)
|
|
27
|
+
message(STATUS "CASM_PREFIX not defined")
|
|
28
|
+
# try to find Python
|
|
29
|
+
find_package (Python COMPONENTS Interpreter Development)
|
|
30
|
+
if(DEFINED Python_EXECUTABLE)
|
|
31
|
+
# if Python found, obtain CASM_PREFIX from the libcasm.casmglobal
|
|
32
|
+
message(STATUS "found Python_EXECUTABLE: ${Python_EXECUTABLE}")
|
|
33
|
+
message(STATUS "checking for libcasm-global")
|
|
34
|
+
execute_process(
|
|
35
|
+
COMMAND pip show libcasm-global
|
|
36
|
+
RESULT_VARIABLE EXIT_CODE
|
|
37
|
+
OUTPUT_QUIET
|
|
38
|
+
)
|
|
39
|
+
if (${EXIT_CODE} EQUAL 0)
|
|
40
|
+
message(STATUS "found libcasm-global")
|
|
41
|
+
execute_process(COMMAND ${Python_EXECUTABLE} -m libcasm.casmglobal --prefix
|
|
42
|
+
OUTPUT_VARIABLE CASM_PREFIX_RAW)
|
|
43
|
+
string(STRIP ${CASM_PREFIX_RAW} CASM_PREFIX)
|
|
44
|
+
message(STATUS "CASM_PREFIX: ${CASM_PREFIX}")
|
|
45
|
+
else()
|
|
46
|
+
message(STATUS "did not find libcasm-global")
|
|
47
|
+
endif()
|
|
48
|
+
endif()
|
|
49
|
+
endif()
|
|
50
|
+
if(DEFINED CASM_PREFIX)
|
|
51
|
+
set(CASMcode_global_ROOT ${CASM_PREFIX}/share/CASMcode_global/cmake)
|
|
52
|
+
endif()
|
|
53
|
+
find_package(CASMcode_global)
|
|
54
|
+
if(NOT CASMcode_global_FOUND)
|
|
55
|
+
message(FATAL_ERROR "CMake failed to find CASMcode_global")
|
|
56
|
+
endif()
|
|
57
|
+
# if successful, we have CASM::casm_global
|
|
58
|
+
|
|
59
|
+
# if no user CMAKE_INSTALL_PREFIX, use CASM_PREFIX if it exists
|
|
60
|
+
IF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
61
|
+
if(DEFINED CASM_PREFIX)
|
|
62
|
+
message(STATUS "CMAKE_INSTALL_PREFIX initialized to default, so updating CMAKE_INSTALL_PREFIX to CASM_PREFIX")
|
|
63
|
+
set(CMAKE_INSTALL_PREFIX ${CASM_PREFIX} CACHE PATH "set CMAKE_INSTALL_PREFIX to CASM_PREFIX" FORCE)
|
|
64
|
+
message(STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")
|
|
65
|
+
endif()
|
|
66
|
+
ENDIF(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
|
67
|
+
|
|
68
|
+
##############################################
|
|
69
|
+
## Build libcasm_crystallography
|
|
70
|
+
|
|
71
|
+
# create libcasm_crystallography
|
|
72
|
+
set(
|
|
73
|
+
libcasm_crystallography_HEADERS
|
|
74
|
+
@header_files@)
|
|
75
|
+
set(
|
|
76
|
+
libcasm_crystallography_SOURCES
|
|
77
|
+
@source_files@)
|
|
78
|
+
add_library(casm_crystallography SHARED ${libcasm_crystallography_SOURCES})
|
|
79
|
+
target_include_directories(casm_crystallography
|
|
80
|
+
PUBLIC
|
|
81
|
+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
82
|
+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/casm/external>
|
|
83
|
+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/casm/external/gzstream>
|
|
84
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
85
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/casm/external>
|
|
86
|
+
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/casm/external/gzstream>
|
|
87
|
+
)
|
|
88
|
+
target_compile_options(casm_crystallography
|
|
89
|
+
PUBLIC
|
|
90
|
+
"-DCASM_XTAL_TXT_VERSION=\"${CMAKE_PROJECT_VERSION}\""
|
|
91
|
+
-DEIGEN_DEFAULT_DENSE_INDEX_TYPE=long
|
|
92
|
+
-DGZSTREAM_NAMESPACE=gz
|
|
93
|
+
)
|
|
94
|
+
target_link_libraries(casm_crystallography
|
|
95
|
+
ZLIB::ZLIB
|
|
96
|
+
${CMAKE_DL_LIBS}
|
|
97
|
+
CASM::casm_global
|
|
98
|
+
)
|
|
99
|
+
if(APPLE)
|
|
100
|
+
set_target_properties(
|
|
101
|
+
casm_crystallography PROPERTIES INSTALL_RPATH "@loader_path")
|
|
102
|
+
else()
|
|
103
|
+
set_target_properties(
|
|
104
|
+
casm_crystallography PROPERTIES INSTALL_RPATH "$ORIGIN")
|
|
105
|
+
endif()
|
|
106
|
+
|
|
107
|
+
##############################################
|
|
108
|
+
## Install libcasm_crystallography
|
|
109
|
+
|
|
110
|
+
# install header files in <prefix>/libcasm/include/,
|
|
111
|
+
# while preserving directory structure
|
|
112
|
+
foreach ( filevar ${libcasm_crystallography_HEADERS} )
|
|
113
|
+
file(RELATIVE_PATH relfile ${PROJECT_SOURCE_DIR}/include/ ${filevar})
|
|
114
|
+
get_filename_component( reldir ${relfile} DIRECTORY )
|
|
115
|
+
install( FILES ${filevar} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${reldir} )
|
|
116
|
+
endforeach()
|
|
117
|
+
|
|
118
|
+
# install libcasm_crystallography in <prefix>/libcasm/lib/
|
|
119
|
+
install(
|
|
120
|
+
TARGETS casm_crystallography
|
|
121
|
+
EXPORT CASMcode_crystallographyTargets
|
|
122
|
+
DESTINATION lib)
|
|
123
|
+
|
|
124
|
+
##############################################
|
|
125
|
+
## Python extensions
|
|
126
|
+
|
|
127
|
+
# The CMake package config and target files are installed under the Python
|
|
128
|
+
# package root. This is necessary to ensure that all the relative paths in the
|
|
129
|
+
# helloTargets.cmake resolve correctly. It also provides encapsulation.
|
|
130
|
+
#
|
|
131
|
+
# The actual path used must be selected so that consuming projects can locate it
|
|
132
|
+
# via `find_package`. To support finding CMake packages in the Python package
|
|
133
|
+
# prefix, using `find_package`s default search path of
|
|
134
|
+
# `<prefix>/<name>/share/<name>*/cmake/` is reasonable. Adding the Python
|
|
135
|
+
# package installation prefix to CMAKE_PREFIX_PATH in combination with this path
|
|
136
|
+
# will allow `find_package` to find this package and any other package installed
|
|
137
|
+
# via a Python package if the CMake and Python packages are named the same.
|
|
138
|
+
set(CASM_CRYSTALLOGRAPHY_CMAKE_PACKAGE_INSTALL_SUBDIR "share/CASMcode_crystallography/cmake")
|
|
139
|
+
|
|
140
|
+
install(
|
|
141
|
+
EXPORT CASMcode_crystallographyTargets
|
|
142
|
+
NAMESPACE CASM::
|
|
143
|
+
DESTINATION ${CASM_CRYSTALLOGRAPHY_CMAKE_PACKAGE_INSTALL_SUBDIR})
|
|
144
|
+
|
|
145
|
+
include(CMakePackageConfigHelpers)
|
|
146
|
+
|
|
147
|
+
write_basic_package_version_file(
|
|
148
|
+
CASMcode_crystallographyConfigVersion.cmake
|
|
149
|
+
VERSION ${PROJECT_VERSION}
|
|
150
|
+
COMPATIBILITY SameMinorVersion)
|
|
151
|
+
|
|
152
|
+
configure_package_config_file(
|
|
153
|
+
"${PROJECT_SOURCE_DIR}/cmake/CASMcode_crystallographyConfig.cmake.in" CASMcode_crystallographyConfig.cmake
|
|
154
|
+
INSTALL_DESTINATION ${CASM_CRYSTALLOGRAPHY_CMAKE_PACKAGE_INSTALL_SUBDIR})
|
|
155
|
+
|
|
156
|
+
install(FILES "${PROJECT_BINARY_DIR}/CASMcode_crystallographyConfig.cmake"
|
|
157
|
+
"${PROJECT_BINARY_DIR}/CASMcode_crystallographyConfigVersion.cmake"
|
|
158
|
+
DESTINATION ${CASM_CRYSTALLOGRAPHY_CMAKE_PACKAGE_INSTALL_SUBDIR})
|
|
159
|
+
|
|
160
|
+
# We are using the SKBUILD variable, which is defined when scikit-build is
|
|
161
|
+
# running the CMake build, to control building the Python wrapper. This allows
|
|
162
|
+
# the C++ project to be installed, standalone, when using the standard CMake
|
|
163
|
+
# build flow.
|
|
164
|
+
if(DEFINED SKBUILD)
|
|
165
|
+
|
|
166
|
+
# call pybind11-config to obtain the root of the cmake package
|
|
167
|
+
execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pybind11 --cmakedir
|
|
168
|
+
OUTPUT_VARIABLE pybind11_ROOT_RAW)
|
|
169
|
+
string(STRIP ${pybind11_ROOT_RAW} pybind11_ROOT)
|
|
170
|
+
find_package(pybind11)
|
|
171
|
+
|
|
172
|
+
# The extension modules must load:
|
|
173
|
+
# - the casm_global library
|
|
174
|
+
# - the casm_crystallography library
|
|
175
|
+
# They can be found by setting a relative rpath
|
|
176
|
+
|
|
177
|
+
### libcasm.xtal._xtal ###
|
|
178
|
+
pybind11_add_module(_xtal MODULE
|
|
179
|
+
"${PROJECT_SOURCE_DIR}/python/src/xtal.cpp")
|
|
180
|
+
target_link_libraries(_xtal PRIVATE CASM::casm_global)
|
|
181
|
+
target_link_libraries(_xtal PRIVATE casm_crystallography)
|
|
182
|
+
install(TARGETS _xtal DESTINATION xtal)
|
|
183
|
+
if(APPLE)
|
|
184
|
+
set_target_properties(
|
|
185
|
+
_xtal PROPERTIES INSTALL_RPATH "@loader_path/../lib")
|
|
186
|
+
else()
|
|
187
|
+
set_target_properties(
|
|
188
|
+
_xtal PROPERTIES INSTALL_RPATH "$ORIGIN/../lib")
|
|
189
|
+
endif()
|
|
190
|
+
|
|
191
|
+
endif()
|