MLIPTS Release v0.1.2
mlipts is currently quite stable for my personal use cases, motivating this release.
Noting many bugs still remain, particularly regarding catching errors. If you are interested in using MLIPTS in it's current state, please email me.
There are a lot of changes since the prior release including:
hpc_config.yml
Now the user does not have to repeatedly define variables such as hpc_account and python_env. Instead these can be read from a config file:
%% writefile hpc_config.yml
hpc: "archer2"
hpc_account: "myaccount"
processor: "gpu"
nodes: 1
gpus: 1
python_env: "path/to/MACE_PYTHON"
This file defines an hpc_config argument for both DataCollection and ActiveLearn class objects. For example:
active_learning_workflow = ActiveLearn('hpc_config.yml')and specific settings can be updated via:
sample_configs = DataCollection(['Pu','O'],'hpc_config.yml')
sample_configs.hpc_config['processor'] = 'cpu' # overwrite class: ActiveLearn
This class allows automatic training of a MACE model committee. The general approach is as follows:
#define and train
active_learning_workflow.define_commitee('base_config.yml',n_models)
active_learning_workflow.train_commitee(train_time_all_models,submit=True)
# evaluate on new configurations
active_learning_workflow.evaluate_committee('03:00:00',npartitions=1,atomic_config_file='MD_samples.xyz',models_dir='models')class: UncertaintyQuantification
If
data = UncertaintyQuantification(original_sample_file='MD_samples.xyz',evaluated_config_files=evaluated_configs)
data.filter_configs(tol=1,method='dubois')feature: #3 smart_convergence option
Now when using write_QM_submission_scripts there is an option to smart converge. Which essentially sorts calculations according to similarity and then copies VASPs CHGCAR from calculation to calculation and sets ICHARG=1.
In addition, I have added a way of running a 'pilot' unit cell configuration which is known to easily SCF converge. This feature currently requires knowledge of the motif beforehand.
Below is an example of me using write_QM_submission_scripts in a workflow, collected 2x1x1 supercell samples for model training.
from mlipts.utils import fetch_supercell_motif
motif_for_smart = fetch_supercell_motif(motif,supercell_dims=np.array([2,1,1]))
datacollection_workflow.write_QM_submission_scripts(
time_per_partition='08:00:00',
QM_cmd_line=vasp_cmd_line,
npartitions=34,
database_file=database_file,
submit=True,
save_and_remove=True,
smart_convergence=True,
expected_motif=motif_for_smart
)Contact
There are a number of additional small changes not covered here, please refer to commits or contact me at:
William Davie, willdavie2002@gmail.com.
Department of Material Science and Metallurgy, University of Cambridge.