usnistgov / alignn

Atomistic Line Graph Neural Network https://scholar.google.com/citations?user=9Q-tNnwAAAAJ&hl=en https://www.youtube.com/watch?v=WYePjZMzx3M
https://jarvis.nist.gov/jalignn/
Other
235 stars 84 forks source link

use_canonize for inference through pretrained.py #148

Open ironhammer269 opened 7 months ago

ironhammer269 commented 7 months ago

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 ?

knc6 commented 7 months ago

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