File size: 2,035 Bytes
fccc139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
tags:
- chemistry
---

## Description

VSCF MLFF is the code repository for the paper "Интерполяция ППЭ с помощью машинного обучения для ускорения расчётов негармонических частот колебаний молекул".

You can find here these files

- `compare_models.py` -- script for comparing SchNet and DimeNetPlusPLus models for PES predicting
- `train.py` -- script for training the model
- `example_plot.py` -- script, which makes example plots by statistics emitted by `train.py` file with `_metrics.pkl` suffix
- `example_eval.py` -- script, which evaluates model for the PES of water molecule, using model emittet by `train.py` script, and fills GAMESS-US input template with it.
- `utils_data.py` and `utils_model.py` -- libraries with functions commonly used by scripts from this repository

## Usage

### `compare_models.py` 
  
#### `python compare_models.py <filename> <model>`
  
- `filename` trajectory file emitted by `xtb` program
- `model` `SchNet` or `DimeNet`

### `train.py`

#### `python train.py [--normalize] [--pretrain] [--loss_k <float>] <loss_mode> <checkpoint_prefix> <data_filename>`

- `normalize` -- normalize the target (can only be used with loss_mode=mae)
- `pretrain` -- add pretraining stage in addition to the finetuing stage
- `loss_k` -- `k` coefficient for adaptive loss (can only be used for adaptive loss)
- `loss_mode` -- `mae` or `adaptive`
- `checkpoint_prefix` -- prefix for checkpoint files
- `data_filename` -- file name of the dataset of molecular VSCF grids

###  `example_plot.py`

#### `python example_plot.py pickle_file`

- `pickle_file` -- path to the `*_metrics.pkl` file

###  `example_dara.py`

#### `python example_plot.py [--denormalize] <model_filename> <data_filename>`

- `denormalize` -- denormalize the target (use if your model if trained with `--normalize`)
- `model_filename` -- path to the model checkpoint file
- `data_filename` -- file name of the dataset of molecular VSCF grids