-
Notifications
You must be signed in to change notification settings - Fork 102
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generalize forcefields for generic ASE calculator support #940
Conversation
@esoteric-ephemera Great! |
Hi @JaGeo, restored the |
Hi @esoteric-ephemera, this is really nice to see in atomate2. Your implementation looks great to me. Would you be also happy to add static makers? In terms of your todos:
I'm not sure if this makes sense? We'd still need to make subclasses for specific implementations anyway, so I don't think a base implementation would add anything?
This would be great if you can figure it out. |
Sounds good, I'll just port the MD maker over to Static makers have been added + tests |
Hi @esoteric-ephemera. Thanks again for this. Is it ready to merge? |
* starting point for input set docs * remove sentence * correct InputGenerator name in figure * adjust figure size * reflect changes of vasp inputsets now in pymatgen * fix linting * change torchdata version according to #940 * change torchdata version according to #940 * Update pyproject.toml resolve conflict with changed matgl version
Hi @utf should be ready to merge |
src/atomate2/ase/jobs.py
Outdated
AseStructureTaskDoc or AseMoleculeTaskDoc | ||
""" | ||
return AseTaskDoc.to_mol_or_struct_metadata_doc( | ||
getattr(self.calculator, "name", self.calculator.__class__), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think this line will fail pydantic
validation if a calculator should ever not have a name. __class__
is not a string, we want the __name__
attribute
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch!
Thanks @esoteric-ephemera, this is very exciting to have! |
In that context: should we document this and a few other of our new workflows that are not VASP-based more clearly? I think a lot of people have interest in this general interface but might not discover it easily |
@JaGeo agreed, this should probably go in the docs for clarity. Also happy to add to the working paper |
If you're happy to add to the paper, I think it should be highlighted. |
And thanks @esoteric-ephemera (bit confused today 🙈 or maybe as usual) |
* starting point for input set docs * remove sentence * correct InputGenerator name in figure * adjust figure size * reflect changes of vasp inputsets now in pymatgen * fix linting * change torchdata version according to materialsproject#940 * change torchdata version according to materialsproject#940 * Update pyproject.toml resolve conflict with changed matgl version
…roject#940) - Add ASE base calculator classes from forcefield library - Add tests for ASE calculators, refactor forcefields - Add static makers - Add tblite dependence to ASE in toml - Migrate forcefield MD base class to ASE - Add barebones tests for ASE MD jobs - Generalize to allow molecules in ASE calculations - Make tblite dependence optional - Move forcefield strict version pins to separate toml block - Refactor naming, enumify and lazy load MD dynamics modules - Make Ase{Structure,Molecule}TaskDoc construction a single function - Change ASE and forcefield result from dict to BaseModel - Ensure ASE and forcefield result docs are subscriptable - Add "ionic_steps" to DATA_OBJECTS - Add 'elapsed_time' and 'tags' to ASE schemas - Add timing to ASE runs - Define basic ASE job schema; remove task_doc_kwargs from ASE in favor of explicit kwargs - Revise ionic_step storage (only for MD) - Add option to pass forcefield name as str without MLFF prefix or as enum - Add deprecation warnings to all predefined MLFF makers (static, relax, MD) - Correct typing of atoms in AseRelaxer - Add tblite to optional ase-ext and strict requirements - Remove dependence on deprecated forcefield makers - Make default calc kwargs and ensure these are loaded when not specified by user - Remove Frechet cell filter safety checks - Make MD ensembles an enum - Move ASE tests to separate test run - Add ASE to phonon supported codes, enforce string literal in BasePhononMaker - Fix potential Pydantic validation error if Ase(MD|Relax)Maker.calculator has no name --------- Co-authored-by: orionarcher <[email protected]> Co-authored-by: Janosh Riebesell <[email protected]>
This is a refactor to better support generic ASE calculators in atomate2, as well as molecules with ASE calculators.
Major changes:
schemas
/utils
have been ported from theforcefields
library to a separatease
libraryForceFieldTaskDocument
from the baseAseStructureTaskDoc
classStructure
, andMolecule
-specific ASE task doc classesForcefieldResult
andForcefieldObject
classes alias ASE parent classes + deprecation warningforcefields
toase
.MolecularDynamics
objectsMost of the other moved classes are internals for atomate2, so I don't expect many important consequences there