Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.X atom info #36

Merged
merged 9 commits into from
Mar 13, 2024
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
8 changes: 3 additions & 5 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
build_and_store_wheels: &BUILD_AND_STORE_WHEELS
install_cibuildwheel_script:
- python -m pip install cibuildwheel==2.14.1
- python -m pip install cibuildwheel==2.17.0
run_cibuildwheel_script:
- cibuildwheel
wheels_artifacts:
Expand All @@ -24,11 +24,9 @@ linux_aarch64_task:
macos_arm64_task:
name: Build macOS arm64 wheels.
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-xcode:latest
image: ghcr.io/cirruslabs/macos-sonoma-xcode
env:
PATH: /opt/homebrew/opt/[email protected]/bin:$PATH
CIBW_ARCHS_MACOS: arm64
PATH: /opt/homebrew/opt/[email protected]/libexec/bin:$PATH
install_pre_requirements_script:
- brew install [email protected]
- ln -s python3 /opt/homebrew/opt/[email protected]/bin/python
<<: *BUILD_AND_STORE_WHEELS
2 changes: 1 addition & 1 deletion .github/workflows/test-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3
key: ${{ runner.os }}-libcasm-global-v2-0-4

- name: Install CASM dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-linux-cxx-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3
key: ${{ runner.os }}-libcasm-global-v2-0-4

- name: Install CASM dependencies
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-linux-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
uses: actions/cache/restore@v4
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3
key: ${{ runner.os }}-libcasm-global-v2-0-4

- name: checkout libcasm-global
if: steps.cache-libcasm-global-restore.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: prisms-center/CASMcode_global
path: CASMcode_global
ref: v2.0.3
ref: v2.0.4

- name: make global
if: steps.cache-libcasm-global-restore.outputs.cache-hit != 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/cache/restore@v4
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3
key: ${{ runner.os }}-libcasm-global-v2-0-4

- name: Install CASM dependencies
run: |
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- 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.
- Fix JSON output of xtal::BasicStructure site label
- Changed pseudoinverse calculation for basis changes to `completeOrthogonalDecomposition().pseudoInverse()`

### Changed

Expand All @@ -28,6 +29,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add to libcasm.xtal.Prim: method labels, constructor parameter `labels`
- Add to libcasm.xtal.Lattice: methods reciprocal, volume, lengths_and_angles, from_lengths_and_angles
- Added `unit_cell`, `diagonal_only`, and `fixed_shape` parameters to libcasm.xtal.enumerate_superlattices.
- Add to libcasm.xtal: combine_structures, filter_structure_by_atom_info, make_structure_atom_info, and make_structure_from_atom_info


## [2.0a8] - 2023-11-15
Expand Down
2 changes: 1 addition & 1 deletion build_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ scikit-build
cmake>=3.20
ninja
pybind11>=2.6
libcasm-global>=2.0.2
libcasm-global>=2.0.4
11 changes: 1 addition & 10 deletions include/casm/crystallography/DoFSet.hh
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,7 @@ class DoFSet {
assert(m_basis.rows() ==
this->traits().dim()); // TODO: This makes sense I think?
if (basis().cols() > 0 && basis().rows() > 0) {
m_inv_basis = basis()
.transpose()
.colPivHouseholderQr()
.solve(Eigen::MatrixXd::Identity(dim(), dim()))
.transpose();
m_inv_basis = basis().completeOrthogonalDecomposition().pseudoInverse();
}
}

Expand Down Expand Up @@ -224,11 +220,6 @@ struct SiteDoFSetIsEquivalent_f : private DoFSetIsEquivalent_f {
}
};

/// Create the symmtery representation for going from one basis to another
Eigen::MatrixXd dofset_transformation_matrix(const Eigen::MatrixXd &from_basis,
const Eigen::MatrixXd &to_basis,
double tol);

} // namespace xtal
} // namespace CASM

Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ requires = [
"cmake>=3.20",
"ninja",
"pybind11>=2.6",
"libcasm-global>=2.0.2",
"libcasm-global>=2.0.4",
]
build-backend = "setuptools.build_meta"

[project]
name = "libcasm-xtal"
version = "2.0a8"
version = "2.0a9"
authors = [
{ name="CASM developers", email="[email protected]" },
]
Expand All @@ -28,7 +28,7 @@ classifiers = [
"Topic :: Scientific/Engineering",
]
dependencies = [
"libcasm-global>=2.0.2",
"libcasm-global>=2.0.4",
"numpy",
]

Expand All @@ -51,13 +51,13 @@ select = ["E", "F", "I"]
known-first-party = ["libcasm", "casm"]

[tool.cibuildwheel]
# Build for python3.9, 3.10, 3.11
build = "cp39-* cp310-* cp311-*"
# Build for python3.9, 3.10, 3.11, 3.12
build = "cp39-* cp310-* cp311-* cp312-*"
# Build for cpython only
skip = "pp*"

# Need libcasm-global at wheel repair stage
before-build = "pip install libcasm-global>=2.0.2"
before-build = "pip install libcasm-global>=2.0.4"

# Testing
test-requires = "pytest pytest-datadir"
Expand Down
2 changes: 1 addition & 1 deletion python/doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# -- package specific configuration --
project = "libcasm-xtal"
version = "2.0" # The short X.Y version.
release = "2.0a8" # The full version, including alpha/beta/rc tags.
release = "2.0a9" # The full version, including alpha/beta/rc tags.
project_desc = "CASM Crystallography"
logo_text = "libcasm-xtal"
github_url = "https://github.com/prisms-center/CASMcode_crystallography/"
Expand Down
4 changes: 4 additions & 0 deletions python/libcasm/xtal/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
"""CASM Crystallography"""
from ._methods import (
StructureAtomInfo,
combine_structures,
filter_structure_by_atom_info,
make_canonical,
make_crystal_point_group,
make_factor_group,
make_primitive,
make_structure_atom_info,
make_structure_from_atom_info,
make_within,
sort_structure_by_atom_coordinate_cart,
sort_structure_by_atom_coordinate_frac,
Expand Down
Loading
Loading