Commit 2409a22f authored by fanding2000's avatar fanding2000
Browse files

Format fix. More options in readme

parent ce29afea
# BOMLIP-CSP # BOMLIP-CSP
An open-source Python framework that integrates machine learning interatomic An open-source Python framework that integrates machine learning interatomic
potentials (MLIPs) with a tailored batched optimization strategy, enabling rapid, potentials (MLIPs) with a tailored batched optimization strategy, enabling rapid,
unbiased structure prediction across the full density range unbiased structure prediction across the full density range
## Perform the complete CSP process ## Perform a complete CSP process
```sh ```sh
git clone https://github.com/pic-ai-robotic-chemistry/BOMLIP-CSP.git --recursive && cd BOMLIP-CSP git clone https://github.com/pic-ai-robotic-chemistry/BOMLIP-CSP.git --recursive && cd BOMLIP-CSP
conda create -n BOMLIP_CSP python=3.10 -y && conda activate BOMLIP_CSP conda create -n BOMLIP_CSP python=3.10 -y && conda activate BOMLIP_CSP
cd BOMLIP-CSP cd BOMLIP-CSP/mace-bench
top_dir=$(pwd) ./reproduce/init_mace.sh && source util/env.sh
cd $top_dir/mace-bench sudo ./util/mps_start.sh
./reproduce/init_mace.sh && source util/env.sh
sudo ./util/mps_start.sh cd ..
./csp.sh
cd $top_dir
./csp.sh sudo ./util/mps_clean.sh
```
sudo ./util/mps_clean.sh
``` ## Perform conformer search / structure generation / structure optimization separately
## Reproduce mace batch opt speedup.
In csp.sh, the argument --mode controls the jobs to do.
```sh Use conformer_only to perform conformer search task only.
#!/bin/bash ```sh
python "${TOP_DIR}/main.py" --path ${TAR_DIR} --smiles "OC(=O)c1cc(O)c(O)c(O)c1.O" \
git clone https://github.com/pic-ai-robotic-chemistry/BOMLIP-CSP.git --recursive && cd BOMLIP-CSP --molecule_num_in_cell 1,1 --space_group_list 13,14 --add_name KONTIQ --max_workers 16\
conda create -n BOMLIP_CSP python=3.10 -y && conda activate BOMLIP_CSP --num_generation 100 --generate_conformers 20 --use_conformers 4 --mode conformer_only > generate.log 2>&1
cd BOMLIP-CSP/mace-bench ```
Or use structure_only to perform structure generation only.
# initialize mace env. ```sh
./reproduce/init_mace.sh && source util/env.sh python "${TOP_DIR}/main.py" --path ${TAR_DIR} --smiles "OC(=O)c1cc(O)c(O)c(O)c1.O" \
sudo ./util/mps_start.sh --molecule_num_in_cell 1,1 --space_group_list 13,14 --add_name KONTIQ --max_workers 16\
cd reproduce --num_generation 100 --generate_conformers 20 --use_conformers 4 --mode structure_only > generate.log 2>&1
```
# run baseline sub-test Structure optimization is done by a seperate command
./subtest_baseline.sh ```sh
python "${TOP_DIR}/mace-bench/scripts/mace_opt_batch.py" ...
# run baseline mixed test ```
cd perf_v2_base Change this command into a comment if you don't want to do that.
./run_mace.sh
## Reproduce mace batch opt speedup.
# run BOMLIP_CSP sub-test
cd ../ ```sh
./subtest.sh #!/bin/bash
# run BOMLIP_CSP mixed test git clone https://github.com/pic-ai-robotic-chemistry/BOMLIP-CSP.git --recursive && cd BOMLIP-CSP
cd perf_v2_batch conda create -n BOMLIP_CSP python=3.10 -y && conda activate BOMLIP_CSP
./opt.sh cd BOMLIP-CSP/mace-bench
# clean mps # initialize mace env.
./util/mps_clean.sh ./reproduce/init_mace.sh && source util/env.sh
sudo ./util/mps_start.sh
``` cd reproduce
## If you want to configure the 7net environment. # run baseline sub-test
./subtest_baseline.sh
```sh
#!/bin/bash # run baseline mixed test
conda create -n 7net-cueq python=3.10 -y && conda activate 7net-cueq cd perf_v2_base
./reproduce/init_7net.sh && source util/env.sh ./run_mace.sh
# Use a fixed batch size for structural optimization # run BOMLIP_CSP sub-test
python ../../scripts/mace_opt_batch.py --target_folder "../../data/perf_v2" \ cd ../
--molecule_single 46 --gpu_offset 0 --n_gpus 4 --num_workers 4 \ ./subtest.sh
--batch_size 2 --max_steps 3000 --filter1 UnitCellFilter \
--filter2 UnitCellFilter --optimizer1 BFGSFusedLS --optimizer2 BFGS \ # run BOMLIP_CSP mixed test
--num_threads 2 --cueq true --use_ordered_files true --model sevennet cd perf_v2_batch
``` ./opt.sh
## License # clean mps
./util/mps_clean.sh
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
```
### Third-party Dependencies
## If you want to configure the 7net environment.
This project includes dependencies with various licenses:
- **MACE**: MIT License (compatible) ```sh
- **FairChem**: MIT License (compatible) #!/bin/bash
- **SevenNet**: GPL v3 License (Note: GPL is a copyleft license) conda create -n 7net-cueq python=3.10 -y && conda activate 7net-cueq
./reproduce/init_7net.sh && source util/env.sh
### License Compatibility Notice
# Use a fixed batch size for structural optimization
**Important**: This project can run completely without relying on SevenNet. python ../../scripts/mace_opt_batch.py --target_folder "../../data/perf_v2" \
This project includes SevenNet as an optional dependency, which is licensed under GPL v3. --molecule_single 46 --gpu_offset 0 --n_gpus 4 --num_workers 4 \
If you use SevenNet functionality, you should be aware of the GPL licensing requirements. --batch_size 2 --max_steps 3000 --filter1 UnitCellFilter \
For commercial use or to avoid GPL restrictions, consider using only the MACE calculator --filter2 UnitCellFilter --optimizer1 BFGSFusedLS --optimizer2 BFGS \
functionality. --num_threads 2 --cueq true --use_ordered_files true --model sevennet
```
## Citation
## License
If you use this code in your research, please cite:
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
```bibtex
@software{BOMLIP_CSP, ### Third-party Dependencies
author = {Chengxi Zhao, Zhaojia Ma, Dingrui Fan},
title = {BOMLIP_CSP: Integrating machine learning interatomic potentials with batched optimization for crystal structure prediction}, This project includes dependencies with various licenses:
year = {2025}, - **MACE**: MIT License (compatible)
url = {https://github.com/pic-ai-robotic-chemistry/BOMLIP-CSP} - **FairChem**: MIT License (compatible)
} - **SevenNet**: GPL v3 License (Note: GPL is a copyleft license)
### License Compatibility Notice
**Important**: This project can run completely without relying on SevenNet.
This project includes SevenNet as an optional dependency, which is licensed under GPL v3.
If you use SevenNet functionality, you should be aware of the GPL licensing requirements.
For commercial use or to avoid GPL restrictions, consider using only the MACE calculator
functionality.
## Citation
If you use this code in your research, please cite:
```bibtex
@software{BOMLIP_CSP,
author = {Chengxi Zhao, Zhaojia Ma, Dingrui Fan},
title = {BOMLIP_CSP: Integrating machine learning interatomic potentials with batched optimization for crystal structure prediction},
year = {2025},
url = {https://github.com/pic-ai-robotic-chemistry/BOMLIP-CSP}
}
``` ```
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment