-
Notifications
You must be signed in to change notification settings - Fork 8
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
Build an iterative phonon flow #306
base: main
Are you sure you want to change the base?
Conversation
Disclaimer: This is a small programming project that I might work on for fun in the next weeks. |
if volume_custom_scale_factors is None: | ||
if volume_scale_factor_range is None: | ||
volume_scale_factor_range = [0.90, 1.1] | ||
|
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.
add warning that default scale factor range is used
new_atoms_list = [ | ||
atoms | ||
for atoms in atoms_list | ||
if atoms.info["config_type"] != "IsolatedAtom" | ||
] | ||
|
||
ase.io.write(destination_file_path, new_atoms_list, append=True) | ||
|
||
logging.info( | ||
f"File {self.pre_xyz_files[0]} has been copied to {destination_file_path}" | ||
) |
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 a good universal solution? maybe, i can reduce it to just one set of isolatedAtom energies to avoid failures
if self.pre_database_dir and os.path.exists(self.pre_database_dir): | ||
if len(self.pre_xyz_files) == 2: | ||
files_new = ["train.extxyz", "test.extxyz"] | ||
for file_name, file_new in zip(self.pre_xyz_files, files_new): | ||
with ( | ||
open( | ||
os.path.join(self.pre_database_dir, file_name) | ||
) as pre_xyz_file, | ||
open(file_new, "a") as xyz_file, | ||
): | ||
xyz_file.write(pre_xyz_file.read()) | ||
logging.info(f"File {file_name} has been copied to {file_new}") | ||
|
||
elif len(self.pre_xyz_files) > 2: | ||
raise ValueError( | ||
"Please provide a train and a test extxyz file (two files in total) for the pre_xyz_files." | ||
) |
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.
did not keep the split ratio constant
src/autoplex/fitting/common/utils.py
Outdated
print(train_data_path) | ||
print(test_data_path) |
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.
remove
@@ -1770,6 +1781,7 @@ def run_gap(num_processes_fit: int, parameters) -> None: | |||
open("std_gap_out.log", "w", encoding="utf-8") as file_std, | |||
open("std_gap_err.log", "w", encoding="utf-8") as file_err, | |||
): | |||
print(*parameters) |
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.
remove
autoplex/src/autoplex/auto/phonons/flows.py Line 269 in 5c231fb
See #305 but we might need to investigate if the post init is really enough for this case as well |
Very first draft for an iterative phonon flow. There are still many, many things to solve before this can work.
make sure that a new random seed is used for each step (make sure the order of the settings has been considered in the seed computation)
reuse the previous database
make sure that the phonon benchmark runs are reused as well
expose all relevant outputs to allow for an iterative procedure
random_seed + len(workflow_maker.volume_custom_scale_factors)
fix previous unit tests
fix reading mace models
improve distort_type_1
make sure random seed creation is done correctly when very similar structures are provided in "structures" - currently, this is not correctly considered (needs to be done in iterative flow as well)
fix write_benchmark_metrics
document that only 0.01 displacement is used in the benchmark
do some testing on the cluster to confirm the options and capabilities
These points will be moved into a subsequent issue.