mace_polar_1: pass charge/spin keys and use REF_energy/REF_forces#79
Open
lollcat wants to merge 1 commit into
Open
mace_polar_1: pass charge/spin keys and use REF_energy/REF_forces#79lollcat wants to merge 1 commit into
lollcat wants to merge 1 commit into
Conversation
The polar-1 medium/large scripts did not pass --total_charge_key / --total_spin_key, so on OMol data every system trained as a neutral closed-shell singlet. They also set --forces_key='forces'; once mace honors CLI key overrides (ACEsuit/mace#1516) that selects an empty array, so forces must read 'REF_forces'. Aligns the key block with mace_omol/mace-omol.sh. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Problem
mace_polar_1/mace-polar-1-medium.shandmace-polar-1-large.shdon't pass the charge/spin keys, and set--forces_key='forces'. On OMol.aselmdbdata this means:data["charge"]/data["spin"](surfaced asatoms.info["charge"]/["spin"]). Without--total_charge_key/--total_spin_keythe defaults look fortotal_charge/total_spin, which are absent, sototal_charge/total_spinfall back to0/1— every system trains as a neutral closed-shell singlet.LMDBDatasetpopulates forces underREF_forces. Once mace honors CLI key overrides (companion PR Honor the CLI key specification in LMDBDataset mace#1516),--forces_key='forces'selects the emptyatoms.arrays["forces"]and forces load as zero. ReadingREF_forcesis correct. (On today's mace this override is ignored and forces happen to fall back toREF_forces, so this change is also correct on current mace.)Fix
Set the key block to match
mace_omol/mace-omol.sh:Applied identically to the medium and large scripts.
Companion PR
This depends on ACEsuit/mace#1516, which makes
LMDBDatasethonor the CLI key specification (currently the charge/spin flags are silently ignored for.aselmdb/.lmdbdatasets). That PR also documents the forces coupling above.Order of merge does not matter for correctness, but both are needed for the polar-1 recipes to train with the correct charge/spin conditioning and non-zero forces.