Conversation
|
Is this what we were talking about yesterday? I don't know if we need it because doing either conservatively (forces or stresses) has the same cost as doing both conservatively I.e. C forces + NC stresses has the same cost as C forces + C stresses Of course it's still useful if one wants to test the effects of turning one off, but it's such a niche curiosity that IMO one should hack it locally |
|
My understanding is more that this is about allowing models that don't offer both outputs (for example because they were not trained with stress) |
| device=None, | ||
| variants: Optional[Dict[str, Optional[str]]] = None, | ||
| non_conservative=False, | ||
| non_conservative="off", |
There was a problem hiding this comment.
I think I'd prefer keeping backward compatibility by making this
| non_conservative="off", | |
| non_conservative:Union[bool, Literal["forces", "stress"]]=False, |
There was a problem hiding this comment.
I think this is making the API unclear if one allows "on" or True but to keep backward compatibility I agree we can change this.
There was a problem hiding this comment.
And following #210 should we call it "force" or "forces"?
There was a problem hiding this comment.
I think this is making the API unclear if one allows "on" or True
Yes, there should only be True, False, "force", "stress", no "on" here!
And following #210 should we call it "force" or "forces"?
I'd say "forces" is fine here, this is what you used in LAMMPS, right?
There was a problem hiding this comment.
Okay I changed the synopsis.
Yes in LAMMPS we have <on/off/forces/stress>
Matches the
non_conservativeinterface already implemented in the LAMMPS metatomic pair style (metatensor/lammps#47).The
non_conservativeparameter was aboolin bothMetatomicCalculatorandMetatomicModel. It is now a string with four accepted values"off"(default),"on","forces"and"stress".Contributor (creator of pull-request) checklist
Reviewer checklist
📚 Download documentation for this pull-request