@@ -220,21 +220,56 @@ python electronic_structure/train.py -c electronic_structure/configs/infgcn/infg
220220
221221### Prediction
222222``` bash
223- # Run inference with the standalone predictor (uses dataset paths from the YAML unless overridden).
223+ # 1) Dataset-sample inference (uses dataset paths from the YAML unless overridden).
224224python electronic_structure/predict.py \
225225 --config electronic_structure/configs/infgcn/infgcn_qm9.yaml \
226226 --checkpoint output/infgcn_qm9_best/infgcn_qm9.pdparams \
227227 --split validation \
228228 --index 0 \
229229 --grid_batch_size 20000 \
230- --output_dir output/infgcn_qm9_best/vis_val0
231- --save_pred_cube \ # if export cube format
232- --save_true_cube \ # if export cube format
233- --cube_dir output/infgcn_pm9_best/cubes # if export cube format
234- # If your datasets live elsewhere, create a symlink to the data root (for example, ln -s /path/to/dataset_ES dataset_ES).
235- # If kaleido is missing, the script writes interactive .html files instead of .png; install kaleido to export PNGs.
230+ --output_dir output/infgcn_qm9_best/vis_val0 \
231+ --save_pred_cube \
232+ --save_true_cube \
233+ --cube_dir output/infgcn_qm9_best/cubes
234+
235+ # 2) MOL-file inference (single file or directory).
236+ # This mode predicts electron density from molecular structure files (*.mol),
237+ # and can export predicted cube + html visualization.
238+ CUDA_VISIBLE_DEVICES=4 conda run -n ppmat python electronic_structure/predict.py \
239+ --config output/infgcn_omol25_s1_trimmed_t_20260118_183549_s_42/infgcn_omol25_trimmed.yaml \
240+ --checkpoint output/infgcn_omol25_s1_trimmed_t_20260118_183549_s_42/checkpoints/latest.pdparams \
241+ --mol_input mols/Baidu_infGCN_Example_20260206 \
242+ --atom_file /home/liuxuwei01/processed_output/omol25.json \
243+ --output_dir output/infgcn_omol25_s1_trimmed_t_20260118_183549_s_42/mol_predict_latest_gpu4 \
244+ --cube_dir output/infgcn_omol25_s1_trimmed_t_20260118_183549_s_42/mol_predict_latest_gpu4/cubes \
245+ --save_pred_cube \
246+ --save_html \
247+ --grid_batch_size 4096
248+
249+ # 3) MOL-file inference with reference (true) cube files.
250+ # If --mol_true_cube_dir provides matching files (<name>.cube or <name>_true.cube),
251+ # the script additionally writes true cube and true/diff html.
252+ CUDA_VISIBLE_DEVICES=4 conda run -n ppmat python electronic_structure/predict.py \
253+ --config output/infgcn_omol25_s1_trimmed_t_20260118_183549_s_42/infgcn_omol25_trimmed.yaml \
254+ --checkpoint output/infgcn_omol25_s1_trimmed_t_20260118_183549_s_42/checkpoints/latest.pdparams \
255+ --mol_input mols/Baidu_infGCN_Example_20260206 \
256+ --mol_true_cube_dir /path/to/true_cubes \
257+ --atom_file /home/liuxuwei01/processed_output/omol25.json \
258+ --output_dir output/infgcn_omol25_s1_trimmed_t_20260118_183549_s_42/mol_predict_latest_gpu4 \
259+ --cube_dir output/infgcn_omol25_s1_trimmed_t_20260118_183549_s_42/mol_predict_latest_gpu4/cubes \
260+ --save_true_cube \
261+ --save_pred_cube \
262+ --save_html \
263+ --grid_batch_size 4096
236264```
237265
266+ Notes:
267+ - ` --mol_input ` supports either one ` .mol ` file or a directory of ` .mol ` files.
268+ - Optional grid controls for MOL mode: ` --mol_grid_shape ` (default ` 80,80,80 ` ) and ` --mol_grid_padding ` (default ` 6.0 ` Angstrom).
269+ - If true/reference cube is not provided, only predicted outputs are available (` *_pred.cube ` , ` *_pred_density.html ` ).
270+ - If kaleido/Chrome is unavailable, the script writes interactive ` .html ` instead of ` .png ` .
271+ - If your datasets live elsewhere, create a symlink to the data root (for example, ` ln -s /path/to/dataset_ES dataset_ES ` ).
272+
238273---
239274
240275## Citation
0 commit comments