Unverified Commit 66462d91 authored by zcxzcx1's avatar zcxzcx1 Committed by GitHub
Browse files

Add files via upload

parent b95dac35
MIT License
Copyright (c) 2025 {Chengxi Zhao, Zhaojia Ma, Dingrui Fan}
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# BOMLIP-CSP
An open-source Python framework that integrates machine learning interatomic
potentials (MLIPs) with a tailored batched optimization strategy, enabling rapid,
unbiased structure prediction across the full density range
## Perform the complete CSP process
```sh
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
cd BOMLIP-CSP
top_dir=$(pwd)
cd $top_dir/mace-bench
./reproduce/init_mace.sh && source util/env.sh
sudo ./util/mps_start.sh
cd $top_dir
./csp.sh
sudo ./util/mps_clean.sh
```
## Reproduce mace batch opt speedup.
```sh
#!/bin/bash
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
cd BOMLIP-CSP/mace-bench
# initialize mace env.
./reproduce/init_mace.sh && source util/env.sh
sudo ./util/mps_start.sh
cd reproduce
# run baseline sub-test
./subtest_baseline.sh
# run baseline mixed test
cd perf_v2_base
./run_mace.sh
# run BOMLIP_CSP sub-test
cd ../
./subtest.sh
# run BOMLIP_CSP mixed test
cd perf_v2_batch
./opt.sh
# clean mps
./util/mps_clean.sh
```
## If you want to configure the 7net environment.
```sh
#!/bin/bash
conda create -n 7net-cueq python=3.10 -y && conda activate 7net-cueq
./reproduce/init_7net.sh && source util/env.sh
# Use a fixed batch size for structural optimization
python ../../scripts/mace_opt_batch.py --target_folder "../../data/perf_v2" \
--molecule_single 46 --gpu_offset 0 --n_gpus 4 --num_workers 4 \
--batch_size 2 --max_steps 3000 --filter1 UnitCellFilter \
--filter2 UnitCellFilter --optimizer1 BFGSFusedLS --optimizer2 BFGS \
--num_threads 2 --cueq true --use_ordered_files true --model sevennet
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
### Third-party Dependencies
This project includes dependencies with various licenses:
- **MACE**: MIT License (compatible)
- **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