Skip to content

Commit

Permalink
get mace_fnames differently in __init__
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohnson541 committed Jan 8, 2025
1 parent ee15a6f commit 06a5643
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pynta/almace/alCalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def __init__(
f'Make sure the initial model directory ({initial}) has sufficient amount of models.' + 'Or make sure you supply an initial traning set to initial_atom',
)

mace_fnames = self.update_mlffs()
mace_fnames = sorted(self.get_fname_mlffs())[-self.num_committes:]

super().__init__(mace_fnames, **kwargs)

Expand Down Expand Up @@ -286,7 +286,7 @@ def save_train(self, atoms):
def update_mlffs(self):
"""Update MLFF models based on new training data."""
for seed in range(self.num_committes):
if len(self.get_fname_mlffs()) < self.num_committes and self.current_train_fname is not None:
if len(self.get_fname_mlffs()) < self.num_committes:
self.train_mace(
self.current_train_fname.replace('.xyz', f'_{seed}.xyz'),
self.current_train_fname.replace('.xyz', f'_{seed}_val.xyz'),
Expand Down

0 comments on commit 06a5643

Please sign in to comment.