-
Notifications
You must be signed in to change notification settings - Fork 26
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
Working save trajectory code with energies also being saved for test mace. #123
Conversation
mace_traj = Trajectory( | ||
species=relaxed_struct[mat_id].species, | ||
species=atoms.get_chemical_symbols(), |
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.
this should have been relaxed_struct.species
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 would rather be sure of the order being the same by taking it from atoms because previously the code was looking at the filtered atoms where there were a large number of extra coords from the filter constraints. n.b. even the original working implementation (a549532) suffered from this flaw which slipped through as the pmg Trajectory
class doesn't check lengths at init.
@@ -129,35 +130,39 @@ | |||
}[ase_filter] | |||
optim_cls: Callable[..., Optimizer] = {"FIRE": FIRE, "LBFGS": LBFGS}[ase_optimizer] | |||
|
|||
for atoms in tqdm(atoms_list, desc="Relaxing"): | |||
for atoms in tqdm(deepcopy(atoms_list), desc="Relaxing"): |
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.
is this deliberate or left over from BatchOptimizer
?
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.
deliberate in order to be able to repeatedly run the optimization in order to debug as if not the original list is mutated in place. It could be excluded from this PR if wanted but I think the isolation is fairly helpful
…efined in preds.py
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.
thanks for these fixes @CompRhys! 👍
coords, lattices = (locals().get(key, []) for key in ("coords", "lattices"))
was problem line which seemed to always return empty lists, as such it never went into the if statement even with the flag set to true and the other issues didn't cause errors.