Make qcelemental an optional dependency#65
Merged
sgoodlett merged 1 commit intoJun 30, 2026
Conversation
The core in-memory path (point-group detection + SALC generation) only needs numpy. qcelemental was imported at module top in molecule.py and symtext/symtext.py but is used solely by the file/schema/Psi4 loaders and serializer and one mass lookup, never by the core path. - molecule.py: drop top-level `import qcelemental as qcel`; import it locally in from_schema, from_file, from_psi4_schema, and to_xyz_string (the only qcel users; from_psi4_molecule uses no qcel). - symtext/symtext.py: drop top-level import; import locally in from_file. - pyproject.toml: move qcelemental into an optional `qcel` extra so `pip install molsym` is numpy-only and `pip install molsym[qcel]` restores the loaders. - requirements.txt: note qcelemental is optional. Now `import molsym` plus point-group/SALC generation works with only numpy installed (no qcelemental/pydantic/pint). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LEzrRFpsUE9ZFWbDwYUmmU
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
sgoodlett
approved these changes
Jun 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #64. Made with Claude.
The core in-memory path (point-group detection + SALC generation) only needs numpy. qcelemental was imported at module top in molecule.py and symtext/symtext.py but is used solely by the file/schema/Psi4 loaders and serializer and one mass lookup, never by the core path.
import qcelemental as qcel; import it locally in from_schema, from_file, from_psi4_schema, and to_xyz_string (the only qcel users; from_psi4_molecule uses no qcel).qcelextra sopip install molsymis numpy-only andpip install molsym[qcel]restores the loaders.Now
import molsymplus point-group/SALC generation works with only numpy installed (no qcelemental/pydantic/pint)