Skip to content

Commit

Permalink
do not train mace if no training data added yet
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohnson541 committed Jan 8, 2025
1 parent 28548fa commit ee15a6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pynta/almace/alCalc.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ def __init__(
# set to early time
self.timestamp_fail = datetime.datetime.min.strftime(self.time_format)
self.timestamp_train = self.timestamp_fail
self.current_train_fname = None

print(self.timestamp_fail)

Expand Down Expand Up @@ -285,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:
if len(self.get_fname_mlffs()) < self.num_committes and self.current_train_fname is not None:
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 ee15a6f

Please sign in to comment.