Views
No views yet
model/; data processing, general-purpose network layers, and property embeddings are provided by OneScience MatChem.| Use case | Description |
|---|---|
| Unconditional crystal generation | Generate new candidate crystal structures with the base checkpoint |
| Property-conditioned generation | Generate structures for target properties such as magnetic density, band gap, and bulk modulus |
| Fixed-composition structure prediction | Search for possible crystal structures for a specified composition |
| Training from scratch | Train with MP-20 or data compatible with the MatterGen cache format |
| Property fine-tuning | Add a property adapter to a pretrained model and fine-tune it |
| Environment connectivity check | Verify OneScience, the checkpoint, and GPU/DCU availability by generating one sample |
torch 2.5.1+das.opt1.dtk25042.1hf download OneScience-Group/Mattergen
2cd Mattergen1# Activate DTK and conda first
2module load compiler/dtk/25.04.2
3conda create -n onescience311 python=3.11 -y
4conda activate onescience311
5# uv installation is also supported
6pip install onescience[matchem-dcu] \
7 -i http://mirrors.onescience.ai:3141/pypi/simple/ \
8 --trusted-host mirrors.onescience.ai1# Activate conda first
2conda create -n onescience311 python=3.11 -y \
3 libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
4conda activate onescience311
5# uv installation is also supported
6pip install onescience[matchem-gpu] \
7 -i http://mirrors.onescience.ai:3141/pypi/simple/ \
8 --trusted-host mirrors.onescience.aihf download OneScience-Group/mp20 --repo-type dataset1datasets/mp20/data/MP20/cache/mp_20/
2├── train/
3├── val/
4└── test/args. For example, update demo/configs/train_8dcu.yaml as follows:1args:
2 data_module: mp_20
3 data_module.root_dir: ./datasets/mp20/data/MP20/cache/mp_20data_module.root_dir under args in demo/configs/finetune_dft_mag_density_smoke.yaml. If you downloaded the data elsewhere, use the corresponding absolute path.1python csv_to_dataset.py \
2 --csv-folder /path/to/csv_folder \
3 --dataset-name my_dataset \
4 --cache-folder ./datasets/cacheweight/:1weight/
2├── mattergen_base/
3│ ├── config.yaml
4│ └── checkpoints/
5│ └── last.ckpt
6└── dft_mag_density/
7 ├── config.yaml
8 └── checkpoints/
9 └── last.ckptchemical_system, dft_band_gap, dft_mag_density, ml_bulk_modulus, and space_group. When using a demo YAML, set checkpoint in demo/configs/generate_base.yaml or demo/configs/generate_dft_mag_density.yaml to the corresponding ./weight/<model_name> path. For fine-tuning, update adapter.model_path in demo/configs/finetune_dft_mag_density_smoke.yaml.1python generate.py \
2 --checkpoint ./weight/mattergen_base \
3 --output outputs/generate/mattergen_base \
4 --batch-size 1 \
5 --num-batches 11outputs/generate/mattergen_base/
2├── generated_crystals.extxyz
3└── generated_crystals_cif.zip1python generate.py \
2 --checkpoint ./weight/dft_mag_density \
3 --output outputs/generate/dft_mag_density \
4 --batch-size 1 \
5 --num-batches 1 \
6 --properties '{"dft_mag_density": 0.15}'1cd demo
2bash run.sh --config configs/generate_base.yaml
3bash run.sh --config configs/generate_dft_mag_density.yaml1cd demo
2bash run.sh --config configs/train_8dcu.yaml --submit1python train.py \
2 data_module=mp_20 \
3 data_module.root_dir=./datasets/mp20/data/MP20/cache/mp_20 \
4 trainer.devices=1 \
5 data_module.batch_size.train=41cd demo
2bash run.sh --config configs/finetune_dft_mag_density_smoke.yamladapter.model_path, data_module.properties, the property embedding, batch size, and number of epochs. Remove trainer.limit_train_batches and trainer.limit_val_batches.| Platform | OneScience Main Repository | Skills Repository |
|---|---|---|
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |