Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃専 [FEATURE] Masking out some labels (e.g. constrained atoms) #307

Open
Linux-cpp-lisp opened this issue Feb 21, 2023 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@Linux-cpp-lisp
Copy link
Collaborator

BETA implemention on masks: https://github.com/mir-group/nequip/tree/masks/examples/mask_labels

See #240 for more discussion.

@Linux-cpp-lisp Linux-cpp-lisp added the enhancement New feature or request label Feb 21, 2023
@Linux-cpp-lisp Linux-cpp-lisp changed the title 馃専 [FEATURE] Masking out some labels (constrained atoms) 馃専 [FEATURE] Masking out some labels (e.g. constrained atoms) Feb 21, 2023
@mhellstr
Copy link

A related feature request would be to set custom weights per force component (e.g. as additional columns in an ASE .xyz dataset).

If I have structures where some atoms have very large forces I do not really care how accurate the trained model is on those large forces, only that they are "large", so it would be great to be able to give them a much smaller weight in the loss function.

This would be useful for example when adding short interatomic distances, or when breaking chemical bonds (i.e. far from equilibrium).

@Linux-cpp-lisp
Copy link
Collaborator Author

Hi @mhellstr ,

That would be something you'd implement as a custom loss function, see here:
https://github.com/mir-group/nequip-example-extension

You could either make a custom loss that directly depends on the force magnitude, or you could take a force_weights (or whatever) key from the data and use that to reweight the loss value. (In the second case, you'd just need to include the force_weights in the dataset as a custom field with include_keys)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants