Atomic Graph ATtention networks for predicting atomic energies and forces.
Project description
AGAT (Atomic Graph ATtention networks)
Installation
Install with conda environment
- Create a new environment
conda create -n agat python==3.10
- Activate the environment
conda activate agat
- Install package
pip install agat
- Install dgl.
Please navigate to the Get Started page of dgl. For example:
conda install -c dglteam/label/cu118 dgl
- Change dgl backend to
tensorflow
.
Using AGAT
The documentation of AGAT API is available.
Quick start
Prepare VASP calculations
Collect paths of VASP calculations
- We provided examples of VASP outputs at VASP_calculations_example.
- Find all directories containing
OUTCAR
file:find . -name OUTCAR > paths.log
- Remove the string 'OUTCAR' in
paths.log
.sed -i 's/OUTCAR$//g' paths.log
- Specify the absolute paths in
paths.log
.sed -i "s#^.#${PWD}#g" paths.log
Build database
from agat.data import AgatDatabase
if __name__ == '__main__':
ad = AgatDatabase(mode_of_NN='ase_dist', num_of_cores=2)
ad.build()
Train AGAT model
from agat.model import Train
at = Train()
at.fit_energy_model()
at.fit_force_model()
Model prediction
from agat.app import GatApp
energy_model_save_dir = os.path.join('out_file', 'energy_ckpt')
force_model_save_dir = os.path.join('out_file', 'force_ckpt')
graph_build_scheme_dir = 'dataset'
app = GatApp(energy_model_save_dir, force_model_save_dir, graph_build_scheme_dir)
graph, info = app.get_graph('POSCAR')
energy = app.get_energy(graph)
forces = app.get_forces(graph)
Geometry optimization
from ase.io import read
from ase.optimize import BFGS
from agat.app import GatAseCalculator
from agat.default_parameters import default_hp_config
poscar = read('POSCAR')
calculator=GatAseCalculator(energy_model_save_dir,
force_model_save_dir,
graph_build_scheme_dir)
poscar = Atoms(poscar, calculator=calculator)
dyn = BFGS(poscar, trajectory='test.traj')
dyn.run(**default_hp_config['opt_config'])
Change log
Please check Change_log.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
agat-7.12.1.tar.gz
(58.5 kB
view details)
Built Distribution
agat-7.12.1-py3-none-any.whl
(62.7 kB
view details)
File details
Details for the file agat-7.12.1.tar.gz
.
File metadata
- Download URL: agat-7.12.1.tar.gz
- Upload date:
- Size: 58.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41dc4337e61097dc5a4e4030644597f5ee3c258e174a5dfe934a2687699a9d3e |
|
MD5 | fde3296b4d930f35e56b3ae5dd3e9bc3 |
|
BLAKE2b-256 | 86c1ff062e174be16a8f47b1f1766a17a1e2ab9bf12651cca0e3ff021797b271 |
File details
Details for the file agat-7.12.1-py3-none-any.whl
.
File metadata
- Download URL: agat-7.12.1-py3-none-any.whl
- Upload date:
- Size: 62.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e2a2c535c80667f529efc9cc50807155b189ea5a58e71d2ed3bc34ffc507168 |
|
MD5 | 1f4a0c00fcad4ac2a5086f9154b64608 |
|
BLAKE2b-256 | adc4bc36b19f3a4575c3104456209755d2655dc6d35d1d472ed5c13a8a9a24ca |