Skip to content

How to finetune with charged dataset #1423

Closed

Description

@kaijiz

Hi, i found two parts mentions about finetune with charge state.
first is:
python run_train.py
--train_file=data.xyz
--embedding_specs='{"charge": {"embed_type": "continuous", "min": -5, "max": 5}, "spin": {"embed_type": "continuous", "min": 0, "max": 4}, "temperature": {"embed_type": "continuous", "min": 0, "max": 3000}}'
--use_embedding_readout
--model=MACE

Second is:
parser.add_argument(
"--total_charge_key",
help="Key of total charge in training xyz",
type=str,
default=DefaultKeys.TOTAL_CHARGE.value,

I am not quite sure what's the difference. Which one i should use. What i am trying is:
python ./mace/scripts/run_train.py --name="MACE_on_big_data"--train_file="train.xyz" --valid_file="valid.xyz" --test_file="test.xyz" --foundation_model="mace-mpa-0-medium.model" --batch_size=32 --max_num_epochs=100 --stage_two --start_stage_two=60 --ema --ema_decay=0.99 --amsgrad --error_table='PerAtomMAE' --device=cuda --seed=123 --wandb --wandb_project="mace_defect" --wandb_name="MACE_on_big_data" --energy_key="REF_energy" --forces_key="REF_forces" --stress_key="REF_stress" --total_charge_key="charge" --E0s="estimated"
is it right? or i need to add "--embedding_specs='{"charge":{"per":"graph"}}'" and remove --total_charge_key

Thank you so much if you could help!!

Activity

  1. locked and limited conversation to collaborators on May 3, 2026
  2. converted this issue into a discussion #1463 on May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions