From c2b560c8b79baf7c25c223b2dcee85749deb685d Mon Sep 17 00:00:00 2001 From: DavideTisi Date: Thu, 2 May 2024 19:29:08 +0200 Subject: [PATCH 1/2] added a newline to readme.txt in example corrected the run_pet docs --- docs/run_model.rst | 23 ++++++++++++++++++++++- example/readme.txt | 2 +- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/docs/run_model.rst b/docs/run_model.rst index 37385fd..401f407 100644 --- a/docs/run_model.rst +++ b/docs/run_model.rst @@ -5,7 +5,28 @@ After the installation, the command line script :bash:`pet_run` is available, an .. code-block:: bash - $ pet_run --path_save_predictions= + $ pet_run --path_save_predictions= + + +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 +#. 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. 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. 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. diff --git a/example/readme.txt b/example/readme.txt index fadfedc..ab57267 100644 --- a/example/readme.txt +++ b/example/readme.txt @@ -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 \ No newline at end of file +pet_run methane_test.xyz results/demonstration_continuation_0 best_val_mae_energies_model 1 1000 --verbose From 30fde2c1012a71efaf7a55e1dcce8fcb95b10f5f Mon Sep 17 00:00:00 2001 From: DavideTisi Date: Thu, 2 May 2024 19:42:54 +0200 Subject: [PATCH 2/2] complete doc --- docs/run_model.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/run_model.rst b/docs/run_model.rst index 401f407..f8a288d 100644 --- a/docs/run_model.rst +++ b/docs/run_model.rst @@ -10,13 +10,14 @@ After the installation, the command line script :bash:`pet_run` is available, an 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 -#. n_aug: A number of rotational augmentations to use. +#. `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. +#. `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.