-
Notifications
You must be signed in to change notification settings - Fork 271
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
OptimizableBatch and stress relaxations #718
Merged
Merged
Changes from all commits
Commits
Show all changes
126 commits
Select commit
Hold shift + click to select a range
d8fd81e
remove r_edges, radius, max_neigh and add deprecation warning
lbluque 81bf8a2
edit typing and dont use dicts as default
lbluque c2bb916
use super() and remove overkill deprecation warning
lbluque d11e72a
Merge branch 'main' of https://github.com/Open-Catalyst-Project/ocp i…
lbluque 15610f8
Merge branch 'main' of https://github.com/Open-Catalyst-Project/ocp i…
lbluque 479e7af
set implemented_properties from config
lbluque 858a782
make determine step a method
lbluque 06b232c
allow calculator to operate on batches
lbluque 32030c3
only update if old config is used
lbluque 1c1bea8
reshape properties
lbluque 360656c
no test classes in ase calculator
lbluque b6c640e
yaml load fix
lbluque 7f2746a
fix Subset of metadata
lbluque df7989e
use mappingproxy
lbluque 9726df7
Merge branch 'main' into calculator_updates
lbluque b16d572
expressive import
lbluque 6c636e5
Merge branch 'main' into calculator_updates
lbluque f5a358a
remove duplicated code
lbluque 708efb0
optimizable batch class for ase compatible batch relaxations
lbluque 9d44c3b
fix optimizable batch
lbluque 5d89cf2
optimizable goodies
lbluque cae838c
apply force constraints
lbluque 74a5347
use optimizable batch instead and remove torchcalc
lbluque 55f9205
update ml relaxations to use optimizable batch correctly
lbluque 163428b
force_consistent check for ASE compat
lbluque 9d48f08
force_consistent check for ASE compat
lbluque 7034d20
check force_consistent
lbluque 100e768
init docs in lbfgs
lbluque 8b919d3
unitcellfilter for batch relaxations
lbluque 3a70b71
ruff
lbluque 7d7686e
UnitCellOptimizable as child class instead of filter
lbluque e8fbb88
allow running unit cell relaxations
lbluque 5a9b389
ruff
lbluque 37ffe6a
no grad in run_relaxations
lbluque 0b887fc
make batched_dot and determine_step methods
lbluque 4a2c6c5
imports
lbluque e7ab81b
rename to optimizableunitcellbatch
lbluque dde4e58
allow passing energy and forces explicitly to batch to atoms
lbluque 28f8155
check convergence in optimizable and allow passing general results to…
lbluque ff08208
relaxation test
lbluque 609d0dc
unit tests
lbluque d09c041
move update mask to optimizable
lbluque c9f5632
use energy instead of y
lbluque 02403aa
all setting/getting positions and convergence in optimizable
lbluque bcaa4ad
more (unfinished) tests
lbluque 71a0ab6
Merge branch 'main' into stress-relaxations
lbluque 008bb1f
backwards compatible test
lbluque 155c515
minor fixes
lbluque 34ca2be
code cleanup
lbluque 20a2da8
add/fix tests
lbluque bc422d1
Merge branch 'main' of https://github.com/FAIR-Chem/fairchem into str…
lbluque 693602d
fix lbfgs
lbluque 06b3a6b
assert using norm
lbluque 8ab940a
Merge branch 'main' into stress-relaxations
lbluque 5636f36
Merge branch 'main' into stress-relaxations
lbluque 3e6b39f
Merge branch 'main' into stress-relaxations
lbluque 464f9b1
Merge pull request #749 from FAIR-Chem/main
zulissimeta aed6b31
Merge branch 'main' into stress-relaxations
lbluque 9a81fff
add eps to masked batches if using ASE optimizers
lbluque a455d76
match iterations from previous implementation
lbluque 95a0496
Merge branch 'stress-relaxations' of https://github.com/FAIR-Chem/fai…
lbluque 1b71182
use float64 for forces
lbluque 316398b
Merge branch 'main' of https://github.com/FAIR-Chem/fairchem into str…
lbluque 879754a
float32
lbluque d7f926c
use energy_relaxed instead of y_relaxed
lbluque d8506ee
energy_relaxed and more explicit error msg
lbluque 6753942
default to batch_size 1 if not set in config
lbluque 9f9c4a0
merge with upstream
lbluque 638404c
keep float64 training
lbluque ac78372
rename y_relaxed -> energy_relaxed
lbluque 63470ba
Merge remote-tracking branch 'origin/main' into stress-relaxations
lbluque 5cdd560
Merge branch 'main' into stress-relaxations
lbluque 3578ceb
Merge branch 'main' of https://github.com/FAIR-Chem/fairchem into str…
lbluque 63408a3
rm expcell batch
lbluque adf55f0
convenience commit from no_experimental_resolve
zulissimeta 5e027d8
use numatoms tensor for cell factor
lbluque 3ccb173
remove positions tests (wrapping atoms gives different results)
lbluque cab1fee
allow wrapping positions in batch to atoms
lbluque 50465e9
Merge branch 'main' into stress-relaxations
lbluque bf619b7
fix test
lbluque ee6b021
wrap_positions in batch_to_atoms
lbluque 23067c7
take a2g properties from model
lbluque 8768dbb
test lbfgs traj writes
lbluque c7debdb
remove comments
lbluque 00554c7
use model generate graph
lbluque a81d639
fix cell_factor
lbluque 08f9f11
fix using model in ddp
lbluque 649444d
Merge branch 'main' into stress-relaxations
lbluque 8d028c8
Merge branch 'main' into stress-relaxations
lbluque c693829
fix r_edges in OCPcalculator
lbluque 4a51006
write initial and final structure if save_full is false
lbluque 2e118ea
Merge branch 'main' into stress-relaxations
lbluque 88b5a4b
Merge branch 'stress-relaxations' of https://github.com/FAIR-Chem/fai…
lbluque 9474860
check unique atoms saved in trajectory
lbluque 55ddaab
tighter tol
lbluque 054ef59
update ASE release comment
lbluque a539f72
remove cumulative mask option
lbluque 6e5eda3
remove left over cumulative_mask
lbluque 10b313a
fix batching when sids as str
lbluque 88386bb
Merge branch 'main' of https://github.com/FAIR-Chem/fairchem into str…
lbluque 25339aa
Merge branch 'main' of https://github.com/FAIR-Chem/fairchem into str…
lbluque 91286f2
Merge branch 'main' of https://github.com/FAIR-Chem/fairchem into str…
lbluque b30c06e
do not try to fetch energy and forces if no explicit results
lbluque 4ce57b0
Merge branch 'main' of https://github.com/FAIR-Chem/fairchem into str…
lbluque 5fcbd42
accept Path objects
lbluque 7c6244f
clean up setting defaults
lbluque efcb0af
expose ml_relax in relaxation
lbluque 20a0319
force set r_pbc True
lbluque 831e3b4
make relax_opt optional
lbluque 134db29
Merge branch 'main' into stress-relaxations
lbluque d015f98
no ema on inference only
lbluque 9696e86
define ema none to avoid issues
lbluque c97c4d0
lower force threshold to make sure test does not converge
lbluque c3b7b2b
clean up exception msg
lbluque e783bf6
Merge branch 'main' into stress-relaxations
lbluque 209a1ed
allow strings in batch
lbluque 2311511
remove device argument from lbfgs
lbluque 23d38ff
minor cleanup
lbluque 4329063
fix optimizable import
zulissimeta aea2694
Merge branch 'main' into stress-relaxations
lbluque 25f2bba
do not pass device in ml_relax
lbluque b3fd1bd
simplify enforce max neighbors
lbluque 547534d
fix tests (still not testing stress)
lbluque 6842a0f
Merge branch 'main' into stress-relaxations
lbluque 2f69937
pin sphinx autoapi
zulissimeta 097757d
typo in version
zulissimeta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
""" | ||
Copyright (c) Meta, Inc. and its affiliates. | ||
|
||
This source code is licensed under the MIT license found in the | ||
LICENSE file in the root directory of this source tree. | ||
""" | ||
|
||
from __future__ import annotations | ||
|
||
from .ml_relaxation import ml_relax | ||
from .optimizable import OptimizableBatch, OptimizableUnitCellBatch | ||
|
||
__all__ = ["ml_relax", "OptimizableBatch", "OptimizableUnitCellBatch"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It's a little strange to have these hard-coded. What should a user do implementing new properties?
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 agree this is strange, but it's the simplest solution I thought of. We can always generalized this to simply "tensor of rank X" but in that case we need to have a data structure that provides that information for each model output.
We could use the properties interface and properties defined in ASE to clean this up, but I would suggest doing that in a new PR:
https://gitlab.com/ase/ase/-/blob/master/ase/outputs.py