Replace manual initialization with from_state across integrators and optimizers#420
Replace manual initialization with from_state across integrators and optimizers#420orionarcher merged 10 commits intomainfrom
Conversation
curtischong
left a comment
There was a problem hiding this comment.
This looks good to me
|
this PR is breaking since we change the functionality of |
|
|
||
| # Preserve charge and spin in atoms.info (as integers for FairChem compatibility) | ||
| if charge is not None: | ||
| atoms.info["charge"] = int(charge[sys_idx].item()) |
There was a problem hiding this comment.
I think we should change int to float since we use float in other places in the code when talking about charges/spins
There was a problem hiding this comment.
i think we should probably change to int it in the other places then. charge and spin are physically integer values.
There was a problem hiding this comment.
I think we should too. it's a bit annoying how charges is a list of float in ASE https://ase-lib.org/ase/atoms.html
There was a problem hiding this comment.
spin are physically integer values.
https://en.wikipedia.org/wiki/Fractionalization .... but here yes
thomasloux
left a comment
There was a problem hiding this comment.
Don't forget to also add that as well to StaticState in runners.py
Summary
from_stateto allow general state transformations and using it across the package.FairchemModelwas not correctly passing charge and spin through the interface.Checklist
Before a pull request can be merged, the following items must be checked: