Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct an small error in the doc #9

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion docs/run_model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,29 @@ After the installation, the command line script :bash:`pet_run` is available, an

.. code-block:: bash

$ pet_run <structures_path> <path_to_calc_folder> <checkpoint> <n_aug> <default_hypers_path> <batch_size> --path_save_predictions=<your_path>
$ pet_run <structures_path> <path_to_calc_folder> <checkpoint> <n_aug> <batch_size> --path_save_predictions=<your_path>


where the positional arguments are:

#. `structures_path`: Path to an xyz file with structures
#. `path_to_calc_folder` : Path to a folder with a model to use
#. `checkpoint`: checkpoint filename header.
The full checkpoint filename will be `path_to_calc_folder+checkpoint+_state_dict`
#. `n_aug`: A number of rotational augmentations to use.
It should be a positive integer or -1.
If -1, the initial coordinate system will be used, not a single random one, as in the n_aug = 1 case
#. `batch_size`: Batch size to use for inference.
It should be a positive integer or -1.
If -1, it will be set to the value used for fitting the provided model.

While the other options are:

* `-h, --help`: it shows the help message and exit
* `--path_save_predictions PATH_SAVE_PREDICTIONS`:
Path to a folder where to save predictions.
* `--verbose`: It shows more details
* `--dtype DTYPE`: dtype to be used; one of 'float16', 'bfloat16', 'float32'.

Structures should be formatted in the same way as training and validation ones, as discussed in the "train model" section. The Calc folder is a path to a folder with checkpoints which is created by the "train_model.py" script. <checkpoint> refers to a specific checkpoint to be used. PET saves several checkpoints, such as the one with the best MAE in energies on validation or the best RMSE in forces on validation, which can happen on distinct epochs. Run :code:`python3 estimate_error.py --help` to see the full list. <n_aug> is a number of rotational augmentations during inference. Finally, one can optionally specify the path where predicted energies and forces are to be saved as numpy (.npy) arrays.

Expand Down
2 changes: 1 addition & 1 deletion example/readme.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pet_train methane_train.xyz methane_val.xyz hypers.yaml ../default_hypers/default_hypers.yaml demonstration

pet_run methane_test.xyz results/demonstration_continuation_0 best_val_mae_energies_model 1 1000 --verbose
pet_run methane_test.xyz results/demonstration_continuation_0 best_val_mae_energies_model 1 1000 --verbose
Loading