Add Spin/Charge to KNOWN_INPUTS#189
Add Spin/Charge to KNOWN_INPUTS#189JonathanSchmidt1 wants to merge 13 commits intometatensor:mainfrom
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
These validate the TensorMap metadata for system-level charge and spin inputs when check_consistency=True: single block, per-system samples, no components, correct property name, no gradients. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f4c22be to
0945180
Compare
There is no distinction between stuff that can be used an inputs and stuff that can be produced as outputs, and everything lives in |
docs/src/outputs/charge.rst
Outdated
| Charge | ||
| ^^^^^^ | ||
|
|
||
| The total charge of the system is associated with the ``"charge"`` name, and |
There was a problem hiding this comment.
Instead of having separate charge and charges concept, I think we should unify both (and likely rename everything to be singular, but I'll do it in a separate PR)
There was a problem hiding this comment.
And then we can use per_atom=True/False (soon sample_kind="system" | "atom" to distinguish between the two cases
docs/src/outputs/spin.rst
Outdated
| Spin | ||
| ^^^^ | ||
|
|
||
| The spin multiplicity of the system is associated with the ``"spin"`` name, |
There was a problem hiding this comment.
should this be named spin_multiplicity? Or is there no chance that we will want both spin and spin_multiplicity in the future?
There was a problem hiding this comment.
I think we will have less trouble if we are compatible with everbody else. Once we have spin atomic spins will be different anyway and we could use magnetization for other purposes if we ever need it
Thank you for the review. Than I will put everything back into outputs. |
Drop charge as a standard name. Rename spin to spin_multiplicity everywhere (C++ registration, validation, tests, docs). The ASE info key remains atoms.info["spin"] for user convenience. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Format long ModelOutput line per ruff. Add spin_multiplicity to QUANTITY_DIMS in units.cpp as a dimensionless quantity to avoid unknown-quantity warning. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@Luthaf I removed the charge part and switched to spin-multiplicity as requested. Please let me know if it looks good now. |
Adds Spin/Charge to KNOWN_INPUTS (ase integration in another PR)
and a respective test/docs.
_check_outputs also seems to be used for checking inputs with check consistency so I asked claude to add respective checks ...
Not sure if we want separate docs for inputs but i imagine also with support for FlashMD and momenta inputs it might be nice to separate it.
Contributor (creator of pull-request) checklist
Reviewer checklist