alignn icon indicating copy to clipboard operation
alignn copied to clipboard

use_canonize for inference through pretrained.py

Open ironhammer269 opened this issue 10 months ago • 1 comments

pretrained.py calls following : g, lg = Graph.atom_dgl_multigraph( atoms, cutoff=float(cutoff), max_neighbors=max_neighbors, )

This uses the default value of use_canonize = False, which is not necessarly the value which was used for training. From my testing, changing this value for inference greatly influences results (tested on jv_formation_energy_peratom_alignn with POSCAR files from the sample_data folder).

Typically, running the following : python pretrained.py --model_name jv_formation_energy_peratom_alignn --file_format poscar --file_path .\examples\sample_data\POSCAR-JVASP-107772.vasp gives 0.003147430717945099 if use_canonize = False (default behaviour). gives -5.2578747272491455e-05 if use_canonize = True

This difference is not huge but seems to be greatly increased when batching mutliple files for inference (my own implementation).

From these results, my guess is that one would want this variable to be stored in the model parameters, rather than called upon training/inference.

Are these normal results ? What is the physical/mathematical meaning of this variable ?

ironhammer269 avatar Apr 10 '24 06:04 ironhammer269

You are right @ironhammer269 We have made use_canonize as True now as it should be.

knc6 avatar Apr 14 '24 14:04 knc6