This repo runs an HPC data-collection workflow from the mlff_attack package:
https://github.com/TRustworthy-AI-Tools-for-Science/mlff_attack
This repo has two dataset workflows:
run_2d_structures/:20 Materials Project structures.run_licohpf_database/:LiCOHPF database.
This repo expects three separate Python environments because each MLFF have different dependency stacks.
After completing the following 4 steps:
~/project/
├── mlff_attack/
├── mlff_attack_data_collection/
│ ├── .env
│ ├── mace-mh-1.model
│ ├── uma-s-1p1.pt
│ ├── pot.almtp
│ ├── pot.almtp.elements
│ └── MACE_model.model
├── .venv-mace/
├── .venv-uma/
├── .venv-chgnet/
├── mlip-3/bin/mlp
└── .venv-mtp/bin/mlp
git clone https://github.com/TRustworthy-AI-Tools-for-Science/mlff_attack.git
git clone https://github.com/declanwhchan/mlff_attack_data_collection.gitcd ~/project/mlff_attack_data_collection
bash mlff_venvs_for_hpc.shCreate .env in mlff_attack_data_collection and enter the following:
MP_API_KEY=your_materials_project_key
HF_TOKEN=hf_your_huggingface_token_hereThen protect it:
chmod 600 .envDownload models externally into mlff_attack_data_collection (CHGNet is already built-in):
Scripts in run_<dataset>/sample_1/ are the single-test versions of the same workflow, so you can run them for a quick check before running the full collection.
Reminder to sync local changes to HPC: Before running or submitting jobs on the HPC, in SFTP, push/sync all local changes from this computer so the HPC copy is up to date.
Run the next step only after the previous step is fully completed.
All steps are to be executed in SSH.
bash run_<dataset>/setup.sh
# Generate initial and perturbed cif structures (OPTIONAL)
bash run_<dataset>/cifs.shsbatch run_<dataset>/main.sh
sbatch run_<dataset>/main_gpu.sh
# Run contour exploration (OPTIONAL)
sbatch run_<dataset>/contour.sh
sbatch run_<dataset>/contour_gpu.shsbatch run_<dataset>/plot.sh
# Run for faster generation of publication plots if plot.sh was initially completed
sbatch run_<dataset>/good_plots.sh
# Visualize initial atomic structures (OPTIONAL)
sbatch run_<dataset>/visualize.shThis submits a controller job that generates supercell CIFs, launches the full MLFF attack array, and then runs a dependent plotting job.
sbatch run_<dataset>/supercell.sh
sbatch run_<dataset>/supercell_gpu.sh# Refresh checking the queue every second:
watch -n 1 sq
# Follow live Slurm output:
tail -f slurm-<jobid>.outssh -L 8000:localhost:8000 <username>@fir.alliancecan.caThen, open a separate terminal and ensure you are in the same login<#>. If not, then ssh login<#> and continue on HPC:
cd mlff_attack_data_collection
python -m http.server 8000http://localhost:8000
Login using SFTP:
cd /mlff_attack_data_collection
get -r <target_directory>