Skip to content

Add mixed atom/orbital projection API, kline styling and layered scatter plotting for bands - #3

Open
LRH123LRH123 wants to merge 6 commits into
masterfrom
codex/add-mixed-orbital-projection-support-n8y3kt
Open

Add mixed atom/orbital projection API, kline styling and layered scatter plotting for bands#3
LRH123LRH123 wants to merge 6 commits into
masterfrom
codex/add-mixed-orbital-projection-support-n8y3kt

Conversation

@LRH123LRH123

Copy link
Copy Markdown
Owner

Motivation

  • Provide a flexible API to select and plot mixed atom and orbital projections (dict or list styles) and to export their numeric data.
  • Allow user control over k-point vertical line appearance and introduce a layered scatter plotting mode to improve visual compositing of projection channels.
  • Simplify specifying orbitals by aliases and support f-orbitals when available.

Description

  • Implemented orbital name mapping and parsing helpers in Band: _orbital_name_to_index, _get_spd_masks, _parse_orbital_selector, _parse_atom_selector, _normalize_mixed_projection_spec, and _format_orbital_selector_label to convert human-friendly selectors into boolean masks.
  • Added mixed-projection aggregation and export features: _sum_mixed_projections, export_mixed_projections_data, and public plotting method plot_mixed_projections that accept projection_spec in both dict and list styles and produce labeled projections and an optional PBAND_mixed.dat export.
  • Extended plotting internals: added kline_style and kline_width parameters to _get_kticks, _get_kticks_hse, _get_kticks_unfold, plot_plain, and callers to control vertical k-line linestyle/width, and added kline_style/kline_width to the public band_plain function in standard.py.
  • Added a new plotting backend _plot_projected_general_new which supports scatter_mode='flattened' (original behavior) and 'layered' (per-channel draw order) and exposed it via plot_mixed_projections; also introduced scatter_mode and color handling in the band_mixed_projections helper in standard.py.
  • Minor API tweaks and defaults: adjusted a few default linewidth values and ensured unfolding logic integrates with the new projection/export code.

Testing

  • No automated tests were run for this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant