Skip to content

Commit

Permalink
Fix issue with MACE error table following training. (duartegroup#104)
Browse files Browse the repository at this point in the history
* Fix issue with MACE error table following training.

* Update mace.py

* Changes to error table function

* Update mace.py

* Update mace.py

---------

Co-authored-by: Martin Ozbej Flerin Maver <wadh6506@aleph.chem.ox.ac.uk>
Co-authored-by: Hanwen1018 <70756446+Hanwen1018@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 9, 2024
1 parent 8015d67 commit 9c0b07e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- cython
- dscribe=2.0
- matplotlib-base
- numpy
- numpy<2
- pytest=8
- pytest-cov=5
- py-plumed
Expand Down
2 changes: 1 addition & 1 deletion environment_ace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- cython
- dscribe=2.0
- matplotlib-base
- numpy
- numpy<2
- pytest=8
- pytest-cov=5
- py-plumed
Expand Down
2 changes: 1 addition & 1 deletion environment_mace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies:
- openmm
- openmm-torch
- nnpops
- openmm-ml
- pip:
- openmmml@git+https://github.com/openmm/openmm-ml.git@main
- ase@git+https://gitlab.com/ase/ase.git@f2615a6e9a # For PLUMED
- mace-torch
13 changes: 5 additions & 8 deletions mlptrain/potentials/mace/mace.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,14 @@ def _print_error_table(self) -> None:

logging.info('Generating error table')

all_collections = [
('train', self.train_configs),
('valid', self.valid_configs),
]
all_collections = {
'training': self.train_loader,
'validation': self.valid_loader,
}

table = create_error_table(
table_type=Config.mace_params['error_table'],
all_collections=all_collections,
z_table=self.z_table,
r_max=Config.mace_params['r_max'],
valid_batch_size=self.valid_batch_size,
all_data_loaders=all_collections,
model=self.model,
loss_fn=self.loss_fn,
output_args=self.output_args,
Expand Down

0 comments on commit 9c0b07e

Please sign in to comment.